Repository navigation
fix(gate-14): the engine's own AppHost generics are a library, not unrouted endpoints - #917
Merged
Merged
Conversation
…routed endpoints gate-14 enumerates every lib/**/Controller/*.php and expects a route per public Response-returning method. In the AppHost engine (the repo that ships lib/AppHost/Bootstrap.php) the generics under lib/AppHost/Controller/Generic* are shipped for leaf apps, where Bootstrap::register() binds them and Routes::standard() names their routes; the engine routes only what it uses itself. Judged like any controller they were a permanent finding in exactly one repo: twelve missing-route lines over GenericDashboard, GenericPreferences, GenericSettings and GenericStore on every openregister pull request, beta and development alike, measured 2026-11-06. The exemption is one directory in one kind of repo: lib/AppHost/Controller/Generic*Controller.php, and only when this repo defines class Bootstrap with a register() in lib/AppHost/Bootstrap.php. Control pair apphost-engine-generics/ (engine: GenericDashboard exempt, gadget#run still reported, routed GenericHealth still resolved) and apphost-engine-generics-leaf/ (the same tree minus Bootstrap.php: both GenericDashboard methods reported). test_gate_route_registration.sh: 71 passed, 0 failed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
Result of the patched runner against openregister |
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.
Summary
gate-14 (route-reachability) enumerates every
lib/**/Controller/*.phpand expects a route for each public Response-returning method. In the AppHost engine, the repo that shipslib/AppHost/Bootstrap.php, the generics underlib/AppHost/Controller/Generic*are shipped for leaf apps:Bootstrap::register()binds them there andRoutes::standard()names their routes. The engine itself routes only what it uses (GenericHealth#index,GenericMetrics#index).Judged like any controller they are a permanent finding in exactly one repo. Measured today on openregister,
betaanddevelopmentalike: twelvemissing-routelines over GenericDashboard, GenericPreferences, GenericSettings and GenericStore on every pull request, with no route anyone would add, since adding one turns a library class into a live endpoint.Change
run-hydra-gates.sh, gate-14 loop: skiplib/AppHost/Controller/Generic*Controller.phpwhen this repo definesclass Bootstrapwith aregister()inlib/AppHost/Bootstrap.php. A leaf importsOCA\OpenRegister\AppHost\Bootstrapand never ships that file, so a leaf that copies a generic into its ownlib/AppHost/Controller/is still judged. The route-side check (method-not-found-on-target-controller) is untouched.scripts/test-fixtures/route-registration/:apphost-engine-generics/: engine marker present; unrouted GenericDashboard (page,catchAll) is NOT reported;gadget#run(conventional, routed nowhere) MUST still be reported; the routed GenericHealth resolves through its binding. Exactly one finding.apphost-engine-generics-leaf/: the same tree minusBootstrap.php. Both GenericDashboard methods andgadget#runreported. Exactly three findings.test_gate_route_registration.sh: ten assertions over the pair.Checks
bash hydra-gates/scripts/lib/test_gate_route_registration.sh→ 71 passed, 0 failed (61 existing + 10 new)bash hydra-gates/scripts/lib/test_gate_3_14_comment_evidence.sh→ exit 0php -lon the fixture filesbetawith--base origin/beta; gate 14 reported the twelve findings before the change, the result after it is noted in the first comment🤖 Generated with Claude Code