Skip to content

ci(consolidation): arm permanent migration gates#46

Merged
softmarshmallow merged 3 commits into
mainfrom
chore/consolidation-ci-arming
Jul 20, 2026
Merged

ci(consolidation): arm permanent migration gates#46
softmarshmallow merged 3 commits into
mainfrom
chore/consolidation-ci-arming

Conversation

@softmarshmallow

@softmarshmallow softmarshmallow commented Jul 19, 2026

Copy link
Copy Markdown
Member

What

This executes exactly the first open consolidation step on #43: Phase 0 CI arming.

  • adds a stable consolidation gates / armed check
  • A/B renders the exact, identity-locked 65-fixture L0.exact subset across base and head
  • runs the five legacy seam architecture locks as a named CI gate
  • enforces Cargo.lock additions-only when a workspace crate is cut
  • keeps the existing canvas build context present on every PR
  • moves n0 shot and timing baseline authority to pinned ubuntu-24.04
  • makes baseline production paired, provenance-bearing, staged, and review-only

This does not begin the decision-issue filing sweep, either docs lane, the cg crate cut, or scoreboard v0.

Etiology

Presentation: clean main has no permanent CI form of #5's one-time consolidation proofs, and the n0 gate is red on a different host while CI does not run it.

Proximate cause: the four shot goldens and timing budgets are identified as aarch64-macos; shot comparison is unconditional, timing comparison silently skips other machines, and a missing benchmark baseline could silently become a new local baseline.

Contract: portable replay/differential checks and environment-owned raster/timing checks were conflated, with no explicit baseline owner or fail-closed CI bootstrap.

Systemic boundary: pixels and timings vary with the raster stack and host. The gate now pins ownership to one CI host, while non-owners prove same-host shot determinism and run every portable check without comparing incomparable environments.

Captured-essence ledger

Scope inventory

  • the 65 checked-in fixtures enumerated by fixtures/test-html/suites/L0.exact.json
  • five seam locks: cg, SVG import, HTML import, htmlcss SVG, and painter
  • workspace Cargo.toml / Cargo.lock
  • the existing canvas wasm build and frozen package contract
  • four n0 shot goldens plus crates/n0/rig/baselines.json
  • crates/n0/rig/probe-baseline.json, inventoried but outside this gate

Caveats with provenance

Re-home destination

  • declared pixel subset and its complete checked-in input identity → bin/check-legacy-pixel-sweep
  • seam contracts → named seam architecture job
  • crate-cut lock proof → bin/check-cargo-lock-additions-only
  • wasm freeze proof → existing canvas build / build, now present on every PR
  • n0 raster/timing ownership and provenance → pinned CI job plus committed baseline manifest

Deliberate drops

None in the harness commit. No renderer behavior, fixture, schema, package metadata, golden, or baseline file changes.

The inspected baseline adoption commit df3d5b5b retires only the old aarch64-macos authority and the stale anchor spike — E10 footer pixels. Commit abe0305d intentionally renamed that live text after the outgoing goldens were recorded; the visual patrol isolated exactly 4,010 changed pixels per local shot to that rename. Current-source macOS↔Ubuntu differences affect 2,627–3,992 pixels per shot (0.215–0.326%) and are confined to text rasterization; geometry and colors align. The old measurements remain preserved in commit history and this ledger. format/grida.fbs, the published @grida/canvas-wasm@0.91.0-canary.22, and probe-baseline.json are untouched.

Local gate evidence

  • cargo fmt --all -- --check
  • cargo clippy --locked -p n0 --bin gate -- -D warnings
  • cargo test --locked -p grida — 828 unit tests plus integration/doc tests green
  • cargo test --locked -p n0-model -p n0 — green
  • all five named seam suites — 15/15 green
  • declared pixel A/B — 65/65 PNGs byte-identical; corpus f1892dcdab29442e
  • n0 non-owner gate — four shots deterministic; replay, differential, and cache checks green
  • required-owner audit — correctly red while main still names aarch64-macos
  • model-v2: anchor — land the v2 engine as the crates/n0 family #5 lock proof replay — +100/-0, green

