| bump | patch |
|---|---|
| type | Fixed |
- Serialize the create-issue audit state owner's writes so concurrent invocations cannot corrupt the record.
scripts/issue-audit-state.pynow wraps every mutating subcommand in an exclusive-create sentinel critical section (a.lockfile beside the state document, created withos.O_CREAT | os.O_EXCL), so two concurrent invocations for the same slug produce a document reflecting one of them entirely and then the other, never a mixture.save_stateobtains a unique per-writer temporary path fromtempfile.mkstemp(retaining the.json.tmpsuffix) and retriesos.replaceoverPermissionError, so two writers never share and truncate one temporary file. Read-only subcommands (query-*,emit-body,check-claim-staleness) acquire no sentinel and stay unserialized; an abandoned sentinel is recovered by age. A new fail-closed transitive call-graph check inlib/test/check-audit-lifecycle-contracts.pyprovessave_stateis unreachable from every read-only-classified subcommand. The mechanism is standard-library only (nofcntl/msvcrt), adds no state-document field, and produces no new mutation-exit class — every section failure is acould not persist state to …condition the shipped routing already carries. The decision channel (next_call=/query-*) remains unserialized, and its non-authoritative-under-concurrency residual is stated indocs/DEVFLOW_SYSTEM_OVERVIEW.md§11. (#1045) - #1004 migration note. This change adds two test-only environment variables in the frozen
DEVFLOW_namespace —DEVFLOW_IAS_ACQUIRE_WINDOW_SandDEVFLOW_IAS_STALE_AFTER_S— which the Tier-3 env-var rename (#1004) must migrate alongside the existingDEVFLOW_*members. (#1045)