Repository navigation
feat(governance): threshold-change flagging — the Goodhart guard (G6/G7) - #24
Merged
Merged
Conversation
- governance.py: diff_gate_thresholds() compares effective gate values between baseline config and current config (max_divergence, max_loops, max_cost_delta, max_recovery_ratio) - CLI: --baseline-config PATH on diff; PR format renders [!WARNING] block above the gate table listing every changed threshold; --explain prints the same summary; missing file exits 2 - agentdiff-check action: new 'baseline-config' input, CI one-liner: git show origin/main:agentdiff.toml > /tmp/baseline-agentdiff.toml - Docs: 'Gate governance (Goodhart guard)' section in Configuration guide, README flag reference - 14 new tests (333 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
--baseline-config PATHonagentdiff diff. When gate values in the baseline'sagentdiff.tomldiffer from this run's, the PR report renders a[!WARNING]block above the gate table:max_divergence: 0.25 → 0.40— right next to the diff it let through.Why
G6/G7 from the release plan (0.4.0 Honest Gate). A threshold tuned until CI goes green stops being a control — this makes loosening the gate as reviewable as the code it guards. Directly answers the Goodhart critique (see blog).
How
governance.py:diff_gate_thresholds()compares effective gate values (config-or-default) formax_divergence,max_loops,max_cost_delta,max_recovery_ratiodiff --baseline-config: PR format renders the warning;--explainprints the same summary; missing file exits 2agentdiff-checkaction: newbaseline-configinput — CI one-linergit show origin/main:agentdiff.toml > /tmp/baseline-agentdiff.tomlTesting
prandexplainformatsChecklist