Skip to content

feat(kix): record follow-up sessions in a PR comment - #558

Merged
kixelated merged 7 commits into
mainfrom
quest/m0/model-routing/kix-sessions
Nov 7, 2026
Merged

kixelated merged 7 commits into
mainfrom
quest/m0/model-routing/kix-sessions

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

kix iterate and merge jobs that commit to an existing PR now record their session on the PR, without touching its body (an App edit there would void the author's ## Review record).

Changes

  • Runner (src/runner/job.ts): every publication that commits sends the session's Implementer: line, at checkpoint as well as deliver.
  • Worker (cloudflare/src/jobs/publish.ts, GitHubService.recordSession): when a commit lands on an iterate/merge job's PR, kix adds that line to its one sessions comment, found by the hidden <!-- quest:sessions --> marker and the App's own ID, and updated in place. A merge job that only lands commits nothing, so it adds no line.
  • quest review (src/cli/review-record.ts): reads implementers from the body's ## Models record plus the marked comment, taking the comment only when a GitHub App wrote it (performed_via_github_app), since anyone can copy the marker.
  • Docs: quest context's ## Models rule, /quest-review's record line, and quest review --help name the comment. quest/m1/model-check.md and quest/m0/token-waste/usage.md read it too.
  • Deletes the quest and its links; pins.md is unblocked.

Choices made without asking

  • The comment holds a ## Models section, so the existing withModels/recorded helpers write and parse it.
  • The CLI accepts any App's marked comment (it does not know kix's App ID); the Worker matches only its own App's.
  • Builds on moq-dev/quest#555, merged in since it hadn't landed yet.

Public API and wire impact

Runner to Worker publish gains an optional implementer field (validated as one Implementer: line). No breaking change.

Caused by

None: a gap in moq-dev/quest#494's design, which this quest was planned to complete.

Validation

just check, bun run test, just worker-test pass.

Models

  • Size: S
  • Implementer: Claude Code, claude-opus-5-5, low effort

(Written by Claude Opus 5.5 with low effort)

Review

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1b806-8f46-7602-9cae-e9cbe7dbbf9b, round 2
  • Head: 9756bf9
  • Base: origin/main at 98deba2
  • Score: 10/10, The head fixes the attribution recovery failure by recording the session before committing, and no remaining findings were identified.
  • Findings: none
  • The last round's findings, at f229837:
    • Fixed: medium, cloudflare/src/jobs/publish.ts:310: Make session recording recoverable after a committed publication; cloudflare/src/jobs/publish.ts:282-285 now awaits session recording before contribute() can commit, so recording failures prevent the commit and successful commits already have attribution.

kixelated and others added 4 commits November 7, 2026 13:39
`quest` builds in a write list per size beside the review lists.
`quest unblocked --json` gives each ready quest its ranked models, one
size up while a Maintainer wait is open, and `quest models <size>
[--writer <model>]` prints a size's list or the entry an iterate's writer
runs at. /quest-spawn falls through the list while nothing is written;
coordinators size each /quest-iterate by the work left and keep it on the
PR's writer. Grok leaves CONTEXT.md, and Opus reviews XL at xhigh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 7, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

kixelated and others added 2 commits November 7, 2026 13:51
kix iterate and merge jobs that commit to an existing PR post or update one
App-written comment, marked <!-- quest:sessions -->, carrying each session's
Implementer: line. quest review reads it with the body's ## Models record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title kix records its follow-up sessions feat(kix): record follow-up sessions in a PR comment Nov 7, 2026
…t drop it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 7, 2026 22:03
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb59b0ba-382d-4532-ba2f-9a2dbfc93295
Commits

Reviewing files that changed from the base of the PR and between d742cea and 9756bf9.

Files selected for processing: 25

  • README.md
  • assets/AGENTS.md
  • assets/CONTEXT.md
  • assets/skills/iterate.md
  • assets/skills/review.md
  • assets/skills/spawn.md
  • assets/skills/unblock.md
  • cloudflare/dev/github.ts
  • cloudflare/src/github/service.ts
  • cloudflare/src/jobs/publish.ts
  • cloudflare/test/publish.test.ts
  • quest/m0/model-routing/README.md
  • quest/m0/model-routing/kix-sessions.md
  • quest/m0/model-routing/models.md
  • quest/m0/model-routing/pins.md
  • quest/m0/token-waste/usage.md
  • quest/m1/model-check.md
  • src/cli/main.ts
  • src/cli/models.ts
  • src/cli/review-record.ts
  • src/github/models.ts
  • src/runner/job.ts
  • test/cli.test.ts
  • test/review.test.ts
  • test/runner.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated
kixelated added this pull request to the merge queue Nov 7, 2026

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed head 9756bf981d95eeb8d4bc71b3dc83dcbfee80a3e1 against base d742cea566ccac03d7822060602c48f1ba064867.

One P2 finding: session attribution is persisted before publication eligibility is checked, so a rejected publication can incorrectly exclude a model from later reviews. Please address the inline finding while retaining recovery for a successful commit whose response is lost.

Scope: the follow-up session recording changes, their runner payload, CLI reviewer exclusions, tests, and surrounding publication/authorization code. The model-routing changes inherited from #555 were already reviewed separately.

Validation: GitHub-only static inspection. I did not run tests, builds, or the CLI. Immediately before submitting, the PR remained open and ready, both SHAs were unchanged, and there were no submitted reviews. This COMMENT is not an approval.

(Written by review (OpenAI))

Comment on lines +282 to +285
// Work on an existing pull request writes none of its text, so its sessions comment records who changes it,
// before the commit, so a commit whose reply is lost never leaves its session unrecorded.
if ((input.changes.length || input.merge) && input.implementer && onPull(job.workflow))
await github.recordSession(upstream, job.actor, pullOf(job.target), input.implementer);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Validate publication eligibility before recording a completed session

This writes the session's permanent Implementer: line before contribute() and verify() establish that the publication can proceed. For example, if another writer moves the PR head before this session's first checkpoint, recordSession() succeeds and then verify() raises BranchChanged, leaving the branch unchanged. A contributor-fork refusal or a merge rejected for workflow changes has the same outcome. pullModels() nevertheless consumes that line as evidence that the model wrote the PR, so a failed attempt by the only remaining review model can make quest review refuse all configured reviewers. The existing blocked-publication tests omit implementer, so they do not exercise this side effect. Perform the eligibility/head/merge checks before publishing attribution, and distinguish pending attribution from a completed publication while preserving lost-response recovery. Add a regression asserting that a definitively rejected first publication does not add an implementer.

(Written by review (OpenAI))

Merged via the queue into main with commit 6a18b8a Nov 7, 2026
14 checks passed
@kixelated
kixelated deleted the quest/m0/model-routing/kix-sessions branch November 7, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant