At a glance
What it does
A dsh-edge-specific skill for moving a GitHub pull request through verified review and CI states without auto-merging.
Before you choose it
Use this after opening or updating a dsh-edge PR. It collects a stable, commit-aware PR snapshot; triages current review comments and CI failures; permits one coherent repair or lifecycle action per invocation; and records the evidence needed to declare a PR ready for the user to merge. It directs code judgment to the companion dsh-code-review skill and selects checks through dsh-pre-push-checks.
Best for
Maintainers of the pawaca/dsh-edge repository who are actively handling a GitHub pull request.
Common tasks
- Check whether a newly updated PR has current-HEAD review findings or CI failures.
- Respond to valid review findings with a bounded repair batch and appropriate checks.
- Rebut stale or unsupported review claims with code or test evidence.
- Determine whether a non-draft PR has the required current-HEAD review and CI evidence to be reported ready for user-directed merge.
Permissions and data
The documented workflow reads repository and pull-request state and may perform normal PR lifecycle and branch actions when used.
Permissions- Repository Git access for status, diff, commit, and push operations.
- GitHub CLI/API access to read PR reviews, comments, checks, statuses, and workflow logs.
- Permission to post a standalone @codex review comment when requesting a review.
- Stores local handled-review state under the repository Git directory, outside the commit.
- Uses PR head SHA markers to associate review requests and reactions with a specific commit.
- GitHub pull requests, GitHub Actions, and the Codex review workflow.
- GitHub authentication suitable for the required repository and PR actions.
Limitations
- It is repository-specific and assumes dsh-edge review conventions, companion skills, and the codex-state sensor script.
- It advances one bounded state transition per invocation; it must not run as a permanent polling loop.
- It never merges a PR; final merge remains a user decision.
- It requires two final snapshots with the same head SHA before reporting ready to merge.
What DSHub checked
- The pinned skill defines a HEAD-aware PR review and CI convergence process.
- The skill requires current-HEAD review handling, a review-pass signal, non-draft ready-state review, and successful or intentionally absent CI before reporting readiness.
- The skill explicitly prohibits automatic merging.
What DSHub did not check
- No installation or execution of this skill was performed.
- Availability or correctness of its referenced scripts, GitHub access, CI configuration, and companion skills was not tested.
- No DeepSeek Harness version range is declared in the supplied evidence.
Pinned install
Primary action
This standalone skill does not have a DSH Plugin install action. Use its source documentation for the delivery method.
Maintainer source
Skill instructions
name: codex-review-loop
description: Drive a dsh-edge GitHub pull request through bounded, HEAD-aware Codex review and CI convergence. Use after opening or updating a PR, when review comments or CI failures arrive, while waiting for @codex review, or when deciding whether the current PR is ready to merge. Verify findings instead of accepting them by default, redirect non-convergent repair loops, and never merge automatically.
Codex Review Loop
Advance one bounded state transition per invocation. Read one stable snapshot, handle the current blocking evidence, perform at most one necessary mutation batch or lifecycle action, then return. Do not implement a permanent polling loop.
Use dsh-code-review to judge the code and dsh-pre-push-checks before every push or ready transition.
Completion contract
Report ready to merge only when two final snapshots have the same head_sha and all of these conditions hold:
- Every current-HEAD review item is fixed or rebutted, or its requested user decision has been resolved into one of those outcomes; no item requiring action remains open.
- The current review phase has a HEAD-bound pass or a phase-correlated approval signal after the latest request or completed no-finding review.
- The PR is not a draft; the review phase created by the ready transition has also passed.
- CI reports
success, ornonehas been verified as intentional under the workflow, ruleset, event, and path configuration.
Never merge the PR. Report the head SHA, review evidence, CI evidence, and any retained branch or worktree for the user to decide.
Read a stable snapshot
Run from any checkout in the repository:
state_script="$(git rev-parse --show-toplevel)/.agents/skills/codex-review-loop/scripts/codex-state.sh"
"$state_script" <PR#> [owner/repo] [not-before-utc]
The sensor paginates reviews, inline comments, discussion comments, reactions, lifecycle events, Check Runs, and commit statuses. It retries when the PR head, state, or draft state changes during collection and refuses to emit mixed evidence.
Treat latest_observed as an observation, not necessarily proof. A bare approval reaction is not SHA-bound and never overrides a finding. Prefer latest_strong, timeline, open_comments, and ci when selecting the next action.
Advance one tick
- Read one snapshot. Preserve the last successful facts if collection fails.
- Stop and report if the PR is merged or closed.
- Read all current
open_commentsand all CI failures before changing code; group findings and failures that share a cause. - Triage every finding. Do not mutate until every item in the current round has a disposition.
- Apply the convergence limits before editing, replying, pushing, requesting review, or marking ready.
- Make one coherent fix batch, run the narrow reproducer and required DSH checks, record outcomes, commit, and push.
- On a draft PR, request
@codex reviewonce for each new HEAD. On a non-draft PR, wait for the automatic review unless the HEAD did not change and every finding was rebutted. - After a draft pass, mark the PR ready and continue through the new ready review and CI phase.
Send review requests as standalone comments so quoted discussion does not retrigger the bot:
head_sha="$(git rev-parse HEAD)"
gh api -X POST repos/<owner>/<repo>/issues/<pr>/comments \
-f body="@codex review
<!-- dsh-review-head: $head_sha -->"
The hidden full-SHA marker binds the request and its reactions to one PR head. Do not omit or copy it across commits. The sensor only aggregates the fork-required edge / verify check by default; set CODEX_REVIEW_REQUIRED_CHECKS to a newline-separated list only when the repository's required checks intentionally change.
Triage findings
Automated review reads the diff, repository rules, and traced entrypoints, but it does not know the PR's motivation, the user's stated scope, actual data volumes, runtime constraints, or prior-round rejections. Its job is to find every possible problem, which makes it systematically biased toward risks that look plausible in isolation but do not apply at the actual scale or in the actual environment. Findings are candidate counterexamples, not established facts. Priority labels rank the reviewer's assessed severity, not the probability that the premise is correct. Do not enter a "fix what the reviewer says" loop — verify each claim's premise before choosing a disposition.
Treat each finding as a technical claim. Confirm that it targets the current HEAD, its path is reachable, its stated impact is real, and it violates a requirement, security rule, data invariant, or documented decision. Judge the problem separately from the proposed repair and inspect sibling callers or lifecycle states that share the same assumption.
Assign exactly one outcome:
fixed: the claim is correct and in scope. Repair the root cause and cover the affected problem family.rebutted: the claim is stale, incorrect, unreachable, already guaranteed, or outside the PR contract. Reply with code or test evidence; do not change code merely to silence it.user-decision: the claim is real, but acting on it changes product behavior, security, durable data, public APIs, or the PR's core scope. Stop mutations and request direction; keep the item open until the user's choice is implemented or rebutted.
Do not weaken assertions, hide errors, add speculative compatibility, or stack fallbacks solely to obtain approval. An item becomes handled only after its disposition, necessary code or reply, verification, and commit reference are complete.
Reply to inline findings in their threads. Reply to review-body findings in one top-level comment that links the review. State the outcome, evidence, affected family, validation, and commit when applicable; never reply only with “fixed.”
When rebutting, include publicly verifiable context the reviewer cannot derive from the diff: the PR description's stated scope, measurements or bounds visible in the codebase, and the history of prior-round rejections on the same family. Do not disclose private conversation details without explicit user authorization. The purpose is to give the reviewer enough information to calibrate its next round instead of re-finding the same family from a different angle.
Enforce convergence
Give each valid finding a stable problem-family label and retain family counts in the handled-state file. Record a review id in actionableFindingRounds only when its round contains at least one fixed or pending user-decision item; rebuttal-only rounds, waits, CI reruns, reactions, limits, and no-finding reviews do not count. Use the sensor's complete finding_rounds list to find unclassified rounds, not as the automatic-mutation budget by itself.
The first fixed disposition in a family requires no special justification — the claim is valid, fix it. From the second occurrence onward, fixed carries the same evidence burden as rebutted: state the concrete premise that makes the claim correct (measurement, path trace, upper-bound calculation), and explain how the repair covers the family invariant. If this evidence cannot be produced, the disposition is wrong — rebut, request user direction, or roll back the approach instead.
- On the second occurrence of one family, stop local patching. State one invariant, audit every affected caller and lifecycle, and use one general repair with a family-level negative test.
- On the third occurrence of one family, stop the current patching approach and perform a strategy reset. Continue autonomously only when an in-scope general replacement, rollback, split, scope reduction, or technical rebuttal is clearly safer and has family-level tests; otherwise request user direction.
- At three actionable finding rounds overall, and after every two additional actionable rounds, publish a convergence checkpoint before further mutation. Audit problem-family recurrence, whether the prior repair caused the new finding, alignment with the PR theme, material scope growth, and whether open problems are decreasing.
- After a checkpoint, continue autonomously when the remaining work is in scope and a bounded invariant-preserving repair covers a whole family. Redirect, rebut, simplify, or roll back an approach instead of accumulating local patches.
- Stop and request user direction when a repair would expand the product, security, data, or public-API contract; materially enlarge or redirect the PR; repeat after a general family repair without a safer replacement; primarily repair problems created by the previous approach; or fail to reduce open problems across two consecutive checkpoints.
Checkpoints diagnose and redirect the loop; no fixed round count alone requires human approval. Human input is reserved for unresolved scope or contract choices and genuine non-convergence.
Record handled state
Store local state outside the commit at:
$(git rev-parse --git-dir)/codex-review-loop-<PR#>.handled.json
Use this shape and preserve prior entries:
{
"handledItemKeys": ["review-body:123", "review-comment:456"],
"actionableFindingRounds": [789],
"families": {
"session-revision-race": {
"count": 2,
"outcome": "fixed"
}
}
}
The sensor accepts this object and older arrays. Never add a key before its disposition, response or repair, verification, and commit reference are complete.
Handle CI
failure: read all failures for the current HEAD once. Distinguish branch defects, test-contract mistakes, flaky infrastructure, permissions, and base failures before acting.pending: wait; do not cancel or duplicate the run.success: inspect unexpected neutral or skipped required jobs before treating it as proof.none: verify workflow triggers, draft state, rulesets, and path conditions. Expected CI that has not appeared remains blocking.
Use gh run view <run-id> --log-failed for GitHub Actions failures. Rerun unchanged code only with evidence of flakiness or infrastructure failure.
Finish a repair batch
Run the smallest reproducer followed by the checks selected through dsh-pre-push-checks. Commit with a conventional message, push normally, and verify that the remote branch equals local HEAD. All review and CI evidence for an older HEAD becomes stale after the push.
Operate deliberately
Install and manage
Prerequisites and target Profile
Target: Codex Profile, Dsh Edge Maintainers Profile
Delivery: Skill Files — https://raw.githubusercontent.com/pawaca/dsh-edge/07856f3ba1818f06ee1687808403360225ad2a9c/.agents/skills/codex-review-loop/SKILL.md。
Compatibility and access
Repository Specific dsh Edge PR workflow skill: Not declared in supplied evidence。
Review compatibility evidence ↗
Risk facts
MIT-licensed repository artifact
Evidence ↗Designed specifically for dsh-edge pull requests and its review workflow
Evidence ↗Evidence and editorial reviewManifest, Bundle patch, distribution and freshness
Immutable evidence
Review status and source activity
Repository text is treated as artifact evidence. This is a reusable project-maintenance skill, not the dsh-edge Cloudflare deployment application itself.
AI reviewed Sep 16, 2026, 2:31 PM UTC。GitHub facts last checked Sep 16, 2026, 2:31 PM UTC。
No material source change has been recorded since this evidence baseline.