快速了解
它能做什么
面向 dsh-edge 的 GitHub 拉取请求审查与 CI 推进技能,不会自动合并。
本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。
选择前先看
在创建或更新 dsh-edge PR 后使用。它会采集与提交绑定的稳定 PR 快照,整理当前审查评论和 CI 失败;每次调用最多执行一批连贯修复或一个生命周期动作;并保留向用户报告“可合并”所需的证据。代码判断会交给配套的 dsh-code-review,推送前检查由 dsh-pre-push-checks 选择。
适合谁
正在处理 pawaca/dsh-edge GitHub 拉取请求的维护者。
常见任务
- 检查更新后的 PR 是否存在针对当前 HEAD 的审查问题或 CI 失败。
- 对有效审查问题执行一批有边界的修复,并运行相应检查。
- 用代码或测试证据反驳过期或缺乏依据的审查结论。
- 判断非草稿 PR 是否具备向用户报告“可由用户决定合并”的当前 HEAD 审查和 CI 证据。
权限与数据
文档中的流程会读取仓库和 PR 状态;使用时可能执行正常的 PR 生命周期和分支操作。
权限- 用于状态、差异、提交和推送操作的仓库 Git 访问权限。
- 用于读取 PR 审查、评论、检查、状态和工作流日志的 GitHub CLI/API 访问权限。
- 在请求审查时发布独立 @codex review 评论的权限。
- 在仓库 Git 目录下、提交之外保存本地已处理审查状态。
- 使用 PR HEAD SHA 标记,将审查请求和反应关联到特定提交。
- GitHub 拉取请求、GitHub Actions 和 Codex 审查流程。
- 满足所需仓库和 PR 操作权限的 GitHub 身份验证。
局限
- 该技能针对 dsh-edge,假设存在其审查约定、配套技能和 codex-state 传感器脚本。
- 每次调用只推进一个有边界的状态转换,不能作为永久轮询循环运行。
- 它不会合并 PR;最终合并仍由用户决定。
- 只有两次最终快照的 HEAD SHA 相同,才会报告可合并。
DSHub 已核对
- 固定版本的技能定义了基于 HEAD 的 PR 审查与 CI 收敛流程。
- 技能要求在报告可合并前,处理当前 HEAD 审查项、获得审查通过信号、完成非草稿 ready 状态审查,并取得成功或经确认有意缺失的 CI。
- 技能明确禁止自动合并。
DSHub 未核对
- 未实际安装或运行此技能。
- 未测试其引用脚本、GitHub 访问、CI 配置和配套技能是否可用或正确。
- 提供的证据未声明 DeepSeek Harness 版本范围。
固定版本安装
主要操作
这个独立 Skill没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。
维护者原文
Skill 使用说明
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.
有意识地管理
安装与管理
前置条件与目标 Profile
目标: codex Profile, dsh-edge-maintainers Profile
交付方式: Skill 文件 — https://raw.githubusercontent.com/pawaca/dsh-edge/07856f3ba1818f06ee1687808403360225ad2a9c/.agents/skills/codex-review-loop/SKILL.md。
兼容性与访问范围
Repository-specific dsh-edge PR workflow skill: Not declared in supplied evidence。
风险事实
证据与编辑审查Manifest、Bundle patch、分发与新鲜度
不可变证据
审查状态与源码活动
仓库文本仅作为工件证据处理。这是可复用的项目维护技能,并非 dsh-edge 的 Cloudflare 部署应用本体。
AI 审查于 2026/9/16 UTC 14:31。GitHub 事实核对日期: 2026/9/16 UTC 14:31。
自当前证据基线以来,没有记录到重要源码变化。