Repository navigation
[Fix] Refuse to overwrite an existing engagement during creation - #769
rudycelekli wants to merge 2 commits into
Conversation
|
Good — One portability concern: Also, |
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
|
Confirmed sequential |
Summary
Calling create twice with the same name currently silently resets persisted engagement metadata and run history. Stage the complete initial document and publish it with a same-filesystem hard link, which atomically fails with FileExistsError if the name already exists. This also protects concurrent creators. get_or_create remains the explicit reuse path. The project targets Linux/macOS; publication requires a filesystem supporting hard links.
Reproduction and verification
A saved engagement with scope exclusions and run history remains byte-for-byte identical after a rejected duplicate create; get_or_create reuses it. A deterministic two-thread barrier proves exactly one concurrent creator succeeds, the winning document loads intact, and staging directories are cleaned.
ef5334f8d37e5be2eecbf56e334f5e3f0f6817ec: persistent before log records the failure.2 passed in 0.03s.make checkon this branch: ruff gate passes;280 passed in 3.58s.Type of change
Checklist
[Fix]make checklocallyCombined batch validation
The exact clean integration
52e549a68214d81ed2f5dad0130a241aeeb14375containing all 20 independent fixes passedmake check: 401 tests passed, full required Ruff gate, and catalog/taxonomy conformance. Individual branch results above are separate from this combined result. Overlapping configuration hunks were combined preserving atomic persistence, error handling, shape validation and UTF-8 encodings. No production state, external security scans or paid model calls were used. GitHub CI will run separately after publication.