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.
Think1m
Plan8m
Build6m
Verify6m
Assertion ledger
8 claims, each independently verified.
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | Completing work with a malformed verify report triggers an UNKNOWN warning | verified | ok |
| A002 | The UNKNOWN warning tells the user to check the verify report | verified | ok |
| A003 | Work still completes successfully despite the UNKNOWN result | verified | ok |
| A004 | The proof chain entry records the result as UNKNOWN | verified | ok |
| A005 | A git conflict during pull causes the process to exit | verified | ok |
| A006 | The conflict error message tells the user about the conflict | verified | ok |
| A007 | The conflict error message instructs the user to resolve and retry | verified | ok |
| A008 | Both tests live in the existing work.test.ts file | verified | ok |
Findings 5 total
debtpackages/cli/tests/commands/work.test.ts→ closed
exitCalls count assertion uses toBeGreaterThan(0) instead of toBe(1)
debtpackages/cli/tests/commands/work.test.ts→ closed
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.ts→ closed
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.ts→ closed
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.ts→ monitor
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