Fix Conditional Test No-Ops
Fix 6 tests that silently pass as no-ops when `getAgentPid()` returns null. These tests call `getAgentPid()`, check if the result is null, and `return` — making the test pass without testing anything. In CI, in most dev environments, and in Codex sessions, the PID resolution fails because the process tree (agent → shell → node) doesn't exist. The test count (3132) includes phantom passes that don't verify behavior.
verdict PASSscore 11 / 12findings 5 (0 risk · 1 debt · 4 obs)duration 10h 3mrejection cycles 0shipped Jun 1, 2026surface cli
Pipeline timeline
Intent to proven code in 10h 3m across Think, Plan, Build, and Verify.
Think532m
Plan515m
Build7m
Verify7m
Assertion ledger
12 claims, each independently verified. Showing 8 — show all →
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | Session file creation test always verifies the file exists, even in CI | verified | fail |
| A002 | Session timestamp test always checks the written value | verified | ok |
| A003 | Session file deletion test always verifies the file was removed | verified | ok |
| A004 | Provided timestamp test always asserts the exact timestamp value | verified | ok |
| A005 | Corrupted session file test always verifies fallback and cleanup | verified | ok |
| A006 | Existing slug test always verifies session file was not consumed | verified | ok |
| A007 | No session test silently skips when the agent PID is unavailable | verified | ok |
| A008 | Parse timing test visibly skips instead of phantom-passing when no files exist | verified | ok |
Findings 5 total
obspackages/cli/tests/commands/work-ci-mocked.test.ts→ monitor
Duplicate @ana tags A001-A006 in work-ci-mocked.test.ts — old getAgentPid/conflict tests and new session tests share tag IDs from different contracts
obs→ closed
Spec claims 11 session tests but only 10 exist (3 in --session flag + 7 in session consumption) — spec miscounted
debtpackages/cli/tests/commands/work-ci-mocked.test.ts→ scope
createSessionTestProject helper is now triplicated — work.test.ts (removed), work-ci-mocked.test.ts (added), plus createMergedProject as similar pattern
obspackages/cli/tests/commands/work-ci-mocked.test.ts→ acknowledge
A002 and A004 are semantically identical tests — both create session file with known timestamp, call startWork, assert saves.work_started_at equals that timestamp
obs→ closed
capture-think-time-C1 finding ('8 tests potential no-ops') is directly resolved by this build — all PID-dependent tests now run with mocked PID unconditionally
Integrity seal
scopesha256:9530bcd188924...
contractsha256:fdcc70d7d3e4c...
plansha256:cd114adadd429...
specsha256:c0f8b9d397c0a...
build-reportsha256:e7d67afa85c8f...
build-datasha256:274d939e955c8...
verify-reportsha256:bea355dc7a51f...
verify-datasha256:0556c27f582a0...
audit cmd$ ana proof audit fix-conditional-test-noops → all hashes match