Repository navigation
Remove duplicate host and runtime tests and test-only exports - #4376
Merged
Merged
Conversation
Remove host daemon, agent runtime, watcher, workspace and bridge tests
that duplicate a stronger test of the same behavior, test a helper
directly and again through its real caller, or assert values they
supply themselves.
- Host file reads: drop dispatch-layer copies of the host-files handler
tests. The handler's relative-path test now pins the error code and
message.
- Watcher: drop the env-gated recovery count harness. Its assertions
restated its own constants.
- Plugin host: drop a test that called the shared env sanitizer directly
instead of going through PluginHostManager.
- Agent runtime: drop archived-session, stale-steer and per-provider-id
registry tests that the recovery, input-accepted and registry suites
already cover. Fold the scripted approval directive suite into the
interactive-requests tests, and pin the full approval payload (reason,
cwd, actions) that reaches the user.
- Workspace: drop mocked gh "no PR" and "not installed" cases, which
real-process tests already cover, and the provisioned-workspace
delegation test, which the integration smoke covers.
- Server move: drop rewriteManagedConfigServer cases that the
server-moved service tests assert exactly.
- Skill staging: drop the nondeterministic concurrent-staging twin.
- Path listing: run the excluded-names and deep-directory tests through
listWorkspacePaths and stop exporting listPathsRecursively. The
dispatch list_paths test now covers a nested directory's name.
- ACP bridge: drop the Electron env test covered by its superset, and
make the superset fail on the wrong value instead of timing out.
- Bridge protocol:
- Drop a restated notification-method constant test.
- Test diffCumulativeText only through the assembler and stop
exporting it. Remove its redundant first-snapshot branch, because
the append branch already handles an empty previous snapshot. Add
empty-snapshot and first-snapshot no-reset checks to the assembler
test.
- Drop coverage-only tests for sendJsonRpc and toJsonRpcMessage.
Inline sendJsonRpc and stop exporting toJsonRpcMessage.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
SawyerHood
force-pushed
the
bb/test-audit-host-thr_s3kmw74uzx
branch
from
September 25, 2026 22:27
9f9aca5 to
c1a9824
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Host and runtime tests covered the same contracts at two layers. Examples:
workspace-dispatchtests that were exact twins of thehost-fileshandler tests;managed-configtests repeated by the server-move service tests.Others tested a shared helper instead of their subject: the plugin-host env test called the
process-utilssanitizer directly and never touchedPluginHostManager. Two could not detect their bug:A few tests kept exports alive only for themselves:
listPathsRecursively,diffCumulativeText,sendJsonRpcandtoJsonRpcMessage.What changed
Found by a read-only test audit using the repo
test-auditskill (#4361).runtime.fake-approvals.test.tsdeleted: its unique assertions move intoruntime.interactive-requests.test.ts, which now asserts the full command approval payload (reason, cwd, actions).listPathsRecursively: its depth and exclusion cases now run throughlistWorkspacePaths, and the function is no longer exported. The dispatch test lists a nested directory.diffCumulativeText: its tests fold into the assembler test, and it is no longer exported.sendJsonRpc: inlined intosendJsonRpcRequest.toJsonRpcMessageis no longer exported.Production +4/−15, tests +176/−1080.
How you verified
pnpm exec turbo run test lint typecheckis green across host-daemon, agent-runtime, host-watcher, host-workspace, provider-bridge-acp, provider-bridge-protocol and provider-parity.command-discoverytests that fail on this machine when/tmp/.agentsexists; they pass withTMPDIR=/var/tmp/....environment-actions: 5/5.test:integration: only the two real-Codex tests that also fail on base.@get-bb/plugin-sdkin both trees:dist/andbundled-types/are byte-identical.🤖 Generated with Claude Code