Skip to content

feat(changelog): commit an auditable evidence ledger for filtered sources - #116

Merged
nibzard merged 1 commit into
mainfrom
feat/changelog-evidence-ledger
Aug 4, 2026
Merged

feat(changelog): commit an auditable evidence ledger for filtered sources#116
nibzard merged 1 commit into
mainfrom
feat/changelog-evidence-ledger

Conversation

@nibzard

@nibzard nibzard commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Why

#112 reported non_material_docs: 32 and nothing else, so there was no way to tell whether a real change had been dropped. The detail a reviewer needs was already being computed, then thrown away:

Where What it held Written on a real run?
generate-changelog-draft.ts:1341-1350 per-group reason, PR, commit SHA + subject No, only inside createPreviewWorkspace (gated on options.preview)
model-output.json the model's discardedItems with reasons No, preview only
PR body reason counts Yes
Workflow artifact upload draft, PR body, cover workdir Yes, and it carried no evidence

Commits dropped by shouldSkipCommitAuthor never reached a change group either, so they were absent from every reason bucket with nothing reconciling the totals.

What changed

The ledger is built on every run and committed to scripts/changelog/audit/<n>.json. Actions artifacts expire, so the committed file is what makes an exclusion answerable months later. It is also uploaded as a run artifact and rendered into the run log on a quiet week, when no PR exists to carry it.

Exclusions are split by how much a reviewer has to trust them. Heuristic reasons (non_material_docs, routine_maintenance, internal_only, benchmark_maintenance, non_recipe_change, plus missing_changed_files because it means lost evidence) come from regexes and commit types, so a real change can hide behind them. They get an open Needs review block in the PR body, capped at 10 with an explicit overflow line rather than a silent truncation. Structural reasons fold into a <details>.

The reconciliation is stated, so a silent drop is visible:

- Commits collected: 71 (3 skipped as an automated author before grouping)
- Logical changes: 40 (4 eligible, 36 excluded, 0 unaccounted)

Redaction is driven by explicit repository visibility. Five of six monitored repos are public; 0xnenlabs/steel and steel-dev/infra are not, and public-repo artifacts and job logs are publicly downloadable, so there is no "keep it in CI" option. Private sources keep their links, SHAs, and file counts but not their pull request titles, commit subjects, or file paths. An unconfigured repository is treated as private, so a newly monitored source cannot leak before someone declares it. The same rule gates the model's discard prose: text survives only when every reference behind it is public.

A redacted heuristic row still tells a reviewer where to look:

- `internal_only` 0xnenlabs/steel [#812](https://github.com/0xnenlabs/steel/pull/812) (1 commit, 2 files)

Testing

15 new cases in tests/changelog-v2.test.ts covering confidence classification, redaction in both directions, the unknown-repo default, reconciliation including the injected-drift case, the needs-review cap, and the rendered section layout. The preview CLI test now asserts the ledger records an author-skipped bot commit that never reaches a group, which is the hole that had no coverage at all.

bun test tests/changelog-v2.test.ts 67 pass, bun run typecheck and bun run check clean.

Unrelated and pre-existing on main: tests/e2e/llm-endpoints.test.ts fails on the homepage logo class assertion (class="shrink-0" vs shrink-0 self-center sm:self-auto), from 9258122. Left alone.

…rces

The generator already built per-group exclusion detail, but only inside
`--preview`, into a tmpdir. The weekly cron run discarded it and left the PR
body with reason counts alone, so a reviewer could not tell whether a real
change had been dropped. Commits skipped by author never reached a group at
all, so they were missing from every count.

Every run now builds an evidence ledger and commits it to
`scripts/changelog/audit/<n>.json`, where it outlives the Actions artifacts.
Each exclusion carries a confidence: heuristic reasons (regex, commit type,
missing changed files) go in an open "Needs review" block in the PR body,
structural ones fold away. The ledger reconciles collected commits against
logical changes, eligible and excluded groups, records author skips
separately, and reports a non-zero `unaccounted` when a group vanishes
between grouping and classification.

Repository visibility is now explicit in the config and decides redaction:
private sources keep their links, SHAs, and file counts but not their titles,
subjects, or paths, and an unconfigured repository is treated as private. The
same rule gates the model's own discard list.
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 2:54pm

Request Review

@nibzard
nibzard merged commit c19b0bc into main Aug 4, 2026
2 of 3 checks passed
@nibzard
nibzard deleted the feat/changelog-evidence-ledger branch August 4, 2026 14:59
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