Repository navigation
feat(governance): gate provenance in every report (G7) - #25
Merged
Merged
Conversation
- provenance_line(): one-line self-describing gate summary (thresholds + source: agentdiff.toml path or defaults) - surfaced in terminal summary panel, JSON gate_provenance field, PR comment footer — every diff answers 'what rules judged me?' - 6 new tests (339 total)
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.
What
Every AgentDiff report now self-describes its rules:
Gate: max_divergence=0.3, max_loops=0, max_cost_delta=10.0% - source: agentdiff.toml— in the terminal summary panel, the JSON (gate_provenancefield), and the PR comment footer.Why
G7 from the release plan. A diff that doesn't say which thresholds judged it forces reviewers to open the config; with provenance embedded, 'what rules judged me?' is answered in place — pairs with G6's change warnings.
How
governance.provenance_line(cfg, config_path)— resolves effective gates, names the source (agentdiff.toml path ordefaults)DiffReport.gate_provenance— additive optional field), PR footer (<sub>)find_config_file()Testing
6 new tests (339 total): defaults vs config source, opt-in recovery-ratio appears, all three formats, explicit
--configpath shown.