Skip to content

feat(ci): two-branch CI — changed-files-only PR lane, full-suite release lane, release-branch cuts, cancellation watchdog - #4486

Merged
senamakel merged 12 commits into
tinyhumansai:mainfrom
senamakel:ci/changed-file-tests-release-branch
Jul 4, 2026
Merged

senamakel merged 12 commits into
tinyhumansai:mainfrom
senamakel:ci/changed-file-tests-release-branch

Conversation

@senamakel

@senamakel senamakel commented Jul 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • PR fast lane: PRs → main now run unit tests only for the changed files — vitest related for app/src changes, domain-scoped cargo llvm-cov (libtest filters derived from src/<a>/<b>/…) for Rust — instead of the full ~13k-test instrumented suite. diff-cover still gates ≥ 80% on changed lines.
  • Two-branch model: new release-ci.yml runs the complete matrix (full unit suites, Rust mock-backend E2E, Playwright, desktop E2E on 3 OSes) on PRs targeting the long-lived release branch, gated by a single Release CI Gate check. prepare-release-pr.yml keeps a standing main→release PR open on every push to main.
  • Releases cut from release: release-staging.yml / release-production.yml now enforce/checkout/bump/tag/push on release, and merge the release branch back into main after a production cut (staging does not back-merge). Production takes a release_type increment (patch/minor/major); staging auto patch-bumps.
  • Cancellation fix: ci-cancel-aware.sh gains an Actions-API watchdog that stops builds inside container: jobs when the run is cancelled — the runner's SIGINT/SIGTERM is swallowed by the host-side docker exec client and never reaches the build.

Problem

  • PR CI runs every unit test in areas that changed at all, so a one-file Rust change pays the full instrumented ~13k-test suite (30-50 min).
  • Integration/E2E lanes (Rust mock-backend E2E, Playwright) run on every PR even though they rarely catch per-PR regressions, multiplying runner usage.
  • Cancellation is broken for container jobs: on run 28692697989's sibling 28692500745, jobs kept building 23–28 minutes after cancel-in-progress fired, concluding success/failure instead of cancelled, holding runner slots hostage.
  • Releases were cut from main with auto-guessed version bumps.

Solution

  • scripts/ci/vitest-changed-coverage.sh + scripts/ci/rust-coverage-changed.sh: changed-files-only test selection with conservative full-suite fallbacks (config/lockfile/lib.rs/nested-test-support changes, empty or oversized change sets). dorny/paths-filter list-files: shell feeds the changed-file lists.
  • release-ci.yml composes the existing test-reusable.yml and e2e-reusable.yml (full, 3 OS) plus the Rust E2E and Playwright lanes moved out of pr-ci.yml.
  • Production keeps the release_type (patch/minor/major) input; after the tag, a post-cut step merges release back into main (continue-on-error + warning so a tagged release is never stranded on conflicts). Staging keeps its automatic patch bump and does not back-merge.
  • Watchdog in ci-cancel-aware.sh polls GET /repos/{repo}/actions/runs/{run_id} (needs the new actions: read permission + workflow-level GH_TOKEN) and TERM→KILLs the build tree from inside the container. Verified locally against a faked API: cancelled runs kill the build within one poll interval; healthy runs are untouched.

Known tradeoff, called out explicitly: on the fast lane, changed Rust lines must be covered by tests in their own domain (or a changed integration-test target) — coverage contributed by unrelated suites no longer counts. The full suite still runs on every main→release PR.

Follow-up (repo settings, not in this diff): create the release branch, allow it in the "Disallow creating branches" ruleset, and add a "Protect release" ruleset requiring Release CI Gate.

