Skip to content

refactor(fact-channels): check recorder and differential tables against the registry (Part of #3383) - #7337

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/3383-20261031T1857Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/3383-20261031T1857Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3383 (slice 19). Continues #7334 (merged).

What changed

Finding: the audit/LLM recorder sections (AUDIT_SECTIONS, FACT_LINES, FACT_SUMMARIES), the refraction differential (SET_CHANNELS) and the answer-key drafts (DRAFT_SECTIONS) were already table-driven by earlier slices, so the shared seams need no edit. What was missing is any tie from those tables to the registry. This PR adds it:

  • FactChannel.differential names the SetChannel that compares a channel (7 channels set it).
  • 4 tests in test_fact_channels.py: every per-file payload_key has an AuditSection and a FactLine (two listed exemptions with reasons), recorder sections name registered keys, and SET_CHANNELS and differential= claim each other one-to-one.
  • how_to_add_a_fact_channel.md and the add-fact-channel skill list the actual per-channel edits.
    No DB, golden or differential output changes (no parsing code touched).

Class / Sibling gaps

Class: shared seams a new fact channel must edit by hand (#3383's list). Members: galaxy_ir SCOPE + loader (checked by test), recipe table (checked), READMEs (checked), record_keeper insert / DDL and state_rehydrator restore (registry-driven), audit / llm sections (table + registry check, this PR), differential (SET_CHANNELS + differential, this PR), answer-key reader (DRAFT_SECTIONS, table-driven).
Sibling gaps: the recipe table, SCOPE comment and report sections are checked against the registry, not generated from it, so a new channel still adds one row in each table beside its registry line (#3383 acceptance "single registry line" is not fully met). call_site / transaction keep custom insert paths. Acceptance bullet 1 (existing channels migrated byte-identical) and bullet 3 (recipe and skill updated) are met.

Remaining slices

  1. Move AuditSection / FactLine declarations onto FactChannel (needs _when/_LINE helpers extracted to a data-only module): fact_channels.py, audit_recorder.py, llm_recorder.py, a helpers module, tests.
  2. Generate the recipe channel table and SCOPE comment from the registry.
  3. Fold the call_site / transaction custom insert into a registry hook.

Gates

pr_gates --fast 9/9 pass (via heavy-run); test_fact_channels.py 30 passed; tree-wide guards run. Ratchets not run: no parsing, golden or ledger input changed.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 31, 2026 19:12
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 19:16
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 1865ae4 into main Oct 31, 2026
105 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/3383-20261031T1857Z branch October 31, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant