You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(gateway,daemon,http): cover §27a's admin owner gate; make HTTP reject rather than drop it (H7)
The gate itself was already correct (daemon/dispatcher.ts, gateway/
dispatcher.ts both FORBIDDEN a non-admin naming owner) but untested: no
test proved a non-admin naming owner was refused, nor that an admin's
owner is what the resulting lease ends up owned by. Added both to
daemon/dispatcher.test.ts and gateway/dispatcher.test.ts; each verified to
fail when the corresponding gate is temporarily removed (the non-admin
test fails outright / times out, since the request proceeds instead of
being refused).
Separately: src/http/app.ts's leaseRequestBodySchema had no owner field at
all and wasn't .strict(), so a non-admin caller naming owner over HTTP got
silence where every other transport answers FORBIDDEN -- the exact
anti-pattern this PR's own operations.ts comment condemns for device.exec's
requesterId (round 4, F4: read-then-silently-ignore is answering as if an
identity was never named). Threaded owner through the schema,
LeaseRequestInput, and the tracker's dispatch call instead, so the shared
dispatcher's own gate decides -- the same fix that precedent already
applied to requesterId. New test proves the field now reaches the
dispatched lease.request rather than being dropped in transit (the gate
itself is exercised at the dispatcher level, once, not per transport);
verified to fail against the pre-fix schema/tracker.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MA98m7ua7qvDFZjxFaww6Z
0 commit comments