work.ts untested branch coverage

Two proof findings (proof-health-v2-C12, proof-health-v2-C8) identify untested defensive branches in work.ts. The UNKNOWN verification result warning and the git pull conflict error path have zero test coverage. Both protect users from silent failures — a malformed verify report proceeding unnoticed, and a rebase conflict during completion losing work. The user wants regression tests for both paths.

verdict PASSscore 8 / 8findings 5 (0 risk · 2 debt · 3 obs)duration 29mrejection cycles 0shipped May 15, 2026surface cli

Pipeline timeline

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

Think
1m
Plan
8m
Build
6m
Verify
6m

Assertion ledger

8 claims, each independently verified.

IDSaysMatcher
A001Completing work with a malformed verify report triggers an UNKNOWN warningverifiedok
A002The UNKNOWN warning tells the user to check the verify reportverifiedok
A003Work still completes successfully despite the UNKNOWN resultverifiedok
A004The proof chain entry records the result as UNKNOWNverifiedok
A005A git conflict during pull causes the process to exitverifiedok
A006The conflict error message tells the user about the conflictverifiedok
A007The conflict error message instructs the user to resolve and retryverifiedok
A008Both tests live in the existing work.test.ts fileverifiedok

Findings 5 total

debtpackages/cli/tests/commands/work.test.tsclosed
exitCalls count assertion uses toBeGreaterThan(0) instead of toBe(1)
debtpackages/cli/tests/commands/work.test.tsclosed
Conflict test creates bareDir and cloneDir as siblings of tempDir — afterEach only cleans tempDir, so these directories leak on each test run
obspackages/cli/tests/commands/work.test.tsclosed
UNKNOWN test mocks process.exit as no-op, causing execution to pass through the early UNKNOWN guard at work.ts:1513 before reaching the target branch at work.ts:870 — exercises two exit points instead of isolating one
obspackages/cli/tests/commands/work.test.tsclosed
A003 assertion uses toBeDefined() for proof chain entry — matches contract 'exists' matcher but weaker than testing standards preference for specific value assertions
obspackages/cli/src/commands/work.tsmonitor
Two different result parsers with different casing: getVerifyResult returns 'unknown' (lowercase), parseResult in proofSummary returns 'UNKNOWN' (uppercase) — works correctly but fragile coupling between two parallel implementations

Integrity seal

scopesha256:48349541fd19b...
contractsha256:e165b52b403ed...
plansha256:3a044a88db21b...
specsha256:60fc33572c2c7...
build-reportsha256:ac772ea2cf222...
build-datasha256:d897213fdf908...
verify-reportsha256:fafe2712f4b75...
verify-datasha256:6925dc1c5a0de...
audit cmd$ ana proof audit work-ts-branch-coverage   → all hashes match