Repository navigation
Open a Quest setup PR when enrolling - #431
Merged
Merged
Conversation
Quest-Claim: a1576d8b3956a615
The core's planInit returns the files installing Quest writes or removes, computed through a read-only Checkout, so the Worker can publish the same files the CLI writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A repository without Quest files enables through the App's setup pull request: the core's init file plan, published on kix/setup with no runner. The project waits in a setting-up state that links the pull request and is enabled when it merges, from the webhook or the next page view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A retry merges the default branch into kix's earlier setup commit, so a push made meanwhile fails the update instead of being reset away. A goal line of only = or - no longer underlines the line above as a heading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Escaping heading syntax cannot cover every Markdown construct, so the planned quest/README.md is checked with the core before anything is published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 3, 2026 04:20
|
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 45 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. CodeRabbit Verify
|
Port #420's stub refresh into the core's planInit, since init's plan moved there: an outdated Quest stub of a current skill is rewritten in place, keeping its newlines, and linked stubs are left alone. Renumber the setup migration to 0021, after main's 0020_head_approval.sql. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A disconnect, retry, or pause made while a merged setup's live checks ran was undone by the reconciliation's earlier snapshot. Each write of the enabling batch now checks the setup row, with its pull request, still exists in the same transaction, and a reconciliation that lost the race reports where the project stands now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A retry read the setup row, made several GitHub requests, then upserted it, so a disconnect made meanwhile was undone and the new pull request would enable contributions on merge. The pending commit is now recorded only while the row is the one the retry read and the project is not enrolled; later updates are scoped to that commit, and a setup gone by the end is reported instead of read as present. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/cli/setup.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements quest/m1/kix/setup-pr.md: a maintainer enrolls a repository that has no Quest files, and the App opens a pull request with what
quest initwrites. No runner is involved. The project waits in a setting-up state that links the pull request, and is enabled when the pull request merges.Summary
planInitlives insrc/core/init.tsand reads the repository through a read-onlyCheckout. It returns the ordered changes ({ path, content | null }): skill stubs (writing missing or outdated ones, deleting retired ones),quest/README.md, theQuests:line, the.gitattributesline, and Claude's hook entries in.claude/settings.json. Conflicts throwInitRefusednaming the path.quest initnow builds a filesystemCheckout, applies the plan, and registers the merge driver, with identical output and messages. Uninstall reuses the core's helpers (installedStubs,parseSettings, and so on).PREFIXandHOOK_EVENTSmoved to the core as well.cloudflare/src/github/setup.tsadapts the default branch's recursive Git tree toCheckout. The few files the plan reads come in one GraphQL blob read, hash-checked like the quest snapshot.scripts/build.tsrenders the shipped stubs intobuild/stubs.json./projects, a row with no Quest files now gets Enable contributions as a link. Its project page shows a short form holding only the optional "What is this project working toward?" question. Submitting it (POST …/setup) rechecks maintainer authority, visibility, and the OSI license live. It then publishes the plan onkix/setupwith the Git Data API, the same#branch/#disarmingpath job branches use, and opens a ready pull request. Its body lists each change, plus what it leaves out: pinningquestin a tool manager and adapting existing instructions. It also mentions thebootstrapjob when there is noflake.nix.github_project_setupstable (migration 0021) records the setup. The project page and the picker show "Setting up" with the pull request's link. When apull_requestwebhook closes or reopens it, the service rereads the pull request. A merge enables the project through the same live checks as Enable, includingquest check, with the enroller's authority, so no second visit is needed. The project page reconciles the same way if a webhook was missed, and keeps the reason if enabling fails. A pull request closed without merging offers a retry (fresh plan from the current default branch) or a disconnect.quest/README.mdwould failquest checkon is refused before publishing.cloudflare/GITHUB.md, plus a README build note.quest rmremoved the quest and its link inquest/m1/kix/README.md.Choices made without asking
github_project_setupstable, not asetupvalue ingithub_projects.state. SQLite can't alter that CHECK, and rebuilding the table would cascade through six dependent tables. A separate table also keeps every existing "enrolled means enabled or paused" check (jobs, delivery, observations, inbox) unchanged. The UI still presents the project as enrolled, setting up.kix/setup, matchingbootstrap'skix/devshelloutside the claim namespace. A retry fast-forwards with a merge of the current default branch into kix's earlier setup commit, so a concurrent push fails the update instead of being reset away. Akix/setupholding commits kix didn't record writing is refused, naming the branch.quest initin a clone. The CLI still follows valid symlinks as before.#and setext underlines). Anything elsequest checkwould refuse, such as a nested heading or a link to a missing quest, is refused at submit. The goal isn't stored, so a retry asks again.Merging main (2026-11-03)
planInit, since init's plan lives there now. Clean up stray skills and refresh outdated stubs #420's tests pass through the core.0020_head_approval.sql, so the setup migration is now0021_project_setups.sql. No other open PR adds a migration.OLD_DRIVERStoregister, which is kept insrc/cli/setup.ts.Checks
just checkandjust testpass locally on f77b8a7: 983 root tests (2 skipped) and 505 Worker tests, including 15 incloudflare/test/setup.test.tsagainst the fake GitHub.Follow-ups
#repositorycheck coversopenSetupandsettleSetupwith no extra work.src/cli/setup.ts(moq-dev/quest#420, merge-driver-upkeep, worktree-hooks) will conflict with the move. Their init changes now belong insrc/core/init.ts.Review
quest review), gpt-6.1-sol, medium effort, new session for the merged branch#enable's batch is guarded by the setup row and its pull, with a regression test.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)