Skip to content

feat(samplers): SamplerSurface keyed on the search manifest + autofit inference tier (search-ext A5 consumers) - #523

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

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

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Search-extensibility A5 (consumers), Brain half. The samplers faculty's SamplerSurface now keys the PyAutoFit tiers on the versioned search manifest, gains the autofit inference mature tier, and reads run_point_search leaves. Merge after PyAutoLabs/PyAutoHands#311 (the roster generator this PR's docs point at, branch sha 5e4224e).

  • agents/faculties/samplers/_samplers.py
    • promoted = the search manifest of the PyAutoFit checkout (python -m autofit search-manifest --json with the checkout first on PYTHONPATH, or --manifest FILE): one <group>/<pkg>/<Name> row per registry entry, same row shape as before. The AST parse of autofit/__init__.py stays as the fallback (stack not importable, older schema, unreadable dump); the digest records which source it used (manifest key).
    • gaps: with a manifest, a search is integration-tested when the file its registry integration_test anchor names exists in the test checkout; the stem-matching rule remains for the AST fallback. Prototype-promotion gaps unchanged.
    • PYAUTO_FIT_INFERENCE mature tier (--fit-inference): the autofit inference repo's declared cells, plus <task>/<Search>: <status> rows from catalogue/search_catalogue.json and its protocol id / ranking. Inventory only — feeds no gap rule, never ranks across tasks.
    • _declared_cell accepts run_search and run_point_search (runner defaults nautilus / point_source for omitted keywords, leaf stem as model_type for run_point_search only; a non-literal declaration keyword makes a leaf unreadable rather than defaulted), and the mature walk reads every declaring leaf under scripts/ — the lens point-source leaf scripts/point_source/simple/baseline.py sits outside */searches/*/, which is why the lens mature tier was always empty. Live: lens mature tier now nautilus/point_source/baseline; autofit inference 30 cells + 15 catalogue rows.
  • samplers.sh: resolves PYAUTO_FIT_INFERENCE.
  • agents/faculties/samplers/AGENTS.md: SamplerSurface diagram, gap rule and env vars updated.
  • skills/sampler_pipeline/reference.md: stage 3 starts from autofit/non_linear/search/_template/search.py and the registry entry; the lockstep list drops the rosters now generated (autofit_workspace llms.txt / searches README, assistants' roster blocks) and keeps only hand-written surfaces (pick tables, branches, guides, tutorials, docs, citations).

Decisions taken (decide-and-flag)

  1. Which manifest the Brain reads: the PyAutoFit checkout's manifest (the faculty inventories that checkout, as the AST tier did), not the installed release. The rosters elsewhere pin to the installed release; the Brain's job is promotion state of the code it is pointed at. --manifest FILE overrides.
  2. Manifest load is a subprocess (sys.executable -m autofit ..., 60 s timeout); ~1-2 s on the live tree. Any failure silently degrades to the AST path — the faculty never fails for want of a manifest.
  3. Two autofit-inference tiers (mature (autofit_inference searches cells) and ... search catalogue)) rather than one merged list, so a leaf with no catalogue verdict and a verdict with no leaf both stay visible.
  4. run_point_search defaults are hard-coded in RUNNERS from the runner's signature (sampler="nautilus", dataset_class="point_source"), not imported, to keep the faculty AST-only over the satellite repos.
  5. Tests name no repositories (fake ws_test anchors, module constants for tier/surface names).

Tenant firewall — FIREWALL_ALLOWLIST tokens needed (Mind, main session)

python3 PyAutoMind/scripts/repos_sync.py --check --only "tenant firewall (organ code)" reports exactly two new instance facts; both are the new surface's default checkout name:

  • PyAutoBrain/agents/faculties/samplers/_samplers.py: add "autofit_inference"
  • PyAutoBrain/agents/faculties/samplers/samplers.sh: add "autofit_inference"

No other Brain file gains a token (tests use module constants). PyAutoHands#311 adds none.

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 -q -n auto tests/ — 1263 passed (tests/test_samplers_surface.py 15, +5 new: manifest-keyed promoted + gaps, unreadable-manifest AST fallback, run_point_search leaf outside searches/, autofit inference cells + catalogue, absent catalogue).
  • Live digest samplers.sh over the worktree: manifest source reported, 15 promoted, no gaps, lens mature tier non-empty, autofit inference tiers populated.
  • check_skill_line_counts.sh: no new overage (the four existing OVER rows — create_issue, batch, prm, start_dev — are pre-existing and untouched).
  • Tenant firewall leg: red until the two allowlist entries above land in Mind.

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 PyAutoLabs/PyAutoHands#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

…t inference tier

search-ext A5 consumers (PyAutoLabs/PyAutoHands#310):
- promoted tier and the integration gap rule key on the search manifest
  (python -m autofit search-manifest --json of the PyAutoFit checkout, or
  --manifest FILE): one <group>/<pkg>/<Name> row per registry entry, and a
  search is integration-tested when its manifest integration_test anchor
  exists. The AST parse of autofit/__init__.py stays as the fallback.
- PYAUTO_FIT_INFERENCE surface (--fit-inference): the autofit inference
  repo's mature cells plus one <task>/<Search>: <status> row per search
  catalogue cell (catalogue/search_catalogue.json); inventory only.
- mature cells: _declared_cell accepts run_point_search (runner defaults
  for omitted keywords, leaf stem as model_type) and the walk reads every
  declaring leaf under scripts/, so the point-source leaf is no longer lost.
- sampler_pipeline reference: stage 3 starts from search/_template/search.py
  and the registry entry; the lockstep list shrinks to the hand-written
  surfaces now that rosters are generated.

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
- manifest subprocess timeout 60 s
- an explicit --manifest that is unusable is named in the digest; a usable
  manifest file alone counts as a surface
- leaf stem stands in for model_type only for run_point_search; a
  non-literal declaration keyword makes the leaf unreadable rather than
  taking a runner default
- the manifest source names the checkout (its __version__ is not a release)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 08bb033 into main Oct 15, 2026
2 of 4 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.

1 participant