Skip to content

feat(hands): generate search rosters from the installed autofit search manifest (search-ext A5 consumers) - #311

Merged
Jammy2211 merged 4 commits into
mainfrom
feature/search-ext-a5-consumers
Oct 15, 2026
Merged

Jammy2211 merged 4 commits into
mainfrom
feature/search-ext-a5-consumers

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Search-extensibility A5 (consumers), the generator half: one generator in PyAutoHands renders every search roster from the versioned search-manifest@1 of the installed autofit release, so a new search reaches every roster by a regenerate, not by hand edits across nine repos.

  • autohands/search_roster.py (library, stdlib only, never imports autofit): renders fenced blocks
    <!-- search-roster:begin style=list|table [indent=N] [link=<repo>] -->
    <!-- search-manifest@1 autofit <version> -->
    ...generated...
    <!-- search-roster:end -->
    
    Only text between the markers is written; prose outside is untouched. Options live in the begin marker, so no per-consumer config lives in Hands.
  • regenerate_search_roster.py / check_search_roster.py (new autohands verbs): --check re-renders against the installed manifest — (a) roster blocks, (b) --workspace-root DIR: every manifest example / integration_test anchor resolves in DIR/<repo> (with #Section → __Section__), (c) --names-in GLOB: every search = af.<Name>(...) names a manifest search; --against-source PATH reports source-checkout drift and never fails.
  • regenerate_navigator.py --roster (navigator write_roster): rewrites only the roster block in the curated llms.txt / scripts/**/README.md.
  • check_search_memory.py --manifest: guards the manifest's MultiStart* searches united with the prefix rule (a source-only sibling keeps its guard); without --manifest the prefix rule alone runs, as in the dependency-free CI leg.
  • Installed mode never reads a source checkout: the manifest subprocess drops PYTHONPATH and runs from a neutral directory (--against-source PATH is the explicit way to read one). Blocks: CRLF preserved, markers in code fences ignored, unknown options rejected, link= relative to the file holding the block.
  • .github/workflows/navigator_check.yml: new search_roster job — pip install autofit (the released, pinned version, never main), dump the manifest once, run (a)+(b)+(c) and the manifest-mode memory check. The workspace is checked out under its repository name so anchors resolve; for project: autofit the integration-test workspace is sparse-checked-out beside it.

Consumers (follow-up PRs, merge after this one): PyAutoBrain, autofit_workspace, autofit/autolens/autogalaxy_assistant, autolens/autogalaxy_workspace, PyAutoMemory.

Closes #310

Decisions taken (decide-and-flag)

  1. Block grammar. The ruling fixes the stamp <!-- search-manifest@1 autofit <version> -->; it needed begin/end fences too, so the stamp is the first line inside <!-- search-roster:begin ... --> / <!-- search-roster:end --> (the repos_sync:begin/end pattern), with rendering options on the begin marker.
  2. Stamp-only drift is a note, not a failure (unless --strict-version). A body that differs from the installed manifest fails; an identical body under a different version stamp passes with a note. Otherwise every autofit release would redden every consumer even when no search changed. The witness ("regenerates byte-identically against the installed version") holds whenever the stamp matches the installed release, which is what the consumer PRs show.
  3. Version that stamped the blocks: autofit 2026.10.12.1 (the current PyPI release, pip install autofit into a clean py3.12 venv). The worktree's importable autofit is the PyAutoFit source checkout, whose __version__ string is the stale 2026.8.17.1; its manifest roster is identical to the release's (only test_mode_budget of two searches differs, which no roster renders), so generating from the source would have stamped a version that was never installed. --against-source reports that difference.
  4. Named-search rule = assignments only. (c) checks <…search…> = af.<Name>(...) calls via AST, not prose mentions — the hand-written guides keep their prose, and a docstring naming a retired search is not a hard failure.
  5. Anchors of repos not checked out are skipped, so the one reusable job serves autolens/autogalaxy too (their anchors point into the autofit workspaces); the autofit workspace job checks out both anchor repos, so all 24 anchors resolve there.
  6. Tenant firewall: no new instance facts — repo names come from manifest anchors at run time; the tests use fake repo names. repos_sync.py --check --only "tenant firewall (organ code)" is clean for every PyAutoHands file.

Heart RED override

Quoted from #310 ("Heart RED override"):

The live human answered the AskUserQuestion "Invoke the Heart RED development override for this batch?" with "Yes, override for development (Recommended)" on 2026-10-15, for tasks search-ext-b5b-score, search-ext-a5-consumers and search-ext-b4b-dev-retire (this issue: search-ext-a5-consumers).

Exact RED reasons at the door (Heart verdict, 2026-10-15): "Heart: RED — Release RED; monitoring RED · 10/100 · 415 unresolved"; "[red] release validation FAILED (stage integrate)"; "[red] PyAutoHands/workflows/Python Version Matrix: failure"; "[red] PyAutoHeart/workflows/Release Integrate: failure"; "[red] PyAutoMind/workflows/Lifecycle Drift: failure"; "[red] PyAutoArray/Tests: red"; "[red] autofit_workspace_test/Smoke Tests: red"; "[red] autogalaxy_workspace_test/Smoke Tests: red"; "[red] autolens_workspace_test/Smoke Tests: red"; "[red] Release validation: NOT release_ready — v2026.10.15.1.dev81701 profile=release (2026-10-15T07:04:34+00:00)"; "[red] Worktree drift: 5 orphan / 0 missing / 4 dirty"; "[red] autolens_inference: red"; "[red] autolens_profiling: red"; "[red] euclid_strong_lens_modeling_pipeline: red"

Permitted: commit, push, PR-open. Merge stays a separate human act; no release or rehearsal; this branch does not fix Heart.

Passed branch gates (tests, smoke, review) are recorded in the PR body at ship; a failed gate cannot be overridden.

Test plan

  • pytest tests/ -q — 501 passed (new tests/test_search_roster.py, 22 cases; test_check_search_memory.py +3; test_autohands_registry.py covers the two new verbs).
  • Tenant firewall --only "tenant firewall (organ code)": no PyAutoHands finding.
  • Real data, installed release (autofit 2026.10.12.1 venv): check_search_roster.py --root autofit_workspace --workspace-root <wt> --names-in ... → 24/24 anchors resolve, all named searches known; autolens/autogalaxy scripts/guides/modeling/searches.py → clean.
  • bin/autohands help lists regenerate_search_roster / check_search_roster; help regenerate_navigator documents --roster.
  • search_roster job: first runs on workspace PRs after this merges (callers use @main).

Note: the workspaces call navigator_check.yml@main, so the new search_roster job first runs on workspace PRs after this PR merges. The consumer PRs demonstrate --check locally against the installed release.

Ship gate

Leg Result
1 Tests PyAutoHands full suite 507 passed (+ test_search_roster.py 28 after the last fix); PyAutoBrain full suite 1265 passed (one test, test_grouped_organ_consumers, fails only when activate.sh exports PYAUTO_MIND, and passes in a clean env; unrelated to this diff); the doc repos have no test dir (n/a); PyAutoMemory make validate green
2 Smoke n/a: no script in any smoke_tests.txt changed. al/ag guides/modeling/searches.py is a docstring-only edit (py_compile clean, not smoke-listed). The workspace smoke CI on these PRs is the record.
3 Review Two independent fresh-context reviews over Hands + Brain. Round 1 was FINDINGS (1 major, 12 minor/nit, 1 status note); all fixed in Hands e720263 and Brain db0916b. Round 2 confirmed 12/13 resolved, with one partial: the installed-mode manifest could still read a source checkout via the cwd. That is fixed in Hands 5e4224e with a test. No third round was run (decide-and-flag).
4 Heart RED. The human development override is recorded on #310 (quoted above).
Witness 6/7. ✓ --check regenerates byte-identically against the installed autofit 2026.10.12.1 in every consumer (output shown in each consumer PR). ✓ navigator --roster writes the curated llms.txt block. ✓ af/al/ag assistant blocks come from the same manifest. ✓ Brain promoted tier and gaps are keyed by manifest name and integration_test. ✓ The workspace CI search_roster job checks anchors against the installed release, not main; it goes live once Hands merges. ✓ al/ag guides are domain advice plus a matrix link. ✗ Capability matrix → B3 catalogue card link: this is in PyAutoFit docs/_generate_searches.py, which is not in this task's repos.
Firewall PyAutoBrain needs the Mind FIREWALL_ALLOWLIST to add "autofit_inference" for agents/faculties/samplers/_samplers.py and samplers.sh. Until then the Brain PR's firewall leg is red; its pytest leg is green.

🤖 Generated with Claude Code

…h manifest

One generator for every search roster (search-ext A5 consumers, #310):
autohands/search_roster.py renders fenced search-roster blocks
(style=list|table, indent, link) stamped
<!-- search-manifest@1 autofit <version> --> from the manifest printed by the
installed autofit; regenerate_search_roster / check_search_roster are the
CLI verbs. --check fails on a changed roster body, notes a stamp-only
difference (unless --strict-version), resolves manifest example /
integration_test anchors under --workspace-root, checks that every
search = af.<Name>(...) in --names-in scripts is a manifest search, and
--against-source reports source-vs-installed drift without failing.

regenerate_navigator --roster rewrites only the roster block in a curated
llms.txt / scripts READMEs. check_search_memory --manifest guards exactly
the manifest's MultiStart* searches (prefix rule stays the stdlib fallback).
navigator_check.yml gains a search_roster job: pip install autofit, dump
the manifest, run both checks against it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the decision-taken Autonomous run took a flagged decision label Oct 15, 2026
An assistant's wiki-currency job clones source repos under sources/; those
are other repositories, so --root . must not check (or rewrite) their blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- installed mode drops PYTHONPATH from the manifest subprocess, so a dev
  shell with a source checkout on it cannot pass source main off as the
  installed release (hint printed on failure); --against-source keeps it
- CRLF files keep CRLF; markers inside code fences are documentation;
  unknown block options are rejected
- link= targets are made relative to the file holding the block
- named searches: target must be search / search_<x> (settings_search and
  grid_search are not searches); annotated, attribute and search= keyword
  forms are read
- check_search_memory --manifest unites manifest names with the prefix rule
- navigator imports search_roster package-relative first
- navigator_check: caller repo from GITHUB_REPOSITORY, integration-test
  workspace branch-matched, regenerate hint in the job summary on drift

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python -m puts the working directory first on sys.path, so running the tool
from inside a source checkout made source main pose as the installed
release (re-review finding). --against-source is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f8df5f6 into main Oct 15, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/search-ext-a5-consumers branch October 15, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

decision-taken Autonomous run took a flagged decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: generate search rosters, tiers and anchors from the manifest (search-ext A5 consumers)

1 participant