Phase 4A failure-injection evidenceΒΆ
Implementation SHA:
3c51950fb090475229f1206e685aaa59a9fe50a9Injection seam: private
FilesystemOSfacadeEvidence test:
tests/unit/test_atomic_failures.pyResult: 27 cases collected; 26 passed and the POSIX namespace-replacement case was skipped on Windows/Python 3.12
The facade wrapper raises one-shot FilesystemOperationError instances without
monkeypatching global filesystem functions. Except where the row says
PUBLISHED_DURABILITY_UNCERTAIN or CLEANUP_INCOMPLETE, the legal next action
is idempotent abort(), which was exercised and removed only the owned staging
name. No injected exception string or repr contained the supplied root,
destination, temporary name, source bytes, or staged bytes.
Injected point |
Actual state / outcome |
Destination and source |
Owned temporary |
Exception |
|---|---|---|---|---|
Capability probe unavailable |
|
absent; no source supplied |
never created |
|
Capability report lacks a required primitive |
|
absent; no source supplied |
never created |
|
Root open |
|
absent; no source supplied |
never created |
|
Parent traversal |
|
absent; nested parent unchanged |
never created |
|
Pre-mutation parent durability barrier |
|
absent; no source supplied |
never created |
represented by the |
Temporary creation |
|
absent; no source supplied |
creation refused; parent closed |
|
Existing-destination handle retention |
|
original bytes unchanged |
never created |
|
First write |
|
absent; no source supplied |
removed by abort |
|
Partial write followed by later failure |
|
absent; no source supplied; completed-chunk count remains zero |
removed by abort |
|
Interrupted write |
remains |
exact payload published |
promotion removes staging name |
interruption retried; no error escapes |
Zero-progress write |
|
absent; no source supplied |
removed by abort |
|
Userspace flush |
not applicable: facade uses unbuffered OS writes |
unchanged until commit |
still owned |
no weaker buffered path exists |
File fsync |
|
absent or original bytes unchanged; source unchanged |
removed by abort |
|
Temporary ownership revalidation |
|
absent or original bytes unchanged |
removed only if identity still matches |
|
Destination revalidation |
|
absent or original bytes unchanged; source unchanged |
removed by abort |
|
No-overwrite atomic promotion |
|
absent or concurrent winner unchanged |
removed by abort |
|
Overwrite atomic promotion |
|
original bytes unchanged; source unchanged |
removed by abort |
|
Simulated cross-device promotion |
|
absent; no source supplied |
removed by abort; no copy fallback |
|
Abort-time temporary unlink |
|
absent; no source supplied |
retained for explicit retry, then removed |
|
Abort-time owned-identity mismatch |
|
absent; no source supplied |
untrusted replacement not removed; one-shot facade retry cleans only the real fixture |
|
POSIX temporary pathname replacement |
|
destination absent |
attacker replacement preserved |
|
Post-publication directory durability barrier |
|
new destination retained; source unchanged |
closed; abort cannot remove destination |
|
Post-publication temporary-handle close |
|
new destination retained; source unchanged |
explicit abort retries close |
|
Post-publication destination-lease close |
|
replacement retained; source unchanged |
explicit abort retries retained-target close |
|
Post-publication parent-handle close |
|
new destination retained; source unchanged |
already promoted; explicit abort retries parent close |
|
Real namespace-race tests supplement the injected points:
a destination appearing after staging is preserved in both default and dual-authorized overwrite modes;
an initially existing destination that is replaced after staging is preserved and publication fails closed;
a POSIX staging pathname replacement is not deleted as owned;
Windows denies staging-name replacement while its no-share handle is open;
two synchronized processes race with no overwrite, producing one winner and one
OUTPUT_EXISTSloser with no staging-name leak.
The independent Deep Security Scan remains BLOCKED BY TOOLING FAILURE. It was not retried and this document is not a substitute for that scan.