[codex] feat(github): add commit status routes - #2
Conversation
There was a problem hiding this comment.
💡 Codex Review
emulate/packages/@emulators/github/src/routes/statuses.ts
Lines 181 to 190 in 14a0870
When a repository has required_status_checks.contexts and a CI client uses this new endpoint to create a successful legacy status, merging the PR still fails because checkMergeRequirements in packages/@emulators/github/src/routes/pulls.ts:262-267 only scans gh.checkRuns and never consults gh.commitStatuses. That means the statuses persisted here cannot satisfy the existing branch-protection gate, so status-based workflows remain blocked despite a success status on the PR head SHA.
emulate/packages/@emulators/github/src/routes/statuses.ts
Lines 194 to 200 in 14a0870
When a repository has a slow or unreachable status webhook, this await makes POST /statuses/:sha wait for the dispatcher’s network delivery and 10-second timeout per matching hook before returning, unlike the other event-producing GitHub routes that fire webhook delivery in the background. This can make creating a status hang during experiments just because a webhook endpoint is down, even though the status has already been stored.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Fork laboratory scope
This draft is for validation inside
agustif/emulate. It targets the fork integration branch and is not an upstreamvercel-labs/emulatepull request.Problem
GitHub repository payloads advertise commit-status URLs, but the emulator has no commit-status entity or routes. Clients can exercise Checks APIs but cannot create status contexts or read status history and combined state.
Root cause
The GitHub store and route registry never modeled commit statuses. Repository deletion, webhook dispatch, ref resolution and documentation therefore had no status integration.
Change
statuswebhook and clean statuses during repository deletion.Validation
git diff --checkpassed.Promotion gate
Keep this PR in the fork until its tests and integration with the Checks SHA resolver are accepted. If Checks PR vercel-labs#184 lands first, recreate the final branch from current upstream main and reconcile the shared ref-resolution seam. Opening an upstream PR requires separate authorization.