Skip to content

Fact channels: audit-report fact sections as an AUDIT_SECTIONS table (Part of #3383) - #6198

Merged
squid-protocol merged 3 commits into
mainfrom
churn/3383-audit-sections
Oct 23, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/3383-audit-sections

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3383 (slice 4: audit-report fact sections).

Change

AuditRecorder._mainframe_facts_block was 22 hand-written if rows: branches, one per fact channel, that every channel PR edited. It now iterates AUDIT_SECTIONS, a table of AuditSection(key, label, columns, where, render). Columns are (label, key[, default]) pairs, or _when(pairs, test) for keys a row carries only when set. A new channel adds one table row. how_to_add_a_fact_channel.md is updated.

Proof of byte-identity

  • 3000 randomized payloads (every key, mixed None / "" / 0 / lists) compared against the old method with json.dumps: 0 mismatches, same section order, same key order.
  • golden-lock.sh crucible_check.py (no update): full_precision PASS, zero_dependency PASS, so data_galaxy_audit.json is unchanged.
  • pr_gates --fast 7/7. tests/tools_recorders all pass. Pre-PR tree guards 194 pass. Time ratchet 0 over.
  • Not run: --ratchets (output is byte-identical and the golden check passed; no ledger or baseline input changed).

Class

Class: shared seams every fact channel edits.

member status
audit_recorder fact sections done here (22 sections)
llm_recorder fact summary lines remaining
galaxy_ir SCOPE comment / recipe channel table (doc vs registry check) remaining
Channels with a custom insert/restore (call_site, transaction, sql_statement, later per-file channels) not migrated into the persist registry

Remaining slices

  1. llm_recorder.py (_mainframe_facts_lines totals/sections, ~lines 617-870) as a table, plus its test.
  2. galaxy_ir SCOPE comment and the recipe channel table: generate or check against the registry in a test.
  3. Migrate the custom-insert channels into fact_channels.CHANNELS.

🤖 Generated with Claude Code

…(Part of #3383)

_mainframe_facts_block iterates a 22-row AuditSection table instead of 22 hand-written
branches. Output is byte-identical (3000 randomized payloads compared against the old
method; both golden masters pass unchanged).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 23, 2026 08:47
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 08:58
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6198 @ 8ab8f7a: 1 failed check(s)

== Small audits (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39927009065/job/120325754286
repro: no local equivalent; read the check page
errors:
##[error]Process completed with exit code 1.
log tail:
{
echo "## ⚠️ This PR modifies a golden-crucible fixture"
echo ""
echo "Files changed ($(echo "$CHANGED" | wc -l) golden-master part(s)):"
echo '' echo "$CHANGED" | head -n 100 echo ''
echo ""
echo "These files should only ever change via `tests/tools/update_golden_master.py`,"
echo "and the PR description should explain why GitGalaxy's output was expected to"
echo "change. Reviewers: confirm the description covers this before approving."
echo "For the semantic diff: `python tests/tools/bless_scope.py --from-head tests/golden_master_audit`."
} >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
BASE_REF: main
##[endgroup]
No golden master fixture changes in this PR.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/fe7dc0e4-14e7-48c5-8b8c-9474da88c78e' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 23, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (cfbefc7) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 09:16
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 80e22db into main Oct 23, 2026
59 checks passed
@squid-protocol
squid-protocol deleted the churn/3383-audit-sections branch October 23, 2026 09:41
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