feat: transactional fingerprints and deterministic mock validation (#1926, #1939)#1984
feat: transactional fingerprints and deterministic mock validation (#1926, #1939)#1984Serhan-Asad wants to merge 6 commits into
Conversation
|
Verification for commit
The host aggregate exposed the known nested-pytest |
|
Final readiness verification (2026-07-10):
No merge to |
Final verification (latest stacked head)Verified head:
This exact head is integrated into manager bundle PR #1998 at combined head |
…on (#1926) Introduces a single `FingerprintTransaction` context manager that enforces the 'artifact write ⇒ fingerprint write' invariant across all mutating PDD commands (sync, generate, update, auto-deps, fix, CI heal). Replaces scattered `save_fingerprint` call sites with one commit-or-fail code path featuring null-hash guards, atomic temp-file+rename persistence, and `FingerprintFinalizeError` propagation to Click (non-zero exit on failure). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37c0c7f to
2fd9d71
Compare
Codex review pass 1Reviewed full head SHA: Intent This PR consolidates the transactional-fingerprint work from #1926 and the deterministic mock-contract work from #1939: every mutating PDD command is meant to finalize a complete, non-null fingerprint atomically and fail the command if finalization is unsafe, while Failure modes
Performance I scanned the new validator and its agentic/fix call sites for unbounded loops, subprocess/network/disk I/O in hot paths, added complexity, allocations, and event-loop blocking. The only notable scaling cost is the deliberate repository-wide Focused verification completed: the 66 changed mock-contract/fingerprint tests passed; direct reproductions confirmed failure modes 2 and 3; changed production modules compile; Verdict: changes requested |
Codex review pass 1 remediationAddressed all three findings from the pass 1 review in commit
Also synchronized prompts, architecture metadata, and fingerprints. Verification:
|
Codex review pass 2Reviewed full head SHA: Intent This PR consolidates #1926 and #1939: all mutating PDD paths should finalize complete, non-null fingerprints through one atomic, fail-closed transaction, while Failure modes
Performance I scanned the complete validator/fingerprint diff and the remediated CI, pre-checkup, cleanup, and terminal-success call paths for unbounded loops, subprocess/network/disk I/O in hot paths, complexity changes, tight-loop allocations, lock contention, and event-loop blocking. The notable cost remains the synchronous repository-wide Focused verification completed: 31 remediation/mock-contract tests passed (484 deselected); direct reproductions confirmed all three failure modes; changed production modules compile; Verdict: changes requested |
Codex review pass 2 remediationAddressed all three findings from the pass 2 review in commit
Prompts, architecture metadata, and fingerprints were synchronized again. Verification:
|
Summary
This consolidates the full work from #1937 and the stacked #1939 follow-up into one
main-targeting PR.FingerprintTransactionfor fingerprint calculation, validation, serialization, and atomic persistence across every mutating PDD path.pddrcrootIssue #1926: transactional fingerprint finalization
pdd/fingerprint_transaction.pyFingerprintFinalizeErrorpropagationIssue #1939: deterministic schema/mock contract validation
MOCK_CONTRACT_DIVERGENCEfailures for real contradictionsVerification
fix_mainsource set: 51 passed, 2 skipped, 72% coveragegit diff --check: passedorigin/mainat49504fc9aCross-repository companion
The related app-page routing fix lives in a different repository and therefore remains a separate PR: promptdriven/pdd_cloud#3251.
Together these coordinated PRs address:
Closes #1926
Closes #1939
Related to promptdriven/pdd_cloud#3024