Skip to content

<!-- Written per the the-loop:writing skill. -->

Decision 158: a reviewer's quiz-taken reply is an open keyword, and it can do one thing ​

  • Status: accepted
  • Date: 2026-11-30
  • Deciders: MadaraUchiha-314 (authorized the work item and declared its phases), L-u-k-e (the issue), the-loop (the design)
  • Work item: issue-557 (PR #558)
  • Spec: docs/specs/issue-557/, § Security considerations and § Security design
  • Related: decision-023 (the authorized-actor guard), decision-102 (work-item collaborators), decision-143 (who ticked a quiz box), decision-157 (quiz only)

The short version ​

the-loop quiz-taken is the first keyword the-loop accepts from someone who is not an authorized user. A reviewer replies it on a pull request, and the-loop adds their login to the who-has-taken-it table in that pull request's description.

It is safe to accept from anyone because of what it cannot do, and each "cannot" is a property of the code path and not a check that could be forgotten:

It cannotBecause
move a gateits handler never calls the graph
reach a sessionits handler never renders or delivers a prompt
write its own text anywherethe ingress drops the body; only the login goes on
become a control commandit is not in the command vocabulary the executor reads
cause a commitits record is the daemon's own file, never checked in

Context ​

The code quiz is for every reviewer (issue-557), and the pull request should show who has taken it. A reviewer is usually not in routing.authorizedUsers: that list is who may drive the-loop, and on a public repository a reviewer may be anyone.

Until now, a comment by someone outside that list was dropped before any keyword was looked for (decision-023). Three ways to let a reviewer say "I took it" were considered:

  1. Add reviewers to the authorized users. That grants far more than is wanted: an authorized user can answer gates and start work.
  2. A per-work-item allow-list, like collaborators (decision-102). A collaborator's comments reach the session as input, which is again more than is wanted, and somebody would have to grant every reviewer first.
  3. A keyword that needs no authorization and grants nothing.

Decision ​

  1. quiz-taken is an open keyword. Both ingresses recognise it after the check for the-loop's own comments and before the authorization check. A comment that is not exactly this keyword takes the path it always took.
  2. Only identity passes that point. The ingress builds a signal with the thread, the comment's id and the author's login. It has no body. Nothing downstream holds the comment's text, so nothing downstream can write it.
  3. The keyword is outside the command vocabulary. The tuple of control commands feeds the authorized executor, the Slack command surface and the operator's command bindings. The open keyword is not in it and has its own parser. A comment that opens one line with it and another line with a control keyword is not an open command.
  4. The author is confirmed. A webhook's account of who wrote a comment is checked against GitHub before it is recorded. The login must fit GitHub's login grammar, which has no character that means anything in markdown.
  5. It is recorded only where it means something: on a pull request recorded as delivering a live work item, after that work item's code quiz was posted there.
  6. The record is the daemon's own. It lives in the work item's portable record, not in work-item-state.json, so an account with no authority cannot cause a commit.
  7. The table is bounded and rebuilt. One row per person, at most 20 rows for people who were never asked to review, and one description write per recorded reply at most.
  8. Taken is self-attested, for reviewers as for the author. Nothing depends on it.

Consequences ​

  • Any account that can comment on a delivering pull request can add its login to that pull request's description. That is the whole of what was opened, and it is bounded.
  • The author's gate is untouched. Who may answer code-quiz is still decided by the edit history and routing.authorizedUsers.
  • A future open keyword has a pattern to follow, and a bar to meet: say what it cannot do, and make each "cannot" structural.
  • An operator who wants none of this sets the keyword to an empty string.

Alternatives considered ​

  • Reactions instead of a reply (a 👍 on the quiz comment). Rejected: the poller does not read reactions, and a reaction is easy to leave by accident.
  • A checkbox per reviewer in the-loop's comment. Rejected: ticking it edits the-loop's comment, which needs write access a reviewer may not have, and the edit history would then mix reviewers into the author's attestation.
  • Deriving the list from the comments on each refresh. Rejected: every reviewer event would cost a read of the whole thread.

Released under the MIT License.