Skip to content

fix(gate-14): the engine's own AppHost generics are a library, not unrouted endpoints - #917

Merged
WilcoLouwerse merged 1 commit into
mainfrom
fix/gate-14-engine-generics-are-a-library
Nov 6, 2026
Merged

WilcoLouwerse merged 1 commit into
mainfrom
fix/gate-14-engine-generics-are-a-library

Conversation

@WilcoLouwerse

Copy link
Copy Markdown
Contributor

Summary

gate-14 (route-reachability) enumerates every lib/**/Controller/*.php and expects a route for each 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: Bootstrap::register() binds them there and Routes::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, beta and development alike: twelve missing-route lines 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: skip lib/AppHost/Controller/Generic*Controller.php when this repo defines class Bootstrap with a register() in lib/AppHost/Bootstrap.php. A leaf imports OCA\OpenRegister\AppHost\Bootstrap and never ships that file, so a leaf that copies a generic into its own lib/AppHost/Controller/ is still judged. The route-side check (method-not-found-on-target-controller) is untouched.
  • Control pair under 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 minus Bootstrap.php. Both GenericDashboard methods and gadget#run reported. Exactly three findings.
  • test_gate_route_registration.sh: ten assertions over the pair.

Checks

  • Ran: bash hydra-gates/scripts/lib/test_gate_route_registration.sh → 71 passed, 0 failed (61 existing + 10 new)
  • Ran: bash hydra-gates/scripts/lib/test_gate_3_14_comment_evidence.sh → exit 0
  • Ran: php -l on the fixture files
  • Running: the patched runner against openregister beta with --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

…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>
@WilcoLouwerse

Copy link
Copy Markdown
Contributor Author

Result of the patched runner against openregister beta (--base origin/beta, hydra-gates from this branch): [gate-14] route-reachability: PASS where the unpatched runner reported twelve missing-route findings over the four generics an hour earlier (same tree). Gate 4 PASS as well after openregister#5953. The run's remaining failures are local-tooling (gates 22 and 53: Ajv not resolvable without node_modules) plus gates 57 and 67, which the unpatched runner reported identically; none of them are touched by this change.

@WilcoLouwerse
WilcoLouwerse merged commit 0720ac9 into main Nov 6, 2026
57 checks passed
@WilcoLouwerse
WilcoLouwerse deleted the fix/gate-14-engine-generics-are-a-library branch November 6, 2026 14:37
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