Commit Graph

152 Commits

Author SHA1 Message Date
Chinesezjc
ce3b13bb08 ci: standby fetches full history; runbook — writer wording throughout, master-ref pinning incompatibility
- serial-linux-selfhosted checks out fetch-depth 0: depth 2 misses
  github.event.before on multi-commit or force pushes, failing the
  archive verifier on a valid tree. Full fetch is cheap against the
  VM's local mirror.
- Runbook (both languages): every remaining admin phrasing (problem
  statement, switch heading, alternatives, consequences) now says
  writer; and the 'composes with this mechanism' claim about a
  master-ref-pinned runner group is replaced with the truth observed
  live on 2026-07-27 — master-ref pinning blocks PR failover, and the
  shipped posture is repository-scoped all-workflow group access.
Static gate green locally: 32 passed, 0 failed.
2026-07-27 16:13:45 +08:00
Chinesezjc
24d7211f09 docs(ci): stop claiming no PR-editable path reaches the standby pool
The standby lane itself is push-only, but under failover pull_request
jobs do reach these runners with the PR merge ref's workflow. The
workflow comment and the larger-runner note (both languages) now state
that plainly and name the actual boundary — repository membership
(private, forking disabled, Dependabot excluded) — matching the
runbook. Static gate green locally: 32 passed, 0 failed.
2026-07-27 16:02:56 +08:00
Chinesezjc
e2eca69e9c docs(ci): writer-level trust boundary stated everywhere; serial note counts four references
- Sweep every remaining 'admin-only' claim (workflow comments, runbook
  lines 13/40, topology note, all zh pairs): the variable is
  writer-manageable, and the boundary against untrusted code is
  repository membership (private, forking disabled, Dependabot
  excluded) — stated identically at every site instead of only in the
  'who can flip' paragraph.
- Serial cross-platform reference note (both languages): master now
  runs four references — the three hosted OS legs plus the self-hosted
  standby drill, linked to the failover runbook.
Static gate green locally: 32 passed, 0 failed.
2026-07-27 15:54:59 +08:00
Chinesezjc
d606ab6877 ci: standby archive base ref; runbook — dependabot exception, clean bootstrap, variable trust model
- serial-linux-selfhosted now fetches depth 2 and passes
  DSH_ARCHIVE_BASE_REF=github.event.before, running the same
  frozen-archive comparison as serial-linux instead of diffing the
  new manifest against itself.
- Runbook (both languages): documents the deliberate dependabot
  exception (queued-on-hosted during failover is expected, not a
  failed switch); corrects the emergency-capacity bootstrap to
  exclude .runner/.credentials when cloning a runner directory; and
  replaces the 'admin-only' variable claim with the accurate
  trust-model statement — repository variables are writer-manageable,
  which in this private fork-disabled repo with an all-workflows
  runner group is routing among members, not an escalation.
Static gate green locally: 32 passed, 0 failed.
2026-07-27 15:47:19 +08:00
Chinesezjc
caabf8f671 ci: dependabot stays hosted under failover; runbook matches shipped bounds
- All four failover selectors (three workers + the verdict job) and the
  paired env/cache expressions now exclude dependabot[bot]: under
  failover, dependency-supplied code keeps queueing for the hosted pool
  instead of executing on the persistent VM. A delayed Dependabot PR
  during an outage is an acceptable cost; dependency code on the
  privileged host is not.
- Runbook (both languages): records the shipped failover bounds
  (coverage 8, snapshots 12, sized for six instances) and documents
  that the verdict job follows the selector too — operators previously
  had no explanation for a verdict queued after all workers passed.
- Local static gate green: 32 passed, 0 failed (translation pairing
  519 pairs consistent).
2026-07-27 15:36:11 +08:00
Chinesezjc
fe246e4a0a ci: failover round — aggregate follows the selector, tighter shared-VM bounds
- all-checks-passed now resolves its pool through the same
  DSH_CI_FAILOVER expression as the worker jobs it aggregates.
  Pinned to the hosted pool it would leave the branch-protection
  verdict queued on the failed pool after every failover job passed —
  observed live during the 2026-07-27 outage as a required check
  looping against dead capacity.
