Done: a test enumerates every POST, PUT, PATCH and DELETE route the router holds (src/http/route_marks.ts names the marks), sends each with a foreign Origin and no token, and expects a refusal that is not a 2xx or 3xx; a route with a reason to differ (webhook, OAuth token, contribute) is on a named allow list with one sentence each, and a new unlisted route fails the test. Suggested: mason.
Risks: The allow list drifting into a catch-all; keep each entry one sentence with its authentication.
Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.
Done: a test enumerates every POST, PUT, PATCH and DELETE route the router holds (src/http/route_marks.ts names the marks), sends each with a foreign Origin and no token, and expects a refusal that is not a 2xx or 3xx; a route with a reason to differ (webhook, OAuth token, contribute) is on a named allow list with one sentence each, and a new unlisted route fails the test. Suggested: mason.
Risks: The allow list drifting into a catch-all; keep each entry one sentence with its authentication.
Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.
Files: test/mutations-same-origin.test.ts, src/http/route_marks.ts