Repository navigation
PASAY-OC-CONCURRENCY-001 — bot comments must not cancel active Owner /oc runs #95
Description
Route
workflow-governance-only · bounded one-file fix
Proven failure
On PR #94 an Owner-triggered /oc OpenCode run was actively executing, then an automated review/bot issue comment caused another opencode.yml workflow instance. The new bot-triggered instance did not need to execute the OpenCode job, but the workflow-level concurrency group with cancel-in-progress: true cancelled the already-running legitimate Owner /oc run before the job-level actor/command filter could protect it.
This is a real automation reliability defect: CodeRabbit / github-actions comments can interrupt an authorized OpenCode task on the same issue/PR.
Goal
Ensure only a new authorized human /oc execution for the same target may supersede/cancel a previous /oc execution. Bot comments, non-/oc comments, review status comments, and unrelated issue-comment events must never cancel an active Owner /oc run.
Scope
Expected changed file only:
.github/workflows/opencode.yml
Do not touch business code, deployment workflows, crossrepo dispatcher #94, secrets, models, permissions, runners, or Agent topology.
Preferred mature GitHub Actions pattern
Use event/dispatch gating so irrelevant issue-comment events cannot enter the same cancel-in-progress concurrency lane as a legitimate run. Keep implementation simple and native to GitHub Actions; no custom daemon/poller/watcher.
Possible acceptable solutions include a concurrency key that distinguishes actionable human /oc from ignored events, or moving/structuring trigger gating so ignored bot/non-command events cannot cancel actionable runs. The final implementation must be proven against actual GitHub Actions concurrency semantics, not assumed from job-level if behavior.
Required invariants
- Owner/human comment containing the accepted
/occommand → OpenCode job runs. - A second authorized
/ocon the same issue/PR may intentionally cancel/supersede the first if this is the documented desired behavior. github-actions[bot]comment on same PR while/ocis running → active/ocis NOT cancelled.coderabbitai[bot]comment on same PR while/ocis running → active/ocis NOT cancelled.- Human non-
/occomment → active/ocis NOT cancelled. - Existing credential isolation and verified OpenCode 1.18.24 routing remain unchanged.
- No production deploy, no merge automation, no new runner.
Deterministic validation
Add/extend the smallest existing workflow validator if already in the same file mechanism; if that would require a second file, STOP and report rather than expanding scope. At minimum use actionlint/YAML parse plus a documented event/concurrency truth table showing the computed concurrency group / cancel behavior for the five cases above.
Delivery
- one bounded branch / PR
- no auto-merge
- OpenCode Review + CodeRabbit
- final report: root cause, exact workflow change, event/concurrency matrix, changed files, checks, new HEAD
STOP after review-ready PR.
Activity
jhackuy commentedon Aug 28, 2026
/oc Execute PASAY-OC-CONCURRENCY-001 exactly as specified in Issue #95. This is a bounded workflow-governance fix. Change only
.github/workflows/opencode.yml; do not touch #94 files, production deploy, business code, secrets, model/provider, permissions, runners, or Agent topology. First verify the proven cancellation root cause against current workflow-level concurrency semantics. Implement the minimum native GitHub Actions fix so bot/non-/oc comments can never cancel an active authorized /oc run, while a new authorized /oc on the same issue may intentionally supersede it. Validate YAML/actionlint and provide an explicit event/concurrency truth table for Owner /oc, second Owner /oc, github-actions bot comment, CodeRabbit bot comment, and human non-/oc comment. Create a review-ready PR, no merge, report branch/PR/HEAD/checks, STOP.pasay-opencode-bot commentedon Aug 28, 2026
PASAY-OC-CONCURRENCY-001 — 执行报告(STOP @ Blocker)
1. 状态:BLOCKED — 未应用任何文件改动
按 Issue #95 范围执行 PASAY-OC-CONCURRENCY-001。已验证根因、完成最小原生修复设计、产出 review-ready 补丁规格与事件/并发真值表。但 唯一受批准的文件编辑子代理
pasay-implementer在硬编码沙盒绑定下拒绝编辑 workflows,且我(PASAY Lead)自身按系统约束不可编辑文件或运行 shell。未提交、未 push、未创建 PR。2. 已完成的子代理工作(证据链)
exploreopencode.yml+ 治理文件 + git 状态opencode.yml与 git 子目录).github/workflows/全部 8 个文件 +.github/其他文件pasay-researcherdocs.github.com与actionlint官方文档 6 大类问题全部有出处;确认根因 + 推荐 Pattern Apasay-implementer.github/workflows/opencode.yml边界编辑PASAY-OC-QUAL-001沙盒禁止改 workflows + 禁 git 命令)PASAY Lead 本人:直接
read读完.github/workflows/opencode.yml(117 行全文)、.git/HEAD、.git/config、AGENTS.md、SOLO_HANDOFF.md(200 行)、.trae/rules/pasay-governance.md、CURRENT_ARCHITECTURE.md(80 行)—— 无编辑工具,无 shell。3. 已验证的根因(官方文档支撑)
证据:
concurrency.group可使用github上下文(含github.event.*),已由 Contexts reference 的「Context availability」表格明确允许。concurrency.cancel-in-progress使用表达式${{ !contains(github.ref, 'release/') }}—— 证实并发键/取消判定使用同一github上下文,发生在 job 调度前。group: ${{ github.head_ref || github.run_id }}—— 即"非匹配事件落到唯一 key"的官方惯用法,正是本修复采用的 Pattern A。issue_comment触发器无原生正文/作者过滤;bot 账户(github-actions[bot]、coderabbitai[bot])会以comment.user.type == 'Bot'送达。→ Job-level
if:太晚,无法阻止 group 已匹配的取消。这就是 Issue 描述的 PR #94 真实失败。4. 最小原生修复(Pattern A,GitHub 官方惯用法)
把现有 job
if:的同款谓词搬入concurrency.group,使非可执行事件落到ignored-<run_id>(永不冲突);可执行事件保留opencode-<N>,第二/oc故意落到同 group → 允许 supersede。当前
concurrency:块(行 9–11)替换为(review-ready patch,未应用)
不变项(必须保留):
on:触发器(issue_comment / pull_request_review_comment, types: created)jobs.opencode块,特别是 job-levelif:(行 15–20,作为 defense-in-depth)permissions:、所有 env、OpenCode 1.18.24 SHA256 校验步骤(行 59–78)、effective config 校验(行 80–96)、handler 步骤(行 98–109)、runtime 记录(行 111–117)5. 事件 / 并发真值表(Issue 要求的 5 例 + 自检)
comment.user.typeconcurrency.group求值/oc同 group?if:/ocon issue #NUser/oc ...opencode-N/ocon same issue #N(运行中)User/oc ...opencode-Ngithub-actions[bot]评论 on PR #N(运行中)Botignored-<run_id>coderabbitai[bot]评论 on PR #N(运行中)Botignored-<run_id>/oc评论 on PR #N(运行中)Userlooks goodignored-<run_id>不变量 #6(凭据隔离 + OpenCode 1.18.24 路由):本 patch 不触及
steps:、permissions:、env、OPENCODE_VERSION='1.18.24'、OPENCODE_ASSET_SHA256—— 全部 byte-identical 保留。不变量 #7(无生产部署 / 无 merge 自动化 / 无新 runner):本 patch 不引入任何 runner、不动
.github/workflows/pasay-deploy-phase1.yml、不动权限块。6. Blocker 详述(诚实)
pasay-implementer返回了明确拒绝,原文要点:其审计声明:Files changed: none;Git operations: none;Commit: none;Push: none;PR: none。
约束拓扑(PASAY Lead 视角):
explore(只读)、pasay-researcher(只读)、pasay-implementer(写但沙盒在PASAY-OC-QUAL-001,禁 workflows/git)7. Git / 分支 / PR / HEAD / 检查 当前真值
opencode/issue95-20260828144049(未变)注:环境为容器化 git 工作区,
.git/refs/heads/与.git/refs/remotes/origin/当前为空(仅.git/HEAD指向工作分支);按系统上下文,自动 push/PR 基础设施将在"我的响应之后"处理 working tree 状态——而本 working tree 未被任何受批准代理改动,故无 push。8. STOP
按 AGENTS.md §5「Agent self-report is never enough to claim success」与系统约束「Never redefine scope / Never ask the user」,本任务在此节点诚实 STOP。补丁已完整规格化(§4)+ 真值表已对所有 6 条不变量证明(§5)+ 根因已对官方文档证明(§3)。唯一缺口是无可用代理可将其落地——这超出 PASAY Lead 的执行边界,需要由具备 workflow-edit 资格的子代理或 Owner 接手应用。
完整 subagent evidence chain:
explore:派 → 部分完成(步数受限)pasay-researcher:派 → 完成(官方文档全引用)pasay-implementer:派 → 拒绝(硬沙盒越界,零文件改动)github run