Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
99062cf
ci: pin third-party actions and fail Codecov uploads closed
cursoragent Nov 10, 2026
2d94ba5
docs: record Codecov and third-party action SHA pins
cursoragent Nov 10, 2026
0742971
ci: fail the assets coverage job closed
cursoragent Nov 10, 2026
cd3f8ad
ci: lock Codecov quotes, CLI pin, and coverage permissions
cursoragent Nov 10, 2026
b21db56
ci: upload Codecov with OIDC and flatten block-scalar uses
cursoragent Nov 10, 2026
32707f6
ci: parse workflow policy checks and split Codecov upload jobs
cursoragent Nov 10, 2026
7ffdbf8
Merge remote-tracking branch 'origin/main' into cursor/pin-codecov-ac…
cursoragent Nov 10, 2026
6b076b1
ci: parse codecov policy from YAML and pin artifact actions
cursoragent Nov 10, 2026
a837dbe
Pin coverage HTML artifact upload and extend codecov workflow policy …
cursoragent Nov 10, 2026
e6e5c66
docs: align CI artifact pin wording with workflow policy
cursoragent Nov 10, 2026
66a0c44
ci: close codecov workflow policy gaps
cursoragent Nov 10, 2026
281e231
ci: lock codecov upload edges and kani args
cursoragent Nov 10, 2026
d252603
ci: lock coverage job end, kani inputs, and checkout credentials
cursoragent Nov 10, 2026
7b7fe92
docs: cite the pinned kani action and the coverage job end
cursoragent Nov 10, 2026
d923f01
ci: pin kani command and working-directory
cursoragent Nov 10, 2026
d299652
docs: name coverage workflows on checkout persist-credentials rule
cursoragent Nov 10, 2026
d202993
ci: pin the coverage producer job key set
cursoragent Nov 10, 2026
590b047
docs: cite the rust-ci-setup toolchain commit
cursoragent Nov 10, 2026
1329f24
ci: lock the tarpaulin script and pin kani actions
cursoragent Nov 10, 2026
be6ee82
docs: record the tarpaulin script and kani checkout rule
cursoragent Nov 10, 2026
8bc112c
ci: match locked workflow steps to their canonical form
cursoragent Nov 10, 2026
964265b
docs: state the exact step rule and correct the ui cites
cursoragent Nov 10, 2026
25df619
ci: lock coverage, editor, and Kani jobs to canonical step lists
cursoragent Nov 10, 2026
b4c36c5
ci: lock Kani job shape, the summary gate, and report uploads
cursoragent Nov 10, 2026
6748532
ci: lock summary job shape and report publish names
cursoragent Nov 10, 2026
530ee5e
ci: lock local action shapes and reusable workflow uses
cursoragent Nov 11, 2026
10a7ddd
ci: fail closed on coverage upload names and local uses
cursoragent Nov 11, 2026
3788edd
ci: reject non-printable upload names and dead expression scans
cursoragent Nov 11, 2026
c0121c4
ci: pin the upload-name range and exact editor test permissions
cursoragent Nov 11, 2026
156ee73
ci: pin permission spelling messages and the publish-path name check
cursoragent Nov 11, 2026
6d9b1fa
ci: pin repeated permission keys and the publish-path name check
cursoragent Nov 11, 2026
3d3a490
ci: pin the middle of an upload name and repeated workflow keys
cursoragent Nov 11, 2026
fdb41cd
docs: correct the sun-position and heightmap mutant notes
cursoragent Nov 11, 2026
d1914ad
ci: reject a repeated mapping key and pin the workflow loader
cursoragent Nov 11, 2026
00b91a7
terrain: reject a heightmap resolution above 32769
cursoragent Nov 11, 2026
151289c
ci: match trigger-key spellings and lock workflow key sets
cursoragent Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: fail the assets coverage job closed
Drop the job-level continue-on-error on coverage.yml. The policy test
rejects continue-on-error on a job that runs Codecov and on the Codecov
step, including a mutant that puts the key back.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Nov 10, 2026
commit 0742971c8b756626c95b77f3c868b1daaffae682
4 changes: 1 addition & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
contents: read
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
runs-on: ubuntu-latest
timeout-minutes: 45
# Coverage may fail on some configurations - non-blocking
continue-on-error: true


