Repository navigation
test(cloudflare): run publication end to end against the seeded GitHub fake - #213
Merged
Merged
Conversation
Quest-Claim: 64e456e2f74a458a
…b fake The seeded fake (dev/github.ts) now models commits and trees in a fork network's shared object store, fast-forward and forced branch updates on the upstream and its service fork, pull request listing, creation, updates, and ready-for-review, and the issue and pull request reads a job's context makes. Like GitHub, it scopes each installation token to the repositories and permissions it was minted for, so a write with the wrong token fails. publish.test.ts drops its own stateful fake for this one, with a small world of its own and the shared `intercept` wrapper for lost responses and concurrent changes. The seed test adds a runner that publishes the seeded queued job's commits and pull request, and a retry that adopts the failed import job's pull request, whose fork branch the seed now records. The local server passes request headers to the fake, which needs them for token scoping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 24, 2026 06:23
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Resolve the publish test conflict with #210's review-thread paging: keep the seeded GitHub fake, teach it to page review threads 100 at a time, and port the busy pull request test onto it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d fake #205's plan test asserted on the old inline fake's request log; read it from the mocked fetch like the rest of the suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Landing summaryLanding head 41fb6ad with a squash merge. Changes since the last reviewed head (8d95317)
Decisions
(Written by Claude Opus 5.5) |
kixelated
added a commit
that referenced
this pull request
Oct 24, 2026
Resolves conflicts with #213 and #214: - `landed` in quest/core now returns the merged PR it finds, so the CLI's `mergedPull` (renamed in #214 to return the PR's URL) keeps using the one shared rule, and the Worker checks it for undefined. - The fake GitHub's merged-claims additions now build on #213's `Repo.branches` model: a quest ref is any listed `quest/*` branch or open upstream PR's branch, at its tip, with the PRs from it that merged. A kept branch is just a listed branch; a closed PR's optional `head` pins the commit it ended at once its branch moves on. The fake's merge endpoint marks the PR merged. - The seeded test lists the kept branches itself, and checks the inbox against the quest a pushed branch claims, since #215's agent cards now show every queued job's quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
added a commit
that referenced
this pull request
Oct 24, 2026
Main's publication tests now run against the shared GitHub fake in cloudflare/dev/github.ts (#213). Port what merge jobs need into it: pull request labels and the timeline that added them, the hold query, the auto-merge and merge mutations, comparing a commit with main, and a commit's .github/workflows tree. The merge job publication tests now drive that fake, and pulled jobs' read tokens keep contents: read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Completes and deletes quest/m0/kix/github-fake.md, a follow-up of kixelated/quest#190.
Problem
cloudflare/test/publish.test.tskept its own stateful GitHub fake, while the seeded local server's fake (cloudflare/dev/github.ts) modeled only the inbox flows. The local server could not run a job's publication, so the epic's end-to-end test could not start from the seeded fake.Changes
dev/github.tsnow models what publication needs:markPullRequestReadyForReview;forkInstallation).publish.test.tsdrops its test-local fake. It uses the shared one with a small world of its own, and replaces the fake's knobs (loseMove,onCreate,forkParent,head,role,now) with world edits and a sharedinterceptwrapper. A new test checks that the fake refuses out-of-scope writes.seed.test.tsadds an end-to-end run: a runner publishes the seeded queued job's commit, opens its draft pull request, and marks it ready. A retry of the failed import job then adopts the pull request it left.dev/serve.tspasses request headers to the fake, since token scoping needs them. The seeded server boots and serves/inbox.Choices made without asking
fork-token/upstream-tokenstrings. The shared fake mints distinct tokens and enforces their scope, so tests assert scope through the fake rather than through token names.Repo.branchesreplacesRepo.claims. It is a map of upstream branch to commit, so an iterated pull request's head branch can move. Aquest/*entry without a pull request is still a claim.Issue.commentsis now the comment list rather than a count.quest/m0/importat pull request 20's head, so a retry of the failed import job can publish.Validation
just checkandjust testpass locally: 465 CLI tests and 335 Worker tests.just worker-seededboots and serves the inbox.Notes
publish.test.ts(D1 state isolation) and will likely conflict here.branchesand pull request heads.Suggested follow-ups
projects,inbox,jobs,push) still carry their ownfetchmocks. Some might move onto the shared fake where they exercise flows it models. This is a candidate for/quest-plan, not done here.🤖 Generated with Claude Code
(Written by Claude Opus 5.5)