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.

Think
532m
Plan
515m
Build
7m
Verify
7m

Assertion ledger

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

IDSaysMatcher
A001Session file creation test always verifies the file exists, even in CIverifiedfail
A002Session timestamp test always checks the written valueverifiedok
A003Session file deletion test always verifies the file was removedverifiedok
A004Provided timestamp test always asserts the exact timestamp valueverifiedok
A005Corrupted session file test always verifies fallback and cleanupverifiedok
A006Existing slug test always verifies session file was not consumedverifiedok
A007No session test silently skips when the agent PID is unavailableverifiedok
A008Parse timing test visibly skips instead of phantom-passing when no files existverifiedok

Findings 5 total

obspackages/cli/tests/commands/work-ci-mocked.test.tsmonitor
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
obsclosed
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.tsscope
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.tsacknowledge
A002 and A004 are semantically identical tests — both create session file with known timestamp, call startWork, assert saves.work_started_at equals that timestamp
obsclosed
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