steps:
- name: Checkout code
uses: actions/checkout@v7
Expand Down
4 changes: 2 additions & 2 deletions docs/current/CI_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ These path-filtered workflows are not in the required set because a filter would
| Full 3-OS `cargo nextest` plus a release build of the core crates, and demo validation | `ci.yml` on push, schedule 04:30 UTC, dispatch. Not on pull requests. |
| 5-toolchain matrix (stable, 1.89.0, 1.88.0, beta, pinned nightly) | `toolchain-management.yml` on push to main, schedule 05:40 UTC, dispatch. The nightly matrix label is `pinned-nightly`. The channel is the date in `.github/rust-nightly-channel` (#560). Miri, sanitizers, and fuzz use that same pin. The checkout sets `lfs: true` (#348) so `ASSET_MANIFEST.tsv` hashes the Aravath blobs, not the pointer files. `Toolchain Validation (1.89.0)` runs workspace clippy `-D warnings`, with that workflow's package excludes. #360 closed the `expect` on schedule registration. #358 is closed. The fix is #360. That 1.89.0 clippy step is expected green. The CI agent is confirming it on main. #375 removes the 50 ms debug wall-clock assert from `view_ring_lod_keeps_the_forest_under_budget`. The test still requires `total > 400` and `kept < 900`. macOS 1.89 on run 39084152246 measured 50.776916 ms, failed `as_millis() < 50`, and skipped `Run clippy with toolchain`. That host-clock assert no longer skips clippy. MSRV stays on the pull request. |
| Sanitizers | `sanitizers.yml` on push and schedule 03:00 UTC. Not on pull requests. |
| Coverage | `coverage.yml` on push to main, schedule 06:10 UTC, dispatch. Its Codecov step and the `aw-editor-tests.yml` coverage upload use `codecov/codecov-action` commit `303a32d7a59b442fa8d48b6a1cc6825c09c847a5` (# v7.1.1), CLI `version: v11.3.2`, `fail_ci_if_error: true`, and `CODECOV_TOKEN`. Neither workflow runs on pull requests. The `coverage.yml` job stays `continue-on-error`. The editor upload step does not. |
| Coverage | `coverage.yml` on push to main, schedule 06:10 UTC, dispatch. Its Codecov step and the `aw-editor-tests.yml` coverage upload use `codecov/codecov-action` commit `303a32d7a59b442fa8d48b6a1cc6825c09c847a5` (# v7.1.1), CLI `version: v11.3.2`, `fail_ci_if_error: true`, and `CODECOV_TOKEN`. Neither workflow runs on pull requests. The `coverage.yml` job does not set `continue-on-error`, so a failed upload fails that workflow. The editor upload step does not set it either. |
| CodeQL | push to main and weekly (Sunday 03:00 UTC). Not on pull requests. |
| Benchmarks, including `aw_build` | see item 1 above. Shard count is 16 (`shard_index` 0–15, `--shard-count 16`). Shards 13, 14, and 15 are `astraweave-render@a`, `@b`, and `@c` (explicit thirds of that crate's bench targets). #374 flat-samples `fluid_baseline_50k` and is on main. Shard 0 is `astraweave-net`, `astraweave-profiling`, `astraweave-water`, and `astraweave-localsim` (#351). Each sharded bench target gets `timeout 600` after `cargo bench --no-run`. Compilation is outside that limit. The `aw_build` job is separate and uses its 30-minute job timeout. The aggregate expects 53 package records. `github-action-benchmark` stores `dev/bench` on branch `benchmark-data`. `gh-pages` is the docs site, and main also has a `gh-pages/` directory, so the old checkout never published that history. The PR comment step clones `github.com/<owner>/<repo>`, does not auto-push, and comments only when a result exceeds the alert threshold. |
| Integration tests other than the replay hash | `integration-tests.yml` on push and schedule 04:00 UTC. |
Expand Down Expand Up @@ -101,7 +101,7 @@ When the same tests also run under nextest (an affected crate on a pull request,

Those four workflows still trigger on every pull request. The heavy jobs are conditional. A skipped job reports success to branch protection. `on.paths` is not used: a path filter would leave a required check pending. `determinism-replay.yml` has no scope and no path filter. The Aravath golden-hash matrix still expands when the scope is cold, so the three `Replay hash (...)` check names are created; the compile steps are skipped. `net-tests.yml` no longer uses `paths-ignore` for markdown. A docs-only pull request classifies `run=false` and skips the `net-tests` job by condition instead of omitting the workflow. Push, schedule, and `workflow_dispatch` do not consult the diff.

`scripts/ci/test_affected_crates.py` and `scripts/ci/test_workflow_policy.py` lock this in. `actionlint` 1.7.7 reports no findings on the workflow files. The policy test requires every non-`actions/*` `uses:` in a workflow or composite action to be a 40-character commit SHA, and every `codecov/codecov-action` step to set `fail_ci_if_error: true`.
`scripts/ci/test_affected_crates.py` and `scripts/ci/test_workflow_policy.py` lock this in. `actionlint` 1.7.7 reports no findings on the workflow files. The policy test requires every non-`actions/*` `uses:` in a workflow or composite action to be a 40-character commit SHA, every `codecov/codecov-action` step to set `fail_ci_if_error: true`, and no `continue-on-error` on a job that runs that action or on the step that runs it.

## Cache

Expand Down
101 changes: 101 additions & 0 deletions scripts/ci/test_workflow_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def workflow_action_pin_violations(text: str, *, path: str = "") -> list[str]:
_SHA40_RE = re.compile(r"[0-9a-f]{40}")
THIRD_PARTY_SHA_MSG = "third-party action must be a 40-char commit SHA"
CODECOV_FAIL_CI_MSG = "codecov step must set fail_ci_if_error: true"
CODECOV_CONTINUE_MSG = "codecov job or step must not set continue-on-error"
_JOB_HEADER_RE = re.compile(r"^ ([A-Za-z0-9_-]+):\s*(?:#.*)?$")
_CONTINUE_ON_ERROR_RE = re.compile(r"^\s*continue-on-error\s*:")
_STEP_DASH_RE = re.compile(r"^(\s*)-\s+\S")
_FAIL_CI_VALUE_RE = re.compile(r"(?m)^\s*fail_ci_if_error:\s*(\S+)")

Expand Down Expand Up @@ -200,6 +203,60 @@ def codecov_fail_ci_violations(text: str, *, path: str = "") -> list[str]:
return violations


def _job_blocks(text: str) -> list[tuple[int, str, str]]:
"""Return (line number, job id, block) for each job under jobs:."""
lines = text.splitlines()
jobs_at = next(
(index for index, line in enumerate(lines) if line == "jobs:" or line.startswith("jobs:")),
None,
)
if jobs_at is None:
return []
headers: list[int] = []
end = len(lines)
for index in range(jobs_at + 1, len(lines)):
line = lines[index]
if line and not line.startswith(" ") and not line.startswith("#"):
end = index
break
if _JOB_HEADER_RE.match(line):
headers.append(index)
blocks: list[tuple[int, str, str]] = []
for position, start in enumerate(headers):
stop = headers[position + 1] if position + 1 < len(headers) else end
job_id = _JOB_HEADER_RE.match(lines[start]).group(1)
blocks.append((start + 1, job_id, "\n".join(lines[start:stop])))
return blocks


def codecov_continue_on_error_violations(text: str, *, path: str = "") -> list[str]:
"""A job that runs Codecov, and the step that runs it, must not continue on error.

Other steps in that job are not this check. Other jobs are not this check.
"""
violations: list[str] = []
prefix = f"{path}: " if path else ""
for job_line, _job_id, block in _job_blocks(text):
if "codecov/codecov-action@" not in block:
continue
step_spans: list[tuple[int, int, str]] = []
for rel_line, step in _step_blocks(block):
start = job_line + rel_line - 1
stop = start + len(step.splitlines()) - 1
step_spans.append((start, stop, step))
for offset, line in enumerate(block.splitlines()):
if _CONTINUE_ON_ERROR_RE.match(line) is None:
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
continue
abs_line = job_line + offset
owner = next(
(step for start, stop, step in step_spans if start <= abs_line <= stop),
None,
)
if owner is None or "codecov/codecov-action@" in owner:
violations.append(f"{prefix}{abs_line}: {CODECOV_CONTINUE_MSG}")
return violations


def github_action_surfaces() -> list[Path]:
roots = (WORKFLOWS, ROOT / ".github" / "actions")
found: list[Path] = []
Expand Down Expand Up @@ -1042,6 +1099,7 @@ def test_third_party_actions_are_commit_pinned(self) -> None:
rel = str(path.relative_to(ROOT))
violations.extend(third_party_action_pin_violations(text, path=rel))
codecov.extend(codecov_fail_ci_violations(text, path=rel))
codecov.extend(codecov_continue_on_error_violations(text, path=rel))
self.assertEqual(violations, [])
self.assertEqual(codecov, [])
ignored = "uses: actions/checkout@v7\nuses: ./.github/actions/rust-ci-setup\n"
Expand Down Expand Up @@ -1088,6 +1146,49 @@ def test_codecov_fail_ci_if_error_false_mutant_is_rejected(self) -> None:
self.assertTrue(decoy_violations)
self.assertIn(CODECOV_FAIL_CI_MSG, decoy_violations[0])

def test_codecov_continue_on_error_mutant_is_rejected(self) -> None:
text = (WORKFLOWS / "coverage.yml").read_text(encoding="utf-8")
self.assertEqual(codecov_continue_on_error_violations(text, path="coverage.yml"), [])
self.assertNotIn("continue-on-error", text)
editor = (WORKFLOWS / "aw-editor-tests.yml").read_text(encoding="utf-8")
self.assertIn("continue-on-error: true", editor)
self.assertEqual(
codecov_continue_on_error_violations(editor, path="aw-editor-tests.yml"),
[],
)
job_mutant = text.replace(
" timeout-minutes: 45\n",
" timeout-minutes: 45\n continue-on-error: true\n",
1,
)
self.assertNotEqual(job_mutant, text)
job_line = next(
number
for number, line in enumerate(job_mutant.splitlines(), start=1)
if line.strip() == "continue-on-error: true"
)
job_violations = codecov_continue_on_error_violations(job_mutant, path="coverage.yml")
self.assertEqual(
job_violations,
[f"coverage.yml: {job_line}: {CODECOV_CONTINUE_MSG}"],
)
step_mutant = text.replace(
" uses: codecov/codecov-action@",
" continue-on-error: true\n uses: codecov/codecov-action@",
1,
)
self.assertNotEqual(step_mutant, text)
step_line = next(
number
for number, line in enumerate(step_mutant.splitlines(), start=1)
if line.strip() == "continue-on-error: true"
)
step_violations = codecov_continue_on_error_violations(step_mutant, path="coverage.yml")
self.assertEqual(
step_violations,
[f"coverage.yml: {step_line}: {CODECOV_CONTINUE_MSG}"],
)

def test_policy_actions_matches_expected_set(self) -> None:
self.assertEqual(set(POLICY_ACTIONS), EXPECTED_POLICY_ACTIONS)

Expand Down
Loading