chore(epic): pipeline-contract 준비 결과를 검증한다
This commit is contained in:
parent
bdb39532ad
commit
18ee58b457
8 changed files with 20 additions and 19 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<!-- task=m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle plan=3 tag=API milestone-task=run-lifecycle -->
|
||||
<!-- task=m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle plan=3 tag=API milestone-task=run-lifecycle -->
|
||||
|
||||
# Code Review Reference - API
|
||||
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
## Overview
|
||||
|
||||
date=2026-08-09
|
||||
task=m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle, plan=3, tag=API
|
||||
task=m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle, plan=3, tag=API
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior artifacts: `agent-task/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/plan_cloud_G08_2.log` and `agent-task/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/code_review_cloud_G09_2.log` (generation 2 retains earlier history).
|
||||
- Prior artifacts: `agent-task/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/plan_cloud_G08_2.log` and `agent-task/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/code_review_cloud_G09_2.log` (generation 2 retains earlier history).
|
||||
- Review state: unimplemented, no official verdict, replaced through explicit plan `write` mode.
|
||||
- Self-review defects: the prior parent-owned `Popen` then `on_started` callback left a controller-crash window in which a caller could exist without a durable locator. It also promised arbitrary descendant verification although a portable POSIX harness can safely own only the caller's dedicated process group.
|
||||
- Scope carried forward: generic lifecycle/events, bounded capture, timeout/cancel races, predecessor resolution, and credential-free subprocess tests.
|
||||
|
|
@ -50,7 +50,7 @@ Review completion means the following steps are finished:
|
|||
|
||||
- [ ] Implement a registered supervisor that durably proves ownership before launching exactly one caller and performing exactly one harness-owned task submission, plus normalized event journal, bounded/redacted capture, and strict finish→idle→quiet completion policies.
|
||||
- [ ] Implement single-owner terminal arbitration, controller-loss handling, authenticated recovery, and bounded owned-process-group cleanup on success, failure, timeout, cancel, malformed events, and reader errors.
|
||||
- [ ] Resolve predecessor `01`, add deterministic registration/crash/race/orphan/redaction tests, and run focused, aggregate, and patch-integrity verification.
|
||||
- [ ] Resolve predecessors `01` and `02`, add deterministic registration/crash/race/orphan/redaction tests, and run focused, aggregate, and patch-integrity verification.
|
||||
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.
|
||||
|
||||
## Review-Only Checklist
|
||||
|
|
@ -64,7 +64,7 @@ Review completion means the following steps are finished:
|
|||
- [ ] Archive active plan to `plan_cloud_G08_3.log`.
|
||||
- [ ] Verify `.gitignore` managed rules unignore task markdown/logs and ignore `agent-roadmap/current.md`.
|
||||
- [ ] If PASS, write canonical `complete.log` and leave no active `.md` files.
|
||||
- [ ] If PASS, move to `agent-task/archive/YYYY/MM/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/` and update this checklist there.
|
||||
- [ ] If PASS, move to `agent-task/archive/YYYY/MM/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/` and update this checklist there.
|
||||
- [ ] If PASS, preserve/report `milestone-task=run-lifecycle` without directly changing roadmap.
|
||||
- [ ] If PASS for split work, remove empty parent or verify remaining sibling ownership.
|
||||
- [ ] If WARN/FAIL, write the next state and do not create `complete.log`.
|
||||
|
|
@ -79,6 +79,7 @@ _Record key design decisions here._
|
|||
|
||||
## Reviewer Checkpoints
|
||||
|
||||
- Exactly one completion record for each encoded predecessor (`01`, `02`) is resolved before implementation; predecessor `02` package exports are preserved when this packet updates `scripts/agent_benchmark/__init__.py`.
|
||||
- The controller launches only the internal supervisor first; the supervisor durably registers a private authenticated control endpoint, and the caller cannot start until `on_started` commits the locator and sends `START`.
|
||||
- Controller loss before `START` launches no caller; controller loss after `START` routes through the supervisor's bounded cleanup without persisting raw argv/environment.
|
||||
- Closed `argv_task`/`stdin_once` modes produce one harness-owned `submitted` event; caller output cannot synthesize it and no second harness input is accepted.
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<!-- task=m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle plan=3 tag=API milestone-task=run-lifecycle -->
|
||||
<!-- task=m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle plan=3 tag=API milestone-task=run-lifecycle -->
|
||||
|
||||
# Benchmark Run Lifecycle
|
||||
|
||||
## For the Implementing Agent
|
||||
|
||||
Filling the implementation-owned sections of `CODE_REVIEW-cloud-G09.md` is mandatory. Resolve predecessor `01`, run every verification command, paste actual output, and leave the active pair for official review. Do not finalize, archive, write `complete.log`, ask the user, or change predecessor ownership.
|
||||
Filling the implementation-owned sections of `CODE_REVIEW-cloud-G09.md` is mandatory. Resolve predecessors `01` and `02`, run every verification command, paste actual output, and leave the active pair for official review. Do not finalize, archive, write `complete.log`, ask the user, or change predecessor ownership.
|
||||
|
||||
## Background
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ Caller adapters need one generic, bounded subprocess lifecycle. This packet owns
|
|||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior artifacts: `agent-task/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/plan_cloud_G08_2.log` and `agent-task/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/code_review_cloud_G09_2.log` (generation 2 retains earlier history).
|
||||
- Prior artifacts: `agent-task/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/plan_cloud_G08_2.log` and `agent-task/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/code_review_cloud_G09_2.log` (generation 2 retains earlier history).
|
||||
- Review state: unimplemented, no official verdict, replaced through explicit plan `write` mode.
|
||||
- Self-review defects: the prior parent-owned `Popen` then `on_started` callback left a controller-crash window in which a caller could exist without a durable locator. It also promised arbitrary descendant verification although a portable POSIX harness can safely own only the caller's dedicated process group.
|
||||
- Scope carried forward: generic lifecycle/events, bounded capture, timeout/cancel races, predecessor resolution, and credential-free subprocess tests.
|
||||
|
|
@ -51,7 +51,7 @@ Caller adapters need one generic, bounded subprocess lifecycle. This packet owns
|
|||
### Verification Context
|
||||
|
||||
- Local Python 3.12.3/Linux arm64. Tests use real temporary subprocesses/process groups and deterministic event fixtures; no external provider/network/credential.
|
||||
- The `bench-01` lane and SDD gates are open. Predecessor `01` is not complete, so runtime scheduling must wait.
|
||||
- The `bench-01` lane and SDD gates are open. Predecessors `01` and `02` are not complete, so runtime scheduling must wait. Index `02` serializes the shared package-export write boundary and aggregate test discovery with this packet.
|
||||
- The lifecycle must be POSIX-safe for the current Linux/macOS benchmark target. Unsupported platforms fail before launch rather than weakening cleanup.
|
||||
|
||||
### Test Coverage Gaps
|
||||
|
|
@ -60,11 +60,11 @@ No current shared module proves durable registration before caller launch, exact
|
|||
|
||||
### Symbol References
|
||||
|
||||
Resolve the completed manifest's timeout types before implementation. The lifecycle accepts an immutable invocation specification plus parser/redactor hooks and must not import future caller adapters.
|
||||
Resolve the completed manifest's timeout types before implementation. Preserve the package exports produced by predecessor `02` when updating `scripts/agent_benchmark/__init__.py`. The lifecycle accepts an immutable invocation specification plus parser/redactor hooks and must not import future caller adapters.
|
||||
|
||||
### Split Judgment
|
||||
|
||||
Process state, event ordering, output readers, terminal arbitration, signals, and cleanup share one race-sensitive invariant. Splitting would allow success publication before cleanup, so the packet stays atomic.
|
||||
Process state, event ordering, output readers, terminal arbitration, signals, and cleanup share one race-sensitive invariant. Splitting would allow success publication before cleanup, so the packet stays atomic. Predecessor `01` supplies the manifest contract; predecessor `02` serializes the shared package export and aggregate discovery surfaces.
|
||||
|
||||
### Scope Rationale
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ Excluded: caller command construction/protocol parsing, workspace creation, atte
|
|||
|
||||
- [ ] Implement a registered supervisor that durably proves ownership before launching exactly one caller and performing exactly one harness-owned task submission, plus normalized event journal, bounded/redacted capture, and strict finish→idle→quiet completion policies.
|
||||
- [ ] Implement single-owner terminal arbitration, controller-loss handling, authenticated recovery, and bounded owned-process-group cleanup on success, failure, timeout, cancel, malformed events, and reader errors.
|
||||
- [ ] Resolve predecessor `01`, add deterministic registration/crash/race/orphan/redaction tests, and run focused, aggregate, and patch-integrity verification.
|
||||
- [ ] Resolve predecessors `01` and `02`, add deterministic registration/crash/race/orphan/redaction tests, and run focused, aggregate, and patch-integrity verification.
|
||||
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.
|
||||
|
||||
### [API-1] Execute one bounded invocation
|
||||
|
|
@ -152,10 +152,10 @@ assert not terminal.process_group_alive
|
|||
|
||||
## Dependencies and Execution Order
|
||||
|
||||
1. Required predecessor `01_benchmark_manifest` is encoded by `03+01_...`.
|
||||
2. No valid active/archive predecessor completion exists at planning time; runtime waits.
|
||||
3. Before implementation, require exactly one matching allowed completion record; missing/multiple matches fail closed.
|
||||
4. Resolve timeout/value symbols, implement API-1 and API-2 as one terminal invariant, then verify from a clean process state.
|
||||
1. Required predecessors `01_benchmark_manifest` and `02+01_isolated_workspace` are encoded by `03+01,02_...`.
|
||||
2. No valid active/archive predecessor completion exists for either index at planning time; runtime waits.
|
||||
3. Before implementation, require exactly one matching allowed completion record for each predecessor; missing/multiple matches fail closed.
|
||||
4. Resolve timeout/value symbols, preserve predecessor `02` package exports, implement API-1 and API-2 as one terminal invariant, then verify from a clean process state.
|
||||
|
||||
## Modified Files Summary
|
||||
|
||||
|
|
@ -164,12 +164,12 @@ assert not terminal.process_group_alive
|
|||
| `scripts/agent_benchmark/lifecycle.py` | API-1, API-2 |
|
||||
| `scripts/agent_benchmark/lifecycle_test.py` | API-2 |
|
||||
| `scripts/agent_benchmark/__init__.py` | API-1 |
|
||||
| `agent-task/m-agent-comparison-benchmark-pipeline/03+01_run_lifecycle/CODE_REVIEW-cloud-G09.md` | API-2 |
|
||||
| `agent-task/m-agent-comparison-benchmark-pipeline/03+01,02_run_lifecycle/CODE_REVIEW-cloud-G09.md` | API-2 |
|
||||
|
||||
## Final Verification
|
||||
|
||||
1. `python3 -c 'from pathlib import Path; g="m-agent-comparison-benchmark-pipeline"; ids=("01",); a=Path("agent-task")/g; r=Path("agent-task/archive"); found={i:sorted([*a.glob(f"{i}_*/complete.log"),*a.glob(f"{i}+*/complete.log"),*r.glob(f"*/*/{g}/{i}_*/complete.log"),*r.glob(f"*/*/{g}/{i}+*/complete.log")],key=str) for i in ids}; bad={i:[str(p) for p in ps] for i,ps in found.items() if len(ps)!=1}; assert not bad,bad; print("\n".join(str(found[i][0]) for i in ids))'`
|
||||
- Expected: exactly one completion path for predecessor `01` before implementation.
|
||||
1. `python3 -c 'from pathlib import Path; g="m-agent-comparison-benchmark-pipeline"; ids=("01","02"); a=Path("agent-task")/g; r=Path("agent-task/archive"); found={i:sorted([*a.glob(f"{i}_*/complete.log"),*a.glob(f"{i}+*/complete.log"),*r.glob(f"*/*/{g}/{i}_*/complete.log"),*r.glob(f"*/*/{g}/{i}+*/complete.log")],key=str) for i in ids}; bad={i:[str(p) for p in ps] for i,ps in found.items() if len(ps)!=1}; assert not bad,bad; print("\n".join(str(found[i][0]) for i in ids))'`
|
||||
- Expected: exactly one completion path for predecessors `01` and `02` before implementation.
|
||||
2. `python3 -m unittest scripts.agent_benchmark.lifecycle_test`
|
||||
- Expected: event, completion-mode, redaction, race, timeout/cancel, and all-terminal cleanup cases pass.
|
||||
3. `make test-agent-comparison-benchmark`
|
||||
Loading…
Reference in a new issue