Problem
The duplicate-run guard (PR #757, issue #751) stores only a single record in .pdd/last_run.json. When a user runs multiple modules sequentially, each run overwrites the previous record:
pdd sync foo # records foo
pdd sync bar # overwrites with bar
pdd sync foo # NOT caught — foo record was lost
The third invocation is exactly the duplicate scenario the guard is meant to prevent, but it passes undetected.
Proposed fix
Store the last N records (e.g. last_runs.jsonl with rotation, or a dict keyed by subcommand + argv), so interleaved module runs don't evict each other's records. The original issue #751 suggested this approach.
Context
Discovered during E2E validation of PR #757. The guard works correctly for immediate back-to-back re-runs of the same command — this only affects interleaved workflows.
Problem
The duplicate-run guard (PR #757, issue #751) stores only a single record in
.pdd/last_run.json. When a user runs multiple modules sequentially, each run overwrites the previous record:The third invocation is exactly the duplicate scenario the guard is meant to prevent, but it passes undetected.
Proposed fix
Store the last N records (e.g.
last_runs.jsonlwith rotation, or a dict keyed bysubcommand + argv), so interleaved module runs don't evict each other's records. The original issue #751 suggested this approach.Context
Discovered during E2E validation of PR #757. The guard works correctly for immediate back-to-back re-runs of the same command — this only affects interleaved workflows.