Skip to content

feat: organ skeleton — registry, commit-pinned reader + receipts, board, CLI, workflows (phase 2) - #2

Merged
Jammy2211 merged 3 commits into
mainfrom
feature/pyautopulse-organ-skeleton
Oct 2, 2026
Merged

Jammy2211 merged 3 commits into
mainfrom
feature/pyautopulse-organ-skeleton

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Phase 2 of profiling-organ-birth (PyAutoPulse#1): the organ skeleton. PyAutoPulse reads, validates and links the profiling-summary@1 feed each registered <lib>_profiling project publishes, pins every ingest to one commit, keeps a receipt, and renders the cross-project board + cockpit feed. Modelled on the PyAutoEyes skeleton (PyAutoEyes#2) and the spec PyAutoBrain/docs/research/profiling_inference_organs.md. Human decisions 2026-10-02: one task, two PRs — merge this one first, then PyAutoBrain (witness row + boards: pulse).

What is in the box

  • registry.yaml — lens row only; repo is a body-map identity, path/github resolve from PyAutoMind/repos.yaml (no second catalogue, per spec).
  • pulse/registry.py, summary.py, ingest.py, board.py, cli.py; bin/pyauto-pulse check | board | census | fetch [--instance K].
  • Ingest resolves the branch to one commit (GitHub API), reads summary_path at that SHA (raw URL), validates the exchange contract (schema/version, envelope keys, unique ids, finite numerics, dates, safe evidence paths, axis/unit consistency, hardware identity on comparison pairs), writes receipts/<instance>.json and a last-good snapshots/<instance>.json. A failed fetch renders cached with the original evidence time plus the new error; nothing is re-aged by a render.
  • Board (dashboard.md/.html, state.json, badge.json): one row per instance; transport integrity, evidence freshness (valid_until null → "freshness policy unspecified" + age) and scientific qualification shown as three separate notions; detail per instance = the producer's own comparisons[] (refused pairs listed apart with the reason, ratio hidden) and limitations[]; drift items carry a /profiling triage <key> action (kind: prompt, safety: scientific_judgement). No recomputed ratio, no cross-project ranking, no Heart verdict. state.json is organ: pulse, validated by PyAutoBrain/board/_state.py.
  • First live render committed: lens @ autolens_profiling d9f385f0, 159 records, 145 comparisons, status yellow (157/159 records unqualified by the producer — healthy transport never turns unknown quality green).
  • Workflows: lint.yml (ruff, pytest, check --offline, lychee), pages_dashboard.yml (state validated against Brain before deploy), dashboard_refresh.yml (push main / PR dry-run / nightly / repository_dispatch: pulse-refresh, concurrency pulse-main-writers).
  • AGENTS.md (boundaries + the spec's never-list; generated marker blocks untouched), REFERENCE.md (registry schema, the v1 contract as read, receipt format), README.md.

API Changes

New organ package pulse and CLI bin/pyauto-pulse. No PyAuto library API touched. Cockpit feed state.json (organ: pulse, repo: PyAutoPulse) is new; the legacy organ: profiling label in autolens_profiling/dashboard/state.json is left alone (phase 3).

Test Plan

  • ruff check . && ruff format --check . clean
  • pytest -q tests — 76 passed (hermetic: no_network autouse; fixtures valid_empty / unsupported_schema / duplicate_id / unknown_provenance / axis_mismatch / changed_hardware / second_producer / trimmed live feed; unavailable + stale-cached as scenarios)
  • bin/pyauto-pulse check --offline → check: OK; online check → check: OK (lens d9f385f0)
  • python3 PyAutoBrain/board/_state.py state.json → ok
  • three workflow YAMLs parse
  • Human: enable GitHub Pages on this repo (source: GitHub Actions) — the first Pages Dashboard run fails until then (PyAutoEyes#2 precedent)
Full API Changes (for automation & release notes)

Added

  • pulse.registry.load/validate/get, pulse.summary.validate, pulse.ingest.ingest/resolve_commit/fetch_at/write_receipt, pulse.board.collect/render_*/write, pulse.cli.main
  • bin/pyauto-pulse — check, board [--offline] [--from INSTANCE=PATH] [--mind PATH], census, fetch [--instance K]
  • registry.yaml (schema 1), receipts/, snapshots/

Removed

  • none

Migration

  • none. Follow-ups filed separately: the pulse-refresh dispatch sender in autolens_profiling/pages_dashboard.yml; the Brain board card + cockpit identity transition (phase 3).

Design notes (deviations from the issue plan, all spec-conformant)

  • --mind PATH is consulted before $PYAUTO_MIND (Eyes order); an explicit --mind without repos.yaml is an error.
  • Comparison endpoints are resolved through the id grammar <comparison_key>@<version> (the live feed stores release versions, not record ids).
  • A refused pair (axis mismatch / changed hardware / missing endpoint) is refused per comparison; the rest of the feed stays valid. host counts as changed only when both records name one.
  • Receipts/snapshots are rewritten only when something other than fetched_at changes, so nightly refreshes commit nothing.
  • --from local reads write no receipt and show the checkout basename only.
  • lint.yml checks out Mind (_mind) and Brain (_brain) so check --offline resolves the body map and the state validator runs.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 2, 2026 13:06
…ard, CLI (PyAutoPulse#1)

Phase 2 of profiling-organ-birth, modelled on the PyAutoEyes skeleton:

- registry.yaml (lens -> autolens_profiling); repo location and GitHub
  identity resolved from PyAutoMind/repos.yaml, never a second catalogue
- pulse/summary.py: the profiling-summary v1 exchange contract (envelope,
  records, comparisons, coverage) plus comparison pairing that refuses
  axis-mismatched or changed-hardware pairs and groups by hardware
- pulse/ingest.py: branch -> one commit via the GitHub API, summary read at
  that SHA, receipts/<instance>.json, last-good snapshots/<instance>.json
  shown as cached (never re-aged) when a fetch fails; local --from reads
  report revision + dirty state and write nothing
- pulse/board.py: dashboard.md/.html, badge.json, state.json (organ pulse);
  integrity / freshness / qualification kept separate, producer ratios
  verbatim, /profiling triage handoff as a scientific_judgement prompt
- bin/pyauto-pulse: check, board, census, fetch
- hermetic tests over tests/fixtures (acceptance cases, a second-producer
  fixture, a trimmed copy of the live feed)
- lint, pages_dashboard and dashboard_refresh workflows; AGENTS/REFERENCE/README

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…Pulse#1)

bin/pyauto-pulse board online: lens resolved to d9f385f0, profiling-summary@1
valid (159 records, 145 comparisons, producer_revision 227b5c91); receipt,
last-good snapshot and the four board files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release Merged library/organ change not yet in a release label Oct 2, 2026
… via the API (PyAutoPulse#1)

github.com answers unauthenticated blob-page fetches with 503 (rate limit), which
failed lint twice on identical link sets; lychee documents --github-token for this.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 4720cb1 into main Oct 2, 2026
2 checks passed
@Jammy2211 Jammy2211 removed the pending-release Merged library/organ change not yet in a release label Oct 7, 2026
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.

1 participant