You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explicitly depends on #4262 (the interface), #4266 (CLI-subprocess driver), and #4267 (Agent-SDK driver) landing first — a parity/contract suite has nothing to compare until at least two real implementations of CodingAgentDriver exist. Its job is to prove #4266 and #4267 are actually interchangeable behind the shared interface (the property #4267's own deliverables and maintainer-only issue #2333 both depend on: "a caller... can swap this driver for the CLI-subprocess driver with no caller-side changes"), the same way test/contract/engine-parity.test.ts proves buildPredictedGateVerdict's re-export surface stays byte-identical to its engine source. This suite is NOT a golden-snapshot comparison the way that one is (a coding-agent driver's output is not deterministic byte-for-byte across implementations, or even across runs of the same implementation) — it's a behavioral contract suite: given the same fake/injected backend, do both drivers honor the same input shape, the same error-surfacing convention, the same result-shape guarantees.
Verify both drivers respect the same working-directory scoping (feat(miner-hands): git-worktree-per-attempt isolation primitive #4269's worktree allocator output) — neither implementation should be able to edit outside its assigned worktree, and the test suite should assert this rather than assume it.
A regression home for any interface-shape bug found post-hoc (mirroring how engine-parity.test.ts's header explains its golden-refresh workflow) — document how a future third driver implementation would plug into this same suite.
test/contract/engine-parity.test.ts:1-48 (existing parity-suite STYLE precedent — golden-snapshot based, not directly reusable but the closest existing "prove two things stay in sync" suite in this repo)
packages/gittensory-engine/package.json: "test": "npm run build && tsc -p tsconfig.test.json && node --test \"dist-test/**/*.test.js\"" (the engine package's own test runner, relevant if this suite is homed there instead of root vitest)
package.json: "test:engine-parity": "vitest run test/contract/engine-parity.test.ts" (the invocation pattern this new suite should follow for its own test:ci wiring)
Explicitly depends on #4262 (the interface), #4266 (CLI-subprocess driver), and #4267 (Agent-SDK driver) landing first — a parity/contract suite has nothing to compare until at least two real implementations of
CodingAgentDriverexist. Its job is to prove #4266 and #4267 are actually interchangeable behind the shared interface (the property #4267's own deliverables and maintainer-only issue #2333 both depend on: "a caller... can swap this driver for the CLI-subprocess driver with no caller-side changes"), the same waytest/contract/engine-parity.test.tsprovesbuildPredictedGateVerdict's re-export surface stays byte-identical to its engine source. This suite is NOT a golden-snapshot comparison the way that one is (a coding-agent driver's output is not deterministic byte-for-byte across implementations, or even across runs of the same implementation) — it's a behavioral contract suite: given the same fake/injected backend, do both drivers honor the same input shape, the same error-surfacing convention, the same result-shape guarantees.Deliverables
test/contract/alongside the existingengine-parity.test.ts/upstream-contract.test.ts, orpackages/gittensory-engine/test/using that package's ownnode --testrunner — pick based on where feat(miner-hands): define the CodingAgentDriver interface seam #4262's interface actually lands and which test runner can most easily inject both drivers' dependencies) that runs the SAME set of scenario fixtures against BOTH the CLI-subprocess driver (feat(miner-hands): CLI-subprocess CodingAgentDriver (reuse SpawnFn/redactSecrets/EFFORT_TIMEOUT_MS pattern) #4266, injected fakeSpawnFn) and the Agent-SDK driver (feat(miner-hands): Agent-SDK CodingAgentDriver (query() loop) #4267, injected fakequery()).engine-parity.test.ts's header explains its golden-refresh workflow) — document how a future third driver implementation would plug into this same suite.References
test/contract/engine-parity.test.ts:1-48(existing parity-suite STYLE precedent — golden-snapshot based, not directly reusable but the closest existing "prove two things stay in sync" suite in this repo)packages/gittensory-engine/package.json:"test": "npm run build && tsc -p tsconfig.test.json && node --test \"dist-test/**/*.test.js\""(the engine package's own test runner, relevant if this suite is homed there instead of root vitest)package.json:"test:engine-parity": "vitest run test/contract/engine-parity.test.ts"(the invocation pattern this new suite should follow for its owntest:ciwiring)