Repository navigation
[2465 by Claude Opus 5] Reduce CI latency with isolated full-suite shards and serialized nightly runs - #2466
Conversation
…e targeted tests, actionlint and eslint pass locally, but no shard has run in CI yet, so I don't have real shard timings. Those, and the desktop step time, will come from this PR's own CI runs; I'm not claiming a speedup until then. Full suite sharding (`scripts/run-test-suite.mjs`) - Split: each test file and each native workspace (currently just `propr-ui`) is one unit. After sorting, units are dealt out round-robin to the shards. On current main that's 513 units: 129 / 128 / 128 / 128. `propr-ui` lands in shard 1 only. - Unchanged behavior: files still run one at a time inside a shard, with a fresh data directory per file and Redis flushed between files. With no shard settings, the CLI and nightly run the same set of tests as before. - Shard settings are checked strictly: you pass `--shard=I/N` or `PROPR_TEST_SHARD_INDEX`/`PROPR_TEST_SHARD_COUNT`. It rejects a missing half, zero, leading zeros, decimals, an index above the count, a count above 64, both sources at once, an empty shard, and sharding combined with explicit file names. - Proof of completeness: `--list` prints the units for a shard without running anything. `--verify-shard-summaries` checks that every expected shard reported, and that every discovered unit ran exactly once with nothing extra. On current main this reports "Verified 4 shards ran all 513 discovered test units exactly once." - Timing: it logs each unit's time and writes a per-unit JSON summary (`PROPR_TEST_SUMMARY_FILE`). It also adds a "slowest units" table to the job summary, for balancing later. PR workflow (`pr-test-on-label.yml`) - Four shard jobs: they run on GitHub-hosted `ubuntu-latest` with no secrets and `fail-fast: false`. Each starts its own Redis and uploads its own sanitized artifact (`…-<attempt>-shard-N`). - Docs build once: a new job, "Validate Test Preparation and Docs", runs `.propr/setup.sh` a single time instead of per shard. Shards install only the Chromium that the browser tests need. - "Run Full Test Suite" is now the aggregate gate: the check name is unchanged, so branch protection doesn't change. It uses `always()` and fails if the shards or docs job fail, are cancelled or are skipped. It also re-checks coverage from the uploaded summaries. - Drafts and re-runs: drafts still skip it, as before. If you re-run only failed jobs, the gate uses each shard's latest attempt, so shards that passed earlier aren't reported as missing. - Failure comment: it now lists each shard's failed stage, the failing files, and truncated output for the failed shards. - Per-PR cancel-in-progress is unchanged. Nightly (`test-nightly.yml`) - Scheduled and manual runs on the same branch now share one concurrency group with `cancel-in-progress: false`, so they can't overlap. GitHub keeps only the newest queued run waiting; the active run, including live E2E, is never cancelled. The live tests, timeouts, models and failure issue are unchanged. Desktop bottleneck (fixed) - Cause: in run 35712445891, the linux-x64 lifecycle script printed its final results about 57 seconds into the step, but the step ran another ~9m23s. The arm64 job took about the same time. - Why: `extractRpm` waits on a 10-minute deadline timer that is never cleared, so Node doesn't exit until it fires. Three other deadlines had the same leak with shorter timers. - Fix: a new `withDeadline` helper clears the timer once the operation finishes. Deadlines, error handling, cleanup and artifact checks are unchanged. - Tests: two new regression tests fail against the old code and pass now. All 29 lifecycle tests pass. Tests and checks - 10 new runner tests cover: - whether every unit, including the native workspaces, lands in exactly one shard, in a fixture repo and in the real repo - invalid shard settings and the list/verify commands - the gate script run for real against success, failure, cancelled and skipped results - nightly concurrency - All 16 runner tests pass. - actionlint 1.7.7 reports no findings for the two changed workflows. The full run flags only unknown runner labels in other workflows, which already existed. When each change takes effect - In this PR: the sharded full suite and the desktop fix (the desktop check runs this PR's copy of the script). This PR's CI runs are where the real shard and lifecycle timings will show up. - After merge: nightly concurrency, since scheduled runs use the default branch. Nothing was changed on [email protected]: no production services, runner settings, branch protection or deployments.
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 8fb25e9 Summary of ChangesShard 1/4 failed because a test depended on something outside the repo, not because of the sharding code. I fixed the test. Cause: in These tests already assumed Fix: the Codex test block now uses its own temporary directory, created at the start and deleted when the block finishes, instead of Verification: I ran the file through
The repo's eslint config skips this file, so linting doesn't cover it. I only reran this one test file, not the whole suite; the next CI run will confirm shard 1. The Node.js 20 deprecation line in the failure evidence is only a warning about 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
Full Test Suite ResultsValidation failed during: Test shard (shard 1).
View shard 1/4 output |
|
Update this PR to prefer the existing gitfix.dev self-hosted runner for compatible PR checks. This is a change to the requested execution location, not a request to reduce test coverage. Verified host facts: Ubuntu 24.04 x64, 12 logical CPUs, 62 GiB RAM, roughly 46 GiB available; one ProPR runner registered and online with labels [self-hosted, Linux, X64, propr]. Other repositories and ProPR services share this host. The ProPR runner currently runs as root. Do not restart services, register runners, change permissions, or touch production data as part of this implementation. Requirements:
Keep this as one queued follow-up after the currently running CI repair, with no overlapping writers. Update the PR description to the final implementation and report real runner placement/timings rather than estimates. Do not merge or deploy. |
…de the repo, not because of the sharding code. I fixed the test.
Shard 1/4 failed because a test depended on something outside the repo, not because of the sharding code. I fixed the test.
**Cause:** in `test/reasoningLevelSettings.test.ts`, two Codex tests ("passes Codex reasoning level through model_reasoning_effort config" and "runs automated Codex executions without persisting resumable sessions") set Codex's config path to `~/.codex`. Codex refuses to build its Docker arguments unless that directory exists, so on the CI machine, which has no `/home/runner/.codex`, both tests failed with "The configured Codex credential directory is unavailable".
These tests already assumed `~/.codex` existed before this PR, but that path didn't show up as a failure in the old single-process run. Most likely another test file created the directory earlier in that run; I haven't found which one. Sharding moves files onto separate clean machines, which is what exposed it.
**Fix:** the Codex test block now uses its own temporary directory, created at the start and deleted when the block finishes, instead of `~/.codex`. `test/contextAnalysisRuntime.test.ts` already does the same thing. No production code changed.
**Verification:** I ran the file through `scripts/run-test-suite.mjs` with an empty home directory, which matches CI:
- **Before the fix:** 43 passed, 2 failed, the same failure as in CI.
- **After the fix:** 45 of 45 passed.
The repo's eslint config skips this file, so linting doesn't cover it. I only reran this one test file, not the whole suite; the next CI run will confirm shard 1.
The Node.js 20 deprecation line in the failure evidence is only a warning about `actions/checkout` and didn't cause the failure. This change has nothing visual, so there are no previews.
PR: #2466
Comment by: @propr-dev[bot] (ID: 5775066154)
Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit e3b0415 Processed 3 comments:
Summary of ChangesI've made the requested changes. Trusted PRs now run the full suite as four parallel shards in one job on gitfix.dev, and forks stay on hosted runners. None of the new self-hosted setup has run in CI yet, so I have no runner placement or timings for it. Those will come from this PR's next run; the job summary and a reasoningLevelSettings failure: already fixed by the previous commit. In CI on 8fb25e9, shard 1 passed, including that test, and the whole Full Test Suite run was green. What changed:
Measured so far (current head, all on hosted runners):
Tests: all 46 affected tests pass: 20 new routing/shard tests, 16 existing runner tests and 10 Electron setup tests. Decisions for you:
No previews, since nothing here is visual. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
Host-side runner capacity is being provisioned now, per the owner's explicit request: gitfix.dev will have FOUR ProPR runner workers in total (existing worker plus three new workers), each with a separate installation/work directory. All match [self-hosted, Linux, X64, propr]. This supersedes requirement 3 in my preceding comment: KEEP the four GitHub matrix shard jobs, route compatible trusted Linux x64 work to the existing labels, and do NOT implement a nested four-shard local coordinator. One shard per runner worker; four workers total. Preserve hosted routing for forks and native other architectures. The shared-host Redis name/port/state isolation fix is still essential: GITHUB_RUN_ID + GITHUB_JOB is identical across matrix entries; add explicit shard/instance and attempt discrimination. Each runner service will have CPUQuota=200%, MemoryHigh=6G and MemoryMax=8G, so the four runner process trees have a combined ceiling of eight CPU equivalents and 32 GiB. Docker containers are managed by the Docker daemon outside those service cgroups: apply explicit limits to CI-owned containers as appropriate and do not assume service quotas constrain Docker workloads. Keep cleanup scoped to this job and preserve production services. Do not add more registered workers or change host configuration inside the implementation task. Review persistent-workspace cleanup, non-root/browser sandbox requirements, resource isolation, and actual job runner_name evidence. No merge or deployment is authorized. Provisioning complete (2026-09-22 10:50 UTC): GitHub confirms all four workers online and idle, including gitfix-propr-2, gitfix-propr-3 and gitfix-propr-4. All four services are active/enabled with verified CPUQuota=200%, MemoryHigh=6 GiB and MemoryMax=8 GiB and separate work directories. New workers report Connected to GitHub / Listening for Jobs. Production services were not restarted. Host maintenance notes are at /root/propr-runner-setup/README.md. Actual PR job execution still needs the workflow changes; no full CI run on the new workers is claimed yet. |
…ll suite as four parallel shards in one job on gitfix.dev, and forks stay on hosted runners. None of the new self-hosted setup has run in CI yet, so I have no runner placement or timings for it. Those will come from this PR's next run; the job summary and a `full-test-timing-*` artifact record them. I've made the requested changes. Trusted PRs now run the full suite as four parallel shards in one job on gitfix.dev, and forks stay on hosted runners. None of the new self-hosted setup has run in CI yet, so I have no runner placement or timings for it. Those will come from this PR's next run; the job summary and a `full-test-timing-*` artifact record them. **reasoningLevelSettings failure:** already fixed by the previous commit. In CI on 8fb25e9, shard 1 passed, including that test, and the whole Full Test Suite run was green. **What changed:** - **Routing:** the same condition appears in every routed job, and a test keeps the copies identical: - PRs from branches in this repo and manual runs go to gitfix.dev. That covers the full suite and the Validate Changes job. - Fork PRs, Dependabot PRs, and runs with the repository variable `PROPR_SELF_HOSTED_PR_CHECKS=false` stay on hosted runners. - There is no automatic fallback: if the runner is busy or offline, those jobs wait in the queue. Setting that variable to `false` sends new runs back to hosted. - **One job instead of four:** a new script, `scripts/run-local-shards.mjs`, runs at most four shards at once. Each shard gets: - its own copy of the prepared checkout, including installed packages and build output. - its own home and temp directories. - its own Redis container and port. - its own output files. Files still run one at a time inside each shard. On cancellation it stops every shard. A cleanup step that always runs kills only this run's processes and Redis containers, and never does a Docker-wide cleanup. - **`scripts/ci-redis.sh`:** container names now include a per-shard instance and the attempt number, and start/stop always agree on them. One shard can no longer remove another's Redis. Existing callers that don't set an instance behave as before. - **Coverage I had to protect:** on gitfix.dev, two Electron tests skip with "Electron cannot start on this worker (exit 127)", while hosted runners actually run them. For self-hosted runs, a hosted job re-runs those two tests with a new flag that turns the skip into a failure, so nothing is lost. - **Required check:** "Run Full Test Suite" keeps its name and fails closed. It requires the chosen path's jobs to succeed, and it re-checks from the shard artifacts that every test ran exactly once. Rerunning failed jobs still works. - **Nothing touches the shared host:** - Jobs use private home and cache directories, not the host's `/root`. - The checkout doesn't keep the token in the persistent workspace. - Stale build output is deleted before building and fresh output is required after. - Nothing is apt-installed on the host: Playwright's system-package install only runs on hosted runners. - **Docs and PR description:** `docs/ci-runners.md` covers which jobs moved, which stayed hosted and why, the trust constraints, and how to add capacity. I also rewrote the PR description to match. **Measured so far (current head, all on hosted runners):** | What | Time | | --- | --- | | Full Test Suite, 4 hosted shards (whole run) | 5m19s (was 17m19s as one job) | | Desktop linux-x64 install lifecycle step | 57s (was 10m20s) | | Nightly full suite on gitfix.dev, unsharded (baseline) | 16m44s | **Tests:** all 46 affected tests pass: 20 new routing/shard tests, 16 existing runner tests and 10 Electron setup tests. `reasoningLevelSettings` also passes with an empty home directory. actionlint and shellcheck report nothing for the files I changed, and ESLint is clean. A local run copied this checkout into four shard workspaces with the real `ci-redis.sh` and a stubbed `docker`. Tests ran inside the copies and used each copy's own packages. The copies took 25–35s here, a cost the CI run will measure on the real host. **Decisions for you:** - **Validate Changes on the same runner:** with only one worker, it and the full-suite job run one after the other. On hosted runners, Validate Changes took 218s, so one of the two checks may finish later than it does now. The CI run will show whether that's acceptable, or whether it should go back to hosted. - **Six short build-check jobs stayed hosted** (the CLI, visual-preview and init-JSON jobs, plus the other CLI compatibility workflow). Each takes under 2.5 minutes, and together they'd add about 7 minutes of queue on the one worker. The glibc 2.31 container job stays hosted because it needs a non-root user. - **Desktop Linux x64 stayed hosted.** It needs `sudo apt-get`, a virtual display and desktop session, and a non-root user for Chromium's sandbox. Electron also can't start on the host. - **Fork-approval setting:** the routing condition isn't a security boundary, since a PR can edit it. What keeps fork code off the host is the repository's setting that requires approval for fork PR workflows from outside collaborators. Please confirm it's on; I changed no permissions or runner settings. Also note that anyone with write access now runs code as root on gitfix.dev. No previews, since nothing here is visual. PR: #2466 Comment by: @propr-dev[bot] (ID: 5775068790) Comment by: @github-actions[bot] (ID: 5775069621) Comment by: @integry (ID: 5775105836) Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit 4041ad3 Summary of ChangesThe full suite is back to four GitHub matrix shard jobs, one per runner worker. For trusted runs they go to the Nothing here has run on the new workers yet. That means I have no Routing
Redis isolation between shards
Docker limits
Workspace cleanup
Root and browser sandbox
Proof of which worker ran each job
A trusted push now needs six worker slots (four shards, docs and validate), so two will queue. Each shard gets 2 CPUs on the host against 4 vCPUs on a hosted runner. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Full Test Suite Native Electron (hosted) Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: CodeQL Please investigate and fix this CI failure.
Failure evidence
|
…e per runner worker. For trusted runs they go to the `[self-hosted, linux, x64, propr]` labels. Forks, Dependabot PRs and `PROPR_SELF_HOSTED_PR_CHECKS=false` stay on `ubuntu-latest`. I removed the nested local coordinator (`scripts/run-local-shards.mjs`) and its job. The full suite is back to four GitHub matrix shard jobs, one per runner worker. For trusted runs they go to the `[self-hosted, linux, x64, propr]` labels. Forks, Dependabot PRs and `PROPR_SELF_HOSTED_PR_CHECKS=false` stay on `ubuntu-latest`. I removed the nested local coordinator (`scripts/run-local-shards.mjs`) and its job. Nothing here has run on the new workers yet. That means I have no `runner_name` values, cgroup readings or shard timings for them, and I'm not claiming any speedup. Locally, the routing and Redis tests (15) and `testSuiteRunner.test.mjs` (16) pass, and actionlint, shellcheck and eslint are clean. **Routing** - **Shards and docs:** the `shard` matrix and `docs` use the same routing expression in `runs-on`, so both routes run the same jobs. - **Required check:** `Run Full Test Suite` always requires all shards and docs to pass. On the self-hosted route it also requires the hosted `native-electron` job. It still checks that four shards ran every test exactly once. - **Validate Changes** (`pr-build-check.yml`) was already routed the same way. - **Staying hosted:** macOS, Windows, ARM64 and desktop Linux x64 jobs are unchanged. **Redis isolation between shards** - Each shard sets `CI_REDIS_INSTANCE=shard-N`, and `ci-redis.sh` adds the run attempt. Containers are named `propr-ci-redis-<run>-<job>-shard-N-a<attempt>` and labelled with run, job, instance and attempt. - Each container gets a Docker-assigned port on `127.0.0.1` and keeps its state file in that worker's own temp directory. - A retry removes only the earlier attempt of the same shard. Tests cover four shards sharing a run and job, plus attempt 2. **Docker limits** - The service quotas don't cover containers, so the CI Redis container now runs with `--memory 512m --memory-swap 512m --cpus 1 --pids-limit 64`. These can be overridden by environment variable, and bad values are rejected. - The actionlint and shellcheck containers run with `--network none --memory 1g --memory-swap 1g --cpus 1 --pids-limit 256`. - **Decision for you:** at worst, CI can reach 13 CPUs and about 35 GiB, above the 8 CPUs and 32 GiB you described. That's the 8 CPUs and 32 GiB of runner services plus 4 CPUs and 2 GiB for four Redis containers, plus 1 CPU and 1 GiB for one tool container. These are limits, not reserved capacity, and CPU limits slow a container down rather than failing it. I kept Redis at 1 CPU to avoid test timeouts. Lowering it to 0.5 would bring the total to 11 CPUs, which is under the host's 12. The nightly suite's Redis also gets the 512 MB limit now. **Workspace cleanup** - Each routed job keeps its job files in `$RUNNER_TEMP/ci`. The short name keeps socket paths under the 108-character limit. - Checkout doesn't store the token, and the default clean checkout removes files left by the previous job. The build step fails if old build output is still there. - The last step of each routed job, including on failure or cancellation, is `git -C "$GITHUB_WORKSPACE" clean -ffdxq`. That removes only this job's untracked files from its own workspace and keeps `.git`. - Nothing prunes Docker or removes other containers. Redis stop only removes the container that job started. **Root and browser sandbox** - The full-suite browser tests launch Chromium with `--no-sandbox` on hosted runners too, and Playwright's default does the same for the `validate` browser checks. Running them as root proves the same thing it does on hosted runners. - Electron doesn't start on this host, so its tests run in the hosted `native-electron` job with skipping turned into a failure. Desktop checks stay hosted. **Proof of which worker ran each job** - A new read-only `scripts/ci-runner-evidence.sh` writes a table to each routed job's summary. It shows the runner name and environment, the user and uid, the attempt, and the cgroup's `cpu.max`, `memory.high` and `memory.max`. On a correctly set-up worker you should see `200000 100000` and the 6 GiB and 8 GiB memory values. - Each shard's `stages.json` records the runner name, and the failure comment names it too. - `docs/ci-runners.md` has the jobs-API command to check `runner_name` afterwards. A trusted push now needs six worker slots (four shards, docs and validate), so two will queue. Each shard gets 2 CPUs on the host against 4 vCPUs on a hosted runner. `docs/ci-runners.md` also records the four-worker setup, the isolation and cleanup rules, and why the remaining jobs stay hosted. I changed no host configuration and registered no workers; nothing was merged or deployed. PR: #2466 Comment by: @integry (ID: 5775136531) Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit 465210e Processed 3 comments:
Summary of ChangesI fixed both failures. The native Electron fix won't be confirmed until the next CI run. Full Test Suite Native Electron (hosted). The job's log showed that it never reached any test. The workflow sets
CodeQL (incomplete string escaping). The flagged file, Checks:
The Node.js 20 deprecation and Ubuntu 26 messages in the failure evidence are only warnings, so I left them alone. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Full Test Suite ResultsValidation failed during: Shard coverage verification, Hosted native Electron units.
|
|
CI failed: Full Test Suite Native Electron (hosted) Please investigate and fix this CI failure.
Failure evidence
|
…firmed until the next CI run.
I fixed both failures. The native Electron fix won't be confirmed until the next CI run.
**Full Test Suite Native Electron (hosted).** The job's log showed that it never reached any test. The workflow sets `PROPR_TEST_SHARD_COUNT: '4'` for every job so the shards can use it. That count also reached this job, which runs its Electron files unsharded and sets no shard index. `run-test-suite.mjs` rejects a count without an index, so the step stopped with "Shard index and count must be set together". The required `Run Full Test Suite` check then failed on that result. I got the same error locally with the count set to 4, and the error goes away when the count is empty.
- **Fix:** the step's `env` in `.github/workflows/pr-test-on-label.yml` now sets `PROPR_TEST_SHARD_COUNT: ''`. The script treats an empty value as unset, so the Electron files run as one unsharded suite.
- **New test:** a check in `test/ciRunnerRouting.test.mjs` fails if that override is removed.
**CodeQL (incomplete string escaping).** The flagged file, `test/ciLocalShards.test.mjs`, was already deleted in the latest commit together with the local shard coordinator. That clears the alert at line 634. Its replacement, `test/ciRunnerRouting.test.mjs`, had the same kind of problem: `limit.replace('.', '\\.')` only escapes the first dot. I added an `escapeRegExp` helper that escapes every regex special character, backslash included, and used it there. None of the other patterns the test builds from strings can contain special characters.
**Checks:**
- `ciRunnerRouting.test.mjs` and `testSuiteRunner.test.mjs` pass (31 tests), and eslint reports no problems.
- actionlint isn't installed here and Docker isn't available to run it, so I didn't run it. I parsed the workflow file instead and confirmed the step's environment now has the empty count.
The Node.js 20 deprecation and Ubuntu 26 messages in the failure evidence are only warnings, so I left them alone.
PR: #2466
Comment by: @propr-dev[bot] (ID: 5775389012)
Comment by: @github-advanced-security[bot] (ID: 4070965963)
Comment by: @propr-dev[bot] (ID: 5775424274)
Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit 2e029a0 Processed 2 comments:
Summary of ChangesThe three shard 3/4 failures in the first comment were real problems on the self-hosted runner, and I fixed them. The native Electron failure in the second comment was already fixed by the latest commit on this branch ( What the two comments were about
Fixes
I also updated Checks run: the routing and test-suite-runner tests (31), plus Still unconfirmed: none of this has run on the gitfix.dev workers yet. If a worker dies before its last step, its Separately, the Gmail, Google Calendar, Google Drive and ProPR connectors need to be authorised in your claude.ai connector settings before I can use them. I didn't need them for this change. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Full Test Suite ResultsValidation failed during: Shard coverage verification, Hosted native Electron units.
|
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: Full Test Suite Shard 3/4 Please investigate and fix this CI failure.
Failure evidence
|
… problems on the self-hosted runner, and I fixed them. The native Electron failure in the second comment was already fixed by the latest commit on this branch (`465210e`). The three shard 3/4 failures in the first comment were real problems on the self-hosted runner, and I fixed them. The native Electron failure in the second comment was already fixed by the latest commit on this branch (`465210e`). **What the two comments were about** - **Run 35719798303** ran the old single-job, four-local-shards setup. It was cancelled partway, so "Shard coverage verification: failure" only reflects the cancellation. - **Three files still failed on the self-hosted runner.** Two of those causes would also have hit the new four-job setup, which hasn't reached its tests on this host yet. - **Native Electron (hosted)** failed on `4041ad3` because the job inherited `PROPR_TEST_SHARD_COUNT=4` without a shard index. `465210e` clears that; its CI run was still queued when I checked. The Node 20 and Ubuntu 26 lines in that evidence are only warnings. **Fixes** - **`initStack.test.ts` failed with "public instance identity is unavailable".** The CLI refuses to create its private directory when a parent directory is group- or world-writable and not sticky. Some directory in the runner's install tree on gitfix.dev is like that. I reproduced the exact error locally with a group-writable parent. The check is correct, and I'm not allowed to change runner permissions, so each self-hosted job now gets its own `TMPDIR`: - It's a private `mktemp -d /tmp/propr-ci.XXXXXX` directory, with the same parent directories tests see on hosted runners. - The job's last step removes it, only if the path matches `/tmp/propr-ci.*`. - `HOME` and the caches stay under `$RUNNER_TEMP/ci`. - The change is in all three self-hosted jobs: the shards, docs, and Validate Changes. - **`mcpBrowser.test.ts` failed with Chromium's "Socket path too long".** That was the old setup's long temp path (121 bytes, over the limit). The previous commit's layout had already brought it to 92 bytes. With the new `TMPDIR` it's about 55 bytes. - **`cliAgentValidation.test.ts` was a timing flake.** It relied on the test noticing one fake child's exit (at 40ms) before a second one's (at 90ms). On a loaded host both had already exited by the time it looked. The test now takes a snapshot when validation finishes and checks two things: - every child process is gone, whether it exited on SIGTERM or was killed after the 100ms grace. - each child that exited normally saw the temporary directory still in place. At twice as many busy processes as CPUs, the old version failed about 1 in 3 runs and the new one passed 10 of 10. I also broke the product code in two ways (finishing before the children closed, and deleting the temp directory on cancel), and the new test fails for each. I also updated `docs/ci-runners.md` and the checks in `test/ciRunnerRouting.test.mjs`. **Checks run:** the routing and test-suite-runner tests (31), plus `cliAgentValidation` and `initStack` (17), all pass. I ran the new workflow setup and cleanup scripts locally: the temp directory is created with mode 0700, `initStack` passes against it, and cleanup removes it. Both workflow files parse and eslint is clean. actionlint and shellcheck aren't installed here, so I didn't run them. **Still unconfirmed:** none of this has run on the gitfix.dev workers yet. If a worker dies before its last step, its `/tmp/propr-ci.*` directory stays until the host's normal tmp cleanup. There's nothing visual to preview. Separately, the Gmail, Google Calendar, Google Drive and ProPR connectors need to be authorised in your claude.ai connector settings before I can use them. I didn't need them for this change. PR: #2466 Comment by: @github-actions[bot] (ID: 5775496485) Comment by: @propr-dev[bot] (ID: 5775505701) Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit 8f15563 Processed 3 comments:
Summary of ChangesThe shard 1/4 and shard 3/4 failures were already fixed by the last commit on the branch ( Comments 2 and 3 (shard 1/4 and shard 3/4, commit
Comment 1 (run 35720594998, commit
Changes in
Tests and docs
There's nothing visual to preview. The Gmail, Google Calendar, Google Drive and ProPR connectors still need to be authorised in your claude.ai connector settings; I didn't need them for this. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Full Test Suite ResultsValidation failed during: Test shard (shard 1), Test shard (shard 3).
View shard 1/4 outputView shard 3/4 output |
…the last commit on the branch (`2e029a0`). Comment 1 was a stale, misleading report, and I fixed how the workflow reports in that situation. None of this has run in CI yet; the next run is the real check. The shard 1/4 and shard 3/4 failures were already fixed by the last commit on the branch (`2e029a0`). Comment 1 was a stale, misleading report, and I fixed how the workflow reports in that situation. None of this has run in CI yet; the next run is the real check. **Comments 2 and 3 (shard 1/4 and shard 3/4, commit `465210e`)** - Both shards failed with the same error: "the public instance identity is unavailable or invalid". Shard 1 failed in `test/connectCliIntegration.test.ts` and shard 3 in `initStack.test.ts`. - **Cause:** on commit `465210e`, the log shows `TMPDIR` was inside the runner's install folder (`/root/actions-runner-propr-4/_work/_temp/ci/tmp`). Both tests create their folders under `TMPDIR`. The CLI rightly refuses to use a folder whose parent can be written to by other users, and one parent in that path allows that. - **Already fixed:** `2e029a0` gives each self-hosted job its own private `TMPDIR` under `/tmp`. I reproduced the failure locally: with a group-writable parent, `connectCliIntegration` fails 0/2 with the same error; with the new `TMPDIR` layout it passes 2/2. I didn't need to change anything for these two. **Comment 1 (run 35720594998, commit `4041ad3`)** - **What happened:** pushing `465210e` cancelled this run while the shards were still testing. - **Why it posted anyway:** the "Run Full Test Suite" and comment jobs are set to run even after a cancellation. So the run still posted a report, and it said "passed" for shards that were actually cancelled. The report only looked for failed steps, and a cancelled step is recorded as "cancelled", not "failure". - **Hosted Electron failure:** this was the known problem on `4041ad3`, and it passed on `465210e`. **Changes in `.github/workflows/pr-test-on-label.yml`** - The comment job now only posts if the run wasn't cancelled. - The required "Run Full Test Suite" gate still runs and fails on cancelled runs. If it were skipped instead, branch protection would treat it as passing when someone cancels the latest run. - In the report, a shard with a cancelled step (for example after a timeout) now shows as "cancelled during …". It is listed in the "Validation failed during" line and its output is attached. It no longer shows as "passed". **Tests and docs** - I added a test to `test/ciRunnerRouting.test.mjs`. It checks both job conditions and runs the real report script against fake shard results (passed, cancelled, failed, missing). - The new test fails against the previous workflow and passes now. - `npm run test:unit` passes (391 tests), eslint is clean and the workflow file parses. - I added a short paragraph to `docs/ci-runners.md`. There's nothing visual to preview. The Gmail, Google Calendar, Google Drive and ProPR connectors still need to be authorised in your claude.ai connector settings; I didn't need them for this. PR: #2466 Comment by: @github-actions[bot] (ID: 5775529377) Comment by: @propr-dev[bot] (ID: 5775603120) Comment by: @propr-dev[bot] (ID: 5775647174) Model: claude-opus-5
|
✅ Applied the requested follow-up changes in commit fbf6ebd Summary of ChangesThis report was for an older commit. Four of the five failures were already fixed on the branch, and I fixed the fifth, the The report is from run 35720830688 on Already fixed on the branch:
New problem, fixed now:
Tests: I updated The PR description still says each native workspace is one unit; that line is now out of date. There's nothing visual here, so I made no previews. The Gmail, Google Calendar, Google Drive and ProPR connectors still need to be authorised in your claude.ai connector settings. I didn't need them for this. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ble Linux checks. Preserved isolation, cleanup, coverage verification, partial reruns, and mandatory hosted Electron coverage. Updated the runner docs and [PR description](#2466). Fixed F7 and restored gated four-worker routing for compatible Linux checks. Preserved isolation, cleanup, coverage verification, partial reruns, and mandatory hosted Electron coverage. Updated the runner docs and [PR description](#2466). Validation: 66 focused tests passed; actionlint, ShellCheck, ESLint, and Bash syntax checks passed. **Activation remains blocked:** runner-policy APIs returned 403, so independent fork exclusion could not be verified. Administrator prerequisites are documented. Exact resulting-head CI and gitfix.dev runner/timing evidence remain pending; earlier hosted results are explicitly labelled as baseline only. PR: #2466 Comment by: @integry (ID: 5784324225) Model: gpt-6-astra
|
The owner has chosen rootless Docker isolation on gitfix.dev instead of VM migration for now, and reports enabling approval for all external contributors. I am provisioning/validating the host-side workers separately. Update this PR for that explicit decision; do not provision host services or change GitHub permissions from the implementation task. Add a clearly named opt-in PROPR_ROOTLESS_PR_CHECKS=true for compatible same-repository, non-Dependabot Linux x64 PR jobs, using labels [self-hosted, Linux, X64, propr-rootless]. Default/disabled and fork routes remain GitHub-hosted. Preserve the four independent shard jobs, required aggregate gate, mandatory hosted Electron checks, Redis collision/ownership fixes, bounded Docker resources, and all coverage. Never select the old generic propr label for PR jobs. This new flag signifies rootless execution, NOT independently enforced fork exclusion; do not set or require PROPR_SELF_HOSTED_PR_ACCESS_VERIFIED to falsely assert that guarantee. Preserve an operational off switch, and document the actual approval-based trust model: fork workflows require manual approval and their ordinary route is hosted, but editable workflow routing is not strict admission control. Rootless contains processes under dedicated unprivileged accounts; it is not a VM or a guarantee against kernel exploits or cross-job persistence. Expected pilot topology: each worker has a dedicated unprivileged host user and user-scoped rootless Docker daemon; runner executes in a container on that daemon and connects only to that daemon's socket. CI paths used as Docker bind sources must exist at the same absolute path inside runner and daemon's host mount namespace. Runner will share its own daemon's rootless network namespace (--network host inside RootlessKit, not production host networking), so locally published Redis ports can be exercised. Per-user cgroup limits cap the runner and sibling Docker workloads together. Production /var/run/docker.sock and credentials are never mounted. Resource and network evidence will be provided after host validation; no activation or completed security checks should be claimed merely from this design description. Inspect workflow assumptions about root/non-root, docker socket/context, executable dependencies and paths. Avoid installing system packages into the production host. Ensure cleanup is scoped to this job and rootless daemon. Keep existing hosted jobs where sandbox/native-platform requirements are not available. Add focused routing regression tests, update docs/PR description to this final policy, validate actionlint/tests, and leave the opt-in unset until I provide host pilot evidence. Do not merge/deploy or create overlapping writers. |
|
✅ Applied the requested follow-up changes in commit 05c1bb2 Summary of ChangesUpdated PR #2466 and its description.
Opt-in was not enabled. Host configuration and GitHub permissions were untouched; pilot evidence and resulting-head CI remain pending. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Updated [PR #2466](#2466) and its description. - Added rootless opt-in routing, Docker prerequisite checks, and scoped cleanup. - Preserved four shards, required gate, hosted Electron checks, Redis ownership fixes, and coverage. - Documented approval-based trust and pilot limitations. - Passed 68 focused tests, actionlint, ShellCheck, Bash syntax checks, and ESLint. Opt-in was not enabled. Host configuration and GitHub permissions were untouched; pilot evidence and resulting-head CI remain pending. PR: #2466 Comment by: @integry (ID: 5784802882) Model: gpt-6-astra
|
CI failed: Windows Connect Discovery (ordinary user, Node 22) Please investigate and fix this CI failure.
Failure evidence
|
|
❌ Failed to apply follow-up changes requested by @propr-dev[bot] An error occurred while processing your request: Comment ID: 5784971127✓ |
|
CI failed: Run Full Test Suite Please investigate and fix this CI failure.
Failure evidence
|
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryAll four shards were cancelled; the required gate correctly failed because coverage was incomplete. No code change is justified by the available evidence. All 56 targeted CI regression tests passed. A rerun was already underway, but GitHub API access subsequently returned No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Full Test Suite Shard 2/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 99d8b3d Summary of ChangesFixed the Redis startup port collision that caused exit 125. Startup now retries conflicting ports with distinct candidates, preserving ownership checks, resource limits, and shard coverage. The Node.js warning was unrelated. Validation: all 59 focused tests passed, plus ShellCheck and Bash syntax checks. Live rootless verification remains for CI; Docker is unavailable locally. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Full Test Suite Shard 4/4 Please investigate and fix this CI failure.
Failure evidence
|
|
Host validation update for the active rootless CI follow-up: all four gitfix-rootless-1..4 workers are registered. The shard 2 Redis bind failure on attempt 2 of run 35790294556 is a host configuration issue I am correcting: RootlessKit was forwarding each daemon's independently allocated port onto the same host loopback port. I am disabling outer port forwarding (PORT_DRIVER=none); the runner uses the daemon's network namespace and can still reach published Redis ports there. Please do not weaken isolation or change Redis port allocation to fix that host issue. The shard 4 test/connectCliIntegration.test.ts failures remain to investigate from its logs. Windows ordinary-user discovery failed on a hosted runner independently. Preserve the rootless preflight and scope any repository fixes to demonstrated failures. |
…. Startup now retries conflicting ports with distinct candidates, preserving ownership checks, resource limits, and shard coverage. The Node.js warning was unrelated. Fixed the Redis startup port collision that caused exit 125. Startup now retries conflicting ports with distinct candidates, preserving ownership checks, resource limits, and shard coverage. The Node.js warning was unrelated. Validation: all 59 focused tests passed, plus ShellCheck and Bash syntax checks. Live rootless verification remains for CI; Docker is unavailable locally. PR: #2466 Comment by: @propr-dev[bot] (ID: 5785062677) Model: gpt-6-astra
|
✅ Applied the requested follow-up changes in commit 6358dde Processed 2 comments:
Summary of ChangesFixed the shard 4 test failure: inherited empty Validation: CLI build passed, all 24 focused tests passed, and all three integration tests passed under the reproduced rootless environment. Rootless preflight and Redis isolation remain unchanged. No visual changes. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…TEXT` caused premature `INTERNAL_FAILURE`. The fake-Docker fixture now isolates runner transport settings, with a regression test. Fixed the shard 4 test failure: inherited empty `DOCKER_CONTEXT` caused premature `INTERNAL_FAILURE`. The fake-Docker fixture now isolates runner transport settings, with a regression test. Validation: CLI build passed, all 24 focused tests passed, and all three integration tests passed under the reproduced rootless environment. Rootless preflight and Redis isolation remain unchanged. No visual changes. PR: #2466 Comment by: @propr-dev[bot] (ID: 5785093826) Comment by: @integry (ID: 5785109680) Model: gpt-6-astra
|
CI failed: Full Test Suite Shard 2/4 Please investigate and fix this CI failure.
Failure evidence
|
|
CI failed: Full Test Suite Shard 1/4 Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit a345f39 Summary of ChangesFixed the logout test’s cold-import timeout by preloading the API module during suite setup, then resetting it to preserve per-test isolation. Validation passed:
Assertions and test timeouts remain unchanged. No visual changes. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
CI failed: Full Test Suite Shard 4/4 Please investigate and fix this CI failure.
Failure evidence
|
|
Additional evidence for the active CI repair at 6358dde: build/lint and CLI compatibility are now green; the remaining failures are UI shards (App.hostedFlow.test.tsx and App.invalidConfiguration.test.tsx retain prior DOM; proprApi.logout.test.ts times out on its first dynamic import). Please address these together through the shared test setup where appropriate, preserving assertions and all shard coverage. Host capacity detail relevant to the timeout: each rootless worker has an aggregate cgroup CPU quota of 2 CPUs and MemoryHigh=6GiB/MemoryMax=8GiB, but can see the host's 12 logical CPUs. Check whether Vitest defaults oversubscribe that quota before increasing timeouts. The shared setup currently only imports jest-dom; verify explicit RTL cleanup and module-reset interactions rather than changing single-element queries to accept duplicates. All four daemons now run with RootlessKit port-driver=none, and simultaneous same-port Redis services on separate daemons passed. Production Docker remains unchanged. The full suite's shard 3 is still running; include its eventual result before calling the repair complete. |
…he API module during suite setup, then resetting it to preserve per-test isolation. Fixed the logout test’s cold-import timeout by preloading the API module during suite setup, then resetting it to preserve per-test isolation. Validation passed: - All 341 tests across the failed CI job’s 39 UI files. - All nine logout tests with an injected 5.5-second import delay. - ESLint and diff checks. Assertions and test timeouts remain unchanged. No visual changes. PR: #2466 Comment by: @propr-dev[bot] (ID: 5785368865) Model: gpt-6-astra
|
✅ Applied the requested follow-up changes in commit b2d9442 Processed 3 comments:
Summary of ChangesAdded explicit shared RTL cleanup and capped Vitest at two CI workers. Assertions, timeouts, and shard coverage remain unchanged. Validation passed: all four UI shards—1,193 tests—under a two-CPU limit, plus 18 targeted tests with automatic cleanup disabled, 17 shard-runner tests, and lint. Original CI shard 3 finished cancelled, so full CI confirmation still requires a rerun. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…CI workers. Assertions, timeouts, and shard coverage remain unchanged. Added explicit shared RTL cleanup and capped Vitest at two CI workers. Assertions, timeouts, and shard coverage remain unchanged. Validation passed: all four UI shards—1,193 tests—under a two-CPU limit, plus 18 targeted tests with automatic cleanup disabled, 17 shard-runner tests, and lint. Original CI [shard 3](https://github.com/integry/propr/actions/runs/35792207892/job/106963523123) finished **cancelled**, so full CI confirmation still requires a rerun. PR: #2466 Comment by: @propr-dev[bot] (ID: 5785370917) Comment by: @propr-dev[bot] (ID: 5785374953) Comment by: @integry (ID: 5785417815) Model: gpt-6-astra
|
/review astra opus |
|
✅ AI Code Review Complete requested by @integry Posted 2 reviews: |
🔍 AI Code Review — astraOverall EvaluationThe PR combines deterministic sharding, isolated Redis instances, serialized nightly runs, and the desktop deadline fix. The visible implementation is strong, but a material review gap prevents calling it merge-ready: the changed ✅ Shard accounting — Deterministic assignment is backed by missing/duplicate-unit verification and a stable aggregate check requiring shards, docs, and hosted Electron. ✅ Deadline cleanup — ✅ Redis ownership — Cleanup validates ownership labels and removes immutable container IDs, protecting other shards and newer attempts. The authoritative status reports 33 passed checks, nine neutral/skipped, and no failures or pending checks. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Capture current-head latency evidence
ScoreThe visible changes have substantial regression coverage and no verified merge blocker. The omitted Electron helper leaves the newly changed required-execution behavior incompletely reviewable, warranting minor review follow-up before merge. Score: 7/10 🤖 Review Details
🤖 Review by ProPR |
🔍 AI Code Review — opusOverall EvaluationThis PR delivers the requested CI latency work — deterministic four-way sharding of the full suite in I traced the shard partition, the summary/verification round trip (including partial-rerun attempt selection), the ✅ Fail-closed coverage proof, not just parallelism — ✅ The deadline fix matches the issue's exact requirement — ✅ Nightly serialization has the right semantics — Ready to merge within scope; the items below are optional follow-ups. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Assert unit status in coverage verification
S2: 🟢 Scope
|
Closes #2465
Reduces CI latency with four independent full-suite shards and serialized nightly runs, preserving the required Run Full Test Suite gate, complete coverage verification, partial reruns and mandatory hosted native Electron assertions. The desktop deadline-timer fix already on this branch remains included.
This follow-up implements the owner's decision to pilot rootless Docker isolation on gitfix.dev instead of VM migration. Activation remains pending host pilot evidence; leave
PROPR_ROOTLESS_PR_CHECKSunset.Routing and trust
PROPR_ROOTLESS_PR_CHECKS=trueselects[self-hosted, Linux, X64, propr-rootless]for compatible same-repository, non-Dependabot Linux x64 PR jobs and existing default-branch manual dispatches. Four independent matrix shards remain; no nested coordinator. Docs, build/lint, mocked visual previews and compatible CLI checks share that pool.falseor remove it as the off switch; already queued jobs need cancellation/restart. These PR check jobs never request the old genericproprlabel.PROPR_SELF_HOSTED_PR_ACCESS_VERIFIEDis neither set nor required, and neither legacy flag controls routing. The new flag signifies rootless execution, not independently enforced fork exclusion.Expected pilot contract
Each worker has a dedicated unprivileged host user and user-scoped rootless Docker daemon. Its runner is a container on that daemon, connected only to its socket. Production
/var/run/docker.sockand credentials are never mounted. Docker bind sources must exist with identical contents at the same absolute paths in runner and daemon-host mount namespaces. Runner--network hostmeans its daemon's RootlessKit network namespace, not production host networking, allowing locally published Redis ports to be exercised.Per-user cgroups must cap runner and sibling containers together (two CPU equivalents, 6 GiB high watermark, 8 GiB maximum per worker). Redis and lint containers retain explicit CPU/memory/PID limits. These are design requirements, not completed host or security validation.
Job setup checks executable prerequisites, requires an explicit local Docker endpoint, rejects conflicting contexts and canonical production socket paths, checks rootless/cgroup-v2/systemd metadata, and isolates Docker client configuration before HOME changes. Read-only lint binds fail on missing source paths. Redis cleanup on self-hosted jobs requires successful daemon preflight; existing ownership checks still apply. Container-visible cgroup reports explicitly cannot verify hidden host ancestor limits. System dependencies belong in the runner image; workflows do not provision host packages or services.
Native Electron, desktop sandbox/session checks, glibc ordinary-user checks and native macOS/Windows/ARM64 checks remain hosted without weakening validation. No GitHub permissions/settings, host services, deployments or runner registrations were changed.
Preserved isolation and coverage
Redis names hash NUL-delimited run/job/instance/attempt values. Every removal checks all ownership labels and deletes by immutable container ID; retry recovery removes only the same owner's older attempts. Regressions preserve the
shard/defaultversusshard-default/empty-instance coexistence case and both stop orders. Cleanup remains job-scoped with no global prune.The aggregate gate still requires all four shards, docs, exact complete coverage and hosted Electron with
PROPR_REQUIRE_NATIVE_ELECTRON=1. Partial reruns retain successful earlier artifacts. Sanitized logs, cancellation behavior and serialized unsharded nightly coverage remain unchanged.Validation and pending evidence
Runner documentation records topology, trust, prerequisites, recovery and the pilot evidence procedure. Host user/daemon mappings, bind-path identity, Redis reachability, effective combined resource limits and network isolation evidence remain owner-provided prerequisites to activation. Resulting-head CI, actual runner placement and timings remain pending; earlier hosted baseline runs do not establish this follow-up's success or rootless speedup.