Skip to content

Commit b060e86

Browse files
committed
ci: make non-essential fork workflows manual-only
1 parent 991f802 commit b060e86

6 files changed

Lines changed: 173 additions & 61 deletions

File tree

.github/workflows/checksum-system-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Checksum System E2E Tests
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [local-desktop-installation-support]
66
paths:
77
- '.github/workflows/checksum-*.yml'
88
- 'scripts/lib/security.sh'
99
- 'checksums.yaml'
1010
- 'scripts/lib/test_security.sh'
1111
pull_request:
12-
branches: [main]
12+
branches: [local-desktop-installation-support]
1313
paths:
1414
- '.github/workflows/checksum-*.yml'
1515
- 'scripts/lib/security.sh'

.github/workflows/playwright.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
name: Playwright Tests
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- 'apps/web/**'
8-
- 'packages/manifest/**'
9-
- 'acfs.manifest.yaml'
10-
- '.github/workflows/playwright.yml'
11-
pull_request:
12-
branches: [main]
13-
paths:
14-
- 'apps/web/**'
15-
- 'packages/manifest/**'
16-
- 'acfs.manifest.yaml'
17-
- '.github/workflows/playwright.yml'
4+
workflow_dispatch:
185

196
jobs:
207
verify-generated:

.github/workflows/production-smoke.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
11
name: Production Smoke Tests
22

33
on:
4-
# Run after website changes are pushed (Vercel auto-deploys on main)
5-
push:
6-
branches: [main]
7-
paths:
8-
- 'apps/web/**'
9-
10-
# Run daily to catch issues early
11-
schedule:
12-
- cron: '0 6 * * *' # 6 AM UTC daily
13-
14-
# Allow manual triggering
154
workflow_dispatch:
165

176
jobs:
187
wait-for-deploy:
19-
name: Wait for Vercel Deploy
8+
name: Wait for Vercel Deploy (Compatibility)
209
runs-on: ubuntu-latest
21-
# Only wait on push events (schedule/dispatch test current production)
10+
# Retained for compatibility if push triggers are restored later.
2211
if: github.event_name == 'push'
2312
steps:
2413
- name: Wait for Vercel deployment
@@ -29,7 +18,7 @@ jobs:
2918
name: Production Smoke Tests
3019
runs-on: ubuntu-latest
3120
needs: [wait-for-deploy]
32-
# Run even if wait job was skipped (schedule/dispatch)
21+
# Run even when the compatibility wait job is skipped.
3322
if: ${{ !cancelled() && (needs.wait-for-deploy.result == 'success' || needs.wait-for-deploy.result == 'skipped') }}
3423
timeout-minutes: 15
3524

.github/workflows/toon-integration-tests.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
name: TOON Integration Tests
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- 'scripts/test_*.sh'
8-
- 'scripts/verify_*.sh'
9-
- '.github/workflows/toon-integration-tests.yml'
10-
pull_request:
11-
paths:
12-
- 'scripts/test_*.sh'
13-
- 'scripts/verify_*.sh'
144
workflow_dispatch:
15-
schedule:
16-
- cron: "0 6 * * 1" # Weekly on Monday 6 AM UTC
175

186
concurrency:
197
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/website.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
name: Website CI
22

33
on:
4-
push:
5-
branches: [main]
6-
paths:
7-
- 'apps/web/**'
8-
- 'packages/manifest/**'
9-
- 'acfs.manifest.yaml'
10-
- '.github/workflows/website.yml'
11-
pull_request:
12-
branches: [main]
13-
paths:
14-
- 'apps/web/**'
15-
- 'packages/manifest/**'
16-
- 'acfs.manifest.yaml'
17-
- '.github/workflows/website.yml'
4+
workflow_dispatch:
185

196
jobs:
207
verify-generated:

docs/MAINTAINER_GUIDE.md

Lines changed: 166 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,172 @@ bash tests/vm/bootstrap_offline_checks.sh
198198

199199
### CI Checks
200200

