Skip to content

feat: declare lifecycle setup fields, render setup_resolved provenance, fix doc drift (likelihood-lifecycle 0D) - #40

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/likelihood-lifecycle-p0-insight
Oct 23, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/likelihood-lifecycle-p0-insight

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Likelihood-lifecycle phase 0, sub-issue 0D. This is infrastructure only: no runs, no new rows, no judgement of results.

Contract (insight/summary.py)

lifecycle_errors(record, rid) validates the optional lifecycle fields that autolens_inference has exported since 0C. They are checked as declarations only:

  • setup_mode must be auto or explicit. Any other value is refused with "<rid>: setup_mode must be auto or explicit".
  • setup_resolved must be an object. backend, device, operator, precision and transformer are text or null; threads is an integer or null.
  • host_class and model_variant are text or null.
  • likelihood is null, or an object that names dataset_type and variant as text.
  • A record without these fields is still valid. Nothing is cross-checked against Pulse, auto is never resolved by inference, and none of the fields feeds acceptance, ranking or selection.

Deviation from the plan: the plan put the v2 check in insight/catalogue.py and the v3 check in summary.py. Instead, the check runs once in the per-record loop of summary.validate, which v1, the v2 catalogue (catalogue.validate is called from there) and assembled v3 shards all go through. Putting it in catalogue.py as well would have reported every v2 error twice. There is no version bump.

Render (insight/setup_browser.py)

Each record disclosure now opens with Setup: <setup_mode> · <backend>/<device>/<operator>/<precision> · <host_class> · <model_variant>, leaving out any part that is missing. A record that declares none of the fields shows no line. The structure of board.py is unchanged.

Fixtures and tests

  • lens_summary_v2.json: experiment-cold now declares setup_mode: auto with setup_resolved (jax/cpu/dense/fp64), host_class, model_variant and likelihood. The fixture still validates ok.
  • test_catalogue.py: the fields are accepted. An invalid setup_mode gets the named refusal, and malformed setup_resolved, host_class, model_variant and likelihood are refused.
  • test_setup_browser.py: the provenance line renders and drops missing parts.
  • test_sharded.py: v3 shard records accept the fields and refuse a bad mode. The v3 helpers live in this file, so the tests went here rather than in test_summary.py.
  • 204 → 219 tests pass.

Docs

  • REFERENCE.md: the Identity and ownership table gains a lifecycle row. auto means the library chose the setup (phase 5), setup_resolved records what it chose, and host_class is provenance, never identity.
  • The live pins are now stated as lens @2 and fit @3, and the deploy-order rule is kept.
  • REFERENCE.md and README.md now say there are two live producers.
  • New text routing full-fit wall-time validation to PyAutoPulse (walltime-validation@1, instance lens-walltime, produced as autolens_inference dashboard/walltime_validation.json). Insight does not host or validate it.
  • CHECKIN.md: one sentence on the same routing. tasks/ is untouched, so there is no overlap with graphical-ep: reconcile EP campaign state 2026-10-23 #38.

Checks

Closes #39

🤖 Generated with Claude Code

Scripts Changed

  • insight/summary.py — lifecycle_errors (setup_mode/setup_resolved/host_class/model_variant/likelihood as declarations)
  • insight/setup_browser.py — Setup: provenance line per record
  • tests/fixtures/lens_summary_v2.json, tests/test_catalogue.py, tests/test_setup_browser.py, tests/test_sharded.py
  • REFERENCE.md, README.md, CHECKIN.md — live pins, two producers, walltime-validation routed to Pulse

Test Plan

  • pytest tests -q 219 passed; ruff clean; pyauto-insight check --offline ok except the pre-existing lens receipt (clears after autolens_inference#45 + refresh)

…e, fix doc drift (likelihood-lifecycle 0D)

- summary.lifecycle_errors validates the optional additive record fields on
  every version's record path (v1, v2 catalogue, v3 shards): setup_mode in
  {auto, explicit} (else "<rid>: setup_mode must be auto or explicit"),
  setup_resolved (text-or-null backend/device/operator/precision/transformer,
  int-or-null threads), host_class and model_variant text, likelihood
  {dataset_type, variant}. Declarations only: no Pulse cross-check, no inferred
  resolution, no acceptance.
- setup_browser: one "Setup: …" provenance line in each record disclosure.
- Fixture: experiment-cold declares setup_mode auto with setup_resolved; tests
  for acceptance, the named refusal, malformed fields, v3 shards and rendering.
- Docs: lifecycle row in the identity table, live pins lens@2 / fit@3, two
  live producers, full-fit wall-time validation routed to Pulse
  (walltime-validation@1, lens-walltime); one CHECKIN sentence.

Closes #39

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f2b3822 into main Oct 23, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/likelihood-lifecycle-p0-insight branch October 23, 2026 14:41
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: likelihood-lifecycle 0D — lifecycle fields, setup_resolved provenance, doc drift + lens receipt fix

1 participant