ci: affected on PRs, full sweep on main+nightly, fold pgtest into gate - #40
Merged
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
sealedsecurity-bot
marked this pull request as ready for review
July 29, 2026 17:59
Greptile SummaryThe PR optimizes pull-request CI while retaining exhaustive post-merge coverage.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| .github/workflows/ci.yml | Splits the gate into affected pull-request and full push/nightly paths, adds nightly scheduling, event-scoped concurrency, and grouped task logs. |
| docs/architecture/build-and-ci.md | Updates the architecture documentation to accurately describe affected pull-request checks and full main/nightly sweeps. |
| go/moon.yml | Adds project- and repository-root Go workspace files to affected detection and lint cache inputs, resolving both prior workspace findings. |
Reviews (4): Last reviewed commit: "ci(go): cover repo-root go.work in go + ..." | Re-trigger Greptile
PRs now run `moon ci :ci` (affected-only) so a Go/UI/docs change skips the vendored forks' nix builds; every push to main and a nightly schedule run the full `moon run :ci` as the backstop for any incomplete inputs glob. Adds appthrust/moon-ci-retrospect for per-task log grouping (no token, no added permissions). Co-Authored-By: seal <noreply@sealedsecurity.com>
Co-Authored-By: seal <noreply@sealedsecurity.com>
…ghtly CI model Addresses two review findings: a go.work-only change would have read as affecting nothing and skipped the Go battery on the PR gate (now in go_sources inputs), and docs/architecture/build-and-ci.md still described the old always-full/PR+push-only pipeline. Co-Authored-By: seal <noreply@sealedsecurity.com>
The project-relative go.work globs only matched go/go.work; a workspace file unifying go/ with forks/nix2container must live at the repo root, which go's upward search from go/ honors. Add the /-prefixed workspace-root variants to both go_sources and the lint task (which honors GOWORK but can't use the anchor). Aligns the doc's affected-command illustration with the moon ci form CI actually runs. Co-Authored-By: seal <noreply@sealedsecurity.com>
Per Matt's decision: one required check instead of two. The real-Postgres suites now run as a step in gate against a Postgres service container attached to the job, after the moon battery. Trades the blast-radius isolation (a service-container flake now reds gate) for a single gate to require in branch protection. Co-Authored-By: seal <noreply@sealedsecurity.com>
The CI section described two jobs (gate + a separate pgtest); it now describes one gate job with the moon battery and the real-Postgres suites as parts, matching the fold. Co-Authored-By: seal <noreply@sealedsecurity.com>
seal-agent
force-pushed
the
compass-repo-sea-1507-ci-affected-nightly
branch
from
July 29, 2026 22:46
0405f16 to
3535ee0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Four changes to the CI pipeline:
.github/workflows/ci.yml). Pull requests now runmoon ci :ci(affected-only) instead of the unconditionalmoon run :ci. A Go, UI, or docs PR no longer pays for the vendored forks' nix builds — the dominant cost, and the reason the gate job's timeout is 90m. moon reads the PR's base fromGITHUB_BASE_REFand runs only the projects the change affects.schedule(cron17 7 * * *) run the fullmoon run :ci— every task, every project, no filter. This is the backstop that makes affected safe: an incompleteinputsglob that let a task be skipped on a PR is caught the moment the change lands on main (named and attributable), and re-checked nightly.appthrust/moon-ci-retrospect(pinned by SHA, v2.1.0) to collapse the single job's flat task fan-out into per-task sections in the Actions log. No token, no added permissions —permissions: contents: readis untouched. The SHA pin is its fork-PR trust anchor (documented in-file, alongside the pgtest-digest and nix-key precedents).pgtestjob, now run as a step ingateagainst a Postgres service container attached to the job. One required check instead of two. Trades the blast-radius isolation (a service-container flake now redsgate) for a single context to require in branch protection — a deliberate call. The suites still run unconditionally (no affected filter, no event filter), and the skip-assertion guard moves with them, so a service that never came up still fails loudly rather than passing silently.Supporting changes:
go/moon.ymladdsgo.work/go.work.sum(both project-relative and repo-root globs) to the Go lane'sgo_sourcesandlintinputs so a future workspace file invalidates the Go battery (closes a latent affected-skip gap; nogo.workexists today).docs/architecture/build-and-ci.md's## CIsection is rewritten to describe the affected-on-PR / full-on-main+nightly model and the folded pgtest.Why affected-on-PR / full-on-main
The pipeline is now a single job (
gate), and fail-closed against silent skips.moon ci's affected detection reintroducesinputs-completeness as a correctness dependency, so it is confined to the PR fast path; main is never gated by affected. On a push to mainGITHUB_BASE_REFis unset, somoon ciwould diff main against its own tip (empty, a misleading green) — hence the fullmoon run :cithere.Why fold pgtest into gate
pgtest was split out so a Postgres-service outage couldn't red the hermetic gate. But it also meant two required checks to pin in branch protection. Folding it in makes
gatethe single check that certifies both the moon battery and the real-Postgres suites — one context to require, one place to look. The accepted cost: a Postgres-container flake now redsgate(a re-run clears it), rather than reddening only an advisory second check.Verification
origin/mainworktree: Go change surfacescompass-go+compass-proto, UI →compass-ui+compass-client, docs → root sweeps only, proto →compass-proto+compass-client. Forks build only whenforks/is touched. A scratchgo/go.worknow correctly markscompass-go:ciaffected after the inputs fix.toolchain-parity:cifor a ci.yml-only change) vs the 90m full-battery budget. The fold adds the real-Postgres suites back onto every gate run (the Postgres service +-tags pgteststep), so the head carrying the fold runs pgtest insidegate.go test … >log || rc=$?; cat log; exit $rccapture (not| tee, which once swallowed aFAIL),CGO_ENABLED=1,-race,-timeout 15m, the DSN env, the digest-pinnedpostgres:16-alpineimage matchingpgtest.go'spgImage, and the source-derived skip-assertion all move intact. Standalonepgtestjob fully removed (no danglingneeds:).actionlintclean on the additions (the one remaining SC1087 is pre-existing in the pgtest assertion script, a false positive on a[[:space:]]regex, which moved with the step). markdownlint clean on the doc.${{ github.event_name }}so a nightly run and a coincident post-merge push don't cancel each other.Refs SEA-1507
Co-Authored-By: seal noreply@sealedsecurity.com