Skip to content
forge-ciPublic

About

AI-assisted checker for slow CI and standardized fast lint validation

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

ci.yml

Policy and automation for fast, reliable pull request CI across the forge-ci, zackees, FastLED, and TechWatchProject repositories.

ci_lint is the standard-library-only Python package implementing both the repository-local checker (ci-lint precheck, plan, units/tests size/wheel/gate, cache audit/janitor, audit, local-gate) and the central fleet scanner (ci_lint/fleet.py: ci-lint fleet scan, history, fleet daily, and sync-issues --dry-run / opt-in --apply). Repositories adopting ci.toml schema 3 (docs/ci-toml.md) get full precheck, planner, and runtime verification; see the canonical example examples/rust-pypi-app/ci.toml and the historical reference repository zackees/template-python-rust-cmd built in issue #6.

Decision

Standardize each code repository on .github/workflows/ci.yml as the entry point for its required quick PR checks, backed by the 2026-12 Forge CI acceleration architecture:

  • Single-engine soldr lint (RUST-034): Declare authoritative targets, lint steps (fmt, clippy, dylint), Dylint libraries, and extra static/Python checks once in root Cargo.toml ([workspace.metadata.soldr] / [workspace.metadata.soldr.lint] / [workspace.metadata.dylint]). Both optional local ./push and the warm CI attestation engine execute the exact same soldr lint command.
  • Client-optional attestation & OIDC Sigstore CI attestations (GATE-003, GATE-014, GATE-020): Local attestation via ./push / Ci-Attestation: commit trailers (mode = "shadow" default) is an optional local accelerator, never a blocker. Unattested PRs run cleanly in CI on the lightning-fast dedicated CI attestation engine and emit OIDC Sigstore signed CI attestations (prooft#29).
  • Node-local Forge CI acceleration (RUST-035, GEN-034, CACHE-042, GEN-036): Route eligible Linux jobs Dell-first via forge-ci/ci.yml/actions/pool-select so soldr, soldrix EROFS layers, forge-node, and dual-key zccache serve warm node-local toolchains and third-party dependency caches directly, gated by fail-fast checks and outcome_kind observability (docs/forge-ci-readiness.md).
  • Streaming cut-through artifact cache (CACHE-041, RUST-033): Hand off cross-compiled binaries and zstd -9 nextest archives through artifacts.forge-ci.com with fail-open fallback to actions/upload-artifact@v4, eliminating multi-minute WAN upload stalls (docs/artifact-cache.md).

A finding is resolved by fixing the repository, updating policy, or recording a scoped, expiring exception (ci.toml's [[exceptions]]).

Policy at a glance

Each row summarizes active fleet policy; see docs/policy-general.md, docs/policy-rust.md, and docs/policy-cpp.md for the full rule tables and per-rule enforcement status.

Area Fleet rule
Quick gate ci.yml runs the required checks for ordinary PRs on Linux, gated by a ci-pre.yml first job that installs nothing (GEN-001, GEN-002, GEN-008, GEN-014..018). Windows, macOS, packaging matrices, and long integration runs belong in separate workflows/tags when needed.
Runner routing & node-local acceleration Route eligible Linux jobs Dell-first through forge-ci/ci.yml/actions/pool-select (GEN-034; min-idle <= 4, expiring bypasses only). Node-local soldr + soldrix + forge-node + dual-key zccache serve warm host-shared caches directly (CACHE-042), while retired dylint-output and redundant Actions caches are omitted.
Attestation (client-optional) Local attestation (./push / prooft --push, Ci-Attestation: commit trailers, local-gate.toml with mode = "shadow") is an optional local accelerator (GATE-003, GATE-014, GATE-020). Unattested PRs never fail for missing local trailers: the dedicated warm CI attestation engine validates them and emits OIDC Sigstore signed CI attestations (prooft#29).
Rust lint & readiness Use forge-ci/setup-soldr (v0.9.65+ or @v0) and soldr for compile-bearing Rust checks (RUST-001, RUST-034, RUST-035). Declare targets, lint steps, Dylint libraries, and extra checks once in root Cargo.toml ([workspace.metadata.soldr.lint]) and run single-engine soldr lint on Linux (never under bosn, GATE-016). Align on fleet Rust 1.98.1 and canonical [profile.dev/test.package."*"] for ≥85–90% cross-repo zccache sharing (docs/forge-ci-readiness.md).
Python (GATE-020, GEN-004) Standardize on basedpyright, ruff check --select I, and ruff format --check across Python paths. Legacy tools (pylint, black, isort, mypy, flake8, pyright) are banned; wire Python checks into [workspace.metadata.soldr.lint].extra on Rust+Python repos so soldr lint runs them once.
Streaming artifact cache Stream large inter-job handoffs (cross-compiled bundles, zstd -9 nextest archives) through artifacts.forge-ci.com with fail-open fallback to actions/upload-artifact@v4 (CACHE-041, RUST-033; docs/artifact-cache.md). Never store linked tests, nextest archives, wheels, or target/ trees in GitHub Actions Cache (CACHE-007, CACHE-008).
Fail-fast & observability Gate heavy Rust matrices behind fast Python (GATE-020), fmt, and policy guards with --fail-fast on by default, and classify exits via outcome_kind (ok / command_failed / worker_fault, GEN-036).
Default-branch CI A push to the default branch may skip a required job only through verified reuse — a byte-identical merged tree proven by a recent green PR or merge-queue run — never through a blanket if: or deleted push: trigger (GEN-021, ci-lint reuse-check; design).
Coverage & artifacts Preserve required checks when accelerating CI (GEN-003). Prefer musl on Linux where feasible (BIN-001), track Windows MSVC x64/ARM64 distinctly (BIN-002), ship native release symbol sidecars (REL-009), and test installed wheels (PKG-001, PKG-008..010) or packed npm artifacts (PKG-002) in the quick Linux gate.
Python benchmark & checker code Use frozen dataclasses for benchmark inputs/results (PY-001) and ci_lint records (PY-002), avoid capture-then-wait subprocess pipes (PY-003), and uphold the Ruff C901 complexity ratchet (PY-004).
Timing & local replay Measure PR critical path, runner queue, and job execution separately (PERF-001). Host soldr lint + Dell-first CI are the fleet default; bosn/act local workflow replay (ACT-001..003) is opt-in only for repos that invoke act and never runs lint (GATE-016).
Exceptions Record rule, path, reason, issue URL, and expiry date in ci.toml [[exceptions]]. An undocumented or expired exception does not satisfy policy.

Evidence behind the policy

  • Issue #1 records Dylint cache identity drift, cold versus warm timing, missing cross-target toolchain components, and platform coverage risks.
  • Issue #2 inventories slow PR paths, workflow violations, and gaps across the sampled fleet.
  • Issue #4 proposes the composable CI contract, full coverage checks, release candidate gate, and Linux libc / Windows ABI target model.
  • Issue #5 measures coverage-per-compile-minute gaps, cache budget/save-scope discipline, and toolchain sourcing order (RUST-008–010, GEN-009).
  • Issue #6 built and measured ci.toml schema 3 and ci_lint round by round against zackees/template-python-rust-cmd (case study).
  • Issue #595, Issue #596, Issue #605, and the attestation system retrospective document the 2026-12 evolution to single-engine soldr lint, client-optional attestation + OIDC Sigstore CI attestations, streaming cut-through artifact handoffs (artifacts.forge-ci.com), and Dell-first node-local acceleration (soldrix / forge-node / dual-key zccache).

Documentation

  • General code repository policy: quick gate, ci.toml/ci-lint contract, caching (CACHE-001..042), secrets/publishing, Dell-first pool-select (GEN-034), client-optional attestation (GATE-001..020), remote-only checks (GATE-012), host-only lint (GATE-016), timing, and exceptions — with a full rule-ID table marking each rule's status.
  • Rust repository policy: common Rust checks, single-engine soldr lint (RUST-034), fleet toolchain/profile/soldrix alignment (RUST-035), zstd -9 nextest archive budgets (RUST-033), platform facades, libraries, and PyPI/npm apps.
  • C/C++ (CMake) repository policy: cpp/... attestation gates, C/C++ lane-key pins and compiler identity, ccache/zccache cache families, no CMake build trees in caches, the cmake/ctest GEN-005 allowlist, and parallel ctest (CPP-001) (#393).
  • Streaming cut-through artifact cache: artifacts.forge-ci.com (CACHE-041), cross-Dell peer .zip sharing, zstd -9 packaging (RUST-033), fail-open workflow wiring, and measured Gold-Test results.
  • Forge CI repo-readiness contract: the nine-item onboarding checklist for soldr lint (RUST-034), fleet toolchain/profile/soldrix base alignment (RUST-035), Dell-first pool-select (GEN-034), node-local cache scoping (CACHE-042), and fail-fast + outcome_kind observability (GEN-036).
  • docs/ci-toml.md: field-by-field schema-3 reference and rule catalog for ci_lint.
  • ci_lint/: the stdlib-only Python checker and central fleet scanner — static precheck, tag/flow planner, runtime build/wheel/units checks, cache key/save-ok/audit/janitor, live settings/secrets audit, OIDC mock-publish check, release-candidate gate, and fleet scan/history/sync-issues (ci_lint/fleet.py).
  • examples/rust-pypi-app/ci.toml: canonical ci.toml example modernized for the 2026-12 forge-ci/ architecture.
  • Designs: multi-phase specifications spanning policy, ci_lint, and fleet repositories (verified reuse on default-branch pushes, PR critical path, per-test selection).
  • Agent operating guide: mechanical scan, evidence, issue lifecycle, and merge-queue worker/chaperone landing (GEN-033).
  • Detailed proposal: historical repository inventory, release lifecycle, and target/libc/ABI model (schema-1 section superseded by schema 3).
  • AGENTS.md: index, working rules, and authoritative Rule-ID Registry for agents working in this repository.

Status

  • Repository-local checker (ci_lint): Implemented and merged — static precheck, tag/flow planner, runtime build/artifact checks, cache runtime (key, save-ok, live audit, trim/janitor/heal/preprune, PR deltas, save-check), live settings/secrets audit, OIDC mock-publish check, release-candidate gate, client-optional local-gate/attest tooling (supporting OIDC Sigstore CI attestations), and soldr lint + Cargo.toml manifest recognition. Every mechanically enforced rule has RED/GREEN fixtures under ci_lint/tests/fixtures/<RULE-ID>/ and is covered by python3 -m ci_lint selftest.
  • Central fleet scanner (ci_lint/fleet.py, ci_lint/sync_issues.py): Implemented and merged — python3 -m ci_lint fleet scan produces live, read-only ranked fleet inventories from the GitHub API without requiring a local checkout or ci.toml; python3 -m ci_lint history diffs recorded scans; python3 -m ci_lint fleet daily drives scheduled daily scans; and python3 -m ci_lint sync-issues plans fingerprinted issue updates (--dry-run by default; --apply requires explicit [fleet] sync-issues = true opt-in in the target repository's ci.toml).
  • Rule enforcement boundary: Repository-local ci.toml precheck/runtime enforcement remains opt-in per repository, and not every policy rule is mechanically enforced yet. Consult the Status column in docs/policy-general.md, docs/policy-rust.md, and docs/policy-cpp.md for the exact per-rule split between Enforced by ci-lint, Policy, Candidate, and Retired.

About

AI-assisted checker for slow CI and standardized fast lint validation

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages