M4.2: the toolchain step #136

Merged
dev-agent merged 1 commits from toolchain-step into main 2026-10-08 18:22:01 +00:00
Collaborator

M4.2, the toolchain step: the implementation of #135 (D3 and D1).

The step: M4.1's preflight becomes a bounded run of the item's driver model that makes the build VM and the project's own files agree. It runs in a transcript of its own (a new toolchain actor), so its turns stay out of the driver's context. It starts two ways:

  • Started by the harness when the VM isn't set up for the project, using M4.1's checks (baseline, clone, marker).
    • It sets the VM up from the repository and edits nothing there: write_file isn't offered.
    • If a command changed a file anyway, the report says so, and the file is left for the work to deal with.
  • Requested by the driver with toolchain_step(reason), offered once the work is agreed.
    • It installs, then brings the pins, setup docs (README) and CI configuration in step.
    • Its edits land in the current milestone, so they're reviewed in the PR.
    • The driver gets the step's report as the tool's result.

D1 made structural: until the go-ahead, the fast path refuses what it knows changes something (writes, installs, local git, deletes, redirections into files), and anything dangerous. The refusal points to the restatement. Unknown commands still go to the classifier, so a bug can still be reproduced (python -c …) before it's restated. The harness's setup step isn't affected by this.

Prompt: the driver's install line becomes "ask for a toolchain_step with why…; before the go-ahead, you only look: say what the work needs in your restatement."

Tests: test_loop_toolchain.py, which replaces test_loop_preflight.py, keeps the M4.1 cases and adds:

  • the setup step edits nothing (a stray file is reported, and write_file isn't offered);
  • a requested step's README edit lands in the milestone's PR beside the work, the driver gets "toolchain step done: …", and the step's turns aren't in the driver's view;
  • before the go-ahead, python3 --version runs and pip install is refused.

The property walk asks for steps now and then, and reaches requested steps in 3 of 16 seeds. ready_before_work and the rest still hold.

Run locally before pushing: unit 759, integration 18. From here on, as you asked, CI runs the full suite rather than my repeating it locally first. This PR carries e2e:full, since it's a milestone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE

**M4.2, the toolchain step**: the implementation of #135 (D3 and D1). **The step:** M4.1's preflight becomes a bounded run of the item's driver model that makes the build VM and the project's own files agree. It runs in **a transcript of its own** (a new `toolchain` actor), so its turns stay out of the driver's context. It starts two ways: - **Started by the harness** when the VM isn't set up for the project, using M4.1's checks (baseline, clone, marker). - It **sets the VM up from the repository and edits nothing there**: `write_file` isn't offered. - If a command changed a file anyway, the report says so, and the file is left for the work to deal with. - **Requested by the driver** with `toolchain_step(reason)`, offered once the work is agreed. - It installs, then brings the **pins, setup docs (README) and CI configuration** in step. - Its edits land in the current milestone, so they're reviewed in the PR. - The driver gets the step's report as the tool's result. **D1 made structural:** until the go-ahead, the fast path refuses what it *knows* changes something (writes, installs, local git, deletes, redirections into files), and anything dangerous. The refusal points to the restatement. Unknown commands still go to the classifier, so a bug can still be reproduced (`python -c …`) before it's restated. The harness's setup step isn't affected by this. **Prompt:** the driver's install line becomes *"ask for a toolchain_step with why…; before the go-ahead, you only look: say what the work needs in your restatement."* **Tests:** `test_loop_toolchain.py`, which replaces `test_loop_preflight.py`, keeps the M4.1 cases and adds: - the setup step edits nothing (a stray file is reported, and `write_file` isn't offered); - a requested step's README edit lands in the milestone's PR beside the work, the driver gets "toolchain step done: …", and the step's turns aren't in the driver's view; - before the go-ahead, `python3 --version` runs and `pip install` is refused. The property walk asks for steps now and then, and reaches requested steps in 3 of 16 seeds. `ready_before_work` and the rest still hold. **Run locally before pushing:** unit 759, integration 18. From here on, as you asked, CI runs the full suite rather than my repeating it locally first. This PR carries `e2e:full`, since it's a milestone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dev-agent added the e2e:full label 2026-10-08 17:37:21 +00:00
dev-agent added 1 commit 2026-10-08 17:37:21 +00:00
M4.2: the toolchain step
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 2m36s
CI / e2e (pull_request) Successful in 11m13s
d9f2ebd5aa
The preflight becomes the toolchain step (D3, as #135 describes it): a
bounded run of the item's driver model, in a transcript of its own,
that makes the build VM and the project's files agree.

- Started by the harness when the VM isn't set up for the project
  (M4.1's checks): it sets the VM up from the repository and edits
  nothing there (no write_file; anything a command changed is reported,
  left for the work).
- Requested by the driver with toolchain_step(reason) once work is
  agreed: it installs, then brings pins, setup docs and CI
  configuration in step; its edits land in the current milestone. The
  driver gets the step's report as the tool's result, not its turns.
- D1 made structural: until the go-ahead the fast path refuses what it
  knows changes something (and anything dangerous), with a pointer to
  the restatement; unknown commands still go to the classifier, so a
  bug can be reproduced before it's restated.
- A `toolchain` actor and view; the walk asks for steps now and then.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
dongar approved these changes 2026-10-08 17:40:02 +00:00
dev-agent merged commit 7c3c09ab98 into main 2026-10-08 18:22:01 +00:00
dev-agent deleted branch toolchain-step 2026-10-08 18:22:01 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/nisse#136