S00-014: Approve runner cleanup idempotence after independent lifecycle checks

Changes: Accept the bounded S00-014 cleanup correction and record independent QA evidence and handoff; no reviewer source changes.
Validation: Four focused signal/descendant tests and make check passed (72 tests); prior function independently fails the injected repeated-signal regression in memory. Inspected executor patch/message and scope; git diff --check passed. Natural EPERM, Windows and parent-task acceptance are not claimed.

Task: S00-014
Agent: auto-qa-0c2d58e2382e
Role: qa
Action: review
Status: done

Task title: Fix repeated runner cleanup after a submitted parent is reaped
This commit is contained in:
wt committed 2026-10-15 01:48:36 +07:00
1 parent 7a737eeb49
commit bdfde480d4
7 files changed
+76 -19

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
# Матрица задач
Generated; state revision **21**. Canonical status: state/tasks.json.
Generated; state revision **22**. Canonical status: state/tasks.json.
| ID | Этап | Оператор | Reviewer | Статус | Owner | Зависимости | Задача |
| --- | --- | --- | --- | --- | --- | --- | --- |
@@ -14,9 +14,9 @@ Generated; state revision **21**. Canonical status: state/tasks.json.
| [S00-008](tasks/S00-008.md) | S00 | ci-cd | qa | todo | | S00-003, S00-004 | Описать WSS/upload/TURN/push topology |
| [S00-009](tasks/S00-009.md) | S00 | orchestrator | security | todo | | S00-003, S00-004, S00-005, S00-006, S00-007, S00-008 | Согласовать результаты spikes |
| [S00-011](tasks/S00-011.md) | S00 | ci-cd | security | done | auto-ci-cd-d105e8027730 | S00-001 | Restore verified npm registry access for the stack spike |
| [S00-012](tasks/S00-012.md) | S00 | ci-cd | qa | blocked | auto-ci-cd-28868645424b | S00-001, S00-011, S00-013, S00-014 | Fix runner prompt delivery after partial stdin timeout |
| [S00-012](tasks/S00-012.md) | S00 | ci-cd | qa | todo | | S00-001, S00-011, S00-013, S00-014 | Fix runner prompt delivery after partial stdin timeout |
| [S00-013](tasks/S00-013.md) | S00 | ci-cd | qa | done | auto-ci-cd-5f68f03dd33b | S00-001, S00-011 | Bound oversized S21-006 runner context without truncating requirements |
| [S00-014](tasks/S00-014.md) | S00 | ci-cd | qa | review | auto-ci-cd-14343249da62 | S00-001, S00-011, S00-013 | Fix repeated runner cleanup after a submitted parent is reaped |
| [S00-014](tasks/S00-014.md) | S00 | ci-cd | qa | done | auto-ci-cd-14343249da62 | S00-001, S00-011, S00-013 | Fix repeated runner cleanup after a submitted parent is reaped |
| [S00-010](tasks/S00-010.md) | S00 | qa | orchestrator | todo | | S00-001, S00-002, S00-003, S00-004, S00-005, S00-006, S00-007, S00-008, S00-009 | Gate: Профиль и проверка стека |
| [S01-001](tasks/S01-001.md) | S01 | orchestrator | security | todo | | S00-010 | Описать identity/model contracts |
| [S01-002](tasks/S01-002.md) | S01 | orchestrator | security | todo | | S00-010, S01-001 | Описать async account context |
+2 -2
View File
@@ -16,9 +16,9 @@
- [S00-008](../tasks/S00-008.md): Описать WSS/upload/TURN/push topology — ci-cd; todo.
- [S00-009](../tasks/S00-009.md): Согласовать результаты spikes — orchestrator; todo.
- [S00-011](../tasks/S00-011.md): Restore verified npm registry access for the stack spike — ci-cd; done.
- [S00-012](../tasks/S00-012.md): Fix runner prompt delivery after partial stdin timeout — ci-cd; blocked.
- [S00-012](../tasks/S00-012.md): Fix runner prompt delivery after partial stdin timeout — ci-cd; todo.
- [S00-013](../tasks/S00-013.md): Bound oversized S21-006 runner context without truncating requirements — ci-cd; done.
- [S00-014](../tasks/S00-014.md): Fix repeated runner cleanup after a submitted parent is reaped — ci-cd; review.
- [S00-014](../tasks/S00-014.md): Fix repeated runner cleanup after a submitted parent is reaped — ci-cd; done.
- [S00-010](../tasks/S00-010.md): Gate: Профиль и проверка стека — qa; todo.
## Граница этапа
+2 -2
View File
@@ -9,9 +9,9 @@ S00-007,S00,security,orchestrator,todo,,"S00-004, S00-005",Утвердить pa
S00-008,S00,ci-cd,qa,todo,,"S00-003, S00-004",Описать WSS/upload/TURN/push topology
S00-009,S00,orchestrator,security,todo,,"S00-003, S00-004, S00-005, S00-006, S00-007, S00-008",Согласовать результаты spikes
S00-011,S00,ci-cd,security,done,auto-ci-cd-d105e8027730,S00-001,Restore verified npm registry access for the stack spike
S00-012,S00,ci-cd,qa,blocked,auto-ci-cd-28868645424b,"S00-001, S00-011, S00-013, S00-014",Fix runner prompt delivery after partial stdin timeout
S00-012,S00,ci-cd,qa,todo,,"S00-001, S00-011, S00-013, S00-014",Fix runner prompt delivery after partial stdin timeout
S00-013,S00,ci-cd,qa,done,auto-ci-cd-5f68f03dd33b,"S00-001, S00-011",Bound oversized S21-006 runner context without truncating requirements
S00-014,S00,ci-cd,qa,review,auto-ci-cd-14343249da62,"S00-001, S00-011, S00-013",Fix repeated runner cleanup after a submitted parent is reaped
S00-014,S00,ci-cd,qa,done,auto-ci-cd-14343249da62,"S00-001, S00-011, S00-013",Fix repeated runner cleanup after a submitted parent is reaped
S00-010,S00,qa,orchestrator,todo,,"S00-001, S00-002, S00-003, S00-004, S00-005, S00-006, S00-007, S00-008, S00-009",Gate: Профиль и проверка стека
S01-001,S01,orchestrator,security,todo,,S00-010,Описать identity/model contracts
S01-002,S01,orchestrator,security,todo,,"S00-010, S01-001",Описать async account context
1 id stage operator reviewer status owner depends_on title
9 S00-008 S00 ci-cd qa todo S00-003, S00-004 Описать WSS/upload/TURN/push topology
10 S00-009 S00 orchestrator security todo S00-003, S00-004, S00-005, S00-006, S00-007, S00-008 Согласовать результаты spikes
11 S00-011 S00 ci-cd security done auto-ci-cd-d105e8027730 S00-001 Restore verified npm registry access for the stack spike
12 S00-012 S00 ci-cd qa blocked todo auto-ci-cd-28868645424b S00-001, S00-011, S00-013, S00-014 Fix runner prompt delivery after partial stdin timeout
13 S00-013 S00 ci-cd qa done auto-ci-cd-5f68f03dd33b S00-001, S00-011 Bound oversized S21-006 runner context without truncating requirements
14 S00-014 S00 ci-cd qa review done auto-ci-cd-14343249da62 S00-001, S00-011, S00-013 Fix repeated runner cleanup after a submitted parent is reaped
15 S00-010 S00 qa orchestrator todo S00-001, S00-002, S00-003, S00-004, S00-005, S00-006, S00-007, S00-008, S00-009 Gate: Профиль и проверка стека
16 S01-001 S01 orchestrator security todo S00-010 Описать identity/model contracts
17 S01-002 S01 orchestrator security todo S00-010, S01-001 Описать async account context
@@ -0,0 +1,4 @@
Approve runner cleanup idempotence after independent lifecycle checks
Changes: Accept the bounded S00-014 cleanup correction and record independent QA evidence and handoff; no reviewer source changes.
Validation: Four focused signal/descendant tests and make check passed (72 tests); prior function independently fails the injected repeated-signal regression in memory. Inspected executor patch/message and scope; git diff --check passed. Natural EPERM, Windows and parent-task acceptance are not claimed.
+29
View File
@@ -0,0 +1,29 @@
# S00-014 independent QA review
Reviewer: auto-qa-0c2d58e2382e (qa).
Executor: auto-ci-cd-14343249da62 (ci-cd).
Date: 2026-10-15. Decision: approve the bounded repeated-cleanup correction.
Input: assigned card/context, master/startup/workflow instructions, exact NFR-007, executor evidence/handoff/message, S00-012 preserved evidence/handoff, blocker reports, accepted ADR 0000 and direct dependency evidence/reviews/handoffs. Output: independent acceptance report. No reviewer source changes.
## Findings against acceptance
1. The preserved real submit regression passes: a descendant first installs SIGTERM ignore and records readiness; the harness submits and sleeps. Runner stops the process group, retains review state, records no scope violation, and the descendant cannot write its delayed source file. No invalid escalation occurs.
2. The equivalent real timeout regression passes, prevents the delayed write and produces the expected blocked/remediation state. Initial cleanup retains SIGTERM followed by SIGKILL even when the parent has already exited. Both preserved subprocess tests were independently rerun.
3. Successful cleanup is recorded on the same Popen instance only after all existing termination steps succeed. The subsequent finally cleanup returns without signaling the reaped group again. PermissionError remains unsuppressed; the deterministic final-SIGKILL failure test confirms a failed attempt does not mark completion and a retry signals again. Existing stdin, deadline/transition monitoring, prompt budgets and scope behavior remain intact; their full-suite checks pass.
Examined executor commit 7a737eeb499c2e4551665747bddeaf78cb75aba1, both source patches, metadata diff, and commit message. Source changes are limited to scripts/runner.py and tests/tooling/test_automation.py; other changes are workflow/generated artifacts. The executor message matches the actual correction and tests and accurately distinguishes injected EPERM from a natural syscall reproduction. Initial working tree was clean. No acceptance defect or review blocker found.
## Actual independent checks
- `python3 scripts/tasks.py resume --agent auto-qa-0c2d58e2382e` and `show S00-014`: exit 0 each; empty owned list expected for reviewer, task in review with a different executor; no claim.
- `git log --all --oneline --grep='^S00-014:'`, `git show 7a737ee` scoped source and metadata sections, and initial `git status --short`: exit 0; patch/message reviewed and tree clean.
- `PYTHONPATH=tests/tooling python3 -m unittest test_automation.RunnerTests.test_completed_cleanup_does_not_signal_reaped_group_again test_automation.RunnerTests.test_failed_descendant_kill_is_not_marked_complete test_automation.RunnerTests.test_submit_transition_stops_source_writing_descendant test_automation.RunnerTests.test_timeout_stops_source_writing_descendant -v`: exit 0; four tests in 3.982s.
- Read-only in-memory Python check: extracted stop_process_tree from `git show 7a737ee^:scripts/runner.py` using AST, temporarily bound it in the test module, ran the deterministic completed-cleanup test and asserted its sole error was `PermissionError: Reaped process group inaccessible`; exit 0. No source edits or real EPERM claim. This independently confirms the regression fails against the prior function.
- `make check > /private/tmp/luma-S00-014-review-check.log 2>&1`: exit 0; 72 tests in 17.514s, validation of 279 tasks, 22 stages, 221 requirements and 211 allocated Web requirements. Includes complete delayed UTF-8/EOF delivery, timeout/transition, fresh sessions, scope, current prompt budgets and immutable snapshots.
- `git diff --check` and final pre-report `git status --short`: exit 0; no whitespace errors or source changes.
- Runtime observations: Python 3.9.6; macOS 27.0.1, build 26A434. No browser/server required for this tooling task.
## Limits and handoff
The original natural EPERM was not reproduced in this session; deterministic signal injection reproduces the repeated-signal failure. Windows cleanup and escaped process groups were not tested. Existing SIGKILL semantics are preserved; no permission bypass or process enumeration was added. No application, model, live provider, S00-012 or root S00-002 acceptance is claimed. Approval covers only S00-014. Coordinator must commit the review transition before launching a fresh process for the returned parent task; reviewer does not continue that work or mutate Git.
+2
View File
@@ -6,3 +6,5 @@ Result: successful stop_process_tree cleanup is recorded on the Popen object, pr
Ready for independent QA review. Inspect actual source diff and commit message; repeat make check and the two deterministic signal tests. Verify initial SIGTERM/final SIGKILL ordering, no repeated signaling after success, no suppression/marking on inaccessible live descendants, and both preserved real SIGTERM-ignoring descendant regressions. The natural prior EPERM did not recur in this fresh session; deterministic injected EPERM failed before the fix and passes after it. Do not describe it as a fresh real-syscall reproduction.
Focused checks: 4 tests passed, exit 0. make check: 72 tests passed in 17.247s, exit 0, including delayed UTF-8/EOF, deadline, transition, fresh sessions, scope and unchanged prompt budgets. Evidence: state/evidence/S00-014-auto-ci-cd-14343249da62.md. No blocker or app/parent-task acceptance claimed. Coordinator must commit implementation and launch a fresh QA reviewer; executor does not set done, continue S00-012, or mutate Git.
Independent QA review: auto-qa-0c2d58e2382e, 2026-10-15. Accepted the bounded repeated-cleanup correction; report: state/evidence/S00-014-review.md. Four focused tests and make check (72 tests in 17.514s) passed, exit 0. Independently confirmed the prior function fails the injected repeated-signal test in memory. No natural EPERM reproduction or parent-task acceptance claimed. No reviewer source changes or blocker. Coordinator must commit this review transition and launch a fresh process to continue S00-012.
+34 -12
View File
@@ -1,6 +1,6 @@
{
"schema_version": 1,
"revision": 21,
"revision": 22,
"tasks": {
"S00-001": {
"status": "done",
@@ -1136,19 +1136,17 @@
"completed_at": "2026-10-14T18:11:33+00:00"
},
"S00-012": {
"status": "blocked",
"owner": "auto-ci-cd-28868645424b",
"status": "todo",
"owner": null,
"external_wait": false,
"reason": "Submit-transition descendant regression fails: repeated stop_process_tree after parent reap raises EPERM at os.killpg; launch OSError handling then attempts invalid escalation from review state.",
"reason": null,
"started_at": "2026-10-14T18:42:03+00:00",
"updated_at": "2026-10-14T18:45:16+00:00",
"blocked_by": [
"S00-014"
],
"updated_at": "2026-10-14T18:48:36+00:00",
"blocked_by": [],
"resume_status": "in_progress",
"blocker_report": "state/blockers/S00-014.md",
"handoff": "state/handoffs/S00-012.md",
"previous_owner": "manual-ci-cd-stdin-20261015b",
"previous_owner": "auto-ci-cd-28868645424b",
"resumed_after_blocker": true
},
"S00-013": {
@@ -1165,14 +1163,17 @@
"completed_at": "2026-10-14T18:42:03+00:00"
},
"S00-014": {
"status": "review",
"status": "done",
"owner": "auto-ci-cd-14343249da62",
"external_wait": false,
"reason": null,
"started_at": "2026-10-14T18:45:17+00:00",
"updated_at": "2026-10-14T18:47:20+00:00",
"updated_at": "2026-10-14T18:48:36+00:00",
"evidence": "state/evidence/S00-014-auto-ci-cd-14343249da62.md",
"handoff": "state/handoffs/S00-014.md"
"handoff": "state/handoffs/S00-014.md",
"reviewer": "auto-qa-0c2d58e2382e",
"review_evidence": "state/evidence/S00-014-review.md",
"completed_at": "2026-10-14T18:48:36+00:00"
}
},
"events": [
@@ -1433,6 +1434,27 @@
"to": "review",
"reason": null,
"evidence": "state/evidence/S00-014-auto-ci-cd-14343249da62.md"
},
{
"revision": 22,
"at": "2026-10-14T18:48:36+00:00",
"action": "auto-unblock",
"task": "S00-012",
"resolved_by": "S00-014",
"to": "todo",
"fresh_agent_required": true
},
{
"revision": 22,
"at": "2026-10-14T18:48:36+00:00",
"action": "approve",
"task": "S00-014",
"agent": "auto-qa-0c2d58e2382e",
"role": "qa",
"from": "review",
"to": "done",
"reason": null,
"evidence": "state/evidence/S00-014-review.md"
}
],
"retired_agents": [