Match pm-cli 2026.10.21 locking, mutation safety and read contracts

Merged
UN
2d ago
+4991-388

The native implementation was pinned to pm-cli 2026.10.19, leaving lock recovery, mutation admission and bounded reads behind current callers. This updates the locked oracle and compatibility constant to 2026.10.21 and implements the applicable October 20/21 behavior in Rust.

Dead same-host writers permit audited recovery before TTL expiry. Mutation decoding rejects unknown keys before storage access, and unsupported test execution options cannot edit linked tests. Assurance discovery and missing-ID refusals are bounded and read-only. List, context and dependency packets retain current ordering, cursors, rounding, literal arguments and explicit row facts. Oversized packets return replay-verified recovery advice. Plain-directory process acceptance preserves concurrent comments and chained history without Git.

The latest review asks to replace an explicit workspace directory in lock-conflict retries with its discovered tracker root. The pinned oracle preserves the literal supplied directory, so that requested change is refused. For example, supplying selected workspace yields --pm-path "selected workspace", while supplying selected workspace/.agents/pm retains that exact spelling. A valid unexpired owner receipt produces exit 4 in both cases.

ThreadDisposition
PRRT_kwDOTwgMRs6u3EZEEvidence-backed refusal: appending .agents/pm diverges from published pm-cli 2026.10.21. Native scope handling is preserved and guarded by a direct differential regression.

Self-review of the whole PR diff found an additional retry mismatch: native comment advice retained comment, while the oracle emits item comments. Advice now uses the canonical namespace, and native startup accepts and normalizes it so the advertised command can be replayed. Other refusal behavior is preserved.

The new differential exercises four path spellings with spaces (absolute and relative workspace/tracker), three scope aliases, and split/equals forms: 24 combinations. It compares recovery commands, argument arrays and examples against the pinned oracle, replays every advertised native retry under the held lock, and checks unchanged lock, item and history bytes without Git. The oracle-only JSON switch is removed from comparison because native comment refusals already emit JSON. A separate parser regression preserves literal comment whitespace.

Three isolated behavioral experiments fail at runtime with exit 101 after successful builds, restoring sources after each:

ExperimentRegression and observed failure
Revert only ownership_error_jsonexplicit_lock_retry_scopes_match_oracle: comment differs from oracle item comments.
Revert only native_argumentscanonical_comment_retry_arguments_are_accepted: the canonical retry is rejected as an invalid subcommand.
Apply the requested path expansion onlyexplicit_lock_retry_scopes_match_oracle: discovered tracker path differs from the supplied workspace.

Regression commands are cargo +1.90.0 test --locked --test parity_1021_contract explicit_lock_retry_scopes_match_oracle -- --nocapture and cargo +1.90.0 test --locked --bin pm-rust canonical_comment_retry_arguments_are_accepted -- --nocapture.

All three unchanged just release-check aggregates pass at source head 0029cf2e22e247b0cb806cf12a7dc6f022351482 in CI run 39641179755.

PlatformStable + instrumented testsLinesFunctionsRegionsBranches
Linux578 + 57814025/140251466/146623438/234383296/3296
macOS567 + 56713940/139401453/145323288/232883258/3258
Windows561 + 56113936/139361452/145223286/232863260/3260

Each aggregate executes 44 test binaries, with zero failed or ignored tests and exactly 100% in all four required coverage dimensions. Source scope and thresholds are unchanged. Formatting, strict Clippy, private-item documentation, identity, dependency audit, changelog and tracker health pass. The inherited allowed maintenance advisory remains unchanged.

All nine CI jobs and CodeQL pass. Standalone suites also pass Linux 578, macOS 567 and Windows 561 tests across 22 binaries each. Both targeted regressions pass directly and through the pm linked-test runner (one test each). The slower duplicate local aggregate was deliberately stopped after the full macOS CI pass; that interrupted run is not counted as passed or as a product failure. No local timeout is counted as passed evidence. No committed dist/ exists in this Rust repository.

Final pushed head 01879fb30d162ee249cbf2b86997d82475467fd7 adds only the validation receipt, pm item and appended history to the certified source head. Production, tests, build controls and gate thresholds are identical. Final-head identity audit passes 7 tests; the certification tracker-body check passes 1 test. Changelog regeneration/check and strict check-only tracker health pass with three existing advisories. Health omits full history drift and does not certify the older chains. The claim is released and the item remains in progress for orchestrator verification.

All review threads and every unresolved comment were fetched without pagination gaps. The latest substantive CodeRabbit body contains no Outside diff range findings. Threads have not been replied to or resolved.

Earlier review fixes protect lock identity during stale cleanup, release and failed initialization; durably persist recovery intent; inspect owner state once; normalize inverse blocker IDs; admit optional oracle absence correctly; and make the zero-wait test deterministic. Their thread mappings and revert proofs remain in docs/NATIVE_PARITY_2026_10_21.md and the tracker.

Identity guards narrow pathname replacement exposure under the existing gate lease; they do not claim atomic compare-and-unlink against arbitrary writers bypassing that lease. The existing full-history integrity investigation remains in pm-rust-b4yl; no history repair or re-anchoring was performed. Native linked-test execution and full assurance evaluation/writes remain outside the supported slice.

PM evidence: pm-rust-qhem. Oracle evidence, thread mappings and regression commands: docs/NATIVE_PARITY_2026_10_21.md.