* test(httpapi): pin the startup event's capabilities and database source
TestStartupLines and TestStartupNamesTheDatabaseSource check the
event=startup line by substring, and neither reads its capabilities
field. A server could print one capability list and advertise another
on GET /v0/beads/context, or a new kind of database source could
relabel the line, and both tests would stay green.
TestStartupEventPublishesTheAdvertisedCapabilitiesAndSource parses the
line back into its fields and pins, for the provider and roles sources
with and without the external-dependency policy: the exact field
sequence, db=provider|roles, and a capabilities value equal to the
handshake's list joined with commas. It is a before-parity pin: a
future alternative source on the same server must leave this line
unchanged for the Issue API's two sources.
Test-only; no behavior change.
Agent-Signature: claude-code-claude-opus-5-5-unknown-reasoning on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(serve): pin ordinary-workspace bd serve under BD_GRAPH_MODE=dependency
bd reads no BD_GRAPH_MODE today. "dependency" names the format every
existing workspace already has, so any later reader of that variable
(a graph-mode serve dispatch, for example) has to keep serving an
ordinary workspace through runServe exactly as it does now. These
tests pin that before such a reader exists.
Each test runs bd serve twice in one workspace, once with the variable
unset and once with BD_GRAPH_MODE=dependency. It requires the
event=startup and event=limits lines to match byte for byte apart
from the ephemeral port, and the GET /v0/beads/context bodies to be
equal. Each run is also checked against what runServe builds: the
serveResolvedMode label, the db source, and a startup capabilities
field equal to the handshake's list. Two runs that were both routed
somewhere else therefore cannot pass by agreeing with each other.
- TestServeOrdinaryWorkspaceIgnoresGraphModeDependency: in-process
through rootCmd (PersistentPreRunE included), on the store source of
a registered-backend workspace. Runs in bd_test.
- TestServerModeServeIgnoresGraphModeDependency: a real bd on a
`bd init --server` workspace, which uses the provider source. Gated
on BEADS_TEST_PROXIED_SERVER like the other TestServerMode* tests,
and placed in the proxied 34-shard manifest by
gen_proxied_shard_manifest.py --write (incremental).
The new file is listed in cmd/bd/BUILD.bazel's bd_test srcs.
Test-only; no behavior change.
Agent-Signature: claude-code-claude-opus-5-5-unknown-reasoning on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(serve): stop the in-process graph-mode pin hanging when serve fails
serveInProcessSnapshot's cleanup decided whether the server was still
running by looking at rootCancel. That holds for a clean run, which
clears rootCancel in PersistentPostRunE. A run whose RunE returns an
error skips PersistentPostRunE, so rootCancel stays set even though the
main flow has already read the run's only result from done. The
cleanup then called rootCancel and blocked on done for good, and the
failure surfaced as a test-binary timeout panic that takes the whole
bd_test shard with it instead of a FAIL for this test.
The cleanup now keys on whether done has been read. A serve that binds,
answers, and then returns an error (one way a future graph-serve
dispatch could regress) now fails in about 5s with "bd serve returned
<err>, want a clean shutdown". A failure before done is read (a bad
GET, say) still cancels the server and waits for it.
Test-only; no behavior change.
Agent-Signature: claude-code-claude-opus-5-5-unknown-reasoning on behalf of Julian Knutsen
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>