Skip to content

ci(quality): move the hydra-gates pin v1.0.1 -> v1.2.0 - #277

Closed
rubenvdlinde wants to merge 1 commit into
developmentfrom
ci/hydra-gates-pin-v1.2.0
Closed

rubenvdlinde wants to merge 1 commit into
developmentfrom
ci/hydra-gates-pin-v1.2.0

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Moves this repo's hydra-gates-ref pin from v1.0.1 to v1.2.0.

Why

v1.0.1's gate-5 (route-auth) had four defects. Two were reported as
ConductionNL/.github#153;
the other two were found while fixing it, and one of those is the expensive
direction:

  1. A resolution failure was reported as a security finding. When
    lib/Controller/<X>Controller.php did not exist, the verdict read
    "N routed method(s) missing auth attribute". On ADR-040 AppHost adopters
    those files are absent by design — the controllers are OpenRegister
    generics aliased at runtime — and the attributes live in the openregister
    package. The gate was reporting "I cannot see it" as "it is absent".
  2. It was not diff-scoped. The missing-file branch continued before
    the _in_scope call, so those findings fired on a package.json-only
    Dependabot bump. Now scoped per ADR-020.
  3. camelCase route slugs were invisible. Gate-5 read route names through
    '[a-z_]+#…'. Gate-14 already used a wider regex; the narrower one was the
    security gate. On scholiq, 14 of 37 routed names matched — the other 23
    were never opened.
  4. The 20-line attribute lookback was not bounded by the start of the
    method,
    so a short guarded method within 20 lines above an unguarded one
    donated its #[NoAdminRequired] to its neighbour. A false negative, and
    invisible, because a pass leaves no log.

Fixed in ConductionNL/.github#162 with 25 control-pair assertions, mutation-tested
against three realistic degradations.

v1.2.0 also brings, from v1.1.0, a countable gate-22 (it printed
FAIL — 0 while a real finding sat in its log) and the runner's COVERAGE
accounting
— v1.0.1's summary printed only N gate(s) failed, so a gate
that never ran was indistinguishable from one that passed.

Expect red

Gate-5 now sees code it never saw. New findings from this PR are the point of
it, not a regression.
Nothing has been baselined or suppressed to keep a repo
green.

⚠️ Note for whoever reads the job log: the Hydra Gates job on this PR diffs a
single workflow file, and the gates are diff-scoped — so its green says almost
nothing. The measurement that matters is the next real code PR.

🤖 Generated with Claude Code

v1.0.1's gate-5 (route-auth) could not tell "this routed method has no auth
attribute" from "I could not resolve the controller class", and reported both
as the former. It also read route names through `'[a-z_]+#...'`, so every
camelCase route slug was invisible to it in either direction, and its 20-line
attribute lookback could borrow the PREVIOUS method's attribute.

Fixed in ConductionNL/.github#162 (closing #153). v1.2.0 also carries the
runner's COVERAGE accounting, which v1.0.1 does not have at all: v1.0.1's
summary printed only "N gate(s) failed", so a gate that never ran was
indistinguishable from one that passed.

EXPECT NEW FINDINGS. gate-5 now sees code it never saw. Red is the honest
outcome of a measurement that previously was not taken; nothing here is
baselined or suppressed to avoid it.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/scholiq @ e56eec0

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-specs ✅
composer ✅ ✅ 100/100
npm ✅ ✅ 750/750
PHPUnit ✅
Newman ⏭️
Playwright ⏭️
Hydra gates ✅

Quality workflow — 2026-08-05 13:29 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Heads-up before this merges: v1.2.0 does not fix the failure, and any green tick on this PR predates the cause.

At 2026-08-05T13:52Z, .github commit f7eaf2a (#164) flipped hydra-gates-require-full-coverage to default true in the shared quality.yml. Every repo references that workflow at @main, so the flip is live everywhere immediately. The flag requires a gate to declare itself not-applicable, and that vocabulary ships in the pinned package:

pin _skip calls
v1.0.1 0
v1.2.0 0
v1.3.0 36

v1.2.0 predates #164 and has no more ability to say "not applicable" than v1.0.1 does. So it fails the coverage assertion in exactly the same way.

Measured, same repo and branch, both runs after #164 merged (app-versions, one-file diff, diff-scoped as CI scopes it):

pin CI run quality / Hydra Gates
v1.2.0 31012647428 13:56Z failure — --require-full-coverage was set: treating incomplete coverage as failure
v1.3.0 31013564400 14:07Z success — 52 applicable gates ran and passed, 11 named NOT APPLICABLE

If this PR currently shows a green Hydra Gates, check the run's timestamp — a run created before 13:52Z executed against the previous workflow and is evidence about a contract that no longer exists.

One character to change: hydra-gates-ref: v1.2.0 -> v1.3.0. Independently confirmed by doriath#160, which changed that one line and nothing else and went failure -> success.

I have deliberately not opened a competing PR here to avoid a conflicting edit on the same line — this repo is yours. I've rolled v1.3.0 to the rest of the fleet; ping me if you'd rather I pushed the one-line change.

@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Closing as stale, and now a regression.

This PR moves hydra-gates-ref v1.0.1 -> v1.2.0. Measured on development just now, this repo is already at:

hydra-gates-ref: v1.3.0
enable-hydra-gates: true

Merging would move the pin backwards v1.3.0 -> v1.2.0. The diff touches only .github/workflows/code-quality.yml (comment + pin), so there is nothing else to salvage.

Measurements recorded from this PR before closing — these were the most repo-specific findings in the batch and they stay valid under v1.3.0:

  • gate-5 (route-auth) was emitting four FALSE findings here on every PR, dependency-only Dependabot bumps included. Scholiq adopts ADR-040 AppHost, so its health/metrics/preferences controllers are OpenRegister generics aliased at runtime by Bootstrap::register() — the files are absent by design and the auth attributes live in the openregister package. v1.0.1's gate was reporting "I could not open the class" as "the attribute is missing". Fixed in fix(gate-5): route-auth reported a resolution failure as a security finding, and never saw a camelCase route .github#162 (closing retrofit: reverse-spec ai-companion-tools (5 REQs / 15 methods) #153); the gate is now diff-scoped per ADR-020.
  • 23 of 37 routed names were invisible to the gate. v1.0.1 read route names through '[a-z_]+#…', so every camelCase slug was skipped. Measured here: only 14 of 37 matched. paymentTransaction#callback, keyAdmin#generateKey and credentialVerify#verify were among the 23 never opened. Expect genuine new findings from the tier — that is the fix working, not a regression.
  • v1.0.1's summary could not distinguish "62 gates green" from "62 gates never ran"; the runner's COVERAGE accounting lands in v1.2.0+ and is present at v1.3.0.

Intent already delivered on development at a strictly newer pin.

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