Remote gate evidence

  • Initial run 29699083578 localized a 30-minute timeout to a second skia-bindings build; no gate binary, candidate, or artifact ran. Commit ed0f3109 unified the shot host and gate into one Cargo graph and retained a 45-minute hard ceiling.
  • Corrected bootstrap run 29700301719 built cold in 17m53s. Its unblessed gate was red only for the absent Ubuntu owner; all four shots were same-host deterministic and replay/differential/cache checks passed. The paired candidate then passed and uploaded exactly five files as artifact 8446425713 (zip SHA-256 469e3fbf2a526611f61f1d43220dc966bcc414ba290595dd0e97d6b2f3fed978).
  • The artifact manifest records source ed0f3109431587c99d25244542c89631060d8bdf, github-actions-ubuntu-24.04-x86_64, Rust 1.92.0, and skia-safe 0.93.1. All five adopted files are byte-identical to the inspected artifact.
  • Final unblessed consolidation run 29701210569 is green, including armed: four shots IDENTICAL; replays deterministic; references deterministic; scene cache matches fresh; starter 15.9/1.7 µs and flat10k 1085.8/273.1 µs are within their CI budgets. Candidate, upload, and bootstrap-failure steps were skipped.
  • Final canvas build 29701210590 and test crates 29701210570 are green, including format, tests, and clippy.

Bootstrap and owner gate

The paired bootstrap completed on pinned Ubuntu: it produced a complete candidate only after every portable gate passed, and the candidate was inspected before adoption. The final unblessed run is green and skipped candidate production. The PR remains draft; all-green CI is evidence, not approval.

Do not merge without explicit owner GO.

Closes #44.

Captured-essence ledger

Scope inventory: the #5 proof estate—65 checked-in L0.exact fixtures, five legacy seam architecture locks, workspace Cargo.lock, the frozen wasm build, and the n0 shot/timing baselines.

