Repository navigation
feat: serialize exact review publication - #592
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77e7cb8123
ℹ️ 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".
| const publication = item.decision.sourceAction === EXACT_REVIEW_ARTIFACT_PUBLISH_SOURCE_ACTION; | ||
| if (publication && activePublishers >= 1) continue; | ||
| const target = item.decision.targetRepo; | ||
| const active = activeTargets.get(target) || 0; | ||
| if (active >= targetCapacity) continue; |
There was a problem hiding this comment.
Avoid starving publisher behind review target capacity
When a target is already at EXACT_REVIEW_TARGET_MAX_CONCURRENT with ordinary review leases, a publication item passes the new activePublishers check but is still skipped by the shared target-capacity check. Because pending items are sorted by creation time, older ordinary review backlog for the same target can keep refilling the target slot before newer @publish items, so completed exact-review bundles may sit unpublished until the review backlog drains instead of using the dedicated serialized publisher lane.
Useful? React with 👍 / 👎.
| has_command_context: Boolean( | ||
| producerDecision.commandStatusMarker && producerDecision.statusCommentId, | ||
| ), |
There was a problem hiding this comment.
Preserve marker-only command status updates
Command-routed reviews can carry a commandStatusMarker without a statusCommentId (src/repair/comment-router.ts emits the marker unconditionally and only adds the id when known), and update-command-status can update by marker alone. Requiring both here makes the delayed publisher skip Mark re-review complete for those successful reviews, leaving the command status stuck at the in-progress/failure state even though publication finished.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ed62dff60
ℹ️ 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".
| set -euo pipefail | ||
| test -n "$GH_TOKEN" | ||
| target_branch="${RECOVERY_TARGET_BRANCH:-$(gh api "repos/$TARGET_REPO" --jq .default_branch)}" | ||
| target_branch="$CLAIM_TARGET_BRANCH" |
There was a problem hiding this comment.
Preserve default-branch fallback for legacy events
When a legacy exact-review dispatch omits target_branch, the legacy intake still records targetBranch: payload.target_branch || "main", while the previous workflow ignored that default and fetched the repository's live default branch for non-recovery reviews. Using the claimed value here makes those legacy items clone main; for any target whose default branch is not main (or was renamed), the checkout step fails before Codex and the durable queue just retries the same bad branch.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6b86504db
ℹ️ 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".
| continue-on-error: true | ||
| env: | ||
| GH_TOKEN: ${{ steps.target-write-token.outputs.token }} | ||
| GH_TOKEN: ${{ steps.target-read-token.outputs.token }} |
There was a problem hiding this comment.
Pass a write token to the exact review runner
For normal exact event reviews of an open issue/PR, pnpm run review is still invoked without --skip-start-comment, and it calls postReviewStartStatusComment in src/clawsweeper.ts to POST the dedicated clawsweeper-review-lease issue comment before reviewing. Supplying the read-only App token here makes that POST fail with insufficient permissions, which is recorded as a lease acquisition failure and causes the review step to exit before producing a bundle, so exact-review queue items just retry instead of publishing.
Useful? React with 👍 / 👎.
* feat: serialize exact review publication * fix: keep exact review publication independent * fix: resolve legacy target default branch * fix: keep exact review generation read-only
Summary
Validation
pnpm run build:allpnpm run lintpnpm run format:checkgit diff --check