Repository navigation
Conversation
|
|
Speaking as Kun's firstmate: first stamp vs tip HEAD contract-class: restore — extension sources already had a restart path; reclaim restores that path when a crashed run left a stale VISION (per-rule)
Waiting on you: (1) |
|
Speaking as Kun's firstmate: re-triage vs tip HEAD contract-class: restore — extension sources already had a restart path; reclaim restores that path when a crashed run left a stale VISION.md (per-rule)
Blocker: push a matching no-mistakes attestation on this head so NM goes green. CI already green; Greptile clean. Firstmate flag: no (author/NM blocker). |
Fixes kunchenguid#6173. Extension capture used O_CREAT|O_EXCL for <id>.runner; a crash left a residue that blocked every later start. Reclaim dead or empty residue under claim/lock safeguards, open existing paths with O_NONBLOCK so FIFO names cannot hang, and refuse live owners.
Do not treat a runner record as dead while its capture helper is still polling after the shell exits, so a new start cannot displace in-flight evidence collection.
1504e92 to
d1317ba
Compare
Intent
Fix issue #6173: extension process-event capture creates state/procevent/.runner with O_CREAT|O_EXCL; if a run dies before removing it every later start fails with 'cannot create .runner'. Add a reclaim path that replaces dead or empty residue only after claim/lock safeguards show the previous owner is gone, opens existing paths with O_NONBLOCK so a FIFO named like a runner cannot hang while holding the source lock, and still refuses live owners, malformed records and unsafe paths. Includes added empty/FIFO refusal coverage in tests/fm-extension-binding.test.sh.
What Changed
Risk Assessment
✅ Low: The bounded reclaim logic preserves claim and lock safeguards, refuses unsafe or live records, and protects in-flight capture from replacement.
Testing
Both targeted executable-interface segments passed against the real product after correcting fixture placement; logs capture reclaim, refusal, ownership, directory-swap and cleanup checks. No full suite or static analysis ran, and all disposable fixtures were removed.
Evidence: Runner lifecycle executable-interface evidence
Source: Runner lifecycle executable-interface evidence
Evidence: State boundaries and replacement cleanup evidence
Source: State boundaries and replacement cleanup evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 4 issues found → auto-fixed (2) ✅
tests/fm-extension-binding.test.sh:1373- The lifecycle-runner check blocked indefinitely at registration replacement while capture remained active; it required explicit termination. The targeted segment cannot complete as written.tests/fm-extension-binding.test.sh:1850- The new replacement-cleanup test creates its readiness marker with touch, but wait_for_file requires a nonempty file. It therefore always reports that polling did not start and cannot verify replacement preservation.tests/fm-extension-binding.test.sh:1637- The lifecycle-state segment fails because it expects 'cannot acquire source ownership' while the command reports 'cannot claim source'. A temporary diagnostic adjustment exposed a further failure: the overridden-state crash fixture did not create both expected reservations.FM_EXTENSION_BINDING_SEGMENT=lifecycle-runner bash tests/fm-extension-binding.test.shwith isolated TMPDIR; stopped blocked registration checkFM_EXTENSION_BINDING_SEGMENT=lifecycle-state bash tests/fm-extension-binding.test.shwith isolated TMPDIRTemporary focused executable-interface driver: remaining lifecycle-runner scenarios undertimeout 90Temporary lifecycle-state driver with diagnostic adjustment undertimeout 90Isolated replacement-cleanup block undertimeout 30Removed temporary driver and fixture directory; verified clean working tree🔧 Fix applied.
2 errors still open:
tests/fm-extension-binding.test.sh:1721- The lifecycle-state segment reproducibly fails when the registry directory is replaced during active capture. The real start command reports 'cannot establish the source launch boundary: registry-race-source', contradicting the test's expected successful descriptor-bound completion. Three runs failed at this boundary.FM_EXTENSION_BINDING_SEGMENT=lifecycle-runner timeout 240 bash tests/fm-extension-binding.test.shwith isolated evidence-directory TMPDIRFM_EXTENSION_BINDING_SEGMENT=lifecycle-state timeout 240 bash tests/fm-extension-binding.test.shtwice with isolated evidence-directory TMPDIRExecuted the existing three replacement-cleanup cases independently against the real Perl capture helperRepeated lifecycle-state with a temporary diagnostic driver printing the failing start command's outputRemoved temporary drivers and fixture directories; verified clean git status🔧 Fix applied.
✅ Re-checked - no issues remain.
FM_TEST_SKIP_ORPHAN_REAP=1 FM_EXTENSION_BINDING_SEGMENT=lifecycle-runner timeout 240 bash tests/fm-extension-binding.test.shFM_TEST_SKIP_ORPHAN_REAP=1 FM_EXTENSION_BINDING_SEGMENT=lifecycle-state timeout 240 bash tests/fm-extension-binding.test.shInitially ran both segments with workspace-local TMPDIR; package binding correctly refused fixtures inside Git. Reran successfully with TMPDIR under the permitted evidence directory.Inspected both evidence logs, verified fixture cleanup, and rangit status --short.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.