Track verbatim sections in the fleet burn-down report - #398
Merged
Conversation
Extends the fidelity-honesty tool to the per-section verbatim units #397 added, so the fleet-wide propagation state is one regenerable artifact - the #305 answer. - fidelity_honesty.py: check_units enumerates whole intent/verbatim files plus each verbatim section; fidelity_pass computes each unit's fleet spread through the same region extractor and git-history stale check the audit uses (canonical_text folded in). A verbatim section is labelled "path § section". - validate.py: a divergence-ledger disposition may target a section unit ("path § section"), so a section-scoped divergence can carry its own disposition. - divergences.json: note updated for section-scoped dispositions. - reports/divergences.md: regenerated. It now surfaces the three universal AGENTS.md rule sections as diverging in all 19 cataloged repos - every repo carries an older paraphrase. That is the #305 divergence made visible and tracked. Per the idempotent-artifact model this is current state, not a gate; the sections read as untriaged until a convergence disposition is recorded, which is appetite-driven. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the fidelity-honesty tooling and divergence ledger to treat verbatim Markdown sections as first-class units (labeled as path § section), enabling fleet-wide tracking of section-level drift in a single regenerable report artifact.
Changes:
- Update
spec/fidelity_honesty.pyto enumerate and evaluate both whole-file units and verbatim section units using the audit section extractor and git-history staleness check. - Update
spec/validate.pysospec/divergences.jsondispositions can target section units (path § section) in addition to whole files. - Regenerate
reports/divergences.mdto surface the newly tracked section-level divergences across the cataloged fleet.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| spec/validate.py | Adds section-unit labels into the manifest-unit set so the divergence ledger can disposition section-level units. |
| spec/fidelity_honesty.py | Adds unit enumeration for verbatim sections and uses the audit extractor/history logic to compute fleet spread per unit. |
| spec/divergences.json | Updates ledger note text to describe that dispositions can apply to whole-file or section units. |
| reports/divergences.md | Regenerated burn-down report reflecting section-level verbatim drift across the fleet. |
- fidelity_honesty.py: separate the downstream path from the canonical path. A reference-backed intent unit (e.g. codecov.yml) has its downstream copy at the entry's `path` but its canonical at the `reference` snippet; the refactor had fetched downstream content at the snippet path, making such a unit read as unavailable fleet-wide. Fetch at the downstream path, compare against the canonical path. - fidelity_honesty.py / validate.py: SECTION_SEP is ASCII " > " (path > section), not the non-ASCII section sign, per the ASCII-only prose rule. - validate.py: guard the section-label interpolation on string path/name so a malformed section entry does not synthesize a bogus "None > None" unit. - reports/divergences.md: regenerated (ASCII labels, codecov.yml no longer false-unavailable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- fidelity_honesty.py: a verbatim section's canonical_path now honors the entry's reference snippet when present (reference or path), matching whole-file units and the docstring, instead of always the entry path. Inert for AGENTS.md (no reference) but correct for a future reference-backed section-bearing entry. - validate.py: guard that sections is a list before iterating it for section-label paths, so an already-invalid sections type does not iterate a non-list. - divergences.json: the note now describes the actual section unit-key format (file path, a space-greater-space delimiter, then the section name) with an example, instead of the vague "path then section name". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- fidelity_honesty.py: check_units skips a non-list sections and requires a string name on a verbatim section, so a malformed manifest degrades to no section unit rather than crashing. - validate.py: actually error on a section object without a non-empty string name, so the ledger block's claim that malformed sections are reported by the files.json checks above now holds. Verified with a negative test (non-list sections, a nameless verbatim section, and a bare string section all skipped, the well-formed section still yielded). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An empty name passes the isinstance str check but is still invalid. check_units and the validate.py ledger-label loop now also require a non-empty name, so an empty name never produces a bogus "path > " unit label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The #305 fleet view. Extends the fidelity-honesty tool to the per-section verbatim units #397 added, so the whole propagation state is one regenerable artifact.
What
check_unitsenumerates whole intent/verbatim files plus each verbatim section;fidelity_passcomputes each unit's fleet spread through the same region extractor + git-history stale check the audit uses. A verbatim section is labelledpath § section.path § section), so a section-scoped divergence can carry its own disposition.AGENTS.mdrule sections (Repository Boundaries & Write Safety, Git and Commit Rules, Verification Discipline) as diverging in all 19 cataloged repos — every repo carries an older paraphrase.The point
This is the divergence #305 names, made visible and tracked in one artifact instead of hiding behind present-but-stale headings. Per the idempotent-artifact model it records current state, not a gate — the sections read as untriaged until a convergence disposition is recorded (appetite-driven; the obvious one is re-vendor the canonical to each repo).
Verification
validate.pygreen;fidelity_honesty.pyenumerates the three section units; report markdownlint-clean; no em-dash; CRLF/LF preserved.🤖 Generated with Claude Code