Skip to content

lifecycle: validate the registry files in check, reconcile planned.md - #158

Merged
Jammy2211 merged 2 commits into
mainfrom
claude/automind-task-planning-57sqpo
Aug 8, 2026
Merged

lifecycle: validate the registry files in check, reconcile planned.md#158
Jammy2211 merged 2 commits into
mainfrom
claude/automind-task-planning-57sqpo

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Why

scripts/lifecycle.py check reported OK over a planned.md in which 9 of 13 entries were wrong. cmd_check validated only two conditions, both about active.md and the state folders — it never opened planned.md or parked.md, and never resolved a single prompt: path.

The registry is the first thing a task-selection pass reads, so the rot has a measured cost: a session picked the two highest-leverage planned.md entries and spent most of itself discovering both were already fixed on main.

What this adds

Three registry checks over active.md / planned.md / parked.md:

  • every prompt: path resolves — and resolves exactly, not via the pre-lifecycle PyAutoMind/<work-type>/<target>/ fallback;
  • it resolves into a state folder its registry impliesplanneddraft/, activeactive/, parked → either, since parked.md holds both scoped and started-then-parked tasks;
  • no slug is listed in two registries at once.

Output shape and the exit-code contract (0 OK, 1 drift) are unchanged.

What this reconciles

Six of the thirteen entries were work that had already shipped — verified on each upstream main, not inferred:

Entry Shipped as
notebook-kernel-cwd-auto-simulate PyAutoHands build_util.py:302 routes through run_notebook.py, setting resources['metadata']['path']
auto-simulate-guard-wrong-simulator-target autolens_workspace — 236 resolvable should_simulate guards audited against the 54 simulators' declared outputs, 0 mismatches
build-testpypi-rehearsal-mode (M1) PyAutoHands release.ymlrehearsal dispatch input, resolve_mode job, downstream jobs gated if: rehearsal != 'true'
heart-ci-linkage (M0) PyAutoHeart heart/checks/ci_status.{sh,py}; the script's own comment says it "replaces the old gh run list --limit 1" — verbatim the defect the entry described
heart-release-validation (M2) PyAutoHeart pyauto-heart validate --ingestheart/validate.py, validation_report.json, release-integrate.yml
heart-release-profile-wheel-integration (M3) PyAutoHeart heart/validate.py carries the named release profile and gates fidelity on profile == release

The entire M0–M3 release-validation milestone chain shipped without one registry entry being retired.

These are removed rather than given fabricated complete/ records — they shipped under other tasks' PRs, and dated records with merge evidence nobody verified would put a worse lie somewhere more trusted. Three legacy paths normalised to draft/. planned.md goes 13 → 7 entries, all paths exact.

Tests

tests/test_lifecycle_check.py — the first test for lifecycle.py. Fictional, hermetic fixtures per the KEEP-copied-into-the-template rule (test_spawn_privacy.py), with every leg driven by input that must trip it. Mutation-checked: reverting either fix fails the specific test guarding it.

Two checks were themselves wrong before these tests pinned them — the parked.md state rule, and the trailing-parenthetical path form (- prompt: ....md (carries the phase table)).

python3 scripts/lifecycle.py check → OK. pytest tests/ → 99 passed.

Known limitation

A local check cannot catch the class that cost the most. All six shipped entries were found by reading upstream code; five were catchable here only because their prompt files happened to be missing. Had those files existed, check would still print OK. Catching that class needs each entry's issue: cross-checked against GitHub, which makes check non-hermetic — deliberately out of scope, recorded in the prompt.

Prompt: draft/maintenance/pyautomind/registry_integrity_check.md


Generated by Claude Code

claude added 2 commits August 8, 2026 18:17
planned.md holds 12 entries, 8 of them wrong, and `lifecycle.py check`
reports OK through all of it — cmd_check never opens planned.md or
parked.md and never resolves a prompt: path.

Found while task-selecting: the two highest-leverage planned entries
(notebook-kernel-cwd-auto-simulate, auto-simulate-guard-wrong-simulator-target)
are both already fixed on main. Verified rather than assumed — PyAutoHands
build_util.py now routes through run_notebook.py, and an audit of all 246
should_simulate guards in autolens_workspace against the 54 simulators'
declared outputs found 236 resolvable and 0 mismatches.

Scopes an offline-only check plus the reconciliation of the 8 drifted
entries and the first test for lifecycle.py.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GW2wFpSkZtXr8VzM5w8MpX
`check` reported OK over a planned.md in which 9 of 13 entries were wrong,
because cmd_check never opened planned.md or parked.md and never resolved a
`prompt:` path. It validated only two conditions, both about active.md and
the state folders.