Caveats and provenance: the full iosvg resvg suite remains local-only (4,351 byte-identical PNGs recorded by #5 and 7c101b9); L0.exact is the declared CI subset; seam tests are lexical dependency locks; machine-local shot drift and timing variance are recorded in #5 and #44.

Re-home: CI now owns stable required checks, exact corpus plus renderer A/B evidence, additions-only crate-cut proof, and a pinned Ubuntu n0 baseline identity. Candidate baselines are complete, review-only artifacts until separately adopted with etiology.

Deliberate drops: none. This commit changes no renderer behavior, fixture, schema, package metadata, golden, or baseline file. The aarch64-macos baseline remains until a genuine Ubuntu CI candidate is inspected.
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nothing Ready Ready Preview, Comment Jul 19, 2026 7:46pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4939dc78-0233-4f88-922c-5e3bb1047cac

📥 Commits

Reviewing files that changed from the base of the PR and between 811ffb8 and df3d5b5.

⛔ Files ignored due to path filters (4)
  • crates/n0_dev/shots/crosszero.png is excluded by !**/*.png
  • crates/n0_dev/shots/default.png is excluded by !**/*.png
  • crates/n0_dev/shots/rot45.png is excluded by !**/*.png
  • crates/n0_dev/shots/ungroup.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • .github/workflows/build-canvas.yml
  • .github/workflows/consolidation-gates.yml
  • .github/workflows/test-crates.yml
  • bin/check-cargo-lock-additions-only
  • bin/check-legacy-pixel-sweep
  • crates/n0/README.md
  • crates/n0/rig/baselines.json
  • crates/n0/src/bin/gate.rs

Walkthrough

Adds a consolidation-gates workflow with conditional Rust, lockfile, pixel-sweep, and N0 checks. Adds revision comparison scripts and changes N0 baselines to use host ownership, provenance metadata, deterministic non-owner checks, and staged baseline candidates.

Changes

Consolidation gates and baseline validation

Layer / File(s) Summary
Workflow scope and gate orchestration
.github/workflows/consolidation-gates.yml, .github/workflows/build-canvas.yml, .github/workflows/test-crates.yml
Adds conditional consolidation jobs, revision scoping, concurrency, and aggregate status handling; updates workflow triggers and path filters.
Revision comparison scripts
bin/check-cargo-lock-additions-only, bin/check-legacy-pixel-sweep
Adds lockfile additions-only validation and byte-identical A/B rendering checks across revisions.
Host-owned N0 gate behavior
crates/n0/src/bin/gate.rs
Adds host-aware shot and benchmark validation, paired blessing requirements, provenance checks, and staged baseline candidates.
Baseline metadata and documented policy
crates/n0/rig/baselines.json, crates/n0/README.md
Updates baseline provenance and performance metadata, and documents CI-owned baselines and non-owner determinism checks.

Estimated code review effort: 5 (Critical) | ~90 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PullRequest
  participant Scope
  participant ConsolidationGates
  participant N0Gate
  participant Baselines
  PullRequest->>Scope: determine base, head, and engine scope
  Scope->>ConsolidationGates: run applicable gates
  ConsolidationGates->>N0Gate: execute host-aware gate
  N0Gate->>Baselines: read or stage baseline metadata
  Baselines->>ConsolidationGates: return gate result
  ConsolidationGates->>PullRequest: publish consolidated status
Loading

Possibly related issues

  • gridaco/nothing issue 43: The workflow adds the consolidation gates, baseline checks, and legacy byte-identical sweep described by the issue.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/consolidation-ci-arming

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Run 29699083578 proved the n0 job timeout was build topology, not renderer output: n0_dev completed its cold release build in 16m24s, then cargo selected a second skia-bindings graph for gate and was cancelled 12m40s later at the 30-minute job ceiling. The candidate and upload steps never ran, and the interrupted cache save failed.

Build n0_dev and gate in one Cargo invocation so their features resolve once, execute the resulting gate binary directly, and retain a 45-minute cold-host ceiling. The fail-closed sequence is unchanged: an unblessed failure may produce a complete review-only candidate, then the job remains red until that candidate is deliberately adopted.

Gate evidence: the exact combined release build passes locally; direct non-owner gate execution passes shots, replay, differential, cache, and timing paths; YAML parsing and git diff checks pass. Frozen format and published package surfaces remain untouched.
Adopt the complete review-only candidate from GitHub Actions run 29700301719, artifact 8446425713 (zip SHA-256 469e3fbf2a526611f61f1d43220dc966bcc414ba290595dd0e97d6b2f3fed978). The manifest records source ed0f310, ubuntu-24.04 x86_64, Rust 1.92.0, and skia-safe 0.93.1.

Captured essence: preserve all four named 1360x900 RGBA states, paired shot/timing ownership, same-host determinism, replay determinism, the ENG-0.2 differential, scene-cache equality, and the generous max(1.5x, +50us) timing rule. The candidate gate passed every portable check before installing and uploading exactly five files.

Etiology: the outgoing images came from 7c101b9 on aarch64-macos. Main commit abe0305 then deliberately changed the footer from the plan-code name anchor spike — E10 to n0_dev — anchor spike without updating the shots; that source change accounts for exactly 4,010 pixels in each current macOS render. Comparing current source across macOS and Ubuntu changes 2,627-3,992 pixels per shot (0.215-0.326%); visual diffs are confined to text rasterization, while geometry and colors align.

The timing numbers move from incomparable macOS measurements to CI-owned min-of-11 measurements: starter 15.639/1.654us and flat10k 1076.711/269.591us for resolve/build. This is an authority transfer, not a performance claim.

Deliberate drop: retire only aarch64-macos baseline authority and the stale E10 footer pixels. Preserve their provenance here and in #5/#44. format/grida.fbs, the published canvas-wasm freeze, probe-baseline.json, renderer behavior, and fixture content remain untouched.
@softmarshmallow
softmarshmallow marked this pull request as ready for review July 20, 2026 03:46
@softmarshmallow
softmarshmallow merged commit 182bb7f into main Jul 20, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gate: CI-hosted run with CI-blessed baselines

1 participant