- Coverage worker bound under failover drops 12 → 8 and snapshot
  concurrency 16 → 12: the pool now runs six always-on instances (the
  spare tier was retired), so worst case is 6 × 8 = 48 coverage
  workers on the shared 64-core VM.
2026-07-27 15:17:48 +08:00
Chinesezjc
fbd50aeb74 Merge remote-tracking branch 'origin/master' into ci/offload-coverage-to-vm-backup 2026-07-27 10:43:18 +08:00
Tianyi Cui
3b328b375e ci: restore standard Windows allocation 2026-07-27 02:31:46 +08:00
Tianyi Cui
8b684fa5d0 ci: fetch archive baseline history 2026-07-27 02:01:46 +08:00
Tianyi Cui
3b8600e2e8 ci: keep required aggregate on enterprise runner 2026-07-27 01:25:01 +08:00
Tianyi Cui
d52f8bfdfe fix(notes): anchor archive seals to prior Git state 2026-07-27 00:01:39 +08:00
Chinesezjc
498df1d8de ci: gate static lane's cache restore under failover; fix runbook recovery steps
Review round on the pivoted design:

- node-24 (static) kept an unconditional hosted pnpm cache restore while the
  coverage and consumers lanes skip it under failover. On the self-hosted VM
  that restore downloads ~180 MB into /home/runner, a path pnpm never reads
  there, adding latency and contention during an outage. Gate it with the same
  `vars.DSH_CI_FAILOVER != 'selfhosted'` condition so all three lanes match.

- Runbook switch step 2 said "Re-run failed jobs", but the documented
  indefinite-queue outage leaves jobs queued (not failed), which cannot be
  re-run in place and do not retarget on variable change. Correct both language
  sides to cancel the run and re-run all jobs, or push a new commit.

- The standby-lane comment still described the switch as a one-line runs-on
  change; it is now setting the admin-only DSH_CI_FAILOVER variable.
2026-07-26 05:44:35 +08:00
Chinesezjc
68e280ce4f docs(ci): make the failover runbook a conforming dated Agent Note
The failover runbook landed as .agents/notes/implemented/process/ci-failover-runbook.md,
which fails three doc-sync gates: the classification/format gates require a
yyyy-mm-dd-topic.md filename and the implemented Agent Note skeleton
(Problem/Decision/Alternatives/Consequences), and the bilingual pairing gate
requires cross-note link targets to match between the two language sides.

Rename to 2026-07-26-ci-failover-runbook.md/.zh.md, reshape both sides into the
implemented skeleton (the runbook steps live in bespoke sections under Decision),
point the sibling topology note and the ci.yml comment at the dated filename, and
make both sides link the canonical .md per the bilingual convention. Re-recorded
the i18n pairing records.
2026-07-26 05:22:28 +08:00
Chinesezjc
0fd6dc8924 ci: pre-wire admin-only failover from hosted pools to the in-house pool
The three required Linux jobs now resolve their pool through the
DSH_CI_FAILOVER repository variable. Unset, everything runs exactly as
today on the hosted enterprise pools. Setting it to 'selfhosted'
(repo-admin-only, not PR-editable, no merge required — a merge would be
deadlocked behind the failing checks themselves) retargets all three
onto the vm-backup pool, halves the coverage worker bound and snapshot
concurrency for the shared VM, and skips the hosted-path cache restores.

