Repository navigation
fix(hydra-gates): gate 67 judges only OpenRegister's lib/Contract/ - #876
Merged
Merged
Conversation
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.
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 67 (
openregister-contract-parity, ADR-084) now judges only OpenRegister. Before this change, it compared any repository'slib/Contract/withhydra-gates/contracts/. opencatalogi now has its ownlib/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.<id>fromappinfo/info.xml. If info.xml is absent or unreadable, it uses the composer package name instead (conductionnl/openregister→openregister).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 terminalchecked 0 file(s)line, so the runner's crash detection still works.Fixtures
In
scripts/test-fixtures/gate-acceptance/openregister-contract-parity/:planted/andclean/now include anappinfo/info.xmlwith<id>openregister</id>. Without it they would be skipped.foreign-app/: opencatalogi, with alib/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/andclean/. The two new trees are run byscripts/lib/test_gate67_contract_parity_scope.sh, which follows the gate-111no-nodesprecedent. It runs the checker on all four trees, then runs the real runner onforeign-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 becauseforeign-appfails 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.-S warningon 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:main(checked in a worktree atorigin/main).test_check_connections_declaration.js,test_gate116_connections_declaration_scope.shandtest_gate_45_to_55_acceptance.shfail because Ajv is not installed on this machine.test_gate_discarded_counts_and_empty_deltas.shfails 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.shfailed 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
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.🤖 Generated with Claude Code