201-
PR checks include:
202-
- ShellCheck lint
203-
- Manifest drift detection
204-
- Selection/contract tests
205-
- Full Docker integration matrix
201+
As of **2026-02-18**, ACFS has **13 GitHub Actions workflows** under `.github/workflows/`.
202+
203+
#### Branch and Release Model
204+
205+
| Surface | Branch/Ref | Workflows |
206+
|------|------|------|
207+
| Upstream mirror branch | `main` | `upstream-sync.yml` updates this branch to track upstream |
208+
| Local integration branch | `local-desktop-installation-support` | `installer.yml` runs installer CI on pushes/PRs |
209+
| Manual-only quality workflows | `workflow_dispatch` | `website.yml`, `playwright.yml`, `production-smoke.yml`, `toon-integration-tests.yml` |
210+
| Security/checksum automation | `local-desktop-installation-support` + schedules/dispatch | `checksum-monitor.yml`, `manifest-drift.yml`, `installer-notification-receiver.yml` |
211+
| Release refs | `v*` tags | `release-checksums.yml` |
212+
213+
#### Workflow Inventory
214+
215+
| Workflow | File | Trigger summary | Main purpose |
216+
|------|------|------|------|
217+
| Installer CI | `.github/workflows/installer.yml` | Push/PR to `local-desktop-installation-support` on installer/script/manifest/workflow/test changes | Full installer validation (lint, drift, checksum verify, matrix install, E2E) |
218+
| Installer Canary (Docker) | `.github/workflows/installer-canary.yml` | Daily schedule + manual dispatch | Fast scheduled canary install run in Docker |
219+
| Installer Canary (Strict) | `.github/workflows/installer-canary-strict.yml` | Nightly schedule + manual dispatch | Strict canary with checksum mismatch detection and issue creation |
220+
| Installer Notification Receiver | `.github/workflows/installer-notification-receiver.yml` | `repository_dispatch` (`installer-updated`, `installer-removed`, `installer-added`) + manual dispatch | Receives installer update events, validates, scans, updates `checksums.yaml`, opens PRs targeting integration branch |
221+
| Auto-Update Upstream Checksums | `.github/workflows/checksum-monitor.yml` | Every 2 hours + manual + push on `local-desktop-installation-support` to `scripts/lib/security.sh` + `repository_dispatch` (`upstream-changed`) | Auto-detect checksum drift, auto-commit `checksums.yaml` to integration branch, raise review issues for external tools |
222+
| Checksum System E2E Tests | `.github/workflows/checksum-system-tests.yml` | Push/PR on `local-desktop-installation-support` for checksum workflow/security changes | Tests checksum workflows and `security.sh` behavior end-to-end |
223+
| Release Gate - Checksums | `.github/workflows/release-checksums.yml` | Tag push `v*` + manual dispatch | Blocks releases when checksum verification fails |
224+
| Internal Checksums Drift Check | `.github/workflows/manifest-drift.yml` | Push/PR on `local-desktop-installation-support` | Ensures internal script checksums and manifest drift state are clean |
225+
| Sync Flywheel Upstream | `.github/workflows/upstream-sync.yml` | Daily schedule + manual dispatch | Mirrors fork `main` to upstream and merges into integration branch |
226+
| Website CI | `.github/workflows/website.yml` | Manual dispatch only | Website lint/typecheck/build and Playwright matrix |
227+
| Playwright Tests | `.github/workflows/playwright.yml` | Manual dispatch only | Chromium-focused Playwright workflow |
228+
| Production Smoke Tests | `.github/workflows/production-smoke.yml` | Manual dispatch only | Runs smoke tests against deployed production URL |
229+
| TOON Integration Tests | `.github/workflows/toon-integration-tests.yml` | Manual dispatch only | Validates `tru` behavior, script lint, optional full integration |
230+
231+
#### Detailed Context by Workflow
232+
233+
##### 1) Installer CI (`installer.yml`)
234+
- **Trigger scope:** Push/PR only on `local-desktop-installation-support`, with path filters for installer/manifests/scripts/workflows/tests.
235+
- **Jobs:**
236+
- `yaml-lint`: validates workflow YAML syntax for all workflow files.
237+
- `shellcheck`: lint all tracked `.sh` files + custom lint scripts + unit-style shell tests + macOS bootstrap mock test.
238+
- `manifest-drift`: runs manifest diff generation checks and validates generated script syntax + shellcheck.
239+
- `checksum-verification`: verifies upstream checksums with `scripts/lib/security.sh --verify --json`.
240+
- `pinned-ref-smoke`: containerized Ubuntu 24.04 install using `ACFS_CHECKSUMS_REF=local-desktop-installation-support`.
241+
- `selection-tests`: runs selection/contract/security/install-helper/RU tests.
242+
- `test-installer`: matrix (`24.04 vibe`, `25.10 vibe`, `24.04 safe`) full installer + `acfs doctor` + tool presence checks.
243+
- `e2e-curlbash-bootstrap`: runs `tests/e2e/test_curlbash_bootstrap.sh`.
244+
- `e2e-resume-after-failure`: runs `tests/e2e/test_resume_after_failure.sh`.
245+
- **Notable behavior:** CI intentionally skips preflight and Ubuntu upgrades inside GitHub Actions containers.
246+
247+
##### 2) Installer Canary (Docker) (`installer-canary.yml`)
248+
- **Trigger scope:** daily `07:30 UTC` and manual.
249+
- **Inputs:** `ubuntu` (`24.04`, `25.04`, `all`), `mode` (`vibe`, `safe`).
250+
- **Execution:** runs `tests/vm/test_install_ubuntu.sh`; sets `ACFS_CHECKSUMS_REF=local-desktop-installation-support`.
251+
252+
##### 3) Installer Canary (Strict) (`installer-canary-strict.yml`)
253+
- **Trigger scope:** nightly `04:15 UTC` and manual.
254+
- **Execution mode:** always strict (`--strict`), captures `canary.log`, keeps going to parse failures.
255+
- **Failure handling:**
256+
- Detects checksum-specific failures via log grep.
257+
- Uploads log artifact.
258+
- Opens or comments on issue `Installer checksum mismatch detected (strict canary)` with actionable steps.
259+
- Fails job at end if canary exit code non-zero.
260+
261+
##### 4) Installer Notification Receiver (`installer-notification-receiver.yml`)
262+
- **Dispatch contract:**
263+
- Event types: `installer-updated`, `installer-removed`, `installer-added`.
264+
- Expected payload fields for dispatch path: `tool`, `new_sha256`, `old_sha256`, `repo`, `commit`, and `url` (for added installers).
265+
- Manual dispatch supports `tool_name` and `dry_run` input (note: `dry_run` is defined but not enforced in later jobs).
266+
- **Validation stage (`validate-dispatch`):**
267+
- Validates tool name format.
268+
- Validates tool presence in `checksums.yaml` for non-add events.
269+
- Restricts installer URLs to trusted domains.
270+
- Writes audit JSONL line to `.github/audit/installer-updates.jsonl`.
271+
- **Checksum stage (`verify-checksum`):**
272+
- Downloads installer with timeout and size cap.
273+
- Computes SHA256 and compares with current `checksums.yaml`.
274+
- **Security stage (`security-scan`):**
275+
- Advisory grep-based scan for risky patterns (curl|bash, wget|shell, eval, chmod 777, rm -rf vars, etc.).
276+
- Produces warnings but always sets `passed=true`.
277+
- **Update and PR stages:**
278+
- `update-checksums` creates branch `auto/update-<tool>-checksum-<shortsha>`, updates YAML, commits, pushes.
279+
- `create-pr` opens PR to `local-desktop-installation-support` with review checklist and labels.
280+
- `handle-removal` creates branch/PR removing installer checksum entries for removal events.
281+
282+
##### 5) Auto-Update Upstream Checksums (`checksum-monitor.yml`)
283+
- **Trigger scope:** every 2 hours, manual dispatch, push on `local-desktop-installation-support` for `scripts/lib/security.sh`, and `repository_dispatch` type `upstream-changed`.
284+
- **Concurrency:** serialized group `checksum-monitor` (queues, does not cancel in-flight).
285+
- **Core flow:**
286+
- Runs `security.sh --verify --json`.
287+
- Splits changes into trusted (`Dicklesworthstone`) vs external.
288+
- Regenerates `checksums.yaml` when mismatches exist.
289+
- Commits and pushes update to `local-desktop-installation-support`, with rebase attempt to handle concurrent changes.
290+
- **Issue automation:** if external installers changed and commit succeeded, opens or appends to a security review issue.
291+
- **Summary:** writes metrics and status to `GITHUB_STEP_SUMMARY`.
292+
293+
##### 6) Checksum System E2E Tests (`checksum-system-tests.yml`)
294+
- **Trigger scope:** Push/PR on `local-desktop-installation-support` for checksum-related files and checksum workflows.
295+
- **Jobs:**
296+
- `yaml-lint`: validates workflow YAML syntax.
297+
- `security-unit-tests`: runs `scripts/lib/test_security.sh`.
298+
- `checksum-verification-e2e`: validates `--verify --json` shape/count logic and `--update-checksums` output shape.
299+
- `checksum-monitor-dry-run`: reproduces monitor logic and validates step outputs parse correctly.
300+
- `checksum-freshness`: advisory (`continue-on-error`) check that committed checksums match upstream now.
301+
- **Artifacts:** uploads E2E and dry-run outputs for debugging.
302+
303+
##### 7) Release Gate - Checksums (`release-checksums.yml`)
304+
- **Trigger scope:** tag pushes `v*` and manual dispatch.
305+
- **Behavior:** runs `security.sh --verify --json`, summarizes mismatch/error counts, and hard-fails release/tag workflow if exit code non-zero.
306+
307+
##### 8) Internal Checksums Drift Check (`manifest-drift.yml`)
308+
- **Trigger scope:** Push/PR on branch `[local-desktop-installation-support]`.
309+
- **Behavior:** runs `scripts/check-manifest-drift.sh --json`, summarizes checked/drifted counts and manifest hash parity, fails if drift detected.
310+
311+
##### 9) Sync Flywheel Upstream (`upstream-sync.yml`)
312+
- **Trigger scope:** daily `00:00 UTC` and manual dispatch.
313+
- **Permissions:** write access for contents, PRs, issues.
314+
- **Flow:**
315+
- Fetches upstream.
316+
- Hard-resets fork `main` to `upstream/main`.
317+
- Force-pushes `main`.
318+
- Merges `main` into integration branch `local-desktop-installation-support` via temp branch `upstream-sync`.
319+
- If clean merge: pushes directly to integration branch.
320+
- If conflict: commits conflict markers, pushes sync branch, creates/updates conflict PR, applies labels.
321+
- Optional conflict analysis via `scripts/analyze-conflicts.ts` when `OPENAI_API_KEY` is set.
322+
323+
##### 10) Website CI (`website.yml`)
324+
- **Trigger scope:** manual dispatch only.
325+
- **Job graph:** `verify-generated` -> `lint-and-typecheck` -> `build` -> `e2e-tests`.
326+
- **Behavior:**
327+
- Verifies generated manifest outputs are in sync.
328+
- Runs ESLint + TypeScript checks.
329+
- Builds Next.js app.
330+
- Runs Playwright matrix across desktop/mobile projects (`chromium`, `firefox`, `webkit`, `Mobile Chrome`, `Mobile Safari`).
331+
- Uploads Playwright artifacts on all outcomes.
332+
333+
##### 11) Playwright Tests (`playwright.yml`)
334+
- **Trigger scope:** manual dispatch only.
335+
- **Job graph:** `verify-generated` -> `test`.
336+
- **Behavior:** installs dependencies and Playwright Chromium only; runs Chromium project tests; uploads report artifacts.
337+
338+
##### 12) Production Smoke Tests (`production-smoke.yml`)
339+
- **Trigger scope:** manual dispatch only.
340+
- **Job graph:** `wait-for-deploy` (push-only compatibility step; skipped in manual mode) -> `smoke-tests`.
341+
- **Behavior:** runs Playwright against live production URL `https://agent-flywheel.com`; uploads artifacts only on failure.
342+
343+
##### 13) TOON Integration Tests (`toon-integration-tests.yml`)
344+
- **Trigger scope:** manual dispatch only.
345+
- **Concurrency:** one run per ref, cancel in-progress on new events.
346+
- **Jobs:**
347+
- `toon-core`: installs Rust + `tru`, validates encode/decode, format env var, key folding, tabular arrays.
348+
- `lint-scripts`: shellcheck on `scripts/test_*.sh`, `verify_*.sh`, `check_*.sh`.
349+
- `full-integration`: manual-only note-driven job for heavier local-style integration coverage.
350+
351+
#### Shared Operational Context
352+
353+
| Concern | Current behavior |
354+
|------|------|
355+
| Token/secrets usage | `UPSTREAM_SYNC_TOKEN` and optional `OPENAI_API_KEY` in `upstream-sync.yml`; default `GITHUB_TOKEN` used broadly for checkout, push, PR, issue operations |
356+
| Repo-writing workflows | `upstream-sync.yml`, `checksum-monitor.yml`, `installer-notification-receiver.yml` |
357+
| Artifact-heavy workflows | `installer.yml`, `website.yml`, `playwright.yml`, `production-smoke.yml`, `checksum-system-tests.yml`, `installer-canary-strict.yml` |
358+
| Dispatch-based automation | `installer-notification-receiver.yml` and `checksum-monitor.yml` |
359+
| Schedule-based automation | `upstream-sync.yml`, `checksum-monitor.yml`, `installer-canary.yml`, `installer-canary-strict.yml` |
360+
361+
#### Current Caveats to Track
362+
363+
1. `installer-notification-receiver.yml` includes a `dry_run` input that is currently not used to gate commit/PR creation.
364+
2. `installer-notification-receiver.yml` runs `npm test` conditionally in one step, which diverges from repo-wide Bun-first conventions.
365+
3. `website.yml`, `playwright.yml`, `production-smoke.yml`, and `toon-integration-tests.yml` are manual-only in this fork strategy; run them on demand.
366+
4. `upstream-sync.yml` intentionally uses destructive Git operations (`reset --hard`, force push) as part of fork mirroring; treat this workflow as high-impact infrastructure.
206367

207368
## Common Tasks
208369

0 commit comments

Comments
 (0)