Adds three registry checks: every `prompt:` path resolves, exactly rather
than via the legacy fallback; it resolves into a state folder its registry
implies (planned -> draft, active -> active, parked -> either, since parked
holds both scoped and started-then-parked tasks); and no slug is listed in
two registries.

Reconciles what it found. Six of the thirteen entries were work that had
already shipped -- verified on each upstream main, not inferred:

  notebook-kernel-cwd-auto-simulate  PyAutoHands build_util.py routes through
                                     run_notebook.py, setting the kernel path
  auto-simulate-guard-wrong-target   autolens_workspace: 236 resolvable
                                     guards audited, 0 mismatches
  build-testpypi-rehearsal-mode (M1) PyAutoHands release.yml `rehearsal` input
  heart-ci-linkage (M0)              PyAutoHeart heart/checks/ci_status.*
  heart-release-validation (M2)      PyAutoHeart heart/validate.py + ingest
  heart-release-profile-wheel (M3)   PyAutoHeart named `release` profile

The entire M0-M3 release-validation chain shipped without one entry being
retired. Removed rather than given fabricated complete/ records: they
shipped under other tasks' PRs, and dated records nobody verified would put
a worse lie somewhere more trusted. Three legacy PyAutoMind/<type>/<target>/
paths normalised to draft/.

First test for lifecycle.py: fictional, hermetic fixtures per the
KEEP-copied-into-the-template rule, each leg driven with input that trips
it. Two checks were themselves wrong before these tests pinned them -- the
parked.md state rule and the trailing-parenthetical path form.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GW2wFpSkZtXr8VzM5w8MpX
@Jammy2211
Jammy2211 merged commit ab80c4f into main Aug 8, 2026
2 checks passed
Jammy2211 pushed a commit that referenced this pull request Aug 8, 2026
Three follow-ups to the registry-integrity work (#158).

1. `lifecycle.py orphans` — the mirror of the checks added there. Those
   validate registry -> prompt; this validates prompt -> registry, listing
   active/ prompts that no entry claims. A prompt counts as claimed by a
   resolving `prompt:` path or by an entry whose slug matches its stem, since
   many entries predate the `prompt:` convention.

   Report-only, NOT wired into `check`: 8 of 10 active/ prompts are currently
   unclaimed, and a gate nobody can turn green gets disabled. `--check` exits
   non-zero for once that backlog is clear.

2. complete/2026/06/build-testpypi-rehearsal-mode.md — the M1 release-rehearsal
   task, which shipped 2026-06-30 as PyAutoHands #111 (71936fb) and left its
   prompt stranded in active/ for six weeks. Reconstructed after the fact and
   labelled as such; the merge body itself names unblocking the Heart
   release-validation gate (M2). This is the record #158 declined to write
   before the upstream evidence existed. Folds and removes the active/ prompt.

3. draft/maintenance/pyautomind/active_prompt_orphan_triage.md — the remaining
   7 orphans, with per-outcome disposal and the steps to turn `orphans` into a
   gate afterwards. One is pre-diagnosed: ep_optimise_expose_updater_delta.md
   belongs to an active.md entry already marked COMPLETE with both PRs merged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GW2wFpSkZtXr8VzM5w8MpX
Jammy2211 added a commit that referenced this pull request Aug 8, 2026
…ge (#159)

Three follow-ups to the registry-integrity work (#158).

1. `lifecycle.py orphans` — the mirror of the checks added there. Those
   validate registry -> prompt; this validates prompt -> registry, listing
   active/ prompts that no entry claims. A prompt counts as claimed by a
   resolving `prompt:` path or by an entry whose slug matches its stem, since
   many entries predate the `prompt:` convention.

   Report-only, NOT wired into `check`: 8 of 10 active/ prompts are currently
   unclaimed, and a gate nobody can turn green gets disabled. `--check` exits
   non-zero for once that backlog is clear.

2. complete/2026/06/build-testpypi-rehearsal-mode.md — the M1 release-rehearsal
   task, which shipped 2026-06-30 as PyAutoHands #111 (71936fb) and left its
   prompt stranded in active/ for six weeks. Reconstructed after the fact and
   labelled as such; the merge body itself names unblocking the Heart
   release-validation gate (M2). This is the record #158 declined to write
   before the upstream evidence existed. Folds and removes the active/ prompt.

3. draft/maintenance/pyautomind/active_prompt_orphan_triage.md — the remaining
   7 orphans, with per-outcome disposal and the steps to turn `orphans` into a
   gate afterwards. One is pre-diagnosed: ep_optimise_expose_updater_delta.md
   belongs to an active.md entry already marked COMPLETE with both PRs merged.


Claude-Session: https://claude.ai/code/session_01GW2wFpSkZtXr8VzM5w8MpX

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants