Repository navigation
test: snapshot boot HTTP registration and auth contracts - #1791
zack-dev-cm wants to merge 1 commit into
Conversation
Signed-off-by: zack-dev-cm <112114097+zack-dev-cm@users.noreply.github.com>
|
@zack-dev-cm is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Related to #1740: adds the route-safety prerequisite before splitting the API into modules.
The boot snapshot covers all 153 HTTP registrations: 147 REST routes and six MCP bridges, including delegated graph, compression and viewer routes. It compares complete registration objects in their original order with a checked-in fixture, for both configured and unset secrets, and verifies that every target function exists.
Auth checks dispatch a wrong bearer through each route's middleware and registered handler: 152 routes reject it and liveness stays public. This also covers handlers that enforce auth without middleware metadata. Separate checks cover valid and missing tokens, hostile Origin, unset-secret behavior and denial before graph-status fanout.
The test collector preserves complete trigger configuration and observer source/target/options, rejects empty inventories and duplicate method/path pairs, and has focused coverage for webhook flags, observer IDs and concurrency limits. Its observer tests cover the capture contract; the boot snapshot targets the current trigger runtime.
Validation: nine focused tests pass; seven isolated mutations demonstrate detection of route omission, method/middleware drift, duplicates, manual-auth bypass, lost observer options and empty capture. The full suite passes 4,940 tests with seven skipped, using a child-only DNS fixture for eight example peer names. Build, skills generation/check, docs sync/check and eval type check pass. The collector passes a dedicated strict check; the test roots retain 17 existing transitive diagnostics, with no new diagnostics.
The tests use real registration/auth functions with SDK dispatch and in-memory KV doubles. They do not start an engine HTTP worker or cover every authorized handler body. Route extraction, the MCP tool table and CLI split remain separate work.
Summary by CodeRabbit