Adds a bilingual failover runbook (switch, capacity via the four
registered spare instances, switch-back, trust boundary) and links it
from the topology note. The push-triggered standby lane remains the
continuous proof that the failover target works.
2026-07-26 00:34:53 +08:00
Chinesezjc
310a387b14 ci: pivot — keep coverage hosted, add self-hosted serial standby lane
Direction change after review discussion. Moving a REQUIRED check onto
a single in-house VM traded merge-path availability for modest savings
and accumulated trust/contention caveats (six review rounds' worth).
Revert every coverage-lane change: coverage stays on the enterprise
Ubuntu 24.04 32-core pool exactly as on master.

Instead, add serial-linux-selfhosted: on every master push the in-house
pool (vm-backup) runs the complete unsharded primary aggregate as a
hot-standby drill. It blocks nothing, yet continuously proves the
environment end to end, so any hosted-pool outage can be answered with
a one-line runs-on retarget onto continuously verified capacity.

Push-triggered lanes execute the base branch's own workflow definition,
so no PR-editable path selects these runners — the entire fork-trust
discussion is structurally moot for this lane. Topology notes (en/zh +
pairing records) describe the standby lane and the switch play.
2026-07-26 00:08:26 +08:00
Chinesezjc
1a5d892ec5 ci: halve coverage workers on the shared self-hosted leg
The hosted 32-core runner is exclusive to one job, but the vm-backup
pool shares one 64-core VM across four runner instances; concurrent
PRs could stack 4×24 = 96 Vitest workers and re-trigger the documented
aggregate-contention failures in the timing-sensitive process suites.
Bound the self-hosted leg at 12 workers per job (48 host-wide fully
loaded) and keep 24 on the hosted leg, selected by the same expression
as the pool.
2026-07-25 00:45:31 +08:00
Chinesezjc
8d53d44b60 docs(ci): reconcile every present-tense topology description with the coverage lane move
Sweep all remaining sources that still described coverage as an
enterprise 32-core job: the ci.yml jobs preamble, the three-job
paragraph of the larger-hosted-runners note, and the required-pool
sentence of the portable-recovery note — English and Chinese sides of
both notes, with their i18n pairing records re-recorded.
2026-07-24 23:49:58 +08:00
Chinesezjc
e532c9ccc2 ci: restore pnpm cache on the hosted leg only
Keep the cache restore for the ephemeral hosted (untrusted-PR) leg where
it is a genuine speedup, gated by the same expression as the runs-on
pool selector; the self-hosted leg skips it and installs from the
persistent local store.
2026-07-24 23:12:20 +08:00
Chinesezjc
5818fd6224 ci: address second review round — dependabot lane, drop dead restore, update topology note
- Route untrusted PRs (forks + Dependabot, same author test as e2e.yml)
  back to the hosted enterprise pool via a runs-on expression: Dependabot
  PRs are same-repo, so the previous head.repo guard admitted
  dependency-supplied code onto the persistent self-hosted VM. A single
  job with pool selection keeps all-checks-passed free of skips.
- Drop the pnpm-store cache restore from this lane: on self-hosted the
  hosted-path cache actually HIT (Linux key) and spent ~52 s pulling
  181 MB into a path pnpm never reads; the persistent local store
  already serves warm installs in seconds.
- Update the larger-hosted-runners Agent Note (en/zh + i18n pairing
  record) so the decision record describes the shipped topology:
  coverage on the in-house vm-backup pool for trusted PRs, hosted
  Ubuntu 24.04 32-core retained for untrusted PRs.
2026-07-24 23:00:56 +08:00
Chinesezjc
81890d7a99 ci: address review — same-repo guard, keep cache path identical
- Restrict node-24-coverage to same-repo PRs so fork-originated code can
  never reach the self-hosted runner (defense in depth; the repo is
  private with forking disabled today).
- Revert the pnpm cache path to the literal /home/runner/... save-side
  path: actions/cache hashes the path into the cache version, so the ~
  variant could never match the cache saved by the master lane. On
  self-hosted the persistent local pnpm store covers warm installs.
- Drop the incorrect 'does not gate merges' claim: node-24-coverage is
  needed by all-checks-passed. Pool capacity notes moved into comments.
2026-07-24 16:37:59 +08:00
Chinesezjc
bdff8573b6 ci: run coverage on in-house vm-backup pool
Coverage does not gate merges, so move it off the metered
dsh-enterprise-ubuntu-24-04-32core-test pool onto the in-house
self-hosted pool (vm-backup label, 64-core).

Also switch the pnpm store cache path to ~ so it resolves under
both /home/runner (hosted) and self-hosted home directories.

Verified on the self-hosted pool: the full coverage job (including
prepare-ci-bubblewrap and the exhaustive suite) completed green in
~5 min.
2026-07-24 12:44:00 +08:00
Tianyi Cui
2dc3bf6005 ci: reuse the primary Linux build 2026-07-23 18:02:17 +08:00
Tianyi Cui
0c678766a4 ci: isolate enterprise Linux critical paths 2026-07-23 17:49:16 +08:00
Tianyi Cui
23d92948b8 ci: defer downstream gates until build 2026-07-23 16:48:19 +08:00
Tianyi Cui
f38ae74b95 ci: rebalance paid runner gates 2026-07-23 16:13:33 +08:00
Tianyi Cui
6c930888c8 ci: rebalance enterprise critical paths 2026-07-23 15:40:19 +08:00
Tianyi Cui
0e8979596c ci: split enterprise linux critical paths 2026-07-23 15:29:41 +08:00
Tianyi Cui
464065cce2 Use enterprise 32-core runners for complete CI 2026-07-23 15:06:23 +08:00
Tianyi Cui
fc1b308266 ci: keep required PR checks on portable runners 2026-07-23 14:31:01 +08:00
imccyu
e1cb3da755 refactor(vitest): resolve every lane through the tsconfig.base.json facade
tsconfig.vitest.json is deleted; its job (a paths map applying to all
test files) is inherent in tsconfig.base.json having no include —
vite-tsconfig-paths treats that as match-all. All four vitest configs
now pin the same facade: the unit config gains a shared pathsPlugin()
helper, the web lane drops its handwritten webserver alias (apps/web
tests are covered by match-all), and the snapshot lane leaves the root
solution (which no longer carries paths) and stops resolving client
imports through package exports. tsconfig.base.json documents the
facade role and bans include/files; the CI eslint cache key hashes the
four graph tsconfigs; the eslint tests-block comment states resolution
via the solution to tsconfig.host.json.

Per missions/tsconfig-single-graph-migration.md §3.
2026-07-23 03:59:06 +08:00
Tianyi Cui
3c397e594f ci: remove critical setup variance 2026-07-22 20:29:33 +08:00
Tianyi Cui
dcf9eee3c5 ci: bound Linux gate contention 2026-07-22 20:19:56 +08:00
Tianyi Cui
9b8320cb94 ci: remove the final Linux lint tail 2026-07-22 20:06:50 +08:00
Tianyi Cui
a952aaed72 ci: trim remaining hosted setup 2026-07-22 20:00:15 +08:00
Tianyi Cui
17983d72bb ci: use process-safe coverage pools 2026-07-22 19:37:45 +08:00
Tianyi Cui
02f6d919c8 ci: remove primary setup overhead 2026-07-22 19:13:07 +08:00
Tianyi Cui
cbbef79fa3 ci: retune consolidated jobs for stacked workload 2026-07-22 19:00:55 +08:00
Tianyi Cui
da5a1fc811 ci: separate master serial and PR jobs
Skipped matrix jobs never expand matrix display values, so let GitHub use stable job identifiers. Bind optimized jobs to pull requests and the three serial references to master pushes.
2026-07-22 18:17:06 +08:00
Tianyi Cui
41609c4ce4 ci: consolidate primary checks on one larger runner 2026-07-22 17:53:01 +08:00
Tianyi Cui
8739abdbfe Merge origin/master into worktree/ci-under-minute 2026-07-22 17:15:46 +08:00
Tianyi Cui
d7e0104a72 ci: unpack bubblewrap without package transaction 2026-07-22 16:45:59 +08:00
Tianyi Cui
b63e6ee72d ci: bound coverage worker forks 2026-07-22 16:26:25 +08:00
Tianyi Cui
9d81078f2f ci: split primary cold-path budget 2026-07-22 16:10:52 +08:00
Tianyi Cui
c67ae11f78 ci: stabilize compatibility runner setup 2026-07-22 16:02:52 +08:00
Tianyi Cui
cd19f87c3f ci: name split Linux lane precisely 2026-07-22 15:57:32 +08:00
Tianyi Cui
0f57eafc36 ci: collapse cold setup waves 2026-07-22 15:44:11 +08:00
Tianyi Cui
990f82b85c ci: tune consolidated runner concurrency 2026-07-22 15:17:17 +08:00
Tianyi Cui
3db0b71f91 ci: consolidate gates on large runners 2026-07-22 15:04:24 +08:00
Tianyi Cui
03348aa382 ci: parallelize aggregate lint 2026-07-22 14:53:46 +08:00
Tianyi Cui
e65ea9bdbc ci: benchmark consolidated hosted gates 2026-07-22 14:42:43 +08:00