From dbb8c3df16940a0b6e92e63bc74c9e1db14a62c9 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 15:58:32 -0800 Subject: [PATCH 1/2] quest: plan recording kix follow-up sessions in a PR comment Co-Authored-By: Claude Opus 5.5 --- quest/m0/model-routing/README.md | 1 + quest/m0/model-routing/kix-sessions.md | 41 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 quest/m0/model-routing/kix-sessions.md diff --git a/quest/m0/model-routing/README.md b/quest/m0/model-routing/README.md index b2c8577e..48cd29a8 100644 --- a/quest/m0/model-routing/README.md +++ b/quest/m0/model-routing/README.md @@ -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 on 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 diff --git a/quest/m0/model-routing/kix-sessions.md b/quest/m0/model-routing/kix-sessions.md new file mode 100644 index 00000000..c0b75a63 --- /dev/null +++ b/quest/m0/model-routing/kix-sessions.md @@ -0,0 +1,41 @@ +# [S] kix records its follow-up sessions + +## Goal + +When a kix `iterate` or `merge` job delivers on 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. The +[model check](/quest/m1/model-check.md) and [`quest usage`](/quest/m1/usage.md) +read the PR body's `## Models` section plus that comment. 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 +(`cloudflare/src/jobs/publish.ts`, `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. +- Update `quest/m1/model-check.md` and `quest/m1/usage.md` to read the + comment too, and `quest context`'s `## Models` rule to mention 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 From 2638536024aa5445c10a114cbffa37448899267b Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 16:00:54 -0800 Subject: [PATCH 2/2] quest: kix-sessions names the review exclusion, checkpoint pushes, and comment trust Co-Authored-By: Claude Opus 5.5 --- quest/m0/model-routing/README.md | 2 +- quest/m0/model-routing/kix-sessions.md | 37 +++++++++++++++++--------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/quest/m0/model-routing/README.md b/quest/m0/model-routing/README.md index 48cd29a8..f39295fb 100644 --- a/quest/m0/model-routing/README.md +++ b/quest/m0/model-routing/README.md @@ -80,5 +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 on an existing PR record their `Implementer:` line in a PR comment +- [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 diff --git a/quest/m0/model-routing/kix-sessions.md b/quest/m0/model-routing/kix-sessions.md index c0b75a63..439481f1 100644 --- a/quest/m0/model-routing/kix-sessions.md +++ b/quest/m0/model-routing/kix-sessions.md @@ -2,12 +2,15 @@ ## Goal -When a kix `iterate` or `merge` job delivers on 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. The -[model check](/quest/m1/model-check.md) and [`quest usage`](/quest/m1/usage.md) -read the PR body's `## Models` section plus that comment. The PR body and its -`## Review` record stay untouched. +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 @@ -15,11 +18,12 @@ 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 -(`cloudflare/src/jobs/publish.ts`, `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. +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 @@ -33,8 +37,17 @@ 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 to mention it. + comment too, and `quest context`'s `## Models` rule and its + `--exclude-model` rule ("each implementing model the PR body records") + to name it. ## Required