@1aboveio/skills 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/resources.json +140 -138
- package/package.json +4 -4
- package/skills/app-dev/airflow/SKILL.md +1 -1
- package/skills/app-dev/android-development/SKILL.md +1 -1
- package/skills/app-dev/app-debug/SKILL.md +1 -1
- package/skills/app-dev/better-auth/SKILL.md +1 -1
- package/skills/app-dev/data-catalog/SKILL.md +1 -1
- package/skills/app-dev/data-quality/SKILL.md +1 -1
- package/skills/app-dev/ios-foundation/SKILL.md +1 -1
- package/skills/app-dev/maestro/SKILL.md +1 -1
- package/skills/app-dev/monorepo/SKILL.md +1 -1
- package/skills/app-dev/nextjs-fullstack/SKILL.md +1 -1
- package/skills/app-dev/prisma-setup/SKILL.md +1 -1
- package/skills/app-dev/pyspark/SKILL.md +1 -1
- package/skills/app-dev/python-backend/SKILL.md +1 -1
- package/skills/app-dev/shadcn/SKILL.md +1 -1
- package/skills/app-dev/zod-v4/SKILL.md +1 -1
- package/skills/cicd/cloud-build/SKILL.md +1 -1
- package/skills/cicd/cloud-debug/SKILL.md +1 -1
- package/skills/cicd/cloud-deploy/SKILL.md +1 -1
- package/skills/cicd/docker/SKILL.md +1 -1
- package/skills/cicd/github-actions/SKILL.md +41 -127
- package/skills/cicd/github-actions/references/audit-and-cleanup.md +148 -116
- package/skills/cicd/github-actions/references/audit-profile-optimize.md +3 -151
- package/skills/cicd/github-actions/references/ci-case-studies.md +3 -10
- package/skills/cicd/github-actions/references/pipeline.md +5 -6
- package/skills/cicd/github-actions/references/runners.md +5 -9
- package/skills/cicd/github-actions/references/speed-and-audit.md +31 -116
- package/skills/cicd/github-flow/SKILL.md +1 -1
- package/skills/cicd/google-cloud/SKILL.md +1 -1
- package/skills/cicd/mergify/SKILL.md +4 -1
- package/skills/cicd/mergify/references/watch-contract.md +73 -16
- package/skills/cicd/mergify/scripts/batch-health.mjs +98 -0
- package/skills/cicd/mergify/scripts/read-delivery-attention.mjs +17 -0
- package/skills/cicd/mergify/scripts/watch-pr-delivery-core.mjs +58 -22
- package/skills/cicd/podman/SKILL.md +1 -1
- package/skills/content/article-review/SKILL.md +1 -1
- package/skills/content/article-to-image/SKILL.md +1 -1
- package/skills/content/flowchart-svg/SKILL.md +1 -1
- package/skills/content/image-gen/SKILL.md +1 -1
- package/skills/content/mermaid/SKILL.md +1 -1
- package/skills/content/wechat-article-writer/SKILL.md +1 -1
- package/skills/content/wechat-publisher/SKILL.md +1 -1
- package/skills/content/wechat-search/SKILL.md +1 -1
- package/skills/content/xai-search/SKILL.md +1 -1
- package/skills/core/distill-writing/SKILL.md +1 -1
- package/skills/core/doc-to-md/SKILL.md +1 -1
- package/skills/core/editorial-review/SKILL.md +1 -1
- package/skills/core/house-style/SKILL.md +1 -1
- package/skills/core/plain-language/SKILL.md +1 -1
- package/skills/core/polish-cn/SKILL.md +1 -1
- package/skills/core/reg-parser/SKILL.md +1 -1
- package/skills/core/terminology/SKILL.md +1 -1
- package/skills/core/write-doc/SKILL.md +1 -1
- package/skills/core/write-report/SKILL.md +1 -1
- package/skills/engineering/better-review/SKILL.md +1 -1
- package/skills/engineering/e2e-test/SKILL.md +1 -1
- package/skills/engineering/engineering/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/engineering/ensure-coverage/SKILL.md +1 -1
- package/skills/engineering/golden-path/SKILL.md +1 -1
- package/skills/engineering/harness-runtime/SKILL.md +1 -1
- package/skills/engineering/resolve-issues/SKILL.md +1 -1
- package/skills/engineering/resolve-release/SKILL.md +1 -1
- package/skills/engineering/rush-issues/SKILL.md +1 -1
- package/skills/engineering/rush-release/SKILL.md +1 -1
- package/skills/engineering/test-quality/SKILL.md +1 -1
- package/skills/risk-compliance/compliance-audit/SKILL.md +1 -1
- package/skills/risk-compliance/contract-compare/SKILL.md +1 -1
- package/skills/risk-compliance/contract-review/SKILL.md +1 -1
- package/skills/risk-compliance/doc-authenticity/SKILL.md +1 -1
- package/skills/risk-compliance/fraud-detection/SKILL.md +1 -1
- package/skills/risk-compliance/payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/portfolio-payment-analysis/SKILL.md +1 -1
- package/skills/risk-compliance/similar-domain/SKILL.md +1 -1
- package/skills/risk-compliance/tld-detection/SKILL.md +1 -1
|
@@ -1,121 +1,153 @@
|
|
|
1
1
|
# CI audit and cleanup
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
3
|
+
## 1. Set the objective
|
|
4
|
+
|
|
5
|
+
Establish scope and whether the goal is required-check latency, runner consumption,
|
|
6
|
+
reliability, or a specific failure. Audits stay read-only; authorized fixes proceed
|
|
7
|
+
through verification. Honor mandatory repository/domain guidance; locate relevant CI
|
|
8
|
+
policy and ADR sections rather than loading historical documents by default.
|
|
9
|
+
Preserve required check names, validation meaning and changed queue-tree validation.
|
|
10
|
+
|
|
11
|
+
### Timing targets
|
|
12
|
+
|
|
13
|
+
- Every job, including E2E/builds: **under five minutes**, start through finish,
|
|
14
|
+
including setup, artifacts and teardown. Report scheduling wait separately.
|
|
15
|
+
- Full workflow: **at most 20 minutes**; for merge-queue workflows, apply **at most
|
|
16
|
+
five minutes** for admission or **at most 15 minutes** for queue validation.
|
|
17
|
+
Measure creation through final completion, including dependencies, scheduling and
|
|
18
|
+
trailing reporting jobs. Do not sum parallel durations or stop at an earlier gate.
|
|
19
|
+
- Keep required-gate latency and queue residence before workflow creation separate
|
|
20
|
+
from full-run duration. Runner consumption is summed job execution, not elapsed run time.
|
|
21
|
+
Identify every measured breach and mark missing timings unknown.
|
|
22
|
+
|
|
23
|
+
## 2. Answer the performance questions
|
|
24
|
+
|
|
25
|
+
Answer all four in a performance audit, even when time targets are met. For a focused
|
|
26
|
+
fix, use the applicable questions. Name jobs, evidence and conclusion: **verified**,
|
|
27
|
+
**finding**, **unknown**, or **not applicable**, with a bounded next action when needed.
|
|
28
|
+
Configuration shows intent; measurements establish actual benefit.
|
|
29
|
+
|
|
30
|
+
| Question | Evidence and decision |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| **Are runner resources used effectively?** | Inspect invoked worker/heap helpers and actual CPU/memory ceilings. Use workload-local CPU over time, throttling, peak memory/OOM and relevant I/O/network waits. Low CPU can mean serial work or I/O; high CPU can include throttling. Without utilization data, actual use is unknown: worker count alone proves neither headroom nor effective use. Increase workers only with measured headroom and fixture isolation; full utilization is not itself the goal. Apply [cgroup sizing](#cgroup-awareness). |
|
|
33
|
+
| **Does independent work run in parallel?** | Combine `needs`, workflow/job concurrency, matrix `max-parallel`, sequential commands and nested pools with start/finish times and available slots. Explain material serialization and shard imbalance. Distinguish prerequisite, mutex and scheduling waits; created-to-start alone does not prove runner contention. Evaluate shared CPU/memory, repeated setup and runner consumption before adding shards or removing limits. |
|
|
34
|
+
| **Do caches save time across relevant runs?** | Compare restore + save + warm install/build with comparable cold execution. Check input/toolchain keys, invalidation, hits/misses, scope, size and eviction, including local stores. A configured cache or hit is not a saving. Preserve lockfile integrity and trust boundaries; exclude credentials and unsafe content. Remove transfer when its net cost exceeds avoided work. |
|
|
35
|
+
| **Can setup or fixtures be shared safely?** | Measure repeated install/build, service startup, migration/seed and per-test fixture costs. Compare compatible checks in one job, build-once artifacts, session fixtures or immutable snapshots against producer waits, transfer, restore and cleanup. Reusable workflows/composite actions share definitions, not completed setup. Bind outputs to the correct revision and all inputs/toolchains; isolate mutable databases, ports, accounts and files per consumer, with reset/cleanup and failure reporting. Route test edits through `test-quality`, browser fixtures through `e2e-test`. |
|
|
36
|
+
|
|
37
|
+
## 3. Collect enough evidence
|
|
38
|
+
|
|
39
|
+
Start with a representative successful run in the relevant lane, or the relevant failure
|
|
40
|
+
for a bug fix. First combine job/step timing with a compact graph (names, `needs`,
|
|
41
|
+
conditions, runners); then read dominant jobs and invoked commands. Expand for the four
|
|
42
|
+
questions and audit scope, not merely the longest job. Use the
|
|
43
|
+
[two-pass commands](two-pass-reading.md) to filter large YAML/API payloads before printing.
|
|
44
|
+
Inspect current pinned source and record its SHA separately from historical run SHA,
|
|
45
|
+
run ID, attempt and lane. Reconcile versions before attributing timings to current code;
|
|
46
|
+
otherwise mark the correspondence unknown.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
gh run list --repo owner/repo --workflow ci.yml --limit 10 \
|
|
50
|
+
--json databaseId,event,headSha,conclusion,createdAt,url
|
|
51
|
+
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --profile-run 123456 --json
|
|
52
|
+
# Only when failures explain latency or block measurement:
|
|
53
|
+
gh run view 123456 --repo owner/repo --log-failed
|
|
54
|
+
# History only for unresolved redundancy/variability or an explicit history audit:
|
|
55
|
+
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --runs 60
|
|
56
|
+
# Optional frozen replay:
|
|
57
|
+
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --runs 60 --save runs.json
|
|
58
|
+
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --from runs.json --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The CLI never edits workflows. History hydrates every requested run without filtering
|
|
62
|
+
workflow/change class. Separate workflow, PR/queue/scheduled/manual, outcome, attempt,
|
|
63
|
+
runner and comparable change cohorts. Reruns are not independent code states.
|
|
64
|
+
Setup/work labels are heuristics, missing timestamps are unknown, and tree metadata
|
|
65
|
+
does not prove the tested checkout or authorize reuse. Zero sole catches does not
|
|
66
|
+
justify retiring rare security/money coverage; correlated failures may be shared setup
|
|
67
|
+
or reducer failures. `--ignore-job <regex>` excludes roll-ups, not substantive tests.
|
|
68
|
+
|
|
69
|
+
When a step hides the cause, time only relevant phases. Preserve exit codes, signals,
|
|
70
|
+
stdout/stderr and cleanup; diagnostics must not change verdicts or expose secrets.
|
|
71
|
+
Keep private source/API captures outside published skill content.
|
|
72
|
+
|
|
73
|
+
For an overall audit, also check these applicable surfaces; mark unsupported conclusions
|
|
74
|
+
unknown. Follow branch-specific references only when the surface applies:
|
|
75
|
+
|
|
76
|
+
- **Selection and gates:** paths select consumers; shared/unknown inputs get sufficient
|
|
77
|
+
coverage; intentional skips are visible; reducers fail on producer failure, missing
|
|
78
|
+
results and unexpected skips. Required names match protection and queue trees validate.
|
|
79
|
+
See [pipeline](pipeline.md) and [conditional CI](conditional-ci.md).
|
|
80
|
+
- **Runner ownership:** labels exist, fork guards precede allocation, workspace cleanup
|
|
81
|
+
is scoped, services/files/ports are isolated, and sibling containers have explicit caps.
|
|
82
|
+
For fleet details read [runners](runners.md); self-hosted PostgreSQL uses infra's
|
|
83
|
+
start/verify/always-cleanup slot-pod interface in [postgres-workflows](postgres-workflows.md).
|
|
84
|
+
Missing infra interfaces go to infra, not a standalone-container workaround.
|
|
85
|
+
- **Timeouts and failure evidence:** every job has `timeout-minutes`; install/inner
|
|
86
|
+
command limits leave outer headroom for diagnostics and cleanup. Cancellation removes
|
|
87
|
+
owned children/containers; temporary resources expire. Retain useful failure artifacts,
|
|
88
|
+
visible retries and scheduled/non-PR failure alerts. A queue supplies no hang timeout.
|
|
89
|
+
- **Security:** inspect minimal permissions, pinned actions, expression-to-`env:` inputs,
|
|
90
|
+
missing-secret failures and secret exclusion from logs/artifacts. See [security](security.md).
|
|
91
|
+
Post-deploy checks prove the deployed revision; AI review is never the only gate or
|
|
92
|
+
auto-passed on timeout. See [post-deploy/publishing](post-deploy-and-publishing.md).
|
|
93
|
+
- **Tests:** assess distinct behavior, repeated fixtures, sleeps, redundant matrices and
|
|
94
|
+
assertion strength through `test-quality`, not timing or failure counts alone.
|
|
95
|
+
|
|
96
|
+
## 4. Prioritize and fix within scope
|
|
97
|
+
|
|
98
|
+
Rank evidenced causes by the requested objective. State expected effects on latency
|
|
99
|
+
and runner consumption when they trade off. Extra parallel jobs can increase setup
|
|
100
|
+
and queue wait; shared setup can add a serial prerequisite. Repair blocked validation
|
|
101
|
+
before using it as a baseline; reporting-only failures are not automatically the top
|
|
102
|
+
performance priority. Shorter retries improve failure latency, not successful-run speed.
|
|
103
|
+
|
|
104
|
+
Choose the smallest supported change. If one missing fact determines the choice,
|
|
105
|
+
check it within scope or name that check and stop. A candidate is not a ready patch;
|
|
106
|
+
no justified change is a valid outcome. Use [execution recipes](speed-and-audit.md)
|
|
107
|
+
only for the identified cause and [historical lessons](ci-case-studies.md) when useful.
|
|
108
|
+
Run checks once per qualifying tree: remove queue-to-main/gate-schedule duplicates
|
|
109
|
+
when queue proof covers the exact tree, while retaining legitimate scheduled/live
|
|
110
|
+
canaries. Each heavy check has one lane owner; changed queue trees still validate.
|
|
111
|
+
|
|
112
|
+
When tests dominate, load `test-quality` and follow its audit -> fix -> verify method
|
|
113
|
+
and speed guidance. Supply slow suites, per-file timings, behavior requirements and
|
|
114
|
+
the budget after overhead. Fix fixture/subprocess setup first. Before deleting a test,
|
|
115
|
+
read its named twin, confirm the same branch/input and equally strong assertions, and
|
|
116
|
+
find references to its name. Preserve distinct paths, freshly review deletions and run
|
|
117
|
+
affected tests with real dependencies. If the skill is unavailable, report test cleanup
|
|
118
|
+
blocked and continue independent workflow work. Audits stop at recommendations.
|
|
51
119
|
|
|
52
120
|
## Cgroup awareness
|
|
53
121
|
|
|
54
|
-
Read limits where the workload executes, including inside
|
|
55
|
-
Resolve
|
|
56
|
-
`
|
|
57
|
-
and
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
critical path, scheduling and dependencies even when every job is under five minutes.
|
|
87
|
-
Use history only to resolve a concrete redundancy or variability question.
|
|
88
|
-
Preserve existing gate names and meaning.
|
|
89
|
-
2. **Remove repeated work.** Select only relevant jobs; consolidate compatible short
|
|
90
|
-
checks; keep one qualifying type check and lint; build once for consumers. Remove
|
|
91
|
-
repeated installs, schema preparation and cache transfers when the evidence supports
|
|
92
|
-
it. Keep changed merge-queue trees validated and legitimate scheduled checks intact.
|
|
93
|
-
3. **Clean expensive tests through `test-quality`.** When tests dominate, load the
|
|
94
|
-
installed `test-quality` skill and follow its audit → fix → verify method and its
|
|
95
|
-
“When the goal is speed” guidance. Pass the slow suites, per-file/test timings,
|
|
96
|
-
existing behavior requirements and the execution budget remaining after job overhead.
|
|
97
|
-
Fix repeated fixture/subprocess setup first. Before deleting a redundant test, read
|
|
98
|
-
its named twin, confirm the same branch/input condition and equally strong assertions,
|
|
99
|
-
and find references to its name. Preserve distinct paths, review deletions freshly,
|
|
100
|
-
and run affected tests with real dependencies. An audit-only request stops at findings.
|
|
101
|
-
This integration is optional for CI work without test changes; if `test-quality` is
|
|
102
|
-
unavailable, continue independent workflow cleanup and report test cleanup blocked.
|
|
103
|
-
4. **Use the allocation.** Apply cgroup awareness to worker pools, framework builds and
|
|
104
|
-
independent commands. Then balance shards by measured duration when a suite still
|
|
105
|
-
exceeds its budget. Include repeated setup and shared runner capacity in the tradeoff;
|
|
106
|
-
moving time into queue waits or adding shards without a measured benefit is not done.
|
|
107
|
-
5. **Verify the result.** Run affected script checks and `actionlint` for workflow edits;
|
|
108
|
-
use `test-quality` verification for test changes. Compare the changed phases and each
|
|
109
|
-
job's full elapsed time and full run duration on a comparable runner and cache state.
|
|
110
|
-
Check both job and run limits: faster jobs can still leave a slow dependency chain.
|
|
111
|
-
Preserve all qualifying behavior and report any moved bottleneck or increased
|
|
112
|
-
runner consumption.
|
|
113
|
-
|
|
114
|
-
Completion means every in-scope job is measured below five minutes and each full run
|
|
115
|
-
meets its applicable limit (≤ 20 minutes overall, ≤ 5 minutes for merge-queue admission,
|
|
116
|
-
≤ 15 minutes for queue validation), with validation preserved. A five-minute timeout
|
|
117
|
-
is not evidence of success. Keep timeouts above measured execution with cleanup headroom;
|
|
118
|
-
do not skip tests, mask failures or rename/split a job solely to hide its cost. If a job
|
|
119
|
-
or run remains over budget, identify its dominant cause and next bounded action.
|
|
120
|
-
Report unmeasured changes as unverified and any necessary exception
|
|
121
|
-
as requiring agreement; do not claim the target is met or silently exempt E2E/build jobs.
|
|
122
|
+
Read limits where the workload executes, including inside job-started containers.
|
|
123
|
+
Resolve its cgroup and visible ancestors: v2 `cpu.max`, `cpuset.cpus.effective`,
|
|
124
|
+
`memory.max`, or corresponding v1 quota/cpuset/memory controls. Combine finite quota
|
|
125
|
+
and CPU affinity/cpuset ceilings using the tightest limits. Treat `max` and v1 unlimited
|
|
126
|
+
sentinels as unlimited. If unavailable or non-Linux, log a documented bounded runner
|
|
127
|
+
allocation fallback; host core count alone is not an allowance.
|
|
128
|
+
|
|
129
|
+
Derive positive workers (minimum one for fractional CPU quotas), reduced for measured
|
|
130
|
+
memory/fixture constraints. Pass counts explicitly to test/build tools. Share CPU and
|
|
131
|
+
memory among simultaneous commands and nested pools; preserve all exit statuses.
|
|
132
|
+
Derive Node `--max-old-space-size` in MiB with room for young generation, native memory,
|
|
133
|
+
buffers and subprocesses. Scope it to the build: inherited `NODE_OPTIONS` may grant each
|
|
134
|
+
child the full allowance. Log ceilings, workers and heap; measure throttling/peak memory.
|
|
135
|
+
Host Docker/Podman API containers are siblings and do not inherit runner limits: set
|
|
136
|
+
explicit CPU/memory caps inside the assigned budget, then size workers inside them.
|
|
137
|
+
|
|
138
|
+
## 5. Verify and close
|
|
139
|
+
|
|
140
|
+
Run affected script tests and `actionlint` for workflow edits; use `test-quality`
|
|
141
|
+
verification for test changes. For selectors/reducers, exercise affected/shared paths,
|
|
142
|
+
docs, rename preimages, deletions, unknown/malformed metadata and unexpected skips as
|
|
143
|
+
relevant, including the motivating failure boundary rather than restating YAML.
|
|
144
|
+
Compare the changed phase, full job and full run on comparable lane/runner/cache
|
|
145
|
+
conditions when available; check moved bottlenecks and shared runner contention.
|
|
146
|
+
Do not dispatch outside authorization. Distinguish static risk, reproduced failure,
|
|
147
|
+
expected improvement and measured result; small samples establish no sustained speedup.
|
|
148
|
+
|
|
149
|
+
Report findings/changes, verification, unmet timing targets and the next bounded action.
|
|
150
|
+
A timeout is not proof of success; retain measured execution and cleanup headroom.
|
|
151
|
+
Preserve validation: no skipped tests, masked failures, `continue-on-error`, or cosmetic
|
|
152
|
+
renaming/splitting to hide cost. Unmeasured changes remain unverified; necessary timing
|
|
153
|
+
exceptions require agreement. No report template or archive is mandatory.
|
|
@@ -1,153 +1,5 @@
|
|
|
1
1
|
# Inspect, fix, verify
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Use this loop for an existing pipeline. Optimization is the default focus: reduce
|
|
7
|
-
required-check latency or runner consumption while preserving validation, not fix every
|
|
8
|
-
red job or produce an investigation report. For fix/optimize requests, carry through
|
|
9
|
-
implementation and verification within the requested scope. Audit/review-only requests
|
|
10
|
-
stay read-only.
|
|
11
|
-
The CLI only inspects runs; it never edits workflows.
|
|
12
|
-
|
|
13
|
-
Keep required checks and their meaning intact. Use enough measurements to choose and
|
|
14
|
-
verify a fix, but do not require evidence tables, report files, saved run archives, or
|
|
15
|
-
before/after collections. Persist them only when requested or useful for replay or a
|
|
16
|
-
long-running investigation. Optional examples: [ci-case-studies.md](ci-case-studies.md).
|
|
17
|
-
|
|
18
|
-
## 1. Profile first, read the bottleneck
|
|
19
|
-
|
|
20
|
-
Start with a representative successful run in the lane being optimized. Identify the
|
|
21
|
-
required-check critical path and its longest phases, including prerequisite waits and
|
|
22
|
-
setup. For runner-consumption work, identify repeated or unnecessary execution even if
|
|
23
|
-
it is off the critical path. Compare a slow successful run when needed; inspect failed
|
|
24
|
-
runs when retries/infrastructure failures contribute to latency or prevent a valid
|
|
25
|
-
baseline. For an explicit bug-fix request, start with the relevant failure instead.
|
|
26
|
-
|
|
27
|
-
Read in two passes. First combine job/step timings with a compact workflow map: job
|
|
28
|
-
names, `needs`, conditions, and runners. Then read the chosen bottleneck job's exact
|
|
29
|
-
configuration and invoked commands. For a large workflow or run payload, extract those
|
|
30
|
-
fields/sections before printing it; do not dump the whole file and rely on truncation.
|
|
31
|
-
Expand to other jobs and the required-check/queue contract only when a dependency or
|
|
32
|
-
proposed optimization requires it, including parallelism, repeated setup, or placement.
|
|
33
|
-
Use the [two-pass command example](two-pass-reading.md) to filter before printing.
|
|
34
|
-
|
|
35
|
-
Honor mandatory repository/domain reading instructions. For other policy documents,
|
|
36
|
-
search headings/keywords for the applicable ADR or CI convention and read that section
|
|
37
|
-
plus necessary context. Do not load every CI document, superseded ADR, or historical
|
|
38
|
-
timing reference by default. Read selectors/reducers when the proposed change affects
|
|
39
|
-
them. Do not turn every optimization into a comprehensive contract review. Use only the
|
|
40
|
-
relevant items of this internal checklist:
|
|
41
|
-
|
|
42
|
-
- Changed paths select the jobs/specs that actually validate them; shared harness inputs
|
|
43
|
-
reach their consumers, and unknown paths select broader checks.
|
|
44
|
-
- Intentional skips remain intentional; unexpected skips and incomplete artifacts fail.
|
|
45
|
-
- Required reducers preserve producer failures at the intended failure boundary.
|
|
46
|
-
- Checkout identity, check names, timeouts, cleanup, and execution permissions remain valid.
|
|
47
|
-
|
|
48
|
-
Inspect the current source revision, not a stale checkout. Compare runs from the same
|
|
49
|
-
lane and comparable change class; do not assume historical runs used current workflows:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
gh run list --repo owner/repo --workflow ci.yml --limit 10 \
|
|
53
|
-
--json databaseId,event,headSha,conclusion,createdAt,url
|
|
54
|
-
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --profile-run 123456 --json
|
|
55
|
-
# Only when a failure is relevant:
|
|
56
|
-
gh run view 123456 --repo owner/repo --log-failed
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Read the slow phase's timing and relevant command, not just a job's red/green status.
|
|
60
|
-
Stop investigating once a useful optimization and bounded change are clear. If no defect
|
|
61
|
-
or worthwhile optimization is established, say so and stop; do not prescribe tuning or
|
|
62
|
-
another measurement campaign by default. Expand history only for an unresolved symptom,
|
|
63
|
-
redundancy question, or an explicitly requested audit:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --runs 60
|
|
67
|
-
# Optional replay, not a required deliverable:
|
|
68
|
-
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --repo owner/repo --runs 60 --save runs.json
|
|
69
|
-
node "$SKILL_DIR/scripts/ci-run-audit.mjs" --from runs.json --json
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
History collection hydrates every requested run; it does not filter by workflow/change
|
|
73
|
-
class. Split PR, queue, scheduled/manual, success, failure, skip, attempt, and runner
|
|
74
|
-
cohorts as relevant. Do not combine unrelated workflows by a shared job name. A failed
|
|
75
|
-
install is not a slow test; a rerun is not an independent code state.
|
|
76
|
-
|
|
77
|
-
Use audit signals as leads: correlated failures can be a reducer/shared setup failure,
|
|
78
|
-
not redundant coverage; zero catches do not justify removing a rare security/money
|
|
79
|
-
check. `--ignore-job <regex>` can exclude roll-ups from analysis, not substantive tests.
|
|
80
|
-
API head-tree matches do not establish the tested checkout or authorize gate reuse.
|
|
81
|
-
Step-name setup/work labels are heuristic; missing timestamps are not zero.
|
|
82
|
-
Job-created-to-start is a scheduling interval, not necessarily runner contention.
|
|
83
|
-
|
|
84
|
-
If a single step hides the cause, add minimal timing around the relevant phases only
|
|
85
|
-
(download/link, database readiness, compile, or browser journey). Preserve command exit
|
|
86
|
-
codes, signals, stdout/stderr, and cleanup. Diagnostics must not change the test verdict.
|
|
87
|
-
Never expose secrets or private connection strings. For suspected resource contention,
|
|
88
|
-
inspect actual cgroup quota, throttling, memory/OOM, and I/O; host core count is not the
|
|
89
|
-
slot allotment. Do not collect unrelated resource data by default.
|
|
90
|
-
|
|
91
|
-
## 2. Fix one concrete cause
|
|
92
|
-
|
|
93
|
-
Prioritize by the requested objective: required-check latency, runner consumption, or
|
|
94
|
-
reliability. Separate blocked/missing validation, test assertions, infrastructure delays,
|
|
95
|
-
and reporting-only failures. A failed timing upload with passing required gates is not
|
|
96
|
-
automatically the first optimization; establish its impact before diverting the task.
|
|
97
|
-
If broken validation prevents a meaningful baseline, repair that blocker within scope
|
|
98
|
-
before comparing performance. Do not expand into unrelated product bugs.
|
|
99
|
-
|
|
100
|
-
Choose the smallest justified code/config change. If the cause belongs to a shared
|
|
101
|
-
gateway or runner, hand off to its owner rather than patching unrelated repository code.
|
|
102
|
-
Shorter retries can reduce failure latency without improving successful-run performance
|
|
103
|
-
or reliability; do not present faster failure as a speedup or raise timeouts as a fix.
|
|
104
|
-
|
|
105
|
-
Separate a candidate from a ready patch. Visible setup cost does not prove caching pays
|
|
106
|
-
off; observed start delay does not identify its cause. If one unresolved fact determines
|
|
107
|
-
the choice, check that fact within scope or name the single missing check and stop. For
|
|
108
|
-
example, compare cache transfer cost with install time, or distinguish a concurrency
|
|
109
|
-
mutex from runner availability. Do not turn a candidate into a patch or another broad
|
|
110
|
-
investigation. No justified change remains a valid outcome.
|
|
111
|
-
|
|
112
|
-
| Bottleneck | Candidate change | Safeguard |
|
|
113
|
-
|---|---|---|
|
|
114
|
-
| Unrelated suites run | path/spec selection; classify before heavy service setup | shared dependencies fan out; unknowns run broader checks; preserve required names |
|
|
115
|
-
| Many tiny setup-heavy jobs | combine compatible checks or overlap independent commands | preserve each exit status and the required-check contract |
|
|
116
|
-
| Repeated or unreliable dependency work | local download store, working gateway, bounded downloads | frozen/hash-verified installs; no credentials in logs |
|
|
117
|
-
| Ineffective cache | remove expensive transfer or cache downloads only | compare transfer cost with install/build savings |
|
|
118
|
-
| CPU oversubscription | quota-sized workers and balanced shards | check memory, throttling, and fixture isolation; do not copy fleet worker counts |
|
|
119
|
-
| Scratch DB disk cost | size-bounded tmpfs when the supported helper/storage contract permits; optional durability reduction | self-hosted PostgreSQL stays in the slot pod through the job-owned helper; measure benefit, preserve persistence/recovery tests and shared memory limits |
|
|
120
|
-
| Slow test-DB preparation | one session for the prepare scripts, parallel independent ones, or a snapshot keyed on schema+prepare inputs | tmpfs alone does not fix round-trip-bound SQL; the snapshot key covers every input |
|
|
121
|
-
| Same check in every job (type check, lint, lockfile policy) | one standalone gate; turn the copy off in builds; run policy checks only when their inputs change | keep the single gate required; never drop the check from CI |
|
|
122
|
-
| Slow/silent failures | inner timeout and retained partial diagnostics | outer headroom; cleanup always; incomplete validation never passes |
|
|
123
|
-
| Main repeats queue proof | remove the `push: main` / gate `schedule:` trigger | the queue ran the exact tree; keep deploy and post-deploy workflows |
|
|
124
|
-
|
|
125
|
-
Do not suppress gates, drop tests without replacement validation, add
|
|
126
|
-
`continue-on-error`, or raise timeouts merely to make CI look healthy. Changed queue
|
|
127
|
-
trees still need validation. For selectors, test behavior across affected/shared paths,
|
|
128
|
-
docs, rename preimages, deletions, unknowns, malformed metadata, and unexpected skips
|
|
129
|
-
as relevant to the change. Tests should not merely restate workflow YAML.
|
|
130
|
-
|
|
131
|
-
## 3. Verify proportionately
|
|
132
|
-
|
|
133
|
-
Run affected script tests and `actionlint` after workflow edits. For selectors/reducers,
|
|
134
|
-
include the missed path or failure boundary that motivated the fix. Inspect a comparable
|
|
135
|
-
PR/queue run when available; do not dispatch extra workflows outside the requested scope.
|
|
136
|
-
For performance changes, compare the formerly slow phase under comparable lane, runner,
|
|
137
|
-
and cache conditions. Expand the sample only when needed to decide whether the change
|
|
138
|
-
helps. Check that it did not move the bottleneck or increase shared runner contention.
|
|
139
|
-
|
|
140
|
-
Close out briefly: what changed, what was verified, and remaining blockers. A useful run
|
|
141
|
-
link or timing is enough; no mandatory report template or archive. State when CI or live
|
|
142
|
-
remeasurement was unavailable. Distinguish a static risk from a reproduced failure and
|
|
143
|
-
an expected improvement from a measured one. Small samples do not prove fleet tail
|
|
144
|
-
latency or sustained speedup. Keep or revert according to the task's objective.
|
|
145
|
-
|
|
146
|
-
## Boundaries
|
|
147
|
-
|
|
148
|
-
- Queue membership, dequeue causes and evidence-reuse rules: `mergify`.
|
|
149
|
-
- Which journeys must remain release-blocking: `golden-path` / `ensure-coverage`.
|
|
150
|
-
- Playwright specs and fixtures: `e2e-test`.
|
|
151
|
-
- Fleet quota, gateway injection and persistent stores: fleet owner;
|
|
152
|
-
[runners.md](runners.md) describes the interface, not permission to reconfigure hosts.
|
|
153
|
-
- Cloud Build deployment or promotion: `cloud-build` / `cloud-deploy`.
|
|
3
|
+
The consolidated procedure is [CI audit and cleanup](audit-and-cleanup.md).
|
|
4
|
+
Use it for read-only audits and authorized optimization; for a focused fix, inspect
|
|
5
|
+
the applicable questions and checks rather than auditing the whole pipeline.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Historical audit of two repositories, using remote default-branch source, change history,
|
|
4
4
|
PR reports and native GitHub jobs/logs. Local checkouts were stale and were not changed.
|
|
5
|
-
These examples inform [audit
|
|
5
|
+
These examples inform [the audit route](audit-and-cleanup.md); they do
|
|
6
6
|
not authorize changing another repository's required proof or copying private endpoints.
|
|
7
7
|
|
|
8
8
|
Repository names, organizations, URLs, commit hashes, PR/run identifiers and exact
|
|
@@ -11,10 +11,6 @@ no identifying source map is included here. Review follow-up fixes and reversion
|
|
|
11
11
|
the first optimization commit. No benchmarks, browser journeys, timeout drills or live
|
|
12
12
|
ruleset/IAM checks were rerun for this audit.
|
|
13
13
|
|
|
14
|
-
**Superseded (2026-10-10):** where these studies weigh reusing queue evidence on main, the
|
|
15
|
-
decided answer is to drop the `push: main` rerun entirely, not to reuse evidence
|
|
16
|
-
(`mergify` skill, "The Queue Run Is The Integration Run").
|
|
17
|
-
|
|
18
14
|
## Evidence vocabulary
|
|
19
15
|
|
|
20
16
|
- **Live observation:** native timestamps, check results or inspected logs. Different
|
|
@@ -38,7 +34,6 @@ Changes across several consecutive optimization iterations:
|
|
|
38
34
|
| One owner for deploy-tooling checks | Move a repeated suite with complementary, tested execution-profile conditions | **Historical cost:** 46-107s in PostgreSQL. Queue/manual policy owns the suite; main/diagnostic PostgreSQL retains it when policy is absent. Every profile still has an owner and required verdict. |
|
|
39
35
|
| 8-CPU quotas and two unit shards, rollback to four workers | Reduce repeated setup, then tune workers under actual quota and fixture constraints | **Author failure analysis:** six workers had 3 failures/28 jobs, four had 0/8. Current unit matrix is two shards x four workers. This is not a universal worker count; browser fixtures still require one worker. |
|
|
40
36
|
| Overlapping policy checks and test-only timeout reduction | Start independent commands together; explicitly await each result | **Author benchmark:** timeout test 30.2s -> 2.3s; tooling ~80s -> ~51s. Missing/unreadable status fails. Timeout override can only shorten collection; uncertainty still conservatively builds. |
|
|
41
|
-
| Full same-tree queue evidence reuse on main | Reuse only exact-tree, complete, trusted latest-attempt proof | **Live:** one main run skipped disposable PostgreSQL/full functional work but refreshed external checks. Missing evidence reruns. Scoped `N/M` jobs cannot satisfy the full numbered-shard evidence contract. |
|
|
42
37
|
| Duration-balanced shards | Deterministic longest-processing-time assignment from measured medians; refresh unknown timings | **Model:** ~160s test load/shard. Full jobs still varied 281-495s in one full-suite run; setup and scheduling remain separate costs. Empty/mismatched suite listings fail. |
|
|
43
38
|
| Request long-lane runners first | Explore scheduling contention before adding execution workers | **Simulation only:** a 15s head start and wider smoke dispatch were modeled to improve queue latency. FIFO is not guaranteed; a later shard still waited 350s. Do not copy sleeps as a proven fix. |
|
|
44
39
|
|
|
@@ -54,7 +49,6 @@ not last `updated_at` or time waiting inside Mergify.
|
|
|
54
49
|
| Scoped A / scoped B: 3.6-4.0 functional job-minutes versus 24.3-36.3 across five earlier full runs | Confirmed workload reduction across different batches, not controlled latency savings. |
|
|
55
50
|
| Their gates took 7m41s / 13m29s | PostgreSQL / golden-path case lifecycle became the remaining critical jobs. Smaller workload need not shorten the gate. |
|
|
56
51
|
| Four admission gates: 5m16s-7m45s; six of seven queue gates >10m | Above repository targets in this sample, but not its official last-20-run p90. Its browser-inclusive budget differs from this skill's generic budget. |
|
|
57
|
-
| Both following main runs executed the full disposable suites | Scoped queue evidence correctly did not authorize broad main reuse. This shifts some detection after merge; it is an explicit coverage-policy tradeoff, not proof of selector completeness. |
|
|
58
52
|
| Latest audited main failed database timestamp ordering, UI presentation checks, and external authentication | Verified failure signatures, not diagnosed causes or proof the optimizations caused regressions. No sustained reliability win established. |
|
|
59
53
|
|
|
60
54
|
**Remaining decisions:** validate selector recall and reconcile broad-before-merge policy
|
|
@@ -88,13 +82,12 @@ job completion, not official required-gate latency; these samples are not fleet
|
|
|
88
82
|
|---|---|
|
|
89
83
|
| Latest PR CI 8m12s versus prior PR 4m45s; unit jobs 236s/235s | Similar execution, different wait. After detection, newest jobs waited ~128-149s to start. Different trees/load: do not attribute this to path selection. |
|
|
90
84
|
| Latest authenticated queue 9m13s; builds 45-129s | Repeated setup/build and browser work both matter. Critical shard pre-banner 20.254s versus concurrent Smoke 2.343s exposes variability, not its cause. |
|
|
91
|
-
| Queue Smoke job 213s; main Smoke 169s, the same Git tree | Confirmed repeated execution.
|
|
85
|
+
| Queue Smoke job 213s; main Smoke 169s, the same Git tree | Confirmed repeated execution. Current audit guidance removes duplicate main gate reruns when the queue covered the exact tree; this observation alone does not establish that coverage. |
|
|
92
86
|
| Post-deploy 9m50s; deployment poll 317s; smoke execution 18s | Optimizing browser execution alone misses the main wait. Preserve exact-SHA deployed-candidate correlation independently of queue proof. |
|
|
93
87
|
| An earlier CI run, Smoke and authenticated jobs failed at Prisma generation | Inspected logs show mirror checksum-download `socket hang up`. Shared infrastructure failure is not redundant coverage or necessarily a test flake; later green samples do not prove permanent remediation. |
|
|
94
88
|
|
|
95
89
|
**Remaining decisions:** profile variable startup/dispatch, validate narrow-path skips,
|
|
96
|
-
|
|
97
|
-
reliability. Repository guide cache/proxy text was stale relative to executable source.
|
|
90
|
+
and investigate dependency reliability. Repository guide cache/proxy text was stale relative to executable source.
|
|
98
91
|
Build-once/fan-out across authenticated shards needs an artifact/environment/secret
|
|
99
92
|
review, not a mechanical cache change. Required job names differ from the skill's
|
|
100
93
|
single-gate design: preserve them during a performance-only change.
|
|
@@ -20,11 +20,10 @@ merge to main ────► Cloud Build: build → push by digest → migrate
|
|
|
20
20
|
rc tag ───────────► Cloud Build: prod candidate at 0% traffic ──► rush-release verifies, shifts traffic
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
- **PR lane:** prove the change.
|
|
24
|
-
- **Queue lane:** prove the merged result; run slow suites here.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
separately targets < 5 min. See [timing criteria](speed-and-audit.md#sla).
|
|
23
|
+
- **PR lane:** prove the change.
|
|
24
|
+
- **Queue lane:** prove the merged result; run slow suites here. Without a queue,
|
|
25
|
+
run slow suites on the PR and require an up-to-date branch. Apply the
|
|
26
|
+
[job and full-run timing targets](audit-and-cleanup.md#timing-targets).
|
|
28
27
|
- **No main test lane with a queue:** the queue already tested the tree that lands on `main`;
|
|
29
28
|
a merge to `main` triggers deploy, not a CI rerun. Without a queue, `push: main` tests it.
|
|
30
29
|
- **Post-deploy lane:** test the deployed revision, never a local build.
|
|
@@ -105,7 +104,7 @@ Require exactly one check, `gate`, in branch protection and the queue. Template:
|
|
|
105
104
|
- [ ] No `paths:` on a workflow that reports `gate`
|
|
106
105
|
- [ ] One `gate` job with `if: always()`; it is the only required check
|
|
107
106
|
- [ ] Area jobs gate on `changes` outputs; `gate` allows a skip only when that filter was false
|
|
108
|
-
- [ ] Full
|
|
107
|
+
- [ ] Full jobs and runs meet the [timing targets](audit-and-cleanup.md#timing-targets)
|
|
109
108
|
- [ ] Queue trigger handled (Mergify draft prefix or `merge_group`), if the repo uses a queue
|
|
110
109
|
- [ ] Self-hosted: fork guard, canonical labels, `persist-credentials: false`, dynamic service ports
|
|
111
110
|
- [ ] Third-party actions SHA-pinned (at least in jobs with secrets or `id-token`)
|
|
@@ -173,15 +173,11 @@ Playwright image's browser, and point the browser path variable at it:
|
|
|
173
173
|
|
|
174
174
|
## Resources, capacity and time
|
|
175
175
|
|
|
176
|
-
- **
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
eight small jobs takes eight slots. Fold short static checks into one job (one checkout,
|
|
182
|
-
one install), and shard only where the wall-clock gain is real. `ci-run-audit.mjs` shows
|
|
183
|
-
both the setup share and the queue wait.
|
|
184
|
-
- `concurrency: cancel-in-progress` on PR workflows frees slots from superseded pushes.
|
|
176
|
+
- **Timeouts and parallelism:** apply the [audit route](audit-and-cleanup.md), using
|
|
177
|
+
actual shared slot capacity. Setup-heavy short jobs are candidates for consolidation,
|
|
178
|
+
not proof that merging improves latency. A hung self-hosted job can hold a slot for
|
|
179
|
+
hours to days; the fleet's longest planned budget is a 35-minute browser lane.
|
|
180
|
+
- Superseded PR cancellation uses the [concurrency recipe](speed-and-audit.md).
|
|
185
181
|
|
|
186
182
|
## Packages and caches
|
|
187
183
|
|