Submission Checklist

  • Tests added or updated — N/A: CI workflow + shell script change; scripts exercised via stubbed dry-runs (classification, fallback, watchdog kill paths) documented in the PR
  • Diff coverage ≥ 80% — N/A: no app/Rust source changed; workflows and CI shell scripts are outside the coverage gate
  • Coverage matrix updated — N/A: behaviour-only CI change
  • All affected feature IDs from the matrix are listed in the PR description under ## Related — N/A: no feature rows affected
  • No new external network dependencies introduced (watchdog talks only to the GitHub Actions API of the running workflow)
  • Manual smoke checklist updated if this touches release-cut surfaces — N/A: release flow changed but smoke checklist steps themselves are unchanged; release workflows now run from the release branch
  • Linked issue closed via Closes #NNN — N/A: no tracking issue

Impact

  • CI wall-time on typical PRs drops sharply (unit tests scoped to changed files; Rust E2E + Playwright no longer run per-PR).
  • Cancelled runs free their runners within ~20 s instead of 20-30 min.
  • Release workflows must now be dispatched from the release branch; version increments stay patch/minor/major.

Related

  • Closes:
  • Follow-up PR(s)/TODOs: create release branch + rulesets (repo settings); consider sharding release-ci if main→release PRs become slow.

AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: ci/changed-file-tests-release-branch

https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x

senamakel added 6 commits July 3, 2026 20:14
…lane

vitest-changed-coverage.sh runs 'vitest related' with coverage against only
the changed app/src files; rust-coverage-changed.sh scopes cargo-llvm-cov to
domain-level libtest filters + changed integration-test targets. Both fall
back to the full suite whenever scoping is not clearly safe.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
PRs targeting main now run only the unit tests related to the changed files:
vitest related for app/src changes and domain-scoped cargo-llvm-cov for Rust,
both falling back to the full suite on config-level changes. The Rust mock-
backend E2E and Playwright lanes move to the new release CI (main→release
PRs). diff-cover still gates >= 80% on changed lines.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
…release PR

release-ci.yml runs the complete matrix on PRs targeting the release branch:
full unit suites (test-reusable), Rust mock-backend E2E, Playwright web lane,
and the full desktop E2E shards on Linux/macOS/Windows, gated by a single
'Release CI Gate' check. prepare-release-pr.yml keeps a standing main→release
PR open on every push to main.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
…sion

- release-staging/production run from the release branch: enforce/checkout/
  bump/commit/tag/push all target release instead of main
- version is supplied explicitly via a required workflow input (X.Y.Z, must
  be strictly greater than current) — bump-version.js accepts an exact
  version alongside patch/minor/major
- after the cut, the version-bump commit is merged back into main
  (continue-on-error + warning on conflicts so a tagged release is never
  stranded)

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
Evidence from run 28692500745: after cancel-in-progress fired, Rust E2E and
Playwright ran to 'success' 4-23 min later and Rust Core Coverage kept
building for 28 min — the runner's SIGINT/SIGTERM is swallowed by the
host-side docker exec client and never reaches processes inside container
jobs, so ci-cancel-aware.sh's traps never fire.

Add a cancellation watchdog to ci-cancel-aware.sh that polls the Actions API
(GET /actions/runs/<id>) and TERMs the build tree from inside the container
when the run is cancelled. Grant actions:read + workflow-level GH_TOKEN in
every wrapper-using workflow, and route the Vitest lane through the wrapper.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
@senamakel
senamakel requested a review from a team July 4, 2026 03:35
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4183bc97-37da-4f55-84b6-dbb046801f4f

📥 Commits

Reviewing files that changed from the base of the PR and between 6856eed and ff44d2c.

📒 Files selected for processing (9)
  • .github/workflows/build-desktop.yml
  • .github/workflows/prepare-release-pr.yml
  • .github/workflows/release-ci.yml
  • .github/workflows/release-packages.yml
  • .github/workflows/release-production.yml
  • .github/workflows/release-staging.yml
  • AGENTS.md
  • scripts/ci/rust-coverage-changed.sh
  • scripts/ci/vitest-changed-coverage.sh
📝 Walkthrough

Walkthrough

This PR introduces a two-branch CI model (main fast-lane, release full-lane) with new prepare-release-pr and release-ci workflows, back-merge-to-main steps in release-production/release-staging, a cancellation watchdog in scripts/ci-cancel-aware.sh wired via GH_TOKEN/actions:read across many workflows, and changed-files-scoped coverage scripts for frontend Vitest and Rust llvm-cov, plus explicit X.Y.Z version input support.

Changes

Cancellation watchdog rollout

Layer / File(s) Summary
Watchdog implementation
scripts/ci-cancel-aware.sh
Adds start_cancel_watchdog polling loop that terminates the script on run cancellation, plus WATCHDOG_PID tracking and cleanup.
Workflow wiring
.github/workflows/android-compile.yml, build-desktop.yml, e2e-agent-review.yml, e2e-playwright.yml, e2e-reusable.yml, e2e.yml, ios-appstore.yml, ios-compile.yml, release-packages.yml, test-reusable.yml
Adds actions: read permission and GH_TOKEN env var to support the cancellation watchdog script.

PR CI scoped coverage lanes

Layer / File(s) Summary
Change-detection outputs
.github/workflows/pr-ci.yml
Restricts PR trigger to main, adds actions: read/GH_TOKEN, and adds frontend-full/frontend-src-files/rust-core-full/rust-core-src-files filter outputs.
Vitest scoped coverage
scripts/ci/vitest-changed-coverage.sh, pr-ci.yml
New script runs Vitest coverage scoped to changed .ts/.tsx files or falls back to full suite; wired into frontend-checks.
Rust scoped coverage
scripts/ci/rust-coverage-changed.sh, pr-ci.yml
New script derives lib/test targets from changed Rust files for cargo llvm-cov, merging lcov output; wired into rust-core-coverage.
Gate rewiring
pr-ci.yml
Removes build-playwright-e2e-artifact job and rewires pr-ci-gate to depend on coverage lanes instead.

Release branch model with release-ci and back-merge

Layer / File(s) Summary
Prepare Release PR
.github/workflows/prepare-release-pr.yml
New workflow ensures a single open main→release PR via GitHub CLI checks.
Release CI workflow
.github/workflows/release-ci.yml
New full-lane workflow with unit-tests, rust-e2e, Playwright build/test, e2e-desktop, and a gate job.
Explicit version input
scripts/release/bump-version.js, scripts/test-release-act.sh
Accepts explicit X.Y.Z version alongside patch/minor/major keywords.
release-production.yml on release branch
release-production.yml
Switches branch enforcement/checkout/push to release and adds a back-merge-into-main step.
release-staging.yml on release branch
release-staging.yml
Switches branch enforcement/checkout/push to release and adds a back-merge-into-main step.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • tinyhumansai/openhuman#1094: Both PRs touch .github/workflows/release-staging.yml with overlapping changes to versioning/tagging and release branch handling.

Suggested labels: feature

Suggested reviewers: sanil-23, M3gA-Mind

Poem

A rabbit hops from main to release,
Watching watchdogs keep the peace. 🐇
Scoped coverage saves us time to spare,
While back-merges tidy branches with care.
Hop, build, gate, and merge — CI's new dance complete! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main CI and release-flow changes, including the two-branch model and cancellation watchdog.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6856eed4d8

ℹ️ 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".


- name: Open or refresh the main→release PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a token that starts Release CI automatically

Because this step authenticates gh pr create with the default GITHUB_TOKEN, GitHub puts pull_request runs created or updated by that token into an approval-required state instead of starting them unattended (see GitHub's triggering-a-workflow docs: https://docs.github.com/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow). In the normal path where a push to main first opens the standing main→release PR, the new release-ci.yml gate can remain pending until someone manually approves workflows, so the automated full-lane release PR does not green itself. Use the existing GitHub App token/PAT for PR creation if this is meant to run automatically.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c0417f1 — prepare-release-pr.yml now mints a token via actions/create-github-app-token@v2 (same XGITHUB_APP_ID/XGITHUB_APP_PRIVATE_KEY App the release workflows push with) and uses it for gh pr create, so the standing main→release PR triggers Release CI unattended.

RELEASE_SHA="$(git rev-parse HEAD)"
git fetch origin main
git checkout -B main origin/main
if git merge --no-ff "$RELEASE_SHA" -m "chore(release): merge release v${VERSION} back into main"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid no-op release PRs after back-merges

When release has just advanced from main with only the version-bump commit, origin/main is already an ancestor of RELEASE_SHA, but --no-ff still creates a new merge commit on main. The new prepare-release-pr workflow then compares release...main, sees that merge commit as main-only, and opens another main→release PR that runs the full release lane even though the trees are already synced; the staging workflow has the same pattern. Allow a fast-forward when possible (or otherwise suppress pure back-merge commits) so every cut does not create a no-op release PR.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c0417f1 — the production back-merge now tries git merge --ff-only first: when main hasn't moved since the cut, main fast-forwards to exactly the release SHA, so prepare-release-pr sees ahead_by=0 and opens no PR. The --no-ff path only remains for the case where main has genuinely diverged (in which case a new release PR is warranted anyway). The staging workflow no longer back-merges at all (removed in e4af430 per maintainer direction).

@coderabbitai coderabbitai Bot added the feature Net-new user-facing capability or product behavior. label Jul 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/pr-ci.yml (1)

85-138: 📐 Maintainability & Code Quality | 🔵 Trivial

Minor asymmetry: scripts/ci-cancel-aware.sh invalidates rust-core-full but not frontend-full.

rust-core-full (line 130) treats a change to scripts/ci-cancel-aware.sh as invalidating scoping, but frontend-full (lines 86-99) does not, even though scripts/ci/vitest-changed-coverage.sh also wraps its Vitest invocation through scripts/ci-cancel-aware.sh. Not a correctness bug (the watchdog script doesn't affect test selection), but worth aligning for consistency if the intent is "any change to shared CI infra falls back to full".

♻️ Optional consistency fix
             frontend-full:
               - '.github/workflows/pr-ci.yml'
               - 'scripts/ci/vitest-changed-coverage.sh'
+              - 'scripts/ci-cancel-aware.sh'
               - 'package.json'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-ci.yml around lines 85 - 138, frontend-full is missing
the shared CI infra dependency that rust-core-full already includes, so a change
to scripts/ci-cancel-aware.sh does not currently force the full frontend Vitest
run. Update the frontend-full path list in pr-ci.yml to include
scripts/ci-cancel-aware.sh, keeping it aligned with rust-core-full and the
scripts/ci/vitest-changed-coverage.sh wrapper so shared CI changes consistently
invalidate scoped test runs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release-packages.yml:
- Around line 16-27: The release workflow is exposing a highly privileged
GH_TOKEN and broad write permissions to every job/step by defining them at the
workflow level. Move the permissions and GH_TOKEN setup down to the specific
job(s), or even only the step(s) that call scripts/ci-cancel-aware.sh, and keep
the workflow default permissions minimal while granting write scopes only where
needed. Use the workflow’s permissions block and the env usage around the
watchdog invocation to localize access.

In `@scripts/ci/rust-coverage-changed.sh`:
- Around line 49-52: The current CHANGED_FILES parsing in the rust coverage
script uses eval to rebuild the files array, which treats PR-derived filenames
as shell code. Update the parsing logic in the changed-files handling block to
use a structured, non-evaluating parser or safe delimiter-based read/loop
approach so filenames are treated as data only. Keep the logging/counting
behavior in the same script, but remove any shell-code re-parsing around the
files array initialization.

---

Nitpick comments:
In @.github/workflows/pr-ci.yml:
- Around line 85-138: frontend-full is missing the shared CI infra dependency
that rust-core-full already includes, so a change to scripts/ci-cancel-aware.sh
does not currently force the full frontend Vitest run. Update the frontend-full
path list in pr-ci.yml to include scripts/ci-cancel-aware.sh, keeping it aligned
with rust-core-full and the scripts/ci/vitest-changed-coverage.sh wrapper so
shared CI changes consistently invalidate scoped test runs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df17a310-4e26-4b6b-a3d3-c7eec1f4a188

📥 Commits

Reviewing files that changed from the base of the PR and between 318027d and 6856eed.

📒 Files selected for processing (21)
  • .github/workflows/android-compile.yml
  • .github/workflows/build-desktop.yml
  • .github/workflows/e2e-agent-review.yml
  • .github/workflows/e2e-playwright.yml
  • .github/workflows/e2e-reusable.yml
  • .github/workflows/e2e.yml
  • .github/workflows/ios-appstore.yml
  • .github/workflows/ios-compile.yml
  • .github/workflows/pr-ci.yml
  • .github/workflows/prepare-release-pr.yml
  • .github/workflows/release-ci.yml
  • .github/workflows/release-packages.yml
  • .github/workflows/release-production.yml
  • .github/workflows/release-staging.yml
  • .github/workflows/test-reusable.yml
  • AGENTS.md
  • scripts/ci-cancel-aware.sh
  • scripts/ci/rust-coverage-changed.sh
  • scripts/ci/vitest-changed-coverage.sh
  • scripts/release/bump-version.js
  • scripts/test-release-act.sh

Comment thread .github/workflows/release-packages.yml Resolved
Comment thread scripts/ci/rust-coverage-changed.sh Resolved
Production takes patch/minor/major again (no manual version string); staging
reverts to its automatic patch bump and no longer merges release back into
main — only the production cut does.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4af430640

ℹ️ 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".

Comment thread .github/workflows/release-ci.yml Outdated
touch app/.env

- name: Run Rust E2E suite
run: pnpm test:rust:e2e

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wrap Release CI E2E runs with cancel-aware

This new Release CI job runs inside container: and starts the long Rust E2E suite directly, bypassing scripts/ci-cancel-aware.sh even though AGENTS.md now requires long build/test commands to use that wrapper because docker exec does not forward cancellation signals. When a main→release PR run is superseded or manually cancelled, this test process can keep consuming the runner until it times out or finishes naturally; wrap this command (and the analogous Playwright build/run commands in this workflow) with the cancel-aware script.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c0417f1 — all three long-running Release CI steps are now wrapped: pnpm test:rust:e2e (the inner script only wrapped its cargo segments; the wrapper now covers the mock server + node harness too), the Playwright artifact build, and the Playwright web session.

…al, scoped GH_TOKEN, wrapped release-ci steps

- prepare-release-pr: create the main→release PR with the GitHub App token;
  PRs created by GITHUB_TOKEN never trigger pull_request workflows, so the
  standing PR would sit without a Release CI run (codex)
- release-production back-merge: fast-forward main when it hasn't moved so
  the back-merge doesn't spawn a no-op main→release PR (codex)
- changed-files scripts: parse the paths-filter list with xargs instead of
  eval — PR-controlled filenames are never re-parsed as shell code; hostile
  quoting degrades to the full-suite fallback (coderabbit)
- write-permission workflows (release-packages/staging/production,
  build-desktop): GH_TOKEN env moved from workflow level to only the jobs
  that run ci-cancel-aware.sh (coderabbit/zizmor)
- release-ci: wrap Rust E2E, Playwright build, and Playwright session with
  ci-cancel-aware.sh (codex)

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 4, 2026
…erit

The prepare-release-pr minted token is restricted to pull-requests:write +
contents:read — it can open the main→release PR but cannot push commits.
release-ci no longer inherits secrets: neither reusable workflow it calls
uses any, and it is pull_request-triggered, so its runs stay secret-free.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
senamakel added 3 commits July 3, 2026 21:27
…nment

XGITHUB_APP_* only exist as environment secrets, so the job needs an
environment to read them at all; Release-PR-Automation holds only those two
secrets and is branch-policied to main, keeping the Production environment
(signing keys etc.) out of reach of push-to-main automation.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x
The check job runs on every merge to main with only the default read token
and no environment; the common case (PR already open / nothing to merge)
ends there. The open-pr job — the only one entering Release-PR-Automation
and minting the App token — runs solely when a PR must actually be created,
and re-checks for a racing PR under the concurrency group before creating.

Claude-Session: https://claude.ai/code/session_01FsaameYvpZMKZfUeWqZi7x

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff44d2c87f

ℹ️ 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".

Comment on lines +132 to +134
env:
# Consumed by scripts/ci-cancel-aware.sh's cancellation watchdog.
GH_TOKEN: ${{ github.token }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Merge the added GH_TOKEN into the existing env

This job already has an env mapping immediately above; adding a second env: at the same job level makes the reusable desktop workflow invalid in Actions or leaves only the second map in YAML parsers. When staging/production call build-desktop.yml, the desktop matrix either will not start or will silently lose the job-level GITHUB_TOKEN and Telegram bot variables, so put GH_TOKEN into the existing env block instead of creating a duplicate key.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in follow-up PR #4488 (commit 91728b8) — the stray second env: is merged into the job's existing env block, and workflow validation now uses a strict duplicate-key YAML loader so this class of break can't pass locally again. (This bug did ship with #4486 and made every push produce a failed invalid-workflow run for build-desktop.yml.)

# Changes here invalidate per-file test scoping → full Vitest run.
frontend-full:
- '.github/workflows/pr-ci.yml'
- 'scripts/ci/vitest-changed-coverage.sh'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Trigger frontend checks for runner changes

This path only appears in frontend-full, but the frontend job and coverage gate are guarded by needs.changes.outputs.frontend; a PR that changes only scripts/ci/vitest-changed-coverage.sh sets frontend-full=true while frontend=false, so the changed runner is not exercised at all. Add this path to the frontend filter too, or include frontend-full in the job/gate conditions.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in follow-up PR #4488 (commit 254f892) — scripts/ci/vitest-changed-coverage.sh (and scripts/ci-cancel-aware.sh) are added to the frontend filter, so touching the runner triggers the lane; the existing frontend-full entry then forces full-suite mode.

# Changes here invalidate per-module test scoping → full suite.
rust-core-full:
- '.github/workflows/pr-ci.yml'
- 'scripts/ci/rust-coverage-changed.sh'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Trigger Rust coverage for runner changes

This path only sets rust-core-full, while rust-quality, rust-core-coverage, and the coverage gate are all keyed off rust-core; a PR that only changes scripts/ci/rust-coverage-changed.sh will therefore skip the Rust lane instead of running the full suite that this flag requests. Include this script in the rust-core filter as well, or make the job conditions consider rust-core-full.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in follow-up PR #4488 (commit 254f892) — scripts/ci/rust-coverage-changed.sh is added to the rust-core filter, so the Rust lane runs (in full-suite mode via the existing rust-core-full entry) whenever the runner itself changes.

@senamakel
senamakel merged commit 5b15bbc into tinyhumansai:main Jul 4, 2026
6 checks passed
senamakel added a commit to senamakel/openhuman that referenced this pull request Jul 4, 2026
…n/consume

The core moved the login-token consume call to `POST /auth/login-token/consume`
(token in the JSON body, response `{ success, data: { jwt } }`) back in tinyhumansai#3794;
the removed legacy route was `/telegram/login-tokens/:token/consume`. The E2E
mock server still only served the legacy path and returned `jwtToken`, and every
login/auth spec asserted on the legacy URL substring — so once the full desktop
E2E suite began running in the new Release CI lane (tinyhumansai#4486), `performFullLogin`
never saw a consume call, no JWT was returned, and every shard cascaded
("Auth consume call missing", "Welcome screen still not visible").

- mock (scripts/mock-api/routes/auth.mjs): accept the new path (legacy kept as a
  harmless alias) and return `data.jwt` (the field the core parses), not jwtToken.
- specs: swap the consume matcher substring to `/auth/login-token/consume` across
  auth-access-control, login-flow, mega-flow, voice-mode, local-model-runtime,
  logout-relogin-onboarding, and the Playwright login-flow spec.

Pure test-fixture fix; no product code changes.

Claude-Session: https://claude.ai/code/session_01UAetDHQCyFtWnyP7RwGdJU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Net-new user-facing capability or product behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant