Repository navigation
feat(hydra-gates): gate 122 reports against a five-star profile on request - #879
Merged
Merged
Conversation
…quest SIG publishes no 5-star limits, so the five-star profile holds a report to half of each 4-star limit: duplication 2.8%, unit size 23.6/11.6/4.2%, McCabe 10.1/3.7/0.55%, parameters 7.5/1.65/0.45%, module coupling 5.0/2.8/0.95%, component independence 96.9%, entanglement 0.0385. Select it with `report --profile five-star` or HYDRA_GATE_SIG_PROFILE. four-star stays the default, the ratchet's unit bounds do not change, and the gate stays advisory. An unknown profile exits 2. Assisted-by: ClaudeCode:claude-opus-5-5
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
Gate 122 (
check_sig_maintainability.py) gets a selectable profile for report mode:four-star(default): the SIG/TUV NORD CERT Guidance for Producers v17.0 limits, unchanged.five-star: half of each 4-star limit, since SIG publishes no 5-star limits. Duplication 2.8%, unit size >15/30/60 at 23.6/11.6/4.2%, McCabe >5/10/25 at 10.1/3.7/0.55%, parameters 3+/5+/7+ at 7.5/1.65/0.45%, module coupling >10/20/50 at 5.0/2.8/0.95%, component independence at least 96.9%, entanglement 0.0385.Select it with
report <app> --profile five-star, orHYDRA_GATE_SIG_PROFILE=five-starwhen the flag is absent (the runner passes its environment through, so a workflow can set the variable). An unknown profile exits 2. The report JSON gainsprofileandstars; the markdown and the census line name the profile (N of M 5-star checks met).What does not change: the ratchet's unit bounds (NLOC > 60, McCabe > 10, 5+ parameters), the default, and the gate's advisory status.
Tests
New
Profilesclass intest_check_sig_maintainability.pyon a fixture with 16.9% of its PHP in a unit over 30 lines (inside 4 stars, outside 5 stars):--profile five-starmissesphp unit_size >30on the same code, and carries the halved duplication, independence and entanglement limitsVerified locally
python3 hydra-gates/scripts/lib/test_check_sig_maintainability.py: 29 tests OKtest_gate122_sig_maintainability_scope.sh: all arms passed, with and withoutHYDRA_GATE_SIG_PROFILE=five-startest_gate_discarded_counts_and_empty_deltas.sh: 37 assertions, 0 failures (a first run under machine load aborted one gate-15 run before its summary; main and a rerun of this branch are both 0 failures)test_gate_acceptance_matrix.sh: 263 passed, 2 failed, both from one runner run on themanifest-l10n-coverage/plantedfixture that aborted before its COVERAGE line under load. Rerunning the runner on that fixture on this branch and on main gives the same result: COVERAGE printed, gate 102 FAIL as declared, gate 122 NOT APPLICABLE.AI tools were used to write this change (Claude Code).
🤖 Generated with Claude Code