Commit Graph
10 Commits
Author SHA1 Message Date
ework-agent 656400d08a fix(ci): hold all PR CI on [ework:ci-held] intermediate pushes
Every pull_request-triggered job in all 20 PR workflows now carries
`if: !contains(github.event.head_commit.message, '[ework:ci-held]')`,
merged with pre-existing job conditions where present.

Why: the ci-engineer lane rebase/fix sessions push incrementally, and
each push spawned ~13 full workflow runs. Queued runs on the same ref
are NOT cancelled by the per-ref concurrency groups (cancel-in-progress
only covers in_progress), so a 20-push session queued ~260 runs that
starved real work (release CI waited behind 73 queued, #5795 incident
lineage). Owner policy 2026-11-15: intermediate pushes must not trigger
CI; the verified final head push (marker-free) is the single CI pass.

Semantics: marker in the commit MESSAGE (subject or body) — GitHub only
exposes head_commit.message at trigger time. Non-PR events are
unaffected (schedule/workflow_dispatch/empty head_commit => guard true).
A held run completes with all jobs skipped; branch-protection required
checks stay unsatisfied until the final unmarked run goes green, which
is the intended signal that "CI has not been asked yet".

No config surface added (owner policy: marker convention, not a knob).

(ework-agent, policy: 推一堆后确定没问题再触发 — m17242)
2026-11-15 09:02:49 +08:00
awork 6d76e56cfd fix(ci): isolate skip-scoped label runs from the real-run cancel scope (#3772)
A `labeled` event for any non-ci:full label starts a run whose gate/plan
job immediately decides skip, but it shared the per-ref concurrency group
of in-flight real runs with cancel-in-progress=true — so the vacuous
skip-run cancelled the real matrix mid-flight and then recorded success
with an empty matrix (false green + 40+ cancelled runs per label burst;
#3770 repro).

Append a `-skip` suffix to the concurrency group for exactly those
trigger-time events (pull_request + labeled + label != ci:full — the same
predicate each gate/plan job already uses), so skip-runs can never cancel
in-flight runs; they finish in ~20s as a harmless trace. ci:full labeled
runs stay in the base group and still supersede in-flight core runs
(#3295); schedule/dispatch/push events are unaffected (suffix is '').

All 13 workflows with a labeled trigger AND a cancel-in-progress group:
ci.yml, ci-image.yml, ci-e2e.yml, ci-registry.yml, ci-zcode-real.yml,
ci-e2e-dsh.yml, ci-e2e-dsh-native.yml, ci-e2e-codex-persona.yml,
ci-e2e-native.yml, ci-e2e-native-opencode.yml, ci-e2e-pi-ws.yml,
ci-windows-codex.yml, ci-e2e-fake.yml. ci-theorem.yml excluded: no
concurrency block, nothing to cancel there.
2026-10-19 20:40:05 +08:00
ranxianglei 0660413313 ci: #3406 items 7/8/10 — stale trigger comments, windows static leg on core PRs, test-suite-lock age bound
Item 7: the missing push triggers on ci-theorem/ci-windows-codex/ci-zcode-real
were deliberately removed by #3295 (adbf263f: 'Lane workflows drop their
pull_request/push triggers') — every lane workflow is uniformly push-free and
master's signal comes from ci.yml core runs + the gated 30-min cron. Chose NOT
to re-add push; instead replaced the stale '#3085: runs on every PR(+push)'
comments (ci-windows-codex + the 7 identically-stale e2e/registry lanes) with
the real trigger conditions.

Item 8: CORE_STATIC gains a windows-latest/node-22 leg so every PR (and master
push) runs typecheck + kernel suite + pi-subagents suite + build on windows,
not only ci:full/nightly.

Item 10: test-suite-lock liveness had no age bound — a dead holder whose pid
was reused (or an unreaped orphan / reboot remnant) keeps kill(pid,0)
succeeding forever and permanently wedges later runs. Locks older than
STALE_LOCK_MS (30 min ≈ 1.5x the slowest measured whole-suite run, #3143's
~1225s windows leg) are now treated as dead: warn loudly, then steal. A live
FRESH holder is still never stolen; BILI_TEST_FORCE=1 unchanged.
2026-10-16 21:42:22 +08:00
ranxianglei 71a0bcd9c9 ci: scheduled runs queue instead of cancelling each other
The nightly concurrency groups ('schedule' -> shared 'nightly' suffix)
carry cancel-in-progress: true, and GitHub applies that WITHIN the group:
two scheduled runs of the same workflow kill each other. The per-file
comments ('keeps scheduled runs out of that cancel scope', #2637 #3)
describe the intent — pushes must not cancel the nightly run — but the
flag as written also lets the 30-min cron kill its own predecessor if a
run ever outlives the interval: tokens spent, no green recorded, and the
smart gate (#3295) can never learn the head is covered.

Empirically no lane has hit this yet (current scheduled runs finish in
minutes, 0 cancellations in recent history) — this is latent hardening,
not a live-fire fix. cancel-in-progress is now scoped to non-schedule
events, so same-ref supersede semantics are unchanged while scheduled
runs queue behind each other (at most one pending; a superseded PENDING
run costs nothing).
2026-10-16 14:40:44 +08:00
ework-agent adbf263fa2 ci: three-layer pipeline — core matrix on PRs, gated 30-min full cron, ci:full label
CI resource pressure: each PR push fired ~50-70 jobs (24 from ci.yml's
12-leg test matrix + 8 e2e lanes + registry/image/theorem/zcode), and
every master merge fired a second full wave that the next merge usually
cancelled — #3071 shipped red precisely because a cancelled master run
delivers no signal.

Three layers (owner-approved 2026-10-15):

1. CORE (blocking, every PR + master push): ci.yml plan job emits a
   6-leg test matrix (ubuntu-22 3-shard, ubuntu-24 whole-suite 1-leg,
   windows-22 2-shard — windows kept per owner) + 1 static leg.
   ~15 jobs instead of ~24, guards tiering unchanged.
2. FULL (12 test legs + 4 static legs): only when (a) a PR carries the
   new `ci:full` label, (b) workflow_dispatch full=true, or (c) the
   30-min smart cron fires AND master moved since the last green
   scheduled run — a quiet master costs one ~20s plan job per tick.
   Lane workflows (e2e/registry/image/theorem/zcode/windows-codex) drop
   their pull_request/push triggers and follow the same gated cron on
   staggered minutes (4-16/30), plus the same label gate.
3. ON-DEMAND: `ci:full` label or workflow_dispatch at any time.

Check-run names are pinned via explicit job `name:` so the 6 core legs
keep the exact legacy `test (os, node, shard)` names — branch protection
now requires exactly those 6. CI_TEST_SHARD denominators ride along in
the matrix (shardTotal) since scripts/run-ci-tests.mjs partitions
totally for any i/N.

Master pushes still get the core matrix immediately (real post-merge
signal, never cancelled by schedule — concurrency groups are now split
by event).
2026-10-16 09:09:34 +08:00
ework-agent e059f41e54 ci: restore full per-PR e2e on all heavy lanes (revert #2637 Plan #2)
#3085: #2637 gated eight previously-unfiltered e2e lanes to request-pipeline
hot files (plus a nightly backstop). Non-hot-file changes then shipped without
e2e coverage, letting regressions through. Remove the pull_request path filters
(and windows-codex's push filter + its YAML anchor) so every PR runs the full
e2e suite again by default.

Kept (none of these reduced coverage): nightly schedules, schedule-safe
concurrency groups, workflow_dispatch fallbacks, ci.yml fail-fast tiering, and
pr-artifact monotonic temp versions — all untouched.

Closes #3085
2026-10-14 08:27:02 +08:00
ework-agent 6b0c7b4f8b ci: trim CI queue load without quality loss (#2637)
Plan #2: path-filter the eight unfiltered heavy lanes (e2e-fake,
codex-persona, dsh-native, native-opencode, native-pi, pi-ws, registry,
windows-codex) to request-pipeline hot files (AGENTS.md §3) plus each
lane's own test subjects; windows-codex filters BOTH pull_request and
push (shape follows ci-zcode-real.yml) so routine master merges stop
paying for three Windows jobs. Required checks (the four ci.yml test
legs, verified via branch-protection API) are untouched.

Plan #3: nightly '30 16 * * *' UTC full regression on master for all
eleven heavy e2e lanes (schedule ignores paths = daily backstop for the
new filters); workflow_dispatch fallback kept everywhere. Concurrency
groups gain a schedule-safe branch so master pushes never cancel the
day's nightly run; same-ref supersede-cancel semantics unchanged.

Plan #8: ci.yml fail-fast tiering — the ~0-1m guards gate the four
platform legs so a broken commit stops in tier 1 (owner-approved).
Behavior change: on guard failure the required legs show pending
instead of red; merge stays blocked.

Also: pr-artifact and windows-codex get same-ref cancel-in-progress
concurrency (pattern of merged #2635); pr-artifact temp versions are
monotonic per run_number (#1385), so a cancelled mid-publish run leaves
no residue.
2026-10-10 17:30:22 +08:00
ework-agent 23d67bef33 fix(#2611): retry npm registry fetches in e2e CI setup to ride out transient blips
A transient runner-to-registry ECONNRESET during setup-phase `npm i -g` /
`npm ci` reds an otherwise-green PR with no test code ever running (#2541 run
38032380794; rerun-failed-jobs green on the same head). Root cause: npm's
built-in fetch retry defaults to only 2 tries. Raise it to 5 via a job-level
env block on every job that touches the registry, so a ~10s jitter rides out
instead of aborting setup. Job-level placement covers the global CLI install
AND `npm ci` AND any build-time fetch in that job. Bounded: worst case ~+2 min
of backoff before a genuine sustained outage still fails fast (jobs carry their
own timeout-minutes).

Applied to the 9 e2e/setup workflows with executable registry installs (12
jobs total). Deliberately NOT applied around `npm publish` (artifact/release
lanes): a publish is non-idempotent, so a fetch-retry re-POST can trip E409 /
double-publish, which is worse than the original failure mode. Documents the
required pattern in reference/testing.md so new lanes inherit it.
2026-10-10 15:22:49 +08:00
Darkness 1105275e86 feat: proxy OpenCode V2 Responses over WebSocket (#1844) 2026-10-03 19:45:41 +08:00
ework-agent f296268f6b test: e2e native lane for real opencode (v1+v2) vs deterministic fake upstream (#1267)
Real opencode host (1.x bare-file plugin / 2.x wrapper-dir plugin) driven
headless through bili's self-spawned proxy against the deterministic fake
chat upstream; zero tokens. Asserts the four #1239 acceptance items:
interception + plugin-mode claim on every request, ACP tool registration
and acp_status round-trip, model-invoked compress really folding a block
(persisted after graceful stop), and the live status endpoint answering
ok for the bound conversation (/acp analog — the slash command is
TUI-only and unreachable in run mode).

Gated behind ACP_TEST_E2E_OC_NATIVE=1 (skip by default); E2E_CHECK=1
zero-cost preflight. CI workflow pins @opencode/cli@2.0.3.
2026-09-25 23:32:22 +08:00