AGENTS.md instructions for /Users/ericson/.codex/worktrees/178c/ars-ui
--- project-doc ---
ars-ui
Project Overview
Rust frontend component library using state machines, framework-agnostic core with Leptos/Dioxus adapters.
Current Phase
The repo is now in active implementation, not spec drafting only.
Agents working on implementation should use the GitHub Project roadmap and issue backlog as the execution source of truth:
Use the GitHub Project ars-ui implementation roadmap to understand active epics, task breakdown, dependencies, status, and iteration planning.
Prefer picking a single issue-backed task that is unblocked, sized, and scoped for independent delivery.
Do not start work from an epic issue unless the user explicitly asks for planning or further decomposition.
Do not start a task that is blocked by unresolved GitHub issue dependencies.
Treat native GitHub issue dependencies as the blocker graph and the issue body acceptance criteria as the delivery contract.
Development Workflow
For implementation tasks:
Read the assigned or selected GitHub issue first.
Move the issue to In Progress on the GitHub Project board.
Review the cited spec sections and any dependency issues.
Add or update the named tests first.
Implement only the scope required to make those tests pass.
If implementation changes the intended contract, update the relevant spec in the same task.
MANDATORY: Invoke the post-implementation-audit skill (.agents/skills/post-implementation-audit/SKILL.md). It runs three sequential audits on the new code — (a) spec/implementation drift with "best outcome" recommendations, (b) iterative "anything else missing?" passes (minimum two rounds), (c) test-coverage audit across every test type the workspace uses (unit, snapshot, proptest, doc, spec-conformance, llvm-cov — mutation testing is not part of this gate; it is Nightly-CI-driven). Every finding lands in this PR — no deferral, no follow-up issues. This step exists because initial implementations consistently ship spec drift and silent contract violations that take 3+ review round-trips to surface; the audit collapses them into one. Skipping this step is a contract violation.
Run cargo xclippy before presenting the final result for user review. Fix warnings in changed code at the root cause, or use #[expect(..., reason = "...")] only for deliberate, justified suppressions. Do not hand off with known warnings in the changed surface.
Is it possible to break the Coverage CI step into multiple smaller steps and merge the coverage results when all of them complete? In a sharding scheme, where each job handles a part of the coverage. Let's investigate it and do a proper plan on how to handle this sharding
Assistant
I’ll use the Superpowers planning workflow here, plus the repo’s existing guidance, and first inspect the current coverage CI/xtask shape so the plan is grounded in what actually runs today.
Assistant
The first skill path alias in the prompt points elsewhere than the local filesystem layout, so I’m falling back to the matching installed skill copies under ~/.claude/skills. The memory index has relevant prior coverage notes, but I’ll verify against the live CI and xtask code before relying on them.
Assistant
I’m also going to use the brainstorming/planning guidance because this is a design change to CI behavior, but I’ll keep it practical: current workflow first, then shardable boundaries, then a concrete migration plan.
Assistant
The repo already has an xtask coverage merge command, which is promising. Next I’m reading the actual coverage orchestration to see whether sharding is mostly workflow-level or needs xtask changes for partial native/wasm groups.
Assistant
The current CI job serializes everything: native workspace coverage, six wasm coverage packages, threshold check, CRAP, then upload. The main design question is how much to split native coverage, because wasm is already naturally per-package inside xtask.
Assistant
There are two likely plans: a low-risk split with one native shard plus six wasm shards, or a fuller split where native package groups are separate shards. I’m checking whether cargo llvm-cov nextest -p ... can produce independently mergeable package LCOV without losing cross-crate coverage accounting.
Assistant
I found that cargo llvm-cov nextest supports package selection and nextest supports partitions, so native sharding can be done either by package groups or by test partitions. Package groups fit the existing per-crate thresholds better and avoid merging partial execution for the same crate unless needed.
Assistant
One constraint from the live workflow: CRAP and Codecov should stay post-merge, because they consume the final merged lcov.info. So the clean shape is many “produce LCOV artifact” jobs, followed by one “merge, threshold, CRAP, upload” job.
Assistant
Given “maximum fanout”, the plan should include two layers: package-group sharding for crates, and nextest partition sharding for the heaviest native crate/test sets. I’m checking the local nextest configuration and coverage helpers so the partition plan doesn’t accidentally bypass repo-specific filters.
Assistant
For maximum fanout, the safer native design is partitioning the whole workspace test set rather than slicing by package. That preserves proc-macro and cross-crate coverage semantics; package-level splits can accidentally miss coverage that is only produced when another crate’s tests exercise a dependency.
Assistant
User
Assistant
I’ll implement this directly from the plan. I’m going to use the execution and TDD workflows because this changes CI tooling behavior, then I’ll verify with focused xtask tests.
Assistant
I reviewed the plan against the current code. The only adjustment I’m making is implementation-level: I’ll add a reusable native coverage helper and command argument builder so tests can prove the exact cargo llvm-cov nextest invocation without launching coverage.
Assistant
I’m starting with tests around pure argument construction because that gives us red/green coverage without paying for an instrumented workspace run. After that I’ll wire the command and workflow.
Assistant
I’m adding the red tests now: one for unpartitioned native coverage arguments, one for a sharded partition, and one guard in the CI module that full coverage stays adjacent to CRAP. The CI workflow itself is YAML, so I’ll verify that structurally after editing rather than unit-testing GitHub Actions.
Assistant
The red tests reference the new API, so they should fail until the helper exists. I’ll run the focused coverage tests once to confirm the failure is the expected missing-symbol failure.
Assistant
The red check failed for the intended reason: NativeCoverageOptions and native_coverage_args don’t exist yet. I’m implementing the smallest helper surface now and reusing it from the existing full coverage path.
Assistant
The native coverage helper is in place. Next I’m exposing it through cargo xtask coverage native and replacing the hand-built native command in cargo xtask ci coverage with this shared helper.
Assistant
The xtask command is wired now. I’ll rerun the focused tests to catch compile and assertion issues before touching the workflow YAML.
Assistant
That filter matched zero tests, so it didn’t prove the new tests. I’ll use the actual test names for the focused pass.
Assistant
The new xtask tests pass with the correct filter. I’m moving on to the Actions split and the CI documentation, keeping the final job named Coverage as planned.
Assistant
I’m replacing the monolithic workflow block with three jobs: native partition matrix, wasm package matrix, and a final merge/check job still named Coverage. The final job remains the branch-protection target and owns CRAP, snapshots, merged LCOV, and Codecov.
Assistant
I noticed an orphaned comment in the wasm job from the old cargo-crap install step; I’ll clean that while I inspect the final merge block.
Assistant
The workflow split is in place. I’m updating the CI spec next so the documented coverage pipeline matches the new producer/merge jobs and the new coverage native command.
Assistant
I’m aligning the CI spec with the actual workflow shape rather than leaving the old monolithic example. This avoids future agents treating cargo xtask ci coverage as the GitHub Actions topology.
Assistant
The docs now describe the sharded pipeline and the new native command. I’m going back through compile/test feedback next, starting with the xtask library tests.
Assistant
The new focused tests pass. I’m running the broader xtask library suite now because the changes touch both coverage and ci modules.
Assistant
The xtask library suite is green. I spotted one workflow edge case while reviewing: the final download pattern should not match coverage-lcov from reruns, so I’m narrowing it to only native and wasm producer artifacts.
Assistant
I’m making the same producer-artifact distinction in the CI spec so it matches the workflow’s rerun-safe behavior.
Assistant
Next I’m formatting the Rust changes with the workspace formatter, then I’ll run compile checks that include the xtask binary path.
Assistant
cargo xfmt completed, but it runs dx fmt broadly across Dioxus files. I’m checking the diff now so I can distinguish our intended changes from any pre-existing or formatter-touched files.
Assistant
The formatter only left the intended five files modified. I’m compiling the xtask package now, which includes the CLI binary where the new subcommand is exposed.
Assistant
cargo check -p xtask passed. I’m rerunning the full xtask lib tests after formatting, then I’ll validate the workflow YAML can be parsed.
Assistant
The xtask tests pass after formatting. I’m checking the CLI help and YAML parse next, which catches wiring mistakes outside the library tests.
Assistant
The CLI help renders correctly and the workflow YAML parses. I’m doing one small end-to-end check of the merge CLI with synthetic LCOV files so the artifact merge path is exercised outside unit tests.
Assistant
The merge CLI produced the expected unioned LCOV content. I’m running check-all against that synthetic file too; it mainly verifies the CLI path and threshold parser, while full real thresholds are covered by CI artifacts.
Assistant
The merge/check CLI smoke passed against synthetic LCOV. I’m starting the required post-implementation audit now: first spec/workflow drift, then two “anything else” passes, then a coverage/test-surface pass.
Assistant
Audit pass 1 found a real doc drift: the infrastructure section still said “the coverage job” owns the LLVM 22 apt cache, but that work now lives in coverage-wasm. I’m fixing that spec wording now.
Assistant
Round 1 also showed the dependency diagram still depicts a single coverage collection job. I’m tightening that section to show native and wasm producers feeding the final Coverage gate.
Assistant
The old graph was already stale in a few places, and the sharding change made the coverage part actively wrong. I’m replacing that section with a compact dependency description that matches the current workflow.
Assistant
Post-audit round 1 findings are fixed. I’m doing the second “anything else missing?” pass now, focusing on stale references and accidental workflow/spec mismatches.
Assistant
Second pass found a pre-existing stale test-harness job section that still referenced core-tests and a job not present in the live workflow. Since this CI doc is already being edited, I’m correcting that drift instead of leaving contradictory pipeline guidance.
Assistant
I’ll remove the phantom job example and document the current contract: harness crates are compiled through the existing test/coverage jobs, with focused local checks available when editing them.
Assistant
The second-pass doc drift is fixed. I’m doing one more clean pass for stale CI names and coverage topology terms before moving to final verification.
Assistant
The second audit pass is clean for the coverage topology. For the test-coverage audit, the changed Rust behavior is covered by xtask unit tests for command construction plus CLI/check smoke tests; I’m running the required clippy gate now.
Assistant
cargo xclippy is still running through the full workspace dependency graph. I’ll keep polling it and only report a pass/fail after the command exits.
Assistant
The first clippy phase has reached the workspace crates and is still running. No result yet; I’m continuing to wait for the final exit code.
Assistant
cargo xclippy finished the workspace pass and moved into its ars-i18n backend-specific checks. It is still active.
Assistant
cargo xclippy exited successfully. I’m doing a final status and diff review now, then I’ll summarize the implementation and verification evidence.
Assistant
The final diff review shows only the intended five files changed. I’m marking the implementation checklist complete now; no commit or push was made.
Assistant
Implemented the sharded coverage plan.
Changed:
ci.yml: split coverage into coverage-native 8-way matrix, coverage-wasm 6-package matrix, and final Coverage merge/check/CRAP/Codecov job.
coverage.rs: added NativeCoverageOptions, native LCOV generation, command construction tests.
main.rs: added .
User
I reviewed here, let's commit and push a PR to github
Assistant
I’ll use the GitHub publish workflow now. First I’m checking the repo state, then I’ll run the required pre-commit/pre-push gates before creating the PR.
Assistant
The worktree is detached and the intended five files are modified. I’m going to create a codex/ branch for this PR before committing, then run cargo xfmt and cargo xci --profile fast as required before push.
Assistant
gh is installed and authenticated. The five intended files are already staged, with no unstaged diff, so the PR scope is clean.
Assistant
Branch codex/sharded-coverage-ci is created. I’m rerunning cargo xfmt before the commit, then the fast CI profile before pushing.
Assistant
cargo xfmt completed cleanly. I’m starting cargo xci --profile fast; this is the required pre-push gate and may take a while.
Assistant
cargo xci --profile fast passed formatting and is in clippy. I’ll keep it running through the remaining gates before committing.
Assistant
cargo xci-fast has passed clippy and is building/running unit tests now. Still no final result yet.
Assistant
The fast gate is still in the unit-test build phase. I’ll continue polling until it exits.
Assistant
The unit binaries finished compiling; nextest is executing the test set now.
Assistant
No new output in the last poll, which is normal while tests run. I’ll keep waiting for the next stage or failure.
Assistant
The unit stage is near the end of the 8,713-test nextest run. Still waiting for the fast profile’s remaining stages and final exit.
Assistant
A long trybuild test is still running inside the unit stage. I’ll keep polling.
Assistant
The first long UI test completed; three long ars-core compile-contract tests remain.
Assistant
The main unit stage passed: 8,713/8,713. The fast profile is now running the ars-i18n split unit checks.
Assistant
I’m picking up at the pre-push gate. cargo xci --profile fast is still running, so I’ll wait for that to finish before committing or pushing.
Assistant
The fast gate has cleared fmt, clippy, unit, and integration, and it is into the adapter phase now. I’m continuing to let the required pre-push gate run to completion before touching git.
Assistant
The adapter and spec snippet stages passed. The fast profile is on the final policy gates now, including the native-only coverage check.
Assistant
The native coverage stage is doing the instrumented rebuild and run. This is the slow part of the fast profile, and it is the last required gate before I commit.
Assistant
The coverage binaries finished building. I’m waiting for the coverage test run and threshold check to report its final result.
Assistant
cargo xci --profile fast passed all 10 steps, including native coverage thresholds. I’m checking the worktree now, then I’ll stage any formatter changes, commit, push, and open the PR.
Assistant
The five intended files are staged and there are no unstaged formatter edits. I’m committing the sharded coverage CI change now.
Assistant
The commit is created. I’m pushing codex/sharded-coverage-ci to origin next, then I’ll create a ready PR against main.
Assistant
The branch is pushed. I’m creating the ready PR now with the verification summary from the local checks.
Assistant
PR creation hit the sandboxed network boundary. I’m rerunning the same GitHub API call with network approval so the PR can be created.
Assistant
PR #729 is open. Per repo workflow, I’m starting the Codex review loop now by posting @codex review, then I’ll poll for its result.
Assistant
The review trigger is posted. I’m polling the PR comments and reactions for Codex’s review lifecycle before calling this done.
Assistant
Codex has not reacted yet; CI has started with early checks pending. I’ll give the review bot a little time and poll again.
Assistant
Still waiting on the review bot’s first signal. I’m continuing the poll rather than closing out before the required review loop has a result.
Assistant
Codex picked up the review request with an eyes reaction. I’m waiting for its final thumbs-up or review threads.
Assistant
The review is still in progress. I’m holding the turn open so I can act on any review findings instead of leaving the PR half-finished.
Assistant
No final review signal yet; I’m giving it one more interval and then I’ll poll the PR review/comment state again.
Assistant
I’m polling now for Codex’s final reaction, review records, and any unresolved review threads.
Assistant
There are no review threads yet and the trigger still only has the eyes reaction. I’ll keep polling; if Codex returns findings, I’ll handle them on this branch before finalizing.
Assistant
The review wait is ongoing. I’m still keeping the session open because the repo workflow requires the Codex review loop after the first push.
Assistant
No terminal output from the wait command; it is just the timed interval. I’ll poll again when it completes.
Assistant
I’m polling the PR again for Codex’s final review signal and current CI state.
Assistant
CI is exercising the new matrix now: all 8 native coverage shards and all 6 wasm coverage shards are pending, with early checks passing. Codex is still reviewing and has not produced threads or approval yet.
Assistant
The review bot still has the request in progress. I’m waiting another interval, then I’ll poll both the review state and the coverage shards again.
Assistant
Still in the wait interval. No local work is changing while this runs; I’m just waiting for GitHub-side signals.
Assistant
I’m continuing to wait for the review completion; once Codex returns either findings or 👍, I’ll update accordingly.
Assistant
The timer is almost done; next step is another GitHub poll for comments, review threads, and CI.
Assistant
I’m polling GitHub again now.
Assistant
Good signal from CI: several native shards and wasm shards are already passing. Codex review is still only in progress, with no threads yet, so I’m continuing to wait.
Assistant
Another wait interval is running. I’ll poll again after it completes.
Assistant
Still waiting; no local command output is expected during the sleep.
Assistant
I’m keeping this open because the post-push review gate is the remaining workflow item, not because there is any local uncertainty.
Assistant
One more short wait, then I’ll poll GitHub state again.
Assistant
Polling again for the review result and CI.
Assistant
The coverage shard design is getting real CI validation now: all 14 shard jobs passed and the final Coverage merge/check job is running. Codex review remains in progress with no threads.
Assistant
I’m waiting another interval for Codex’s review result and the last CI jobs.
Assistant
Still in the timed wait. Next poll will check whether the final Coverage merge job completed.
Assistant
No change locally; this is all GitHub-side waiting at this point.
Assistant
I’ll poll once this interval finishes; if Coverage fails, I’ll inspect logs, and if Codex posts findings, I’ll patch them.
Assistant
Polling GitHub again for final CI and review state.
Assistant
Codex found two real Coverage issues, and CI confirms the final Coverage job failed. I’m fixing both now: repeat --file per artifact and make the final Coverage job run/fail explicitly when a shard fails.
Assistant
The workflow needs a small shell fix in the final job, not Rust changes. I’m editing .github/workflows/ci.yml to add the shard-result guard and construct the merge command with repeated --file flags.
Assistant
The workflow patch is in place. I’m verifying YAML parsing and the shell command shape before amending the PR branch.
Assistant
YAML parses cleanly and the diff is exactly the review fix. I’ll run a focused shell/merge check with synthetic LCOV inputs next.
Assistant
The synthetic merge check confirms repeated --file arguments work. I’m running the formatter gate, then I’ll commit and push the review fix.
Assistant
cargo xfmt completed. I’m checking for any formatter changes outside the intended workflow file before staging.
Assistant
Only .github/workflows/ci.yml changed. I’m staging and committing this review/CI fix, then I’ll push and retrigger Codex review.
Assistant
The workflow fix is staged. I’m committing it with the required trailer.
Assistant
The fix commit is created. I’m pushing it to update PR #729.
Assistant
The PR is updated. I’m replying to the two Codex threads with what changed, resolving them, and then I’ll retrigger Codex review on the new commit.
Assistant
The review threads have replies. I’m resolving the two threads in GitHub now.
Assistant
Both original Codex threads are resolved. I’m posting a fresh @codex review for the new commit and will poll again.
Assistant
The follow-up review trigger is posted. I’m waiting for Codex to pick up the new commit.
Assistant
Waiting on the follow-up review’s first reaction.
Assistant
Polling the follow-up review trigger and PR state now.
Assistant
The follow-up review is in progress and the old threads remain resolved. The new CI run has started; I’m waiting for Codex’s final signal and the coverage rerun.
Assistant
Waiting on the follow-up review and CI. If Codex reports another finding, I’ll patch it in the same branch.
Assistant
Still in the wait interval. The last visible state was Codex reviewing and CI just starting.
Assistant
I’m continuing the wait; no local command is running besides the timer.
Assistant
One more short interval, then I’ll poll the follow-up review reaction and CI matrix.
Assistant
Polling the follow-up review and current checks.
Assistant
The second review is still in progress; no new threads have appeared. CI is into the sharded coverage matrix again.
Assistant
Waiting another interval for the second Codex pass and the coverage rerun.
Assistant
No new local output; the branch is pushed and I’m waiting on GitHub-side results.
Assistant
I’ll poll after this sleep completes; the key things left are Codex’s final reaction and the final Coverage check.
Assistant
Still waiting; no action needed until the remote state changes.
Assistant
The wait interval is nearly complete; I’ll poll next.
Assistant
Polling for the second review and CI state now.
Assistant
No new Codex findings yet, and the coverage rerun is partially through with most shard jobs passing. I’m continuing to wait for the remaining shards and the final review signal.
Assistant
Waiting on the remaining remote checks and Codex review completion.
Assistant
Still waiting; the branch is already updated and the old review threads are resolved.
Assistant
I’ll poll when this timer completes; expected remaining work is just remote validation.
Assistant
Still in the wait interval.
Assistant
Polling again for the final review reaction and CI.
Assistant
Codex’s second pass found one doc-only issue: the CI spec still showed the old single --file glob pattern. I’m updating that snippet to match the workflow’s repeated-flag pattern.
Assistant
I’m editing the spec snippet so the documented final Coverage job uses if: always(), the shard guard, and repeated merge arguments just like the workflow.
Assistant
The doc snippet now uses repeated --file. I’m checking the diff and then I’ll format, commit, push, reply, and retrigger review again.
Assistant
I noticed the doc snippet was still missing the workflow’s explicit “no artifacts” guard. I’m adding that for parity before committing.
Assistant
The doc snippet now mirrors the workflow behavior. I’m running the formatter gate again before committing this doc fix.
Assistant
The formatter gate passed. I’m checking the worktree, then committing the doc-only review fix.
Assistant
Only the intended spec file changed. I’m staging and committing it.
Assistant
The doc fix is staged. I’m committing it with the required trailer.
Assistant
The doc fix commit is ready. I’m pushing it to PR #729.
Assistant
The doc fix is pushed. I’m replying to the new Codex thread, resolving it, and starting another review pass on the latest commit.
Assistant
The new Codex thread has a reply. I’m resolving it now.
Assistant
The doc thread is resolved. I’m triggering Codex review again on the latest commit.
Assistant
A fresh Codex review is posted for 9aeefdd52. I’m waiting for its reaction and the new CI run.
Assistant
Waiting for the latest review trigger to be picked up.
Assistant
Polling the latest review trigger now.
Assistant
Codex picked up the latest review. All known threads are resolved, and the newest CI run has started.
Assistant
Waiting for the latest Codex review result and CI progression.
Assistant
Still waiting; no local changes are pending.
Assistant
I’ll poll GitHub again after this wait interval; the latest trigger is still under review.
Assistant
Continuing the wait.
Assistant
Polling latest review and CI state.
Assistant
Latest review is still in progress, with no new threads. CI is through clippy and early gates and is running the shard matrix again.
Assistant
Waiting for the latest review and coverage matrix to finish.
Assistant
No new local output; still waiting on GitHub.
Assistant
I’ll poll once this wait interval completes.
Assistant
Still waiting.
Assistant
The wait is almost done; next I’ll check for new Codex review output and final Coverage status.
Assistant
Polling again.
Assistant
Still no new Codex findings or approval; the latest review trigger remains at eyes. CI is mostly green and still waiting on the slower coverage/feature jobs.
Assistant
Waiting another interval for the final remote state.
Assistant
No local work is pending; this is just waiting on remote review and CI.
Assistant
I’ll poll again after this timer finishes.
Assistant
Still in the wait interval.
Assistant
The timer is almost done; next poll will show whether Coverage passed on the corrected workflow.
Assistant
Polling now.
Assistant
The latest CI run has all coverage shards passing and the final Coverage job is now running. The latest Codex trigger no longer showed the eyes reaction in the reactions endpoint, but there is not yet a new review record, so I’m going to poll again before treating it as complete.
Assistant
Codex has completed the latest review with no major issues on 9aeefdd52b. I’m waiting on the last CI jobs now, especially the final Coverage job.
Assistant
Codex review is clean; the remaining wait is CI only.
Assistant
Still waiting for the final CI statuses.
Assistant
Polling the final checks now.
Assistant
The corrected final Coverage job passed, and Codecov is green. Two overall CI checks are still pending: Feature Flag Check and Release Verification.
Assistant
Waiting for the final two CI statuses.
Assistant
No local action needed; Release Verification is the last slow remote gate.
Assistant
I’ll poll when this wait completes.
Assistant
Polling final CI again.
Assistant
Everything except Release Verification is green; Feature Flag Check has passed too. I’m waiting on the final release gate.
Assistant
Waiting on Release Verification.
Assistant
Still waiting for the last remote check.
Assistant
No change locally; Release Verification is the only pending item.
Assistant
I’ll poll again once this interval completes.
Assistant
Polling Release Verification now.
Assistant
Release Verification is still pending; every other check, including the new sharded Coverage job and Codecov, is passing. I’ll keep waiting for that final gate rather than overstating the PR as fully green.
Assistant
Waiting on Release Verification.
Assistant
No change yet; still waiting on the last remote check.
Assistant
Release Verification remains the only pending item from the last poll.
Assistant
Still waiting.
Assistant
Continuing the wait for the final check.
Assistant
I’ll poll after this timer completes.
Assistant
Polling Release Verification again.
Assistant
Implemented, committed, pushed, and opened the PR:
Run cargo xfmt before every commit and before every push, even when cargo fmt was already run. cargo xfmt is the workspace formatter gate because it also runs leptosfmt, dx fmt, and nightly rustfmt settings; using plain cargo fmt alone is insufficient and must not be treated as formatted.
After user approval, run cargo xci --profile fast (alias: cargo xci-fast) locally and fix any failures before pushing anything to GitHub. The fast profile covers the workspace-level regressions a pre-push gate should catch: fmt, clippy, unit, integration, adapter, spec-compile-snippets, error-variant-coverage, mutual-exclusion, snapshot-count, and a native-only coverage check (coverage-native) that enforces the thresholds of the crates whose CI coverage is native-only (the agnostic library crates + xtask) — so ars-components-style coverage regressions surface before push, not on CI. The native coverage check adds an instrumented rebuild, so the fast profile runs in roughly 10–15 minutes. Reserve full cargo xci (~25 minutes, all 20 gates including the wasm coverage + CRAP gate and the feature-matrix groups) for after substantial refactors that may have shifted feature-flag interactions. For small follow-up changes, run the focused tests and checks that cover the edited code instead. To run only the coverage check, use cargo xcov (native-only) or cargo xcov --full (mirrors CI; needs the wasm toolchain + clang-22).
After cargo xci-fast passes, commit and push a PR targeting main. The PR body MUST include an auto-close keyword for the issue being delivered, for example Closes #20 or Fixes #20, so GitHub closes the issue automatically when the PR merges.
If the PR creates or modifies any .snap insta fixtures, attach the snapshot-reviewed label after opening or updating it (gh pr edit <num> --add-label "snapshot-reviewed"). This signals to reviewers that the snapshot output was inspected and is intentional. Re-apply the label whenever you push a commit that touches .snap files; the workflow assumes the label reflects the latest snapshot state.
MANDATORY: Invoke the waiting-for-codex-review skill (.agents/skills/waiting-for-codex-review/SKILL.md) immediately after the first push that creates the PR, and re-invoke it after every subsequent push to the PR branch. The skill posts the initial @codex review trigger, polls Codex's 👀 → (👍 | ∅ + threads) reaction lifecycle, addresses any review threads with the same rigor as post-implementation-audit (TDD + no coverage regression), replies inline, resolves threads, and re-comments @codex review to start the next pass — looping until Codex leaves 👍. Skipping this step leaves Codex findings unaddressed and silently widens the gap between merged code and the spec; the merge gate is 👍 from Codex plus green CI, not green CI alone.
Only after CI passes, Codex has left 👍, and the PR is merged, close the issue.
Never close a GitHub issue without a merged PR that passes CI and a 👍 from Codex. Never commit or push without explicit user approval. Keep the issue, PR, and Project board status aligned with the actual work state at every step.
Default delivery rules:
Follow TDD: tests first, implementation second, verification last.
Keep task scope aligned with the issue. If the issue is too large or ambiguous, stop and split or clarify rather than freelancing a bigger change.
Prefer tasks sized 1, 2, 3, or 5 points. 8 is exceptional. 13 must be decomposed before implementation.
Preserve the crate and dependency layering defined by the architecture and implementation plan.
Do not add a new dependency crate without explicit user approval first. If a task appears to need a new crate, stop, explain why, and get approval before editing any Cargo.toml.
When a task is complete, verify the exact tests and checks named by the issue before considering it done.
Adapter-level component implementation MUST follow docs/implementation/adapter-component-delivery.md precisely. Before planning or implementing any adapter-level component task — for any component in crates/ars-leptos or crates/ars-dioxus — agents MUST fully read docs/implementation/adapter-component-delivery.md and every workflow/checklist file it links under docs/implementation/adapter-components/. The checklist below is a reminder of required deliverables, not a substitute for reading the full workflow document set. Every adapter task must land all of the following in the same PR, with no deferral to follow-up issues:
Adapter crate code (crates/ars-{leptos,dioxus}/src/<category>/<component>/) with module wiring and prelude re-exports — minimize clone() calls by parking per-instance values shared across closures in StoredValue<T> (Leptos) or CopyValue<T> (Dioxus) instead of cloning into each capture, per "Avoid Repeated Closure Clones" in docs/implementation/adapter-components/03-framework-rules.md;
Adapter-level unit + SSR tests in crates/ars-{leptos,dioxus}/tests/<component>.rs;
Adapter-level wasm browser tests in crates/ars-{leptos,dioxus}/tests/<component>_wasm.rs for any interactive behavior (focus, keyboard nav, pointer events, typeahead, controlled-signal sync, observers, portal, scroll, cleanup);
Counterpart-driven UX review before code — use the browser to inspect the live docs/examples for the strongest counterpart, starting with React Aria / React Spectrum when available, and record the supported, unsupported, and intentionally different UX axes before choosing the adapter/tests/widgets shape;
Widgets examples in all six widgets crates (examples/widgets-{leptos,dioxus}, widgets-{leptos,dioxus}-css, widgets-{leptos,dioxus}-tailwind) under the matching Rust category module, such as src/categories/data_display.rs for spec category data-display and src/categories/date_time.rs for date-time — replacing any "Coming soon" placeholder text with a real interactive demo that visually demonstrates every supported counterpart feature and component state;
E2E fixtures in crates/ars-e2e/fixtures/{leptos,dioxus}/src/categories/<category>.rs for existing flat category fixtures, or in src/categories/<category>/<component>.rs with src/categories/<category>/mod.rs when the PR also migrates that category to a directory-backed module imported by categories/mod.rs; add an E2E harness module at crates/ars-e2e/src/<category>/<component>.rs covering axe-core, keyboard, pointer, adapter-parity, and computed visual assertions for supported counterpart UX states (unless the component is purely static and adapter tests already prove that — state the reason in the PR body);
xtask e2e <category> subcommand (in xtask/src/e2e.rs, xtask/src/main.rs, and crates/ars-e2e/src/main.rs) when this is the first E2E-covered component in a new category;
Spec synchronization for any drift surfaced by the implementation, with the amendment landed in the same PR (see "Spec Synchronization During Implementation");
Validation gates: cargo xtask lint adapter-parity runs without SKIP for the component; cargo xci-fast passes; post-implementation-audit skill ran all three phases with every finding fixed in this PR.
Skipping any of these is a workflow violation. The adapter-component-delivery.md entry point and linked docs/implementation/adapter-components/ workflow files are the single source of truth for what "adapter task complete" means.
Code Quality Standards
Document all public items. Every public struct, enum, trait, function, constant, type alias, method, field, and variant must have a /// doc comment. Every lib.rs must have a //! crate-level doc comment. The workspace enforces missing_docs linting — undocumented public items are build failures.
Zero warnings policy. All code must compile with zero warnings under the workspace's configured clippy and rustc lints. Fix the root cause instead of suppressing. When suppression is genuinely needed, use #[expect(lint, reason = "...")] — never #[allow(...)].
Derive documentation from the spec. Doc comments should describe the purpose and semantics of the item as defined in the corresponding spec/ files, not just restate the type signature.
Use #[inline] selectively, not mechanically. Do not add Clippy's missing_inline_in_public_items lint at the workspace level, and do not treat public visibility alone as a reason to mark an item #[inline]. Use #[inline] for thin cross-crate wrappers, trivial accessors, and hot-path no-op shims where the call overhead is plausibly meaningful. Avoid blanket #[inline] on all public APIs — it increases code size, adds compile-time cost, and turns #[inline] into noise instead of a deliberate performance signal.
Use directory-backed modules with mod.rs when a module owns children. This repo standardizes on the older filesystem layout for nested modules. If module foo has child modules, the parent must live at foo/mod.rs, not foo.rs. Do not mix foo.rs with a sibling foo/ directory. When a refactor adds child modules under an existing flat file, move the parent into foo/mod.rs in the same change. Do not leave empty leftover module directories behind.
API Design Standards
Design for the pit of success. Public APIs should make the most natural, shortest path also be the path that is correct, accessible, localizable, type-safe, and performant. Prefer ergonomic constructors and defaults that preserve the spec's strongest guarantees instead of making users opt into correctness after choosing a convenient API.
Name escape hatches explicitly. When a component needs a lower-level, static, non-i18n, or otherwise less complete path, keep it available but make the tradeoff visible in the API name or type. The blessed path should remain the simplest call site, while escape hatches should read as deliberate choices.
Keep semantic data separate from rendered views. Rich framework views are useful for customization, but components still need semantic sources for accessible names, localized text, announcements, ids, and state-machine wiring. Do not rely on arbitrary rendered view trees as the only source of user-facing semantics.
Code Coverage
The workspace uses cargo-llvm-cov for code coverage with per-crate threshold enforcement. CI runs coverage on every PR (see .github/workflows/ci.yml).
Local coverage commands:
bash
# Fast native-only coverage gate — instruments + checks only the crates whose
# CI coverage is native-only (agnostic library crates + xtask). No wasm/clang
# toolchain needed; this is what the `fast` pre-push profile runs.
cargo xcov
# Full native+wasm coverage gate, mirroring CI (needs the wasm toolchain + clang-22)
cargo xcov --full
# Per-crate coverage with inline annotated source (most useful during development)
cargo llvm-cov test -p ars-interactions --text -- hover
# Per-crate summary only
cargo llvm-cov test -p ars-interactions -- hover
# Native-only workspace coverage (host target; excludes wasm-only crates)
cargo llvm-cov --workspace \
--exclude ars-leptos --exclude ars-dioxus \
--exclude ars-test-harness-leptos --exclude ars-test-harness-dioxus \
--exclude ars-derive --exclude xtask \
--lcov --output-path lcov.info
# Check all crates against spec-defined thresholds (run after a *merged* lcov)
cargo xtask coverage check-all --file lcov.info
The --text flag produces line-by-line annotated source showing hit counts and ^0 markers on uncovered branches — use this to identify gaps after writing tests. Uncovered no-op callback closures in tests (e.g., |_| {}) are expected and not a gap.
The local recipe above excludes the adapter and adapter-test-harness crates because their target_arch = "wasm32" / feature = "web" code paths can't be measured via host-target cargo llvm-cov. CI runs an additional wasm-coverage pipeline on nightly (cargo xtask ci coverage) that uses wasm-bindgen-test's experimental coverage recipe with LLVM 22 / clang-22 to emit lcov for ars-leptos (csr), ars-dioxus (web), ars-dom (web), ars-i18n (web-intl), and the adapter test harnesses, then merges with the native lcov via cargo xtask coverage merge. The per-crate thresholds in xtask::coverage::default_thresholds() are enforced against the merged file — including adapter targets (ars-leptos 74/55, ars-dioxus 77/70, ars-test-harness-leptos 60/0, ars-test-harness-dioxus 60/0). ars-derive (proc-macro, runs in compiler) is exercised via crates/ars-core/tests/derive_contract.rs and is unmeasured. xtask has its own enforced threshold (30/35) and is measured. See spec/testing/14-ci.md §2 for the full pipeline.
CRAP Gate (complexity vs. coverage)
Coverage tells you which lines run; mutation testing tells you whether tests would notice misbehaviour. The CRAP gate (cargo-crap) tells you which functions are risky to change — high cyclomatic complexity combined with low coverage. The CRAP score is complexity² · (1 − coverage)³ + complexity.
Why regression mode, not an absolute threshold. At 100% coverage CRAP == cyclomatic complexity, so an absolute --fail-above threshold rejects every large match no matter how well it is tested. This workspace is built on state machines: each stateful component's Machine::transition is intrinsically a wide match (state, event) (complexity 30–80) and is exhaustively tested. An absolute gate would fight that architecture and reject more components as the catalog grows. The gate therefore runs in regression mode.
Blessed entrypoints:cargo xcrap (local human-readable report, never fails), cargo xcrap --update-baseline (regenerate the baseline), and cargo xtask ci crap (the CI gate). The gate is the last step of the full cargo xci pipeline, running immediately after coverage and reusing its merged lcov.info (no recompile). It is not in the fast profile: the fast profile runs only the native-only coverage-native check, which does not produce the merged lcov.info the CRAP gate compares against.
Policy:cargo crap --path . --lcov lcov.info --baseline .crap-baseline.json --fail-regression --min 30 --exclude 'target/**' --exclude 'examples/**' --exclude 'xtask/**' --exclude 'crates/ars-e2e/**' --exclude 'crates/ars-derive/**'. The gate scopes to the shipped component library — tooling (xtask), the browser E2E harness (ars-e2e), the proc-macro crate, demos, and build output are excluded (they are not shipped surface, and several run uninstrumented-as-tooling on CI → 0% → spurious CRAP). The gate fails only when a function at or above CRAP 30 regresses (more complexity or less coverage) versus the committed baseline. New functions are tolerated — the per-crate coverage thresholds already ensure new code is tested — and sub-threshold churn on simple functions is ignored. Net: the coverage gate guarantees new code is tested; the CRAP gate guarantees shipped code does not rot.
--path ., not --workspace. cargo-crap's regression key is (file, function, line), and --workspace records machine-absolute file paths (/Users/… locally, /home/runner/… on CI). A baseline committed with absolute paths never matches on CI, silently turning the gate into a no-op. --path . emits repo-relative paths (./crates/…) that match on any checkout; coverage still associates correctly because cargo-crap canonicalizes paths when reading the lcov. --exclude is honored under --path (it is a no-op under --workspace), so target/** and the unmeasured crates/ars-derive/** are skipped there. Because the key includes the line number, a baseline only matches non-uniquely-named functions (e.g. Machine::transition) while their line numbers are stable; regenerate the baseline when a tracked file's lines shift materially.
Baseline:.crap-baseline.json at the repo root is committed and complete (every function, no --min, so a function crossing the threshold is still caught). Regenerate it with cargo xcrap --update-baseline from CI's merged lcov.info (download the coverage-lcov artifact) whenever a deliberate complexity increase lands; commit the new baseline in that PR — a conscious "I accept this" checkpoint. cargo-crap's --epsilon (default 0.01) absorbs coverage float jitter. If the baseline is missing, the gate bootstraps it and passes with a notice.
Pinned version: cargo-crap is pinned to an exact version in xtask::crap::CARGO_CRAP_VERSION and .github/workflows/ci.yml (same convention as cargo-mutants). To bump, update both. Install locally with cargo install cargo-crap --locked --version <version> (or cargo binstall cargo-crap).
Scope / escape hatch: the exclude-glob list lives in xtask/src/crap.rs (EXCLUDE_GLOBS), each entry justified by a comment, and scopes the gate to the shipped component library. Because the gate runs under --path ., cargo-crap's --exclude is honored, so build output (target/**), demos (examples/**), the task runner (xtask/**), the browser E2E harness (crates/ars-e2e/**), and the proc-macro crate (crates/ars-derive/**) are skipped at walk time. The last three are not shipped library code and run uninstrumented-as-tooling on CI (0% coverage → spurious CRAP), so gating them is meaningless. Prefer fixing or refactoring over adding entries. (Note: the per-crate coverage gate still measures xtask at its own loose 30/35 threshold — that is separate from CRAP.)
Mutation Testing
Coverage tells you which lines run. Mutation testing tells you whether the tests would notice if those lines silently misbehaved. The workspace uses cargo-mutants for this — a cargo extension binary, not a workspace dependency.
Local commands (state-machine modules are the most rewarding targets):
Prefer cargo xmutants over bare cargo mutants — it applies the same
per-crate --features profile as Nightly CI (for example
ars-components/i18n) so snapshot and i18n-gated tests match CI.
bash
# Run on a single component machine (~6 min for popover)
cargo xmutants -p ars-components -f crates/ars-components/src/overlay/popover/mod.rs
# Just list what would be mutated, without running tests (fast)
cargo xmutants -p ars-components -f crates/ars-components/src/overlay/popover/mod.rs --list
# Whole crate (slow — only if you really mean it)
cargo xmutants -p ars-components
Agnostic component implementation gate: whenever an agent implements a new framework-agnostic component, or materially changes an existing one, the delivery must include:
spec-conformance tests for the component's anatomy/public contract, including its Part enum and required API/attribute surface;
the full test breadth the component warrants (unit, snapshot, proptest) with strong line/branch coverage.
Mutation testing is NOT a pre-PR requisite for agnostic component work. Do not run a targeted cargo xmutants pass as a delivery/audit gate, and do not block a PR on a clean local mutation run. Surviving (MISSED) mutants are surfaced by the Nightly CI mutation-testing job (see below); triage them — add tests for real gaps, or add a justified line-agnostic .cargo/mutants.toml exclude for true equivalent mutations — in a dedicated follow-up when Nightly reports them, not during initial component delivery. (Running a local mutation pass voluntarily is fine, but it is never required and never blocks delivery or review.)
Reading the output: Results land in mutants.out/mutants.out/ (gitignored). The two files that matter:
caught.txt — mutations that broke at least one test ✅
missed.txt — mutations that survived all tests ❌ — each one is either a real test gap to fill or an "equivalent mutation" that needs a [[skip]] entry in mutants.toml with a justification
CI integration: Nightly only. .github/workflows/nightly.yml has a mutation-testing job with a 21-entry matrix that runs cargo mutants -p <package> on every framework-agnostic crate, using --shard k/n to spread larger crates across parallel runners. Shard indices are 0-based (k runs from 0 to n-1); k == n is invalid and will fail the job. When adding shards, always start at 0/n and end at (n-1)/n.
ars-components (≈ 1,630 mutants today, planned to grow as the spec adds the remaining ~97 components): sharded 12-way → ≈ 135 mutants per runner today, ≈ 850 per runner at the ~10,000-mutant endpoint. Sized for the full spec catalog up front so we don't re-shard every few months as components land.
ars-a11y, ars-forms, ars-interactions: one runner each (under 600 mutants apiece).
Adding a new state machine inside an existing crate requires no CI changes — its mutations land in whichever shard the cargo-mutants partitioner places them. The shard counts are sized so the slowest runner stays well under 30 minutes today and under ~50 minutes at the planned endpoint; re-balance only when a crate outgrows that budget (visible on the nightly dashboard as one shard pulling away from the others).
All matrix jobs run with fail-fast: false so failures on one module don't mask data on another. Each job uploads its mutants.out/ as a workflow artifact (always, even on success — surviving "missed" entries on a passing run still reveal test-quality work). The job fails if any mutation survives, so a missed mutation forces a deliberate triage decision (fix the test, or document the equivalence with a [[skip]] entry in mutants.toml).
Excluded crates (mutation testing's signal degrades wherever determinism does): adapter glue (ars-leptos, ars-dioxus), DOM/FFI (ars-dom), ICU/FFI (ars-i18n), test infrastructure (ars-test-harness*), and the proc-macro crate (ars-derive, runs in the compiler). Adding a brand-new crate that is a good mutation target requires one new matrix entry; run a local scout first (cargo mutants -p <crate> --list to size, then a real run) so we know the right shard count before the nightly fires.
Bumping the pinned version. Both the local install command above and .github/workflows/nightly.yml pin cargo-mutants to an exact version (currently 27.0.0) — same convention as wasm-pack in the a11y-audit job. Pinning is deliberate: cargo-mutants ships new mutators in releases, and an unpinned install would silently change the mutation set without any code change, surfacing as phantom CI failures on a green-source repo. To bump, open a PR that (1) updates the version string in CLAUDE.md and nightly.yml, (2) runs the popover scout locally with the new version (cargo mutants -p ars-components -f crates/ars-components/src/overlay/popover/mod.rs) to confirm the mutation count is in the same ballpark, and (3) triages any new "missed" entries the new mutators surface — they are usually genuine test-quality gaps newly visible to the tool.
Property Testing (proptest)
State-machine invariants are exercised by proptest under crates/<crate>/tests/proptest_state_machines/ (see ars-components). Default proptest behaviour drops *.proptest-regressions seed files alongside test sources — instead, every proptest! block in this workspace pulls a shared Config from tests/proptest_state_machines/common.rs that:
Reads PROPTEST_CASES from the environment (1,000 default; 10,000 in the nightly extended-proptest job).
Sets failure_persistence to FileFailurePersistence::Direct("proptest-regressions/state-machines.txt"), so all persisted seeds for the test binary live in one file at the crate root: crates/<crate>/proptest-regressions/state-machines.txt. The directory is committed (per proptest's own recommendation in the file header) so every developer's runs benefit from previously-shrunk failures.
When a new crate adopts proptest for state-machine tests, copy the same common.rs helper and reference it via #![proptest_config(super::common::proptest_config())] inside every proptest! block. Don't let proptest fall back to its WithSource default — that scatters seed files across the source tree.
Adapter Prelude Convention
Both ars-leptos and ars-dioxus expose a prelude module targeting end users — application developers who consume the ready-made components. use ars_leptos::prelude::* (or use ars_dioxus::prelude::*) should give them everything they need.
The prelude contains only user-facing items:
Component modules — as components land, their public module paths (e.g., button, dialog) are re-exported so users can write button::Props, etc.
User-facing traits — traits end users call on component outputs (e.g., Translate from ars-i18n). Re-export the trait so consumers don't need a direct dependency on the subsystem crate.
Configuration types — types that appear in component props or configure behaviour (e.g., Locale, Direction, Orientation, Selection).
The prelude does not include implementation details consumed only by component authors inside the adapter crate: core engine types (Machine, Service, ConnectApi, AttrMap), accessibility primitives (AriaRole, AriaAttribute), interaction helpers (merge_attrs), or adapter hooks (use_machine, UseMachineReturn). Those remain accessible via their normal crate paths for advanced users building custom machines.
Both adapter preludes must stay symmetric: same items, same structure. When adding a new re-export to one adapter's prelude, add it to the other as well in the same PR.
Adapter Testing Convention
Adapter-level component tests should default to the framework-specific test harness crate:
Leptos adapter tests should prefer ars-test-harness-leptos.
Dioxus adapter tests should prefer ars-test-harness-dioxus.
Shared ars-test-harness helpers should be used where relevant for viewport, layout, clipboard, drag/drop, timing, and other DOM test setup instead of bespoke per-test browser scaffolding.
When a component spec requires interaction, focus, overlay positioning, clipboard, file upload, drag/drop, or similar browser behavior, the task's tests should exercise that behavior through the adapter harness entrypoints and shared core harness helpers unless there is a concrete technical reason not to.
Spec Synchronization During Implementation
The specification is the authoritative contract. It took weeks of deliberate design and MUST be followed.
Spec-first implementation rule
Before implementing any public type, trait, function, or method:
Read the spec section first. Find the relevant code example in spec/. Use spec-tool toc <file> and grep to locate it.
Match the spec exactly. If the spec defines struct ComponentIds { base: String } with methods from_id(), id(), part(), item(), item_part() — implement exactly that. Do not invent alternative field names, method names, or signatures.
Cross-check after implementation. Before presenting code for review, diff every public item against the spec's code examples. Every struct field, every method name, every parameter must match.
If you must deviate, there must be a concrete technical reason (e.g., the spec's API cannot compile, or a dependency doesn't expose the needed type). Document the reason in a code comment and flag it to the user explicitly.
Inventing alternative APIs that "seem equivalent" is never acceptable — it silently invalidates the spec's design decisions and all downstream code that depends on those APIs.
Spec/code mismatch resolution
If code and spec disagree, resolve the mismatch in the same task or PR.
Shared conceptual changes belong in shared or foundation spec files, not only in adapter code.
Adapter-specific findings must be reflected back into spec/foundation/08-adapter-leptos.md and/or spec/foundation/09-adapter-dioxus.md when relevant.
Do not leave spec drift behind as follow-up cleanup.
Spec Structure
The specification lives in spec/ with this layout:
spec/manifest.toml — START HERE — central index of all components and their dependencies
spec/components/{category}/ — one file per component, organized by category
spec/testing/ — test specs split by domain
Component Categories
input/ — checkbox, text-field, slider, number-input, etc.
selection/ — select, combobox, listbox, menu, tags-input, etc.
overlay/ — dialog, popover, tooltip, toast, presence, etc.
navigation/ — accordion, tabs, tree-view, pagination, steps, etc.
date-time/ — date-field, time-field, calendar, date-picker, etc.
data-display/ — table, avatar, progress, meter, badge, etc.
layout/ — splitter, scroll-area, carousel, portal, toolbar, etc.
specialized/ — color-picker, file-upload, signature-pad, qr-code, etc.
utility/ — button, toggle, focus-scope, visually-hidden, separator, etc.
Working with the Spec
When reading large files, run wc -l first to check the line count. If the file is over 2,000
lines, use the offset and limit parameters on the Read tool to read in chunks rather than
attempting to read the entire file at once.
Using xtask spec (preferred)
Use cargo xtask spec to resolve file sets instead of manually parsing manifest.toml:
bash
# Quick metadata lookup:
cargo xtask spec info <component>
# Find all
</INSTRUCTIONS>
<proposed_plan>
Sharded Coverage CI Plan
Summary
Yes, this is feasible. The repo already has the two load-bearing pieces: cargo xtask coverage wasm can generate one wasm LCOV per package, and cargo xtask coverage merge already unions LCOV line/branch hits without double-counting. For maximum fanout, shard native coverage with cargo-nextest partitions and run each wasm coverage package as its own matrix job, then merge all artifacts in a final Coverage job that preserves threshold checks, CRAP, Codecov upload, and the existing merged lcov.info artifact.
cargo xtask coverage check-all --file /tmp/merged.lcov on a known-good merged artifact when available.
Validate in CI on the PR:
each native shard uploads one LCOV artifact;
each wasm shard uploads one LCOV artifact;
final Coverage job downloads 14 LCOV files, merges them, passes thresholds, runs CRAP against merged lcov.info, and uploads to Codecov.
Assumptions
Use 8 native partitions initially; adjust after one or two PR runs if one shard dominates.
Keep the final job name Coverage to reduce branch-protection churn.
Do not introduce new third-party actions or Rust dependencies.
Keep cargo xci --profile fast unchanged; this is CI full-coverage sharding, not a change to the local fast pre-push gate.
</proposed_plan>
PLEASE IMPLEMENT THIS PLAN:
Sharded Coverage CI Plan
Summary
Yes, this is feasible. The repo already has the two load-bearing pieces: cargo xtask coverage wasm can generate one wasm LCOV per package, and cargo xtask coverage merge already unions LCOV line/branch hits without double-counting. For maximum fanout, shard native coverage with cargo-nextest partitions and run each wasm coverage package as its own matrix job, then merge all artifacts in a final Coverage job that preserves threshold checks, CRAP, Codecov upload, and the existing merged lcov.info artifact.
I did not run the real full sharded coverage workload locally; that is intentionally CI-scale and now split across GitHub Actions. No commit or push was made.