Repository navigation
ci: cancel superseded ci.yml runs per ref - #1091
Merged
Merged
Conversation
stamp-build Bot
added a commit
that referenced
this pull request
Nov 20, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/ZXll.svg" width="16" height="16" align="absmiddle" alt=""> <b>Lookout</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_d326ec9e59a8265a6ee34e5c43a7f85f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> ## Summary Follow-up to `#1091` (`#core:#387`): require the `workflow_dispatch` release gate in `.github/workflows/release.yml` to verify that `$GITHUB_SHA` is the merge commit of the matching merged `chore: release $TAG` PR on `main`, reusing `release_only`'s exact PR-matching filter so the rule lives in one place. ## Why With per-ref CI cancellation on `main` (`#1091`), a commit merged after a release PR cancels that release commit's CI. Re-dispatching `release.yml` from `main` without checking the commit's PR would run against the new head of `main` and publish it with the non-release PR's notes. ## Changes - **`.github/workflows/release.yml`** (gate and shared filter only; publish steps and `release` job untouched): - Hoisted `release_only`'s exact `jq` PR-matching rule into workflow-level `env.RELEASE_PR_FILTER` (keeps `release_only` free of `actions/checkout` and untrusted code). - Added `pull-requests: read` to `publish.permissions` so the gate can read `repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/pulls`. - Updated `publish`'s `gate a dispatched release on main's CI` step to evaluate `$RELEASE_PR_FILTER` against `$GITHUB_SHA` before entering the 60-minute CI poll loop, failing closed on any non-release, unmerged, wrong-commit, or ambiguous PR. - Updated `release_only` to reference `"$RELEASE_PR_FILTER"` directly. - **`tests/release-only-workflow.test.ts` and `tests/fixtures/release-only-cli.ts`**: - Execute the actual `gate a dispatched release on main's CI` bash step extracted from `.github/workflows/release.yml` with `RELEASE_PR_FILTER` read from the workflow. - Verify the gate accepts a matching merged `chore: release $TAG` PR and refuses non-release PRs, wrong commits, unmerged/ambiguous PRs, null notes, API failures, and existing tags before polling `ci.yml/runs`. - Verify `publish` declares `pull-requests: read` and both steps reference `"$RELEASE_PR_FILTER"`. ## Verification - Validated `.github/workflows/release.yml` YAML parsing. - `CI=1 pnpm run check` passes locally (typecheck, `oxlint --type-aware --deny-warnings`, unit tests including all 27 cases in `tests/release-only-workflow.test.ts`, mock `sea-trial`). --------- Co-authored-by: Lookout <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 21, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup>opened from existing branch <code>agent/cindy/release-0.127.0</code> @ <code>b15d311f509d</code>, which the agent did not push</sup><br><sup><a href="https://stamp.build/review?receipt=prc_73c76ce0b5c49eb86a194fb0d706127f"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.127.0 ### Behavior changes hosts should know - **Pi is an optional dependency of `@botiverse/oar`** (#1098). A default install still includes `@earendil-works/pi-ai` and `@earendil-works/pi-coding-agent`, so nothing changes unless you opt out. `npm install --omit=optional` (or `pnpm install --no-optional`) leaves both out; note that these flags drop every optional dependency in the tree, not only Pi's. Pi stays in `defaultRuntimes` either way. `@botiverse/oar-cli` keeps both packages as direct dependencies. - Without the packages, `installation()` reports `unsupported` with code `dependency_missing` in a normal Node host for every Pi mode. In-process Pi SDK used to report `not_found` here, so hosts that branch on `not_found` should handle the new code. - Pi RPC with an explicit `command` now also checks the host packages, because the host process needs them for session lookup, project-package checks and context-overflow detection. Its command check runs first, so a missing or too-old `pi` still reports `not_found` or `version_unsupported`. Default Pi RPC in a single-file or Electron host still reports `unsupported_host` first. - The declarations of every entry point except `@botiverse/oar/pi-durable` no longer import Pi, so TypeScript hosts with `skipLibCheck: false` compile without it. `pi-durable` still needs `@earendil-works/pi-ai`. - **Ending a process through stdin EOF takes one kill grace, not two** (#1097). When OAR closes stdin to end an idle Claude or Codex session, Codex's login process after a completed login, or a Qoder or Qwen session or model list, and the process is still alive after the kill grace (10 s by default, `OAR_KILL_GRACE_MS`), OAR now force-ends the process tree at once. Before, it sent SIGTERM and waited a second grace, so this could take up to 20 s. Processes that already ended after one grace are unchanged: Claude and Codex model, inventory and account queries, DSH, Factory and Pi RPC. A session with an active turn is still stopped at once. - **Explicit context overflow is `input_too_large` on more paths** (#1093). The generic error-text rules now check for an explicit overflow first ("This model's maximum context length is N tokens. However, ...", "Your input exceeds the context window of this model", "Prompt is too long", with an optional `Internal error: ` prefix) and keep the original reason. A specific native category or provider code still takes precedence. - OpenCode 2.2.7 and 2.3.2 report an overflow and other invalid requests with the same JSON-RPC code (`-32603`) and native name (`provider.invalid-request`); an explicit overflow there is now `input_too_large`. On OpenCode, a rejected summary request still reports `kind: "failed"` with `failure: "provider"`. - The same rules cover the ACP fallback (every ACP runtime), Cursor, Factory, Grok, Pi in-process, Pi Durable and Morph, Claude's generic invalid-request fallback, and `invalid_request_error` provider bodies on Pi and Codex. An Anthropic-style "prompt is too long" body that used to be `invalid_request` is now `input_too_large`. - The runtime matrix gains "Recovery after automatic compaction fails": after a measured failed automatic compaction, Claude, Pi, DSH, OpenCode v2 and threshold-triggered Codex returned to `idle` and completed the next prompt on the same session. The failed turn stays readable from `turn_ended.outcome` and `status().value.lastTurnOutcome`. ### New - **Codex MCP startup per server** (#1092). From Codex 0.169.0 (executable installs, stable versions), `sessionCapabilities(installation).mcpStartup` is `{ kind: "per_server", firstModelRequest: "may_start_pending" }`: Codex can send the first model request while an MCP server is still listing tools, and that tool is then missing from turn one. A missing declaration means unknown. - Native startup reports that carry a thread ID become `mcp_server_startup` events with the server name and `pending`, `ready`, `failed` or `cancelled` (native `starting` is `pending`). This is a new `RuntimeEventBody` variant, so code that switches exhaustively on event kinds needs a case for it. - `mcpStartupOf(records, sessionId)` (from `@botiverse/oar` and `@botiverse/oar/observe`, with type `McpStartupStatus`) returns the latest state per server for the root agent. - A host that needs a server on turn one can subscribe with `session.events(observer, { cursor: { sessionId: session.id, afterSeq: -1 } })`, which replays startup reports, and wait for its `ready` before the first input. A server that never reports stays unknown, so set your own time limit. ### Tests and CI - The release workflow's dispatch, tag-push and `release_only` paths all require the commit to be the merge commit of exactly one merged `chore: release vX.Y.Z` pull request (#1095, #1096). `ci.yml` cancels superseded runs per ref (#1091). Tests check a fixture process's identity before cleanup (#1089), and DSH's `lastInput` and `requestsForTurn` share one trailing synthetic-context check (#1090). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]> Co-authored-by: xxchan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a workflow-level
concurrencygroup per ref withcancel-in-progress: trueto.github/workflows/ci.yml(#core:#387):Why
On
main, each push schedules ~15 macOS jobs. Without workflow-level concurrency cancellation, successive merges queue supersededmainruns ahead of the release commit's run, starving the macOS runner pool untilrelease.yml's 60-minute CI gate times out.mainhas now had to be unblocked by hand three times:0.122.0on 2026-11-190.125.0on 2026-11-20 at 06:02 UTC (9 queued runs,#378)0.126.0on 2026-11-20 at 18:50 UTC (5 older queued runs)With
group: ${{ github.workflow }}-${{ github.ref }}andcancel-in-progress: true:pushtomainandworkflow_dispatchonmainshareci-refs/heads/main, so newermainpushes and manual recovery dispatches cancel older queued/runningmainruns immediately.ci-refs/pull/<N>/merge, so pushes to a PR cancel only older runs on that same PR and never collide withmain, other PRs, or aworkflow_dispatchon the branch ref (ci-refs/heads/<branch>).Dependency Audit (verified before changing)
.github/workflows/release.yml(untouched): Lines 79-80 query onlyactions/workflows/ci.yml/runs?head_sha=$GITHUB_SHA, selecting.event == "push" or .event == "workflow_dispatch"and takingfirst(newest run for that exact commit). It never reads older commits' runs. If another commit merges tomainwhile a release commit's CI is running, the superseded commit's run is cancelled andrelease.ymlfails closed (CI did not succeed on $GITHUB_SHA), matching its contract that a dispatched release is only ever the current head ofmain..github/workflows/: None useworkflow_runonci.ymlor depend on olderci.ymlruns.osv-scanner.yml,runtime-latest.yml, andrelease.ymlalready declare workflow-levelconcurrency.stamp settings -R botiverse/oar,stamp repo guard list -R botiverse/oar):merge_holdhas no active holds (holds: []),ci_on_readyhas no custom rules, andworkflow_guardis off. Verified empirically on the 5 cancelledmainruns from 2026-11-20 (44738501140,44751339691,44758089023,44770042974,44777833935): Stamp posted zero false post-merge failure comments on their PRs (#1084,#1085).Verification
.github/workflows/ci.ymlYAML parsing.CI=1 pnpm run checkpasses locally (typecheck,oxlint --type-aware --deny-warnings, unit tests, mocksea-trial).