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
{{ message }}
Repository navigation
Commit df819c4
Browse filesBrowse the repository at this point in the historyBrowse files
test(dogfood): the comment threads read is its own HIGH_RISK row, proven on the hosted dispatcher too
Ruling B on the card (comment 7363771779): split comment-threads-read-session
out of comment-doors-session, list it in HIGH_RISK, and have
comment-threads-query.dogfood.test.ts claim it with a [hosted] group that
drives the read through a dispatcher alone over the real stack.
Claude-Session: https://claude.ai/code/session_01Utp6Ca2yTZZiHWkyVgD2oK
Co-authored-by: Claude <noreply@anthropic.com>
// credentials, and the dispatcher's two preamble gates apply unexempted.
430
430
// ⛔ Ids stay in this comment, out of the row's strings.
431
431
//
432
-
// #39134 — the domain also claims a fourth shape, the comment threads read
433
-
// (`POST /comments/threads/query`), forwarded to the same member.
434
-
//
435
432
// The three doors are not HIGH_RISK: each writes one row the caller owns or
436
433
// may resolve, after reading it AS THE CALLER (object grant, organization
437
434
// wall, the comment read gate), so it is no sibling read path around a data
438
435
// gate. Their proofs are the plugin-audit and plugin-security door suites
439
436
// and the two-door wire suite, none of which lives in this directory.
440
437
//
441
-
// ⚠️ That reason does not carry to the threads read. It answers object data
442
-
// (the comments on, and the ids and display names of, the records of any
443
-
// object a list filter selects) through a sibling HTTP entry point, which
444
-
// is the HIGH_RISK list's own definition. Every read in it runs as the
445
-
// caller (the object read planned by the engine under the caller's context,
446
-
// and an ordinary read of `sys_comment` under the comment read gate), so it
447
-
// adds no gate of its own, but that is equally true of the MCP surface the
448
-
// list does carry. Its end-to-end proof on the real SecurityPlugin is
449
-
// comment-threads-query.dogfood.test.ts, which drives the self-hosted mount
450
-
// only and claims no row. Whether the read is HIGH_RISK, as its own row or
451
-
// this one, is an open decision on #39134; until it is recorded, this row
452
-
// classifies the domain with the read named and NOT on the HIGH_RISK list.
453
-
{id: 'comment-doors-session',summary: 'Comment doors (`DELETE /comments/reactions/:id`, `PUT /comments/:id/resolution`, `DELETE /comments/:id`) and the comment threads read (`POST /comments/threads/query`) — a signed-in member removes their own reaction, resolves or reopens a thread they can read and may post on, and removes a comment they wrote with no reply under it; a row the caller cannot read answers as unknown, another member\'s row is refused 403, and an anonymous caller is refused 401 by the door itself, exactly as the self-hosted mount refuses it. The threads read answers the top-level comments on the records a list filter selects and the caller may read, with each record\'s id and display name: a record outside the caller\'s row scope is not answered, a caller with no read on the object (or a filter naming a field they cannot read) gets that read\'s own 403 PERMISSION_DENIED, an anonymous caller 401',state: 'enforced',
454
-
enforcement: 'core/security/own-row-delete-routes.ts (the unreact and own-comment delete doors) and plugin-audit/comment-routes.ts (the resolution door), for the three doors — the caller resolved from the request\'s own credentials (ownRowDeleteCallerResolver: no signed-in user 401, a held sign-in 403), the row read AS THE CALLER (object grant, organization wall, comment read gate; unreadable = unknown 404), the owner column checked (403 PERMISSION_DENIED) or the posting gate asked (canWriteObject insert on sys_comment), then a system write attributed to the caller; and plugin-audit/comment-threads-query.ts (the threads read) — the caller resolved as the doors resolve it (no signed-in user 401, a held sign-in 403), the strict body refused before any read (400 VALIDATION_ERROR), then every read AS THE CALLER and none as the system: ObjectQL planReadScope plans the caller\'s read of the object with the filter (row scope, field read, organization wall; refused: the read\'s own 403 PERMISSION_DENIED) and hands back the subquery that scopes sys_comment.record_id to it, the threads are one ordinary read of sys_comment under the comment read gate, and the records\' display names one read of the object for their ids; reached through ICommentDoorsService.handleCommentDoor by runtime/domains/comments.ts, which claims exactly the four method and path shapes, forwards the transport\'s request UNREAD, resolves the slot per request and adds no credential of its own (an absent slot or member is a typed 501, never a route miss). The two dispatcher preamble gates apply with NO exemption: core/security/auth-gate.ts ALLOW_ROUTES does not list the paths and runtime/http-dispatcher.ts enforceProjectMembership does not skip them. The member runs the very registration the self-hosted mount runs (plugin-audit comment-doors-member.ts over registerCommentDoors in audit-plugin.ts)',
438
+
// This row keeps the domain's ledger key: the population is minted per
439
+
// dispatcher DOMAIN, one key is classified by one row, and the domain also
440
+
// serves the threads read below, which is classified on its own row.
441
+
{id: 'comment-doors-session',summary: 'Comment doors (`DELETE /comments/reactions/:id`, `PUT /comments/:id/resolution`, `DELETE /comments/:id`) — a signed-in member removes their own reaction, resolves or reopens a thread they can read and may post on, and removes a comment they wrote with no reply under it; a row the caller cannot read answers as unknown, another member\'s row is refused 403, and an anonymous caller is refused 401 by the door itself, exactly as the self-hosted mount refuses it. The domain\'s fourth shape, the comment threads read (`POST /comments/threads/query`), is classified by comment-threads-read-session',state: 'enforced',
442
+
enforcement: 'core/security/own-row-delete-routes.ts (the unreact and own-comment delete doors) and plugin-audit/comment-routes.ts (the resolution door) — the caller resolved from the request\'s own credentials (ownRowDeleteCallerResolver: no signed-in user 401, a held sign-in 403), the row read AS THE CALLER (object grant, organization wall, comment read gate; unreadable = unknown 404), the owner column checked (403 PERMISSION_DENIED) or the posting gate asked (canWriteObject insert on sys_comment), then a system write attributed to the caller; reached through ICommentDoorsService.handleCommentDoor by runtime/domains/comments.ts, which claims exactly the four method and path shapes (the three doors and the threads read), forwards the transport\'s request UNREAD, resolves the slot per request and adds no credential of its own (an absent slot or member is a typed 501, never a route miss). The two dispatcher preamble gates apply with NO exemption: core/security/auth-gate.ts ALLOW_ROUTES does not list the paths and runtime/http-dispatcher.ts enforceProjectMembership does not skip them. The member runs the very registration the self-hosted mount runs (plugin-audit comment-doors-member.ts over registerCommentDoors in audit-plugin.ts)',
note: 'The DISPATCHER domain only: on a self-hosted kernel the same paths are served from plugin-audit\'s mount on the kernel\'s http.server and never reach the dispatcher. Unit- and wire-proven, not dogfood-proven: runtime domains/comments.test.ts pins the domain on the real HttpDispatcher (the four shapes forwarded unread, the threads read with its body and query string, every other method and path the ordinary miss, 501 for an absent slot or member, the slot read per request, the environment-scoped spelling forwarded at the wire path, a signed-in non-member stopped before the member on a door and on the threads read, a gated session on a door); http-conformance hono-comment-doors.conformance.test.ts drives the real AuditPlugin through createHonoApp on a kernel with no http.server (unreact, resolve and reopen, own-comment delete land in the store; the threads read answers a page) and answers the anonymous refusal and refused bodies, the threads read\'s own refusals included, with the same bytes as the self-hosted mount; plugin-security comment-doors.integration.test.ts and comment-reaction-unreact-door.integration.test.ts hold the doors\' grants on the real stack. The threads read on the real SecurityPlugin (a row-scoped member not answered the hidden record\'s threads, a member with no read refused 403 PERMISSION_DENIED, anonymous 401) is proven by comment-threads-query.dogfood.test.ts on the self-hosted mount only; that file claims no row here and the row cites no proof.'},
444
+
note: 'The DISPATCHER domain only: on a self-hosted kernel the same paths are served from plugin-audit\'s mount on the kernel\'s http.server and never reach the dispatcher. Unit- and wire-proven, not dogfood-proven: runtime domains/comments.test.ts pins the domain on the real HttpDispatcher (the four shapes forwarded unread, every other method and path the ordinary miss, 501 for an absent slot or member, the slot read per request, the environment-scoped spelling forwarded at the wire path, a signed-in non-member and a gated session stopped before the member); http-conformance hono-comment-doors.conformance.test.ts drives the real AuditPlugin through createHonoApp on a kernel with no http.server (unreact, resolve and reopen, own-comment delete land in the store) and answers the anonymous refusal and refused bodies with the same bytes as the self-hosted mount; plugin-security comment-doors.integration.test.ts and comment-reaction-unreact-door.integration.test.ts hold the doors\' grants on the real stack. The threads read the domain also serves carries its own row and its own end-to-end proof (comment-threads-read-session).'},
445
+
446
+
// #39134 — the comment threads read (`POST /comments/threads/query`), split
447
+
// out of `comment-doors-session` by the maintainer's ruling recorded on
448
+
// #39134 (card comment 7363771779, option B of analysis 7361405247): it is
449
+
// its own HIGH_RISK row, proved end to end on the hosted door too. ⛔ Ids
450
+
// stay in this comment, out of the row's strings.
451
+
//
452
+
// HIGH_RISK for the list's own reason: unlike the three doors above it
453
+
// ANSWERS object data — the comments on, and the ids and display names of,
454
+
// the records of any object a list filter selects — through a sibling HTTP
455
+
// entry point, on the self-hosted mount and on the hosted dispatcher.
456
+
//
457
+
// No `covers`, on purpose. The ratchet discovers entry points per REST
458
+
// route family and per dispatcher DOMAIN (plus the named probes), and this
459
+
// read lives inside the `/comments` domain, whose one key stays classified
460
+
// by `comment-doors-session` above (a key is classified by exactly one row,
461
+
// and the classified-keys pin lists it there). A shape added inside a
462
+
// classified domain mints no key, so the binding that holds this read is
463
+
// the HIGH_RISK list plus the mutual row ↔ proof attribution, not `covers`.
464
+
{id: 'comment-threads-read-session',summary: 'The comment threads read (`POST /comments/threads/query`), on the self-hosted mount and on the hosted dispatcher — a signed-in member is answered the top-level comments on the records a list filter selects and they may read, with each record\'s id and display name: a record outside the caller\'s row scope is not answered, a caller with no read on the object (or a filter naming a field they cannot read) gets that read\'s own 403 PERMISSION_DENIED, and an anonymous caller is refused 401 by the read itself; on the hosted dispatcher a signed-in caller who is not a member of the environment is refused 403 PROJECT_MEMBERSHIP_REQUIRED before the read runs',state: 'enforced',
465
+
enforcement: 'plugin-audit/comment-threads-query.ts — the caller resolved as the comment doors resolve it (no signed-in user 401, a held sign-in 403), the strict body refused before any read (400 VALIDATION_ERROR), then every read AS THE CALLER and none as the system: ObjectQL planReadScope plans the caller\'s read of the object with the filter (row scope, field read, organization wall; refused: the read\'s own 403 PERMISSION_DENIED) and hands back the subquery that scopes sys_comment.record_id to it, the threads are one ordinary read of sys_comment under the comment read gate, and the records\' display names one read of the object for their ids. Self-hosted: served from plugin-audit\'s mount on the kernel\'s http.server (registerCommentDoors in audit-plugin.ts). Hosted: reached through ICommentDoorsService.handleCommentDoor by runtime/domains/comments.ts, which forwards the transport\'s request UNREAD, body and query string included, and adds no credential of its own, behind the two dispatcher preamble gates with NO exemption (core/security/auth-gate.ts ALLOW_ROUTES does not list the path; runtime/http-dispatcher.ts enforceProjectMembership does not skip it); the member runs the very registration the self-hosted mount runs (plugin-audit comment-doors-member.ts)',
466
+
proof: 'comment-threads-query.dogfood.test.ts',
467
+
note: 'HIGH-RISK, proven end to end on both faces by comment-threads-query.dogfood.test.ts, which boots a real org-bound stack with the real SecurityPlugin and AuditPlugin. Self-hosted mount, at HTTP: a row-scoped member is not answered the hidden record\'s thread, a member with no read on the object is refused 403 PERMISSION_DENIED, a filter on a field the caller cannot read 403 PERMISSION_DENIED, anonymous 401. Hosted (`[hosted]`): the same read through a runtime HttpDispatcher alone over the same stack, the way a hosted tenant kernel with no http.server is reached: a full reader and a row-scoped member each answered exactly their readable records\' threads, the member with no read 403 PERMISSION_DENIED, anonymous 401 UNAUTHENTICATED, and, behind a host whose kernel resolver places the request in an environment, a signed-in non-member 403 PROJECT_MEMBERSHIP_REQUIRED with the read never planned while a member of it is answered. The membership store there is a fixture standing in for the cloud-provided sys_environment_member; the judgment over it is the dispatcher\'s own. Unit and wire pins beside it: runtime domains/comments.test.ts (the read forwarded with its body and query string, a non-member stopped before the member) and http-conformance hono-comment-doors.conformance.test.ts (the read answers a page, and its own refusals answer the same bytes at both doors with a permission stand-in).'},
457
468
458
469
// #36506 — the `/personal-views` and `/attachments` dispatcher domains (ruling
459
470
// A on #22438, applied to the personal-view delete door and the attachment
0 commit comments