Skip to content

inference-summary@3 record shards; fit pinned @3 (migrating_from @1); gaussian_x3 wave 2 closed (B5b-2) - #31

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

Jammy2211 merged 4 commits into
mainfrom
feature/search-ext-b5b2-remainder

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the PyAutoInsight part of B5b-2 (search-extensibility epic; autofit_inference#12, producer PR PyAutoLabs/autofit_inference#13). It adds the inference-summary@3 contract: @1's envelope and record contract, with the records held in sha256-verified shard files. It also moves the fit instance to @3.

What changes:

  • Reader (insight/summary.py).
    • A @3 index carries record_shards (id, protocol_id, path relative to the index, sha256, records) and never inline records.
    • load_sharded checks each shard's digest, header (inference-summary-records, v3, project, shard id, protocol) and record count, and checks that each record's protocol matches its shard's.
    • It then assembles the shards in index order, and the result is validated exactly as @1.
    • @1 and @2 are unchanged.
  • Ingest (insight/ingest.py).
    • Shards are fetched at the one resolved commit.
    • A kept shard whose sha256 is unchanged is reused, so a refresh copies only what changed.
    • Shards are kept byte-for-byte under snapshots/<instance>/. They are written only after the whole capture validates, then the index is written, then shards the new index no longer names are pruned.
    • Offline reads re-verify every kept shard. --from reads the shards beside the index.
  • Board. One row per shard (protocol, records, execution, convergence and acceptance counts, a link at the commit), never every record.
  • Registry.
    • fit is pinned to supported_schema: inference-summary@3, with migrating_from: inference-summary@1. Until the first @3 capture, the committed @1 snapshot stays valid last-good evidence, labelled "awaiting the first refresh". A fresh fetch must still return @3.
    • check says when migrating_from has become obsolete.
  • Docs and tests. REFERENCE.md gains a v3 section. tests/test_sharded.py adds 18 tests.
  • Ledger. The task file tasks/gaussian_x3_search_wave2.md and the campaign next/progress lines are updated (wave 2 closed). The board is re-rendered --offline.

Not done here, by design: the online fit snapshot refresh. It needs autofit_inference#13 on main. When this PR merges after it, the push-triggered Dashboard Refresh captures fit under @3. Then run bin/pyauto-insight check online and drop migrating_from.

Decisions taken (decide-and-flag)

  1. The contract version is inference-summary@3, not @2. This needs your sign-off. Ruling 1 named @2, but PyAutoInsight's @2 already exists: it is the setups/prepared-problems contract that instance lens is pinned to. Reusing the number would have broken lens. The per-protocol split therefore takes the next free version, @3. It keeps @1's envelope and record contract unchanged and holds the records in shard files. @3 does not include @2's setups.
  2. Shards are split per leg, not just per protocol. A single gaussian_x3@2 file would hold 12,750 records and still be far above 50 MB. The ruling allowed "an equivalent per-leg layout", so there is one shard per protocol × dataset × search × settings × config. That gives 101 shards; the largest is 1.56 MB and the total is 66 MB. Each shard is written one record per line, and each shard's sha256 is in the index, so a refresh re-copies only the shards that changed.
  3. The Insight pin moves to @3 with migrating_from: inference-summary@1. Without that field, the committed @1 fit snapshot would fail check --offline from the moment the pin moves. With it, the old capture stays valid last-good evidence, labelled "awaiting the first refresh". A fresh fetch must still return @3.
  4. The ordering floor is a §8 note plus §11 N1, not an amendment. The note was written after the wave-2 rows existed, so under the change rule it cannot be a criterion, and it is not one: it changes no verdict, threshold, headline number or protocol version.
  5. Zero-success closed legs count as "unreliable". They fall below the floor like any other leg under 50 % (rate 0 %, numbers shown). Open legs and legs that cannot be assessed are listed last, with no label.

Ship gate

Leg Result
1 Tests autofit_inference: 121 passed, against both Insight main and the branch; ruff check and format clean; all 7 --check gates green. PyAutoInsight: 204 passed; ruff clean; check --offline OK; board --offline rendered. PyAutoCortex: 65 passed; cortex.py check OK.
2 Smoke n/a: no workspace smoke script is touched. check --from fit=<this branch> validates all 12,973 records in 101 shards.
3 Review Two rounds by independent fresh-context Opus reviewers, each given the diffs only. Round 1: FINDINGS (0 blockers, 3 should-fix, 9 nits), all fixed. Round 2: CLEAN with 5 nits; 4 fixed, 1 left (a reliable leg with no wall estimate would fall through to the unjudged rows; it cannot happen with today's data, and a test catches it).
4 Heart RED. Development-only override recorded on #12 (quoted below).
Witness 3 of 4 met, 1 partial. ✓ Every row of 409930 (980) pulled and judged under @2 at df6d218f1, and the four probe-sourced legs closed: three positioned, Zeus JAX blend recorded at 0/250, unreliable. ✓ Ordering ruled and protocol amended as a post-hoc §8 note (plus N1 and a state.md ruling line). ✓ Cortex 409930 moved into the log with wall 1:30. ◐ Records reach Insight under the chosen schema: shipped as @3 (see decision 1), with the registry bumped and check --offline green; check online and the fit snapshot refresh from main wait for the merges (human next step).

Heart RED — development-only override (quoted from autofit_inference#12)

Heart at the door: 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 (cleared 2026-10-15 evening); [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; [red] Worktree drift; [red] autolens_inference: red; [red] autolens_profiling: red; [red] euclid_strong_lens_modeling_pipeline: red. Live human in session 6ffb59e9 answered AskUserQuestion "Yes, override for development (Recommended)" on 2026-10-15 for this launch. Permitted: commit, push, PR-open. Merge is a separate human act; this never reaches a release.

🤖 Generated with Claude Code

Jammy2211 and others added 4 commits October 15, 2026 18:16
…ing_from @1 (B5b-2)

Reader: v3 index (record_shards: id, protocol_id, path, sha256, records) with shard files
verified by sha256, header and count, assembled and validated as v1. Ingest keeps shard
bytes under snapshots/<instance>/, re-fetches only changed shards at the resolved commit,
writes them only after the capture validates and removes orphans; offline re-verifies;
--from reads shards beside the index. Board lists shards, not every record. Registry
migrating_from keeps the committed @1 fit capture valid until the first @3 refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; board --offline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rating_from note, v3 parity disclaimer (B5b-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad wording (B5b-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the decision-taken autonomous run took a flagged decision; review it first label Oct 15, 2026
@Jammy2211
Jammy2211 merged commit d993285 into main Oct 15, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/search-ext-b5b2-remainder branch October 15, 2026 17:53
Jammy2211 pushed a commit that referenced this pull request Oct 15, 2026
The committed fit capture is inference-summary@3 since the post-#31 refresh;
the acceptance test still indexed doc['records'] and failed lint on this
branch (and latently on main, whose refresh commit skipped CI).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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; review it first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant