Skip to content

feat: pre-dispatch premise check + Lane backfill (M1.3 slices 1–2, #608) - #609

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/premise-lane-checks
Nov 12, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/premise-lane-checks

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Programme M1.3, slices 1–2 (findings MIND-2 and MIND-3). Closes #608. Slice 3, fail closed, is M2.3 and waits on a human ruling.

Slice 1, a premise check: pyauto-brain batch premise <draft> (agents/conductors/batch/_premise.py). It makes no LLM call and uses bounded gh.

  • What it checks, on a fresh main: the named files, functions, issues and PRs, plus timing claims against the Heart record.
    • Functions are searched across every checkout.
    • Removals count only after the draft was filed.
    • A path with no history is treated as work to create, never as evidence.
  • Results: ok / obsolete / unknown with evidence. Only obsolete exits 1; a crash gives unknown.
  • Where it runs: it is the first step of the shift worker template, and the worker stops on obsolete. batch brief --check warns on each obsolete pick.
  • --write-verified stamps Verified: through a new set-header one-Mind-writer op, which skips a draft that has moved.
  • The digest shows obsolete (premise check): <why>.

Slice 2, a Lane backfill: bin/lane_backfill.py proposes a Lane for each pool draft that lacks one, with the evidence and a why, and has an idempotent --apply. Intake learns requirement-context lane words.

Test plan

  • Witness (a): replayed at the 2026-11-06-pm dispatch time. delaunay_smoke_300s_cap is obsolete: the newest Heart smoke runs took 8.6–15.9 s against the ≥300 s claim. gallery_runner_missing_tiers is obsolete: scripts/gallery/gallery_run.sh was removed in 0dc177b on 2026-09-30.
  • Witness (b): 119 pool drafts lack a Lane, and the proposals are 109 any / 8 ral / 2 wsl-data. Applying them to a scratch copy left none without a Lane; a rerun exits 0.
  • A premise sweep of the pool (127 drafts) gave 84 ok, 42 unknown, 1 obsolete (remove_eden_packaging_tooling: eden.yaml deleted on 11-10).
  • Brain pytest tests/: 1718 passed, 1 skipped. The known environmental failure test_grouped_organ_consumers remains. 56 new tests.
  • Skill line counts OK. Tenant firewall OK.
  • Independent review: FINDINGS, namely a false obsolete for a nested path to create, a false obsolete for an upstream function, false gpu from a bare GPU mention, a crash reading as obsolete, a ledger wedge on a moved draft, and the digest wording. All are fixed in 02bb592. Re-review: CLEAN, with the pool re-swept.

Heart RED override (development only)

Authorization from the live human at the programme block gate, 2026-11-12: "Override + merge both". This authorizes the development-only RED override for #608 and gives the merge command, conditional on every required check being green within the turn.

Heart verdict RED (pyauto-heart readiness, ts 2026-11-12T19:30:21Z). The current RED reasons, verbatim: "PyAutoNerves: 2 commit(s) behind origin"; "PyAutoArray: 2 commit(s) behind origin"; "PyAutoGalaxy: 10 commit(s) behind origin"; "PyAutoLens: on branch feature/last-imaging-features-review (not main)"; "PyAutoLens: 3 uncommitted source change(s)"; "PyAutoCTI: 2 commit(s) behind origin"; "install verification FAILED (testpypi; checks F)"; "release validation FAILED (stage integrate)"

None of these is in the repos this PR changes. Branch gates passed: tests, review CLEAN, smoke not applicable. This PR does not fix Heart, and Heart stays RED for release.

Tier: glance. Merge mode: auto-merge on green if the Witness passes, with a post-merge summary. A RED override additionally needs the human's merge command, which was given in the same turn.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits November 12, 2026 19:22
)

Slice 1 — `batch premise <draft>` (agents/conductors/batch/_premise.py):
on a fresh main of each named repo it checks the backticked paths and
functions a draft names, reads its issue/PR states, and compares a title's
smoke-duration claim with the Heart's timing record. Returns ok | obsolete |
unknown with evidence (exit 1 on obsolete); for a bug it says what to
reproduce. Renames and newly-gitignored paths count as moved, not gone; a
path with no history is work to create, never evidence. No LLM call.
- `--write-verified` stamps `Verified: <date> <sha> (<repo>)` on an ok draft,
  inside a shift as a new `set-header` ledger op (one Mind writer), else in
  place, uncommitted. `shift_ledger.py set-header` queues the same op.
- First step of the shift worker template: stop and report on obsolete.
- `batch brief --check` warns on each named task whose premise is obsolete
  (`--no-premise` skips it).
- `--at <ISO>` replays main as it stood. Witness (a): both obsolete tasks of
  the 2026-11-06-pm shift (delaunay_smoke_300s_cap,
  gallery_runner_missing_tiers) return obsolete at shift dispatch time;
  fixtures under tests/fixtures/premise/.

Slice 2 — `bin/lane_backfill.py`: proposes a Lane: for every lane-less draft
in the planner pool (now `_batch.planner_pool`, the plan gates factored out
as `pool_gate`), with the matching words as evidence; `--apply [--from
table]` writes the headers, honouring a human's edits. Intake's
LANE_SIGNALS learn A100, HPC, /mnt/ral (ral), bare GPU (gpu), any /mnt/<drive>
(wsl-data) and "private data" (local-dev); the backfill reads the same table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Must-fix:
- premise: a deleted root-level file no longer matches a nested path the
  draft means to create (`token.endswith("/" + p)` only when p has a dir).
- premise: a function missing from the declared repos is looked up in every
  library/organ checkout before it can be gone, and only a removal after the
  draft's Filed: (else Issued:, else 180 days) counts as evidence.
- intake lane signals: RAL, A100, HPC and GPU count only in the title, the
  Witness: line or a requirement phrase ("on the A100", "submit ... to RAL",
  "needs a GPU"); mechanisms (SLURM, sbatch, --gres, /mnt paths, CUDA,
  private data) count anywhere; negated mentions never count. The proposal
  table gains a `why` column (infer_lane_reason).

Also:
- `batch premise` degrades any crash to `unknown (check failed: ...)`, exit
  0; the worker template says to proceed on unknown and report it.
- set-header on a draft no longer on main is skipped with a note, not raised.
- the digest shows an `obsolete <why>` .done as "obsolete (premise check)".
- lane_backfill --apply with nothing left exits 0, "nothing to apply".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit c7e7c1c into main Nov 12, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/premise-lane-checks branch November 12, 2026 19:53
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.

feat: pre-dispatch premise check + Lane backfill, slices 1–2 (M1.3)

1 participant