Repository navigation
Open
Labels
Milestone
Description
Summary
Two follow-ups from #562 and #563, under #554. Both are in the change-aware CI scopes.
- A. Cancelled-push gap. A new push on
maincancels the older run in its group. The next run diffs only its own push. So the files of the cancelled push are never path-tested by a push run. Today only the next(build):push (app gates) or the weekly cron (extension suites) tests them. - B.
.agents/**class. A non-Markdown file under.agents/matches no class, so it turns every scope on. A skill script edit then runs every app job.
Part A was ruled on 2026-11-16: force every scope after a cancel. Part B shipped in 98b9b002c (PASS=32).
Why
A. Cancelled-push gap
- The workflow group is
${{ github.workflow }}-${{ github.ref }}-qualitywithcancel-in-progress: true(.github/workflows/prod.docs.plus.yml:68-70). - On a push, the extension filter and the scope list diff
github.event.before..github.event.after.FORCE_ALLturns on only for a dispatch, the cron, or an all-zerosbefore(:175).ALL_SCOPESadds every(build):push (:211). - The weekly cron runs the security audit and every extension suite (
:18,:39-41). It skips lint, Type Check and the other app gates (:224-227,:235-238). - Cancelled push runs on
main, 2026-10-12 to 2026-11-11 (gh run list --status cancelled, read 2026-11-11): 4. Three ran on 2026-10-24, before Run only the CI suites a pull request or push can affect #563. One ran after Run only the CI suites a pull request or push can affect #563: run 42643193705 (2026-11-09). - Run 42643193705 finished every gate before it was cancelled. Only
🚀 Deploy Productionand two later jobs were cancelled. The next push, run 42643542728, loggedDetected 0 changed files. So no file went untested this time. - The husky pre-push hook runs
bun run check:ci([Tracking] Faster, change-aware CI/CD pipeline #554 SP2). That covers local gates, not the browser or extension suites on a runner.
B. .agents/** class
.github/scripts/detect-change-scopes.sh:32classes any*.mdpath as docs, so.agents/skills/*/SKILL.mdis docs.- Any other file under
.agents/reaches theunmatchedarm (:54), which turns on webapp, admin and backend. - Runs 42662047020 and 42662791796 (2026-11-09) each logged
unmatched .agents/skills/release-product/scripts/note-coverage.ts. Each ran Type Check, Webapp Unit Tests and Build Verification. M6 was 245 s and 229 s (Run only the CI suites a pull request or push can affect #563 review, Measure CI/CD time to live after the v2.3 work: 1090 s median before #569 M6 rule). - The lint job runs
bun run lint,bun run formatandbun run lint:styleson every push (.github/workflows/quality-lint.yml:24-27).check:agent-docsis part ofbun run check(package.json:53), not of the lint job.
Decision (maintainer)
- How to close the gap? Ruled 2026-11-16: force every scope after a cancel (ruling).
- Recommended: force every scope after a cancel. Detect Changes reads the previous push run on this branch with
gh api. If it endedcancelledbefore all its gates completed, setFORCE_ALLandALL_SCOPES. It is fail-safe, like theunmatchedrule. It costs one full run per such cancel (1 since Run only the CI suites a pull request or push can affect #563).- Read gate jobs, not the run conclusion. The new run starts seconds after the push, so the previous run can still be
in_progress: a job underalways()keeps running ([Tracking] Faster, change-aware CI/CD pipeline #554 SP1). Force every scope when the previous push run is not completed, or completed as cancelled, before all its gate jobs ended.
- Read gate jobs, not the run conclusion. The new run starts seconds after the push, so the previous run can still be
- Other: diff from the head SHA of the last push run whose gates all completed. It tests only the missed files, but it needs a SHA search and a fallback for a missing run.
- Not enough alone:
cancel-in-progress: falseon pushes. GitHub still replaces a pending run in the group, so the gap stays for queued pushes.
- Recommended: force every scope after a cancel. Detect Changes reads the previous push run on this branch with
What to change
- Agent in the repo, part B first. Confirm that no gate except lint reads
.agents/**. Check thetypecheckworkspace list, the unit test globs, andapps/webapp/docker/Dockerfile.bun,apps/admin-dashboard/docker/Dockerfile.bun,apps/hocuspocus.server/docker/Dockerfile.bunand.dockerignore.grep -n '\.agents' apps/*/docker/Dockerfile.bun .dockerignoremust print nothing (it printed nothing at0b302b222). Post the result here. - Agent in the repo. In
.github/scripts/detect-change-scopes.sh, add.agents/*to the docs arm at:32. Update the scope table in.github/WORKFLOWS.md(detect-change-scopes.sh:4says they stay in step). Add one case to.github/scripts/detect-change-scopes.test.shfor a.agents/skills/<name>/scripts/<file>.tspath. ExpectPASS=32 FAIL=0. - Maintainer ruling on the Decision above. Ruled 2026-11-16: force every scope after a cancel.
- Agent in the repo, part A. Build the ruled option in the
🔎 Detect Changesjob. Print one line,reason=forced-after-cancel, when it fires. Grant the jobactions: readonly. Add a test case if the logic lives in a script. Add a test case for anin_progressprevious run. - Agent in the repo. Add a Rollback line to Stop extension README media from triggering extension test suites #562 and Run only the CI suites a pull request or push can affect #563: "Scopes read
before..after. Since Path-test the files of a cancelled push, and class.agents/**changes as docs only #759, a run after a cancelled push forces every scope." - Maintainer. Commit through the
commit-reviewskill. Run [Tracking] Faster, change-aware CI/CD pipeline #554 SP1, then push.
Benchmark
| Field | Value |
|---|---|
| Metric | (a) Files of a cancelled push run that no later push run path-tests (exact). (b) App jobs (Type Check, Webapp Unit Tests, Build Verification) on a change to .agents/** only (exact). (c) M6 (#569) of that change, in seconds |
| Before | (a) structural gap; 0 files missed so far (1 cancelled push run since #563, run 42643193705, finished its gates). (b) 3 of 3, runs 42662047020 and 42662791796. (c) 245 s and 229 s, n = 2 push runs, 2026-11-09 (a hint, not a result) |
| After | not measured yet |
| Condition | GitHub-hosted ubuntu-latest, prod.docs.plus.yml with this change. (a) the first live push after a cancelled push run. If no cancel happens by the v2.3.7 release audit, record (a) as "not measured"; the step 4 test case proves the rule. (b), (c) come from the #563 docs-only draft PR, with no separate PR. That PR edits one root .md line and one comment line in one .agents/skills/ script, and it closes unmerged. Since 98b9b002c, an .agents/** path is in the docs class, so both edits run the same job set. A docs-only draft PR run counts in place of a push (#563 ruling of 2026-11-06) |
| How to run | (a) gh run view <next run> --log | grep -E "reason=|unmatched|docs ". (b), (c) read the 5 runs of the #563 docs-only draft PR. M6 from each run createdAt (#569). Never take n = 5 from reruns |
| Pass rule | (a) the first run after a cancelled push prints reason=forced-after-cancel, or lists every file of the cancelled push. (b) 0 of 3 on 5 of 5 runs. (c) median 120 s or less, n = 5, with min–max. Stop rule: revert part B if any .agents/** change breaks a gate on main that lint did not catch |
| Guard | The weekly cron stays green. detect-change-scopes.test.sh prints FAIL=0 |
| Owner | Steps 1, 2, 4, 5: agent in the repo. Steps 3, 6, the #563 docs-only draft PR and the live read: maintainer |
| Claim | Internal: "A skill script edit now runs 0 build or test jobs, down from 3, and passes CI in s, down from 229-245 s. No push's files skip their tests after a cancel." |
Related
#554 (tracker), #562 and #563 (change-aware CI, Rollback text), #569 (M6 definition and sample rules), #557 (CI failure alerts).
Activity
HMarzban commentedon Nov 14, 2026
Moved to v2.3.7 at the v2.3.6 release audit. The before is posted, but no after is measured, and the part A ruling is not set yet.
ci: class .agents changes as docs only
HMarzban commentedon Nov 16, 2026
Measured, 2026-11-16
Part B, steps 1 and 2, committed in
98b9b002c. Part A waits for the step 3 ruling.Step 1: no gate except lint reads
.agents/**grep -n '\.agents' apps/*/docker/Dockerfile.bun .dockerignoreprinted nothing (exit 1), at684612c14..or.agents.apps/*,extensions/*,packages/*.typecheckisbun run --filter '*' typecheck, so.agentsis not in it.tsconfig.jsonincludes onlypackages/**,apps/**,extensions/**. No tsconfig, jest or bunfig file names.agents.apps/webapp. Backend tests runbun testinapps/hocuspocus.server..agentshas no test files and nosrc/paths..agents. The one link runs the other way:qr-svg.tsimportsapps/webapp/src/utils/qrCodePaths.ts..agents. ESLint (eslint .) and Prettier (house skills) do, and both run in the lint job on every push.check:agent-docsruns only in localbun run check.What changed
.github/scripts/detect-change-scopes.sh:.agents/*joins the docs arm. A path under asrc/folder still skips it, so it stays fail-safe..github/WORKFLOWS.md: row 2 of the scope table lists.agents/**, with one sentence on why..github/scripts/detect-change-scopes.test.sh: new caseagents-skill-scriptfor.agents/skills/release-product/scripts/note-coverage.ts.Before and after
.agents/**pathdocs_only=false, loggedunmatcheddocs_only=true, loggeddocsnote-coverage.ts,schedule.json), 3-3 before, 0-0 after;SKILL.mdis a control, 0 of 3 before and after; plus 1 combined run of 3, 3 of 3 before, 0 of 3 afterbash, synthetic list,FILE_COUNTset, at684612c14before the edit and with it afterdetect-change-scopes.test.shPASS=31 FAIL=0PASS=32 FAIL=0bashThe synthetic paths were
note-coverage.ts,tech-writer/SKILL.mdandx-posts/references/schedule.json.SKILL.mdwas already docs before. Two guards hold after:.agents/skills/x/src/a.tsstaysunmatched, and.agentsplus a webapp file still turnswebappon.Metrics (b) and (c) on a live run are not measured yet. The live before stays as posted: runs 42662047020 and 42662791796, M6 245 s and 229 s.
Gates
bash .github/scripts/detect-change-scopes.test.shPASS=32 FAIL=0bunx prettier --check --ignore-unknown .github/WORKFLOWS.md .github/scripts/detect-change-scopes.sh .github/scripts/detect-change-scopes.test.shshellcheck .github/scripts/detect-change-scopes.sh .github/scripts/detect-change-scopes.test.shStep 5 draft (not posted)
The issue's Rollback line describes part A, which is not built. Post it on #562 and #563 only after step 4 ships: "Scopes read
before..after. Since #759, a run after a cancelled push forces every scope."Until then, this part B line is true. It is proposed text, not text from this issue: "Scopes read
before..after. Since #759, a change under.agents/**counts as docs."Left
.agents/skills/script, first push plus 4 empty commits, n = 5, closed unmerged. Owner: maintainer.98b9b002cand pushed. [Tracking] Faster, change-aware CI/CD pipeline #554 SP1 stays with the maintainer.HMarzban commentedon Nov 16, 2026
Maintainer ruling, 2026-11-16
Answered by the maintainer in the 2026-11-16 working session; posted by the agent.
FORCE_ALLandALL_SCOPES.docs(changelog): record the v2.3.7 work of 2026-11-16
HMarzban commentedon Nov 16, 2026
Review, 2026-11-16 (maintainer approved).
.mdline and one.agents/skills/script comment line. The separate 5-run draft PR is cut. Since98b9b002c, both paths run the same docs-class job set.in_progresstest case.98b9b002c(PASS=32).ci: force every scope after a cancelled push run
HMarzban commentedon Nov 17, 2026
Measured, 2026-11-17
Part A, step 4, built as ruled on 2026-11-16: force every scope after a cancel. Committed in
58f22a844and pushed 2026-11-17 (first run 44025904215). Part B stays in98b9b002c.What changed
.github/scripts/detect-cancel-gap.sh(new): reads the previous push run and its jobs on stdin. It printsforceand onereasonline.force=false,reason=previous-run-ended.force=false,reason=previous-gates-ended.force=true,reason=forced-after-cancel. This covers a gate job that isin_progressorcancelled, and a run with no jobs.force=false,reason=no-previous-run. Unreadable input:force=true,reason=forced-unreadable-run(fail-safe)..github/workflows/prod.docs.plus.yml,🔎 Detect Changes: a newgapstep onpushonly. It reads the previous push run on the same branch withgh api(highestrun_numberbelow this run).steps.gap.outputs.forcejoinsFORCE_ALLandALL_SCOPES. The job gainsactions: readonly..github/scripts/detect-cancel-gap.test.sh(new): 11 cases. They include thein_progresscase the review names (in-progress-gate) and its control (in-progress-deploy-only)..github/WORKFLOWS.md: one paragraph under Change scopes, and one Related files line.Before and after
main, cut before their gates ended, whose next push run forces every scopegapstep run locally against the live API, withRUN_NUMBERset to the next run, andcreated<=added to reach old runsreason=forced-after-cancelmainwhose gates all ended, forced anywayreason=previous-gates-endeddetect-cancel-gap.test.shPASS=11 FAIL=0bashdetect-change-scopes.test.sh(guard)PASS=32 FAIL=0PASS=32 FAIL=0bash"Before" is the rule at
5aa56e1d1. There,FORCE_ALLturns on only for a dispatch, the cron, or an all-zerosbefore, so no push run forced after a cancel. The 5 runs are every cancelled push run onmainfrom 2026-10-12 to 2026-11-17 (gh run list --status cancelled). Run 40072862372 was cancelled while queued and has no jobs. Two more replays held: run 800 printedreason=previous-run-ended, and run 1 printedreason=no-previous-run.Metric (a) on a live run is not measured. No push has been cancelled since this change. If none happens by the v2.3.7 release audit, record (a) as "not measured". The test cases prove the rule.
Gates
bash .github/scripts/detect-cancel-gap.test.shPASS=11 FAIL=0bash .github/scripts/detect-change-scopes.test.shPASS=32 FAIL=0bun fmt --check --ignore-unknownon the 4 filesactionlint .github/workflows/prod.docs.plus.ymlshellcheckon the 2 new scriptsLeft
gh run view <next run> --log | grep -E "reason=|unmatched|docs ". Owner: maintainer.