Fix test behavioral coverage gaps

Two tests pass but don't prove what they claim. One has dead logic that duplicates another assertion. One tests a trivially true property of a pure function instead of the actual behavioral guard it's named after. These create false confidence — the test suite reports green but the claimed behavior is unexercised. Fix both so the assertions match their intent.

verdict PASSscore 10 / 10findings 4 (1 risk · 0 debt · 3 obs)duration 28mrejection cycles 0shipped May 21, 2026surface cli

Pipeline timeline

Intent to proven code in 28m across Think, Plan, Build, and Verify.

Think
4m
Plan
6m
Build
5m
Verify
5m

Assertion ledger

10 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001The dead ternary line is removed from the doctor scaffold testverifiedok
A002The doctor test still verifies deployment is listed as a scaffold defaultverifiedok
A003The doctor test still verifies troubleshooting is listed as a scaffold defaultverifiedok
A004An entry with an existing surface is not overwritten during backfillverifiedok
A005The backfill guard test uses a surface mismatch to prove the guard worksverifiedok
A006The backfill guard test does not skip the backfill loop via migration markerverifiedok
A007The replacement test carries the A021 contract tagverifiedok
A008The trivial deriveSurface idempotency test is removedverifiedok

Findings 4 total

riskpackages/cli/src/commands/work.tsclosed
Backfill guard treats empty string surface as 'no surface' — !'' is truthy in JS, so surface: '' would be overwritten during backfill
obspackages/cli/tests/commands/work.test.tsclosed
New backfill guard test doesn't verify the negative case — no test for what happens if surface is removed from the guard condition
obsclosed
Proof context finding surface-awareness-bridge-C1 directly resolved by this build — trivial idempotency test replaced with behavioral backfill guard test
obsclosed
Proof context finding add-doctor-command-C2 directly resolved by this build — dead ternary logic removed from A022 test

Integrity seal

scopesha256:25f3647eb8f07...
contractsha256:1f32c2f4922e2...
plansha256:534b3ea105671...
specsha256:fab8cee104766...
build-reportsha256:d38a921e89aab...
build-datasha256:875737dc24d0f...
verify-reportsha256:39a86d0815c22...
verify-datasha256:f442747e420e1...
audit cmd$ ana proof audit fix-test-behavioral-coverage   → all hashes match