Skip to content

feat: keep rejected approaches visible across backend handoffs - #214

Draft
Desperado wants to merge 4 commits into
mainfrom
Desperado/qmax-code-go-tui
Draft

Desperado wants to merge 4 commits into
mainfrom
Desperado/qmax-code-go-tui

Conversation

@Desperado

Copy link
Copy Markdown
Contributor

Long or compacted conversations can bury a rejected approach even when the shared transcript retains its evidence. Add /handoff reject <approach> | <evidence> to keep an explicit user decision visible to the next backend. For example, a note that increasing the reconnect timeout failed at both 5s and 60s accompanies the next turn after switching providers.

The checkpoint is included in every CLI handoff, including native resumes with no missing transcript entries, and in built-in provider system prompts. It survives compaction and session save/resume. /handoff lists entries; /handoff forget <number> removes a rejection, and /clear resets the checkpoint. Removed notes remain superseded by the current list.

Security: notes use existing retained-transcript redaction, are capped at 12 KiB, and are identified as user-supplied data. Input recall keeps only /handoff, avoiding retention of raw pasted evidence. Notes make no additional model request and do not inspect credentials or provider-private state.

This first version requires explicit user decisions. Failures are not automatically classified, and model compliance is not enforced. docs/HANDOFF.md describes a controlled live backend comparison; that evaluation has not yet been run.

Validation:

  • Regression coverage for failed turns, compaction, save/restart, native resume, local/connected prompts, note validation/removal, redaction, and input recall.
  • go test ./...
  • go vet ./...
  • go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run
  • Release-style build with -ldflags='-s -w -X main.Version=dev' (artifact under .context).
  • Diff review and secret scan: no outstanding findings.

@qualitymaxapp

qualitymaxapp Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

QualityMax Review

Verdict: ACTION REQUIRED · Confidence: degraded — required review evidence is incomplete

Re-review: Open the QualityMax check and select Re-review after it completes.

Files eligible: 18 · Files reviewed: 0 · Files with findings: 0 · Findings: 0 · Inline cards: 0

Priority findings

priority location finding
— — No blocking findings

Review gates

gate status
AI diff review unavailable · eligible 18, reviewed 0 · batches reviewed 0 of 4 · LLM · batch 1 returned malformed review evidence
SAST completed · eligible 30, reviewed 30 · hybrid · served claude-haiku-4-5-20251001 · requested qwen3.7-plus
Overall review evidence action required — one or more required review gates are incomplete
Inline evidence not needed

Important files

file risk note next step
— — No findings —

Review lifecycle

Use the inline cards to inspect evidence and suggested remediation. Re-run the QualityMax review after pushing a fix; unchanged cards are identified by their stable finding marker. Dismiss with a reason through the existing QualityMax/GitHub review feedback flow. 0 prior card(s) are stale/resolved on this head. @qmax Q&A is tracked separately.

Proof legend: VERIFIED independently judged patch · REPRODUCED verified finding · GROUNDED deterministic evidence · MODEL-ONLY model judgment.

QualityMax project results are available in the configured project.

Receipt · commit 7c6f02ef3c07dbc7076468974545978bead683dc · run 2026-10-12T13:46:47+00:00 · model served gemini-3.1-flash-lite · model requested gemini-3.1-flash-lite · model review unavailable — no completed model review · model source not recorded · re-review 2 · proof counts {}

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

QualityMax Review — canonical overview updated; no inline findings were created for this review.

@qualitymaxapp

qualitymaxapp Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

⚠️ QualityMax Pipeline

Gate Result
🔍 AI diff review ⚠️ Unavailable — no completed model review · unavailable · 18 eligible / 0 reviewed · Diff analysis incomplete after 0/4 bounded review batches: batch 1 returned malformed review evidence.
🔍 SAST completed · 30 eligible / 30 reviewed · claude-haiku-4-5-20251001
🔍 Canonical PR review delivery completed · 0 eligible / 0 reviewed · exact-head review #5491666872 and overview #6002650534 confirmed
🧪 Repo Tests ✅ 889/889 passed (go)
🤖 AI Tests ⚠️ 51/56 passed

Powered by QualityMax — AI-Powered Test Automation

- Record the checkpoint digest each native CLI session received; resend
  only when the session is new, the checkpoint changed, or entries are
  being transferred, so it no longer accumulates in CLI history per turn.
- Print a /handoff reject reminder after a backend switch that follows
  unrecorded work, noting interrupted turns and failed tool calls where
  the backend exposes them (CC is_error, Codex exit codes, OpenCode/agy
  errors, built-in JSON errors). It never records a rejection itself.
- Accept any whitespace after /handoff and its subcommand; reject
  look-alikes like /handoffs instead of sending them to the model.
- Support \| for a literal pipe in the approach and echo the parsed
  approach, warning when the evidence contains a pipe.

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

QualityMax Review — canonical overview updated; no inline findings were created for this review.

Dropping the oldest entries re-encoded the whole history once per dropped
entry. Search for the fewest drops that fit instead: ~800 untransferred
entries took ~13s before the backend started and now take under 2s. The
test checks the result matches the previous linear search.
eval/handoff runs the live experiment from docs/HANDOFF.md: a fixed Go
fixture where raising ReconnectTimeout is the tempting but wrong fix, a
scripted phase A with real captured test output, checkpoint vs. control
arms that differ only by the /handoff note, optional padding that pushes
phase A out of the inline handoff, and one backend-B turn through RunCLI.
Scoring samples the timeout constant during the turn (catching reverted
attempts), runs hidden tests with the original test restored, and writes
per-run artifacts plus summary.md. 'run' prints the plan and only calls
backends with --yes; 'selfcheck' verifies the fixture without backends.

@qualitymaxapp qualitymaxapp Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

QualityMax Review — canonical overview updated; no inline findings were created for this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant