Skip to content

fix(review): read or refuse sessions saved by an older quest - #561

Merged
moq-bot[bot] merged 3 commits into
mainfrom
quest/m0/review-old-state
Nov 7, 2026
Merged

moq-bot[bot] merged 3 commits into
mainfrom
quest/m0/review-old-state

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/review-old-state.md.

Summary

quest review now validates a saved session when it loads it, before the reviewer runs (parseState in src/cli/review.ts):

  • Sessions saved before moq-dev/quest#508 store each round's findings as a count. Rounds with 0 are read as []. Rounds with findings are refused with an error naming --new, because the findings to settle were never saved.
  • Sessions saved before moq-dev/quest#514 have no last round. They are read as-is, and since resuming needs a last round, their next round reviews the change anew and settles the saved findings.
  • A malformed session, or a round without a findings list, is also refused with --new.
  • --new skips loading the saved session entirely.

Tests cover each format, plus a fake-CLI round showing an old session is refused without any reviewer call.

Caused by

  • moq-dev/quest#508 changed rounds[].findings from a count to a list. previous.findings.length on the old count gave undefined, so the reviewer ran and then hit does not settle each of the last round's undefined finding(s).

Choices made without asking

  • ci: call queue-build.yml from main #538's branch was new that day, so I did not reproduce it directly. My guess is a stale session file left under the same branch digest (sessions are keyed by branch name, which moq-dev/quest#557 changes). Either way, the format check covers that case too.
  • I refuse rather than guess when the saved count is nonzero, because there is nothing to number the findings against.

Validation

  • npm run check passes, and so does npx vitest run test/review.test.ts (74 tests).
  • In the full vitest run, 26 tests fail in test/gate.test.ts, test/resolve.test.ts and test/worktree*.test.ts. They depend on PATH, disk space and process signals in this sandbox, and this PR touches none of that code.

Models

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

(Written by Claude Opus 5.5 with low)

🤖 Generated with Claude Code

Review

mechanical fix by quest land watch: merged main at 5f29613f63cb1be511b29218cfc186c6ac63ff57 with the quest merge driver (head dee02c0)

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1b823-af0d-7bf2-b7ea-2da59276fea4, round 1
  • Head: a6e0e4f
  • Base: origin/main at 6a18b8a
  • Score: 10/10, The specified diff validates incompatible saved finding lists before running the reviewer and lets --new bypass saved state; no actionable regressions were found, though tests were not run in the read-only environment.
  • Findings: none

@pullfrog

pullfrog Bot commented Nov 7, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

…he reviewer runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title quest review continues sessions saved by an older quest fix(review): read or refuse sessions saved by an older quest Nov 7, 2026
@kixelated
kixelated marked this pull request as ready for review November 7, 2026 22:32
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

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: 3fdc812d-d69f-469b-ab1f-03fb1ad5becf
  • 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 a6e0e4f9d78c697840d183185de269b2c022df96 against base 2108b1d92a135a79880fe89fa6d1c8dc5d6587a1 (also the merge base).

No actionable findings in the reviewed diff.

The direction is sound for the legacy formats identified here: zero finding counts become empty lists, count-only findings are rejected before the reviewer runs, and --new bypasses loading saved state. I traced sessions without last through the fresh-review path, including settlement of saved findings, and checked the existing resume/unchanged logic, the format changes in #508 and #514, and the added tests.

Validation limits: GitHub-only static review. I did not run builds, type checks, or tests, and have not independently verified the test results reported in the PR. This is a comment review, not a merge or CI-readiness approval.

(Written by review (OpenAI))

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 7, 2026
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

quest land watch: the merge queue removed this pull request at a6e0e4f because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot
moq-bot Bot enabled auto-merge November 7, 2026 23:16
@moq-bot

moq-bot Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

quest land watch: armed auto-merge on this pull request at dee02c0, so it joins the back of the merge queue once its required checks pass, with main at 5f29613 merged in by the quest merge driver.

(written by quest land watch)

@moq-bot
moq-bot Bot added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 3e90e22 Nov 7, 2026
17 checks passed
@moq-bot
moq-bot Bot deleted the quest/m0/review-old-state branch November 7, 2026 23:26
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