Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m0/model-routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ are mostly judgment.
- [Route by size](/quest/m0/model-routing/models.md) - `/quest-spawn` starts each quest on the first entry of its size's ranked list that can run
- [Review score](/quest/m0/model-routing/review-score.md) - every `quest review` round scores the change out of 10
- [Commits and PRs record their models](/quest/m0/model-routing/implementer.md) - commit trailers and PR records name each harness, model, and effort, and the PR's size
- [kix records its follow-up sessions](/quest/m0/model-routing/kix-sessions.md) - kix `iterate` and `merge` jobs that change an existing PR record their `Implementer:` line in a PR comment
- [moq-dev pins](/quest/m0/model-routing/pins.md) - moq-dev/moq and moq-dev/moq.pro bump their `quest` pin to pick up the routing
54 changes: 54 additions & 0 deletions quest/m0/model-routing/kix-sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# [S] kix records its follow-up sessions

## Goal

When a kix `iterate` or `merge` job publishes changes to an existing PR,
kix posts or updates one PR comment carrying that session's `Implementer:`
line (harness, model, and effort), so every session that changed the PR is on
record. Whatever reads the PR's implementers reads the PR body's `## Models`
section plus that comment: the `--exclude-model` rule in `quest context`'s
Reviews section, so a local review never picks a model a kix session coded
with, the [model check](/quest/m1/model-check.md), and
[`quest usage`](/quest/m1/usage.md). The PR body and its `## Review` record
stay untouched.

## Plan

Decided 2026-11-04 (user, /quest-complete follow-up of
[moq-dev/quest#494](https://github.com/moq-dev/quest/pull/494)). #494 records
each implementing session in the PR body's `## Models` section, and the kix
runner adds its line when a job opens or updates a PR's text. But on an
existing PR, kix `iterate` and `merge` jobs write no PR text (the runner's
`deliver` sends no `pull` for them, `src/runner/job.ts`, so
`cloudflare/src/jobs/publish.ts` never calls `GitHubService.deliver`), and
editing the body would make the App its last editor, which voids the
author's own `## Review` record (`cloudflare/src/github/review.ts`). These
sessions are the second implementers the record exists to catch.

- How should those sessions be recorded?
- ✅ A kix PR comment that the audits also read
- Rejected: editing only the body's `## Models` section and exempting such
edits from the review-record check; leaving them unrecorded
- Which milestone?
- ✅ m0, in this epic beside the record it completes
- Rejected: m1

Implementation guidance:

- One comment per PR, found by a hidden marker and updated in place, with
one `Implementer:` line per session in the `## Models` line format.
- Record a session when it first publishes changes, at a `checkpoint` as
well as at `deliver`, matching the rule that each session adds its line
when it first pushes; a merge job that only lands adds none. The runner
already computes the line for `deliver`, so it can send it with each
publication and let the Worker post it.
- Readers take the marked comment only when a GitHub App wrote it, since
any commenter can copy a hidden marker.
- Update `quest/m1/model-check.md` and `quest/m1/usage.md` to read the
comment too, and `quest context`'s `## Models` rule and its
`--exclude-model` rule ("each implementing model the PR body records")
to name it.

## Required

- [Commits and PRs record their models](/quest/m0/model-routing/implementer.md) - this builds on its `## Models` record and the runner's reporting