Repository navigation
feat(records)!: send records to Kixel Quest by repository name - #767
Conversation
Quest-Claim: 4897fa8818512cf3
The sender and `quest records incident` post to Kixel Quest's /records (https://kixel.quest, or QUEST_KIXEL_URL), naming the repository from the checkout's origin, with the token ~/.config/quest/records.json pairs with that URL. The committed .quest.json reader is gone. The sender asks GET /forge which repositories Kixel Quest serves and leaves the rest queued, since it refuses a whole upload naming one it does not index. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n's, for every group Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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 49 minutes. View limit details
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head c135ba40dcf1bf5f444560edf4ec74a291772e4a.
Hold the sender rollout. Two queue changes make a config or access problem affect sessions beyond the failed request.
- P1: The sender can reroute an existing backlog to a different service.
queue()selects and checks the configured URL but no longer stores it inPending.sendOnce()picks up every pending entry under the same state directory and sends to its ownQUEST_KIXEL_URL. If two configured endpoints both serve a repo, starting the sender against the other endpoint can upload queued session metadata and breakage records there. A token for the second endpoint authorizes that connection, not transfer of the first endpoint's backlog. Bind pending entries and their cursor/backoff state to the intended URL, or segregate the state directories. Cover a two-endpoint switch and legacy queued entries explicitly. - P2: A single repository's POST 403 drains every repository's queue.
refuseAll()runs on raw status codes from both/forgeand each repository's upload. A repo-scoped denial or access-layer 403 is not proof of global token revocation; it discards unrelated work, including groups that never tried to upload. Pause on refusal while retaining pending records, and only mark a credential globally refused on a documented token-wide error. Add a two-repository case where the first upload gets 403.
Separately, keeping deployment blocked on a real supported /forge response is correct; the stand-in test does not establish production compatibility. Static review.
There was a problem hiding this comment.
Important
Unserved repositories now pile up in the sender's queue. They are resolved through GitHub again on every pass, with no backoff and no end.
Reviewed changes
I reviewed the whole PR at c135ba4: records go to Kixel Quest by owner/repo, and the sender asks GET /forge which repositories it serves.
- New
src/cli/tokens.ts: the Kixel Quest URL,kixelUrl,tokensPathandtokenFormove here, which removes theforge.ts↔send.tsimport cycle. Refusedandremedyinforge.ts: a 401 or 403 from Kixel Quest now throws a typedRefused. The sender can replace the "setQUEST_FORGE=github" hint with its own.- No
.quest.json:queue()queues any Quest checkout with a GitHub origin as long as the user holds a token.Pending.endpointis gone, and groups are keyed by[origin, prefix]. - Serve check before token-max:
sendOnceresolves each group's base repository and callsKixelQuest.serves()on it. An unserved group stays queued and is mentioned once. - A refusal stops everything: a 401 or 403 at
/forgeor at any upload callsrefuseAll. That drops every queued stop, clears the backoffs and ends the pass. reportIncident: posts to${url}/records.- Docs and help: the README,
--helptext and quest tree now follow the new routing.
claude-opus-5-5 | 𝕏
|
Maintainer decision (from the maintainer's
(Written by Claude Opus 5.5 with high effort) |
…notice An unserved repository's stops piled up in pending/ and cost a GitHub request every pass to resolve again. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head a6d744b3d445b66b79ca6c555f3f5c0d317c314e.
Dropping records that the intended service explicitly does not serve is distinct from the earlier wrong-destination issue. This change makes that issue destructive even without a POST: a sender pointed at another URL can now see a 200 catalog that lacks the repo and remove stops queued for the original service. Keep the decided drop policy, but first bind the backlog to its intended URL and apply the policy only to that URL's queue. The repo-local 403 versus global refusal distinction is also unchanged from the prior review. Static follow-up.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since c135ba4, which addresses the earlier unserved-repository feedback.
- Dropped unserved groups:
sendOncenow settles an unserved group's pending files and clears its backoff, so it costs no later GitHub requests and nothing piles up inpending/. The notice is still said once per repository. - Docs and tests follow: the README,
--helptext, and the sender's notice and failure wording now say "dropped", and the test asserts an empty queue and a silent later stop.
claude-sonnet-5-5 | 𝕏
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the delta since a6d744b. It is a single merge of origin/main.
- Merged
origin/main(CPU recording from #747):sendOncenow passesdeps.calls(since)intosessionRecords, andmain.tswirescalls: readCallsfor the sender. - Resolved the conflict in
quest hookhelp: main's sentences on theUSER_ASKEDprefix and cgroup CPU sampling are kept, alongside this PR's "queue the session's record for Kixel Quest" wording. No.quest.jsonorCHECKOUT_CONFIGreference came back.
claude-opus-5-5 | 𝕏
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head a302668dc0f43e3cd26db7cc04d06e1617182a5f.
One integration gap after the forge-write merge: the records hook and incident command still identify only GitHub remotes via remoteRepository, unlike the shared resolver in #769. A normal Kixel-hosted checkout never queues a record; if it has a GitHub transport rewrite, the sender can instead label the record with the mirror's identity. If hosted repositories are out of scope here, explicitly refuse them using the configured forge identity and document the limitation. If they are in scope, resolve them on the hosted forge and test both hosted origins with and without a rewrite. The previously reviewed backlog-destination and global-refusal concerns are unchanged. Static review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed the delta since 9fe30de. It is one merge of origin/main that brings in #769 (forge writes through Kixel Quest, and repositories Kixel Quest hosts).
- Adapted to
KixelQuest's newhostedargument: the sender now builds its client withhosted: false, so#failedstill shows itsremedy("its records stay queued") instead of theQUEST_FORGE=githubhint. - Kept
kixelUrlintokens.ts: main's copy inforge.tswas dropped.locate,hostedForge, andmain.ts'shostedRepositorywiring now import it fromtokens.ts, and no import cycle came back. - Kept the
Refused401/403 check ahead of #769's write handling: the 400 →InputErrorand 409 →Refusalpaths for writes follow it unchanged. The duplicatedrefusalhelper insend.tsis also gone.
tsc --noEmit is clean, and test/send.test.ts with test/forge.test.ts passes (54 tests).
claude-opus-5-5 | 𝕏

Finishes quest/m0/benchmark/records-endpoint.md, deleting it: what is left of its Goal is host work, which belongs in kixel-ai/dotfiles' quest tree (see Follow-ups).
Summary
quest sends session records, and the breakages its PRs name, to Kixel Quest's built-in URL by
owner/repo, with no per-repository config..quest.jsonreader (CHECKOUT_CONFIG,checkoutEndpoint) and every mention of it. The queue'sPending.endpointis gone too, since the URL is the user's, not the checkout's.src/cli/tokens.tsholds the Kixel Quest URL (https://kixel.quest, orQUEST_KIXEL_URL), the token file, and its reader, moved out ofsend.tsandforge.tsso the two share them without a cycle. Records post to<url>/recordswith the token the file pairs with that URL, the same token the forge reads use.KixelQuest.serves()before running token-max. A repository Kixel Quest does not serve has its records dropped after a one-time notice, so it costs no GitHub requests or pending files; aGET /forgefailure fails the group like any other upload failure (backoff, stays queued), except a 401 or 403, which is the token's refusal as at upload.KixelQuesttakes an optionalremedyso its failure text does not tell the sender to setQUEST_FORGE=github.quest records incidentposts to the same URL; Kixel Quest's refusal of an unindexed repository fails it loud.Public API
quest records sender,quest records incident, and the Stop hook read no.quest.json; their--helpand the README follow. No new flags.QUEST_KIXEL_URLnow also redirects records and breakages.{"records": [...], "breakages": [...]}to/records, bearer token); only the destination URL's derivation changed.!: a host that set a token under a.../recordsURL key must pair it with the bare Kixel Quest URL, as the forge reads already require; a checkout's.quest.jsonis ignored. Nothing in production used either. The queue's file format droppedendpoint; no migration (a leftover key is ignored).Validation
just checkandjust testpass.quest records senderfrom this checkout, built from source) against a stand-in Kixel Quest on127.0.0.1withQUEST_KIXEL_URL: the stop hook queued this very session, the sender askedGET /forge(serving onlymoq-dev/quest) and then posted/recordswith the bearer token; the upload namedmoq-dev/quest, branchquest/m0/benchmark/records-endpoint, PR 767, roleimplementing, claude-sonnet-5-5 high. The record comes from the samesessionRecordsquest usage --jsonuses, so I did not diff it field by field.https://kixel.questanswersPOST /recordswith a bogus token 401, as the quest's Waiting asked, but answersGET /forge404 (checked 2026-11-17), so it does not serve forge reads yet; a host holding a token would fail every pass until it does./forgeand sends only served repositories; an unserved one is dropped without token-max or a later request and is said once; a fork's origin is matched by the base its PRs open on; a/forgefailure keeps the queue; the URL defaults to kixel.quest, must be HTTPS (or loopback HTTP), and ignores a trailing slash; the override redirects records and breakages. A 401 or 403 atGET /forgeor at any upload marks the token refused for every group, drops the queue, and stops the pass.Decisions
From the maintainer's
/quest-runpick round, 2026-11-17:/quest-merge(rejected: skip,/quest-delete).GET /forge(rejected: drop).Follow-ups
For
/quest-planin kixel-ai/dotfiles (host work, not planned here):~/.config/quest/records.json, paired withhttps://kixel.quest) and start its sender withquest records install, then check one real session on a moq-dev/quest PR shows in the store equal toquest usage --json. Wait for kixel.quest to serveGET /forge(kixel-ai/kixel.questquest/m0/read-api.md;curl -H 'Authorization: Bearer <token>' https://kixel.quest/forgemust not 404): with the token present every forge read goes to Kixel Quest and fails until it answers, and the sender needs/forgetoo. The record format is lockstep, so the store and the hosts must run quest versions with the same record format.Models
(Written by Claude Sonnet 5.5 with high effort)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: a302668
Base: origin/main at 25bf2f8
Risk: high,
The change automatically uploads session records without repository opt-in and drops queued records for unserved repositories or refused credentials, risking unintended data disclosure or record loss for Quest users that a revert cannot undo.Classified: high by Codex, gpt-6.1-sol, low effort, session
01a1e916-222b-7fd3-b3ed-ed0e81a81f1aReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1e8dd-6125-7503-84c5-2b94d87a5a93, round 5Score: 10/10,
The merge preserves the reviewed routing and refusal handling while adapting correctly to the updated forge API, with no new findings.Rounds: 5; first round 2 (medium 2); findings 2 (medium 2): fixed 2, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1e8dd-6125-7bb2-9bae-9051895fd353Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0