drive run dir does not capture the clan config flake — the only copy survives at the shared state path and is destroyed by the next drive / trial-reset (seen on 20260828T051317Z) #927

Closed
opened 2026-08-28 06:12:15 +00:00 by matou-build-agent · 4 comments

Separate concrete defect seen during the #923 drive (20260828T051317Z).

Symptom

logs/state-logs.log reads ERROR: no state logs directory at …/standing-rented/state/logs, and the run dir's own state/ is empty. The config repo the red was about survived only at the shared path test-results/standing-rented/state/clan-config — a trial-reset or the next drive destroys the only copy of the flake needed to diagnose a config_eval red.

Fix

Have the drive harvest capture the clan config flake (at least a git bundle / rev-parse HEAD + tree snapshot) into the per-run state/ so a config-eval red is diagnosable post-hoc without racing the next drive for the shared checkout.

Separate concrete defect seen during the #923 drive (`20260828T051317Z`). ## Symptom `logs/state-logs.log` reads `ERROR: no state logs directory at …/standing-rented/state/logs`, and the run dir's own `state/` is empty. The config repo the red was about survived only at the shared path `test-results/standing-rented/state/clan-config` — a `trial-reset` or the next drive destroys the only copy of the flake needed to diagnose a config_eval red. ## Fix Have the drive harvest capture the clan config flake (at least a `git bundle` / `rev-parse HEAD` + tree snapshot) into the per-run `state/` so a config-eval red is diagnosable post-hoc without racing the next drive for the shared checkout.
Author
Member

This was generated by AI during triage.

Agent Brief

Category: bug
Summary: Have the drive harvest snapshot the clan config flake into the per-run state/ so a config_eval red is diagnosable post-hoc

Current behavior:
The per-run run dir does not capture the clan config flake. The only copy survives at the shared state path (test-results/standing-rented/state/clan-config), which the next drive — or a trial-reset — destroys. So logs/state-logs.log reads ERROR: no state logs directory at …/standing-rented/state/logs and the run dir's own state/ is empty. When a red is about the config flake (a config_eval failure), the flake needed to diagnose it is gone by the time anyone looks, or is being raced by the next drive for the shared checkout. Seen on drive 20260828T051317Z.

Desired behavior:
The drive harvest captures a self-contained snapshot of the clan config flake into the per-run state/ — at minimum a git bundle (or equivalent immutable copy) plus rev-parse HEAD and a tree listing — so a config_eval red is fully diagnosable from the run dir alone, without racing the next drive or a trial-reset for the shared checkout.

Key interfaces:

  • The drive harvest step that populates the per-run state/ — extend it to snapshot the config repo the drive built against. Capture from the shared local checkout (…/state/clan-config) into <run_dir>/state/.
  • Prefer an immutable capture (git bundle) over a live .git copy so the snapshot can't be mutated by concurrent git housekeeping (cf. the #925/#923 .git-ingest hazard).

Acceptance criteria:

  • After a drive, <run_dir>/state/ contains the config-flake snapshot (bundle + HEAD + tree listing), independent of the shared checkout.
  • A subsequent drive or trial-reset does not destroy the captured snapshot.
  • A seam/offline test asserts the harvest writes the snapshot into the per-run state/ (best-effort: absent config repo does not fail the harvest).

Out of scope:

  • Fixing what produced the underlying config_eval red (that's #925/#923's territory).
  • Changing where the shared checkout itself lives.

Ruled by agent under ADR 0174 — veto anytime.
Ruling: ready-for-agent. Two-way door — it adds a best-effort local capture of an on-disk checkout into the per-run state/, revertible by a commit and provable by an offline test of the harvest (no live droplet needed to prove the capture writes). Not on the one-way-door list. Safe for the swarm.

> *This was generated by AI during triage.* ## Agent Brief **Category:** bug **Summary:** Have the drive harvest snapshot the clan config flake into the per-run `state/` so a `config_eval` red is diagnosable post-hoc **Current behavior:** The per-run run dir does **not** capture the clan config flake. The only copy survives at the shared state path (`test-results/standing-rented/state/clan-config`), which the next drive — or a `trial-reset` — destroys. So `logs/state-logs.log` reads `ERROR: no state logs directory at …/standing-rented/state/logs` and the run dir's own `state/` is empty. When a red is *about* the config flake (a `config_eval` failure), the flake needed to diagnose it is gone by the time anyone looks, or is being raced by the next drive for the shared checkout. Seen on drive `20260828T051317Z`. **Desired behavior:** The drive harvest captures a self-contained snapshot of the clan config flake into the **per-run** `state/` — at minimum a `git bundle` (or equivalent immutable copy) plus `rev-parse HEAD` and a tree listing — so a `config_eval` red is fully diagnosable from the run dir alone, without racing the next drive or a `trial-reset` for the shared checkout. **Key interfaces:** - The drive harvest step that populates the per-run `state/` — extend it to snapshot the config repo the drive built against. Capture from the shared local checkout (`…/state/clan-config`) into `<run_dir>/state/`. - Prefer an immutable capture (`git bundle`) over a live `.git` copy so the snapshot can't be mutated by concurrent git housekeeping (cf. the #925/#923 `.git`-ingest hazard). **Acceptance criteria:** - [ ] After a drive, `<run_dir>/state/` contains the config-flake snapshot (bundle + `HEAD` + tree listing), independent of the shared checkout. - [ ] A subsequent drive or `trial-reset` does not destroy the captured snapshot. - [ ] A seam/offline test asserts the harvest writes the snapshot into the per-run `state/` (best-effort: absent config repo does not fail the harvest). **Out of scope:** - Fixing what produced the underlying `config_eval` red (that's #925/#923's territory). - Changing where the shared checkout itself lives. --- Ruled by agent under ADR 0174 — veto anytime. **Ruling:** `ready-for-agent`. Two-way door — it adds a best-effort local capture of an on-disk checkout into the per-run `state/`, revertible by a commit and provable by an offline test of the harvest (no live droplet needed to prove the capture writes). Not on the one-way-door list. Safe for the swarm.
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13097
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13097 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #927 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 9ea7e9e8ca is not reachable from origin/main (not landed)
  • changed_files: 'app/tests/e2e/fixtures/evidence.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/evidence.test.ts' is not in the diff of the claimed commits
envelope
{
  "issue": 927,
  "status": "success",
  "commits": [
    "9ea7e9e8ca4bf582e46ccd2ecf8a8df9212e98a0"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/evidence.ts",
    "app/tests/e2e/fixtures/evidence.test.ts"
  ],
  "tests": [
    {
      "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/evidence.test.ts",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "After a drive, <run_dir>/state/ contains the config-flake snapshot (bundle + HEAD + tree listing), independent of the shared checkout": "captureConfigFlake writes config.bundle + HEAD + tree.txt into configFlakeSnapshotDir = <runDir>/state/clan-config-snapshot (evidence.ts); harvest() calls it. Test 'captures a bundle + HEAD + tree listing into the per-run dest' verifies the bundle, HEAD sha, and tree contents.",
    "A subsequent drive or trial-reset does not destroy the captured snapshot": "Snapshot lives under runDir (per-run), not the shared stateDir the next drive/trial-reset reclaims; capture is an immutable git bundle. Pinned by 'locates the source and snapshot paths' asserting configFlakeSnapshotDir is under /run not the shared state.",
    "A seam/offline test asserts the harvest writes the snapshot into the per-run state (best-effort: absent config repo does not fail the harvest)": "evidence.test.ts describe('captureConfigFlake'): real-repo capture test + 'records an absent config repo as a note without throwing or writing a dest'."
  },
  "summary": "Drive harvest now snapshots the clan config flake (immutable bundle + HEAD + tree) into the per-run state so a config_eval red is diagnosable post-hoc, safe from the next drive/trial-reset.",
  "blockers": []
}
**close-report** for #927 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 9ea7e9e8ca4bf582e46ccd2ecf8a8df9212e98a0 is not reachable from origin/main (not landed) - changed_files: 'app/tests/e2e/fixtures/evidence.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/evidence.test.ts' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 927, "status": "success", "commits": [ "9ea7e9e8ca4bf582e46ccd2ecf8a8df9212e98a0" ], "changed_files": [ "app/tests/e2e/fixtures/evidence.ts", "app/tests/e2e/fixtures/evidence.test.ts" ], "tests": [ { "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/evidence.test.ts", "exit_code": 0 }, { "command": "CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "After a drive, <run_dir>/state/ contains the config-flake snapshot (bundle + HEAD + tree listing), independent of the shared checkout": "captureConfigFlake writes config.bundle + HEAD + tree.txt into configFlakeSnapshotDir = <runDir>/state/clan-config-snapshot (evidence.ts); harvest() calls it. Test 'captures a bundle + HEAD + tree listing into the per-run dest' verifies the bundle, HEAD sha, and tree contents.", "A subsequent drive or trial-reset does not destroy the captured snapshot": "Snapshot lives under runDir (per-run), not the shared stateDir the next drive/trial-reset reclaims; capture is an immutable git bundle. Pinned by 'locates the source and snapshot paths' asserting configFlakeSnapshotDir is under /run not the shared state.", "A seam/offline test asserts the harvest writes the snapshot into the per-run state (best-effort: absent config repo does not fail the harvest)": "evidence.test.ts describe('captureConfigFlake'): real-repo capture test + 'records an absent config repo as a note without throwing or writing a dest'." }, "summary": "Drive harvest now snapshots the clan config flake (immutable bundle + HEAD + tree) into the per-run state so a config_eval red is diagnosable post-hoc, safe from the next drive/trial-reset.", "blockers": [] } ``` </details>
Author
Member

close-report for #927 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 927,
  "status": "success",
  "commits": [
    "9ea7e9e8ca4bf582e46ccd2ecf8a8df9212e98a0"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/evidence.ts",
    "app/tests/e2e/fixtures/evidence.test.ts"
  ],
  "tests": [
    {
      "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/evidence.test.ts",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "After a drive, <run_dir>/state/ contains the config-flake snapshot (bundle + HEAD + tree listing), independent of the shared checkout": "captureConfigFlake writes config.bundle + HEAD + tree.txt into configFlakeSnapshotDir = <runDir>/state/clan-config-snapshot (evidence.ts); harvest() calls it. Test 'captures a bundle + HEAD + tree listing into the per-run dest' verifies the bundle, HEAD sha, and tree contents.",
    "A subsequent drive or trial-reset does not destroy the captured snapshot": "Snapshot lives under runDir (per-run), not the shared stateDir the next drive/trial-reset reclaims; capture is an immutable git bundle. Pinned by 'locates the source and snapshot paths' asserting configFlakeSnapshotDir is under /run not the shared state.",
    "A seam/offline test asserts the harvest writes the snapshot into the per-run state (best-effort: absent config repo does not fail the harvest)": "evidence.test.ts describe('captureConfigFlake'): real-repo capture test + 'records an absent config repo as a note without throwing or writing a dest'."
  },
  "summary": "Drive harvest now snapshots the clan config flake (immutable bundle + HEAD + tree) into the per-run state so a config_eval red is diagnosable post-hoc, safe from the next drive/trial-reset.",
  "blockers": []
}
**close-report** for #927 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 927, "status": "success", "commits": [ "9ea7e9e8ca4bf582e46ccd2ecf8a8df9212e98a0" ], "changed_files": [ "app/tests/e2e/fixtures/evidence.ts", "app/tests/e2e/fixtures/evidence.test.ts" ], "tests": [ { "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/evidence.test.ts", "exit_code": 0 }, { "command": "CI=true pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "After a drive, <run_dir>/state/ contains the config-flake snapshot (bundle + HEAD + tree listing), independent of the shared checkout": "captureConfigFlake writes config.bundle + HEAD + tree.txt into configFlakeSnapshotDir = <runDir>/state/clan-config-snapshot (evidence.ts); harvest() calls it. Test 'captures a bundle + HEAD + tree listing into the per-run dest' verifies the bundle, HEAD sha, and tree contents.", "A subsequent drive or trial-reset does not destroy the captured snapshot": "Snapshot lives under runDir (per-run), not the shared stateDir the next drive/trial-reset reclaims; capture is an immutable git bundle. Pinned by 'locates the source and snapshot paths' asserting configFlakeSnapshotDir is under /run not the shared state.", "A seam/offline test asserts the harvest writes the snapshot into the per-run state (best-effort: absent config repo does not fail the harvest)": "evidence.test.ts describe('captureConfigFlake'): real-repo capture test + 'records an absent config repo as a note without throwing or writing a dest'." }, "summary": "Drive harvest now snapshots the clan config flake (immutable bundle + HEAD + tree) into the per-run state so a config_eval red is diagnosable post-hoc, safe from the next drive/trial-reset.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#927
No description provided.