Skip to content

feat(hydra-gates): gate 122 estimates the SIG maintainability rating and its levers - #911

Merged
rubenvdlinde merged 2 commits into
mainfrom
feat/sig-rating-estimate
Nov 7, 2026
Merged

rubenvdlinde merged 2 commits into
mainfrom
feat/sig-rating-estimate

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Base: this branch stacks on #909 (feat/sig-v18-star-bands-and-gates-json). Review or merge #909 first; until then this diff also shows #909's commit.

What changes

Gate 122's report gains a rating section: an estimate of SIG's continuous maintainability rating (0.5 to 5.5).

  • Per check: linear interpolation between the caps of the star level a share falls in, from Alves, Correia and Visser 2011 (eq. 1). A property is the minimum over its checks.
  • Per property across languages: the mean of the per-language ratings, weighted by the code each property measures.
  • Per sub-characteristic: the plain mean of its mapped properties (the criteria v12.0 mapping, without volume and component balance).
  • Overall: power mean of the five sub-characteristics. SIG does not publish the 2026 exponent, so the report gives p = 1 and p = -1 as a range.
  • Levers: per property and language, the overall gain from fixing the next 1,000 exposed lines (worst band first), and the lines needed to raise the property by 0.5. A lever is marked sure when it is in the top 3 under both exponents.
  • Report rows now also carry loc, the lines above each bound, and independence carries hidden_loc.
  • Component independence and entanglement get assumed 3-star and 2-star caps for the estimate only. Each step doubles the allowed exposure. Their discrete check still reads <4 below 4 stars.

Sources, quotes and every assumption: ~/sig-lanes/shared/research/sig-stars.md, section 4.

Verified

  • python3 hydra-gates/scripts/lib/test_check_sig_maintainability.py: 57 tests OK, 11 of them new. They cover the Alves 2011 ArgoUML example (2.68), the interpolation edges, p = 1 being the plain mean, LOC weighting, a language without code, a single language, a report without structure, independence and entanglement below 4 stars, lever order on a fixture, and the bisection for +0.5.
  • test_check_sig_floor.py: 35 tests OK.
  • test_gate122_sig_maintainability_scope.sh and test_gate123_sig_floor_scope.sh: all arms pass.
  • The estimate was run against the measured openregister and opencatalogi reports and the output read. The ratings and levers are plausible, but no SIG rating exists to compare them with.

Not verified

  • No comparison with a real Sigrid rating. The exponent, the 2026 sub-characteristic mapping, the language weighting and the lower caps for independence and entanglement are assumptions.
  • No CI run was watched.

🤖 Generated with Claude Code

…tes.json per run

Gate 122 now rates against the 4-star limits of the SIG/TUV NORD CERT
Guidance for Producers v18.1 (2026 model): unit size 48.0/24.2/9.1%,
complexity 20.7/7.5/1.1%, interfacing 15.4/3.4/0.9%, coupling 9.7/5.3/1.8%,
duplication 5.8%, entanglement 0.075, independence 94.5%. Volume is not
rated. Every report row carries the star level its share earns: 5, 3 and 2
stars from the v18.1 limits scaled by the band ratios of Alves, Correia and
Visser 2011 (duplication: Heitlager 2007), 1 star below 2. Independence and
entanglement have 5 stars at half the 4-star exposure and no band under 4.
The five-star profile uses the derived 5-star band instead of half of each
4-star limit.

Gate 123 records the guidance in the floor file and never lowers a floor on
re-recording: a floored check the new limits miss stays in the file and is
named, so the change of status is visible.

The runner writes gates.json next to the findings logs: every declared gate
with its verdict, findings count, scope and matrix category.

Assisted-by: ClaudeCode:claude-opus-5-5
…and its levers

The report now carries `rating`: a continuous 0.5 to 5.5 estimate per check
(Alves, Correia and Visser 2011, eq. 1), per property and language, per
property across languages (weighted by code), per sub-characteristic and
overall. SIG publishes no power-mean exponent for the 2026 model, so the
overall rating is reported under p = 1 and p = -1 as a range.

Levers: per property and language, the overall gain from fixing the next
1,000 exposed lines worst band first, and the lines needed to raise the
property by 0.5. A lever is sure when it ranks in the top 3 under both
exponents. Report rows now also carry the lines above each bound.

Component independence and entanglement get assumed 3 and 2 star caps for
the estimate only; their discrete check still reads <4 below 4 stars.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit c67bf79 into main Nov 7, 2026
52 of 53 checks passed
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