Skip to content

fix(hydra-gates): gate 67 judges only OpenRegister's lib/Contract/ - #876

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/gate-67-openregister-only
Oct 29, 2026
Merged

rubenvdlinde merged 1 commit into
mainfrom
fix/gate-67-openregister-only

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

Gate 67 (openregister-contract-parity, ADR-084) now judges only OpenRegister. Before this change, it compared any repository's lib/Contract/ with hydra-gates/contracts/. opencatalogi now has its own lib/Contract/ from the SIG decoupling work (its own interfaces and AppIdentity), and integriq may get one too. Gate 67 failed there on drift in a contract those apps do not own.

  • The checker reads <id> from appinfo/info.xml. If info.xml is absent or unreadable, it uses the composer package name instead (conductionnl/openregister → openregister).
  • For any other app it exits 3 (not applicable) and prints the reason: lib/Contract/ here is this app's own, not the OpenRegister contract (app id opencatalogi, from appinfo/info.xml <id>). This path also prints the terminal checked 0 file(s) line, so the runner's crash detection still works.
  • Exit 3 used to always mean "no lib/Contract/", and the runner's skip text said so. The runner now shows the checker's own SKIP line, so the verdict states the actual reason.

Fixtures

In scripts/test-fixtures/gate-acceptance/openregister-contract-parity/:

  • planted/ and clean/ now include an appinfo/info.xml with <id>openregister</id>. Without it they would be skipped.
  • foreign-app/: opencatalogi, with a lib/Contract/ that differs from the shipped copy. Expected: NOT APPLICABLE.
  • composer-only/: no info.xml, openregister named only in composer.json, with one drifted file. Expected: FAIL.

The acceptance matrix only reads planted/ and clean/. The two new trees are run by scripts/lib/test_gate67_contract_parity_scope.sh, which follows the gate-111 no-nodes precedent. It runs the checker on all four trees, then runs the real runner on foreign-app/ and checks the gate-67 verdict line.

Verified

  • test_gate67_contract_parity_scope.sh: exit 0, all 5 cases. Mutation check: with the old checker restored, it exits 1 because foreign-app fails with 3 findings and the runner says FAIL.
  • test_gate_acceptance_matrix.sh: exit 0 (266 PASS, 0 FAIL, 93 of 100 gates fixtured; gate 67's planted and clean arms green).
  • tests/test-hydra-gates-bin.sh: exit 0 (70 passed).
  • test_gate_errexit_discipline.sh, test_gate_numbers_unique.sh: exit 0.
  • ShellCheck -S warning on the runner and the new suite: exit 0.
  • tests/run-helper-suites.sh: 133 passed, 1 quarantined, 5 failed. The 5 failures are not from this change:
    • 4 fail the same way on main (checked in a worktree at origin/main). test_check_connections_declaration.js, test_gate116_connections_declaration_scope.sh and test_gate_45_to_55_acceptance.sh fail because Ajv is not installed on this machine. test_gate_discarded_counts_and_empty_deltas.sh fails because gate 122 is not on its advisory allowlist (left over from feat(hydra-gates): gate 122 holds changed units to the SIG 4-star bounds #871).
    • test_gate_route_auth.sh failed 1 of 47 in the full run, which shared the machine with other lanes. Rerun alone on this branch: exit 0, 47 of 47.

Notes for review

  • A repository with lib/Contract/ but no info.xml <id> and no composer name is skipped, with "app id unknown" in the reason. Every Nextcloud app has one of the two.
  • In hydra, the only mention of gate 67 is ADR-084, which describes the comparison and does not claim a wider scope. The hydra-gates skill has no gate-67 row, so no companion PR is needed.

🤖 Generated with Claude Code

Gate 67 compared any repository's lib/Contract/ with hydra-gates/contracts/.
Only OpenRegister publishes that contract, so an app with its own interfaces
in lib/Contract/ (opencatalogi since its decoupling work) failed on drift it
neither owns nor can fix.

The checker now reads the app id from appinfo/info.xml, with the composer
package name as the fallback, and exits 3 (not applicable) for any other
app with the reason "lib/Contract/ here is this app's own, not the
OpenRegister contract". The terminal "checked N file(s)" line is printed on
that path too. The runner shows the checker's SKIP reason instead of a fixed
"no lib/Contract/" text.

The planted and clean fixtures gain an info.xml naming openregister. Two
new trees, foreign-app (opencatalogi, drifted: not applicable) and
composer-only (openregister by composer name, drifted: fail), are run by
test_gate67_contract_parity_scope.sh, through the checker and the runner.
@rubenvdlinde
rubenvdlinde merged commit 327c512 into main Oct 29, 2026
48 of 49 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