AGENTS.md instructions for /Users/ericson/.codex/worktrees/d5d2/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.
Present the final result for user review before any commit.
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. Every adapter task — for any component in crates/ars-leptos or crates/ars-dioxus — 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 the "Avoid unnecessary clones" section in docs/implementation/adapter-component-delivery.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);
Widgets examples in all six widgets crates (examples/widgets-{leptos,dioxus}, widgets-{leptos,dioxus}-css, widgets-{leptos,dioxus}-tailwind) under the matching src/categories/<category>.rs — replacing any "Coming soon" placeholder text with a real interactive demo;
E2E fixtures in crates/ars-e2e/fixtures/{leptos,dioxus}/src/main.rs and an E2E harness module at covering axe-core, keyboard, pointer, and adapter-parity checks (unless the component is purely static and adapter tests already prove that — state the reason in the PR body);
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 , so a function crossing the threshold is still caught). Regenerate it with from CI's merged (download the artifact) whenever a complexity increase lands; commit the new baseline in that PR — a conscious "I accept this" checkpoint. cargo-crap's (default 0.01) absorbs coverage float jitter. If the baseline is missing, the gate bootstraps it and passes with a notice.
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 components using a shared type:
cargo xtask spec reverse <shared-type>
# See a file's heading structure (with line numbers):
cargo xtask spec toc <file>
# Validate frontmatter matches manifest.toml:
cargo xtask spec validate
# Search spec content by keyword/regex (with optional filters):
cargo xtask spec search <query> [--category <cat>] [--section <sec>] [--tier <tier>]
# Get a compact component summary (states, events, props, accessibility):
cargo xtask spec digest <component>
# Get full implementation context (component + all deps concatenated):
cargo xtask spec context <component> [--framework <fw>] [--include-testing]
The xtask also runs as an MCP server (cargo xtask mcp) exposing all spec tools for LLM agents.
Reading a component (manual fallback)
Read spec/manifest.toml to find the component's path and dependencies
Read the component file (has YAML frontmatter listing its foundation/shared deps)
Only load the foundation files listed in foundation_deps — not all of them
Framework and library specs — MANDATORY skill loading
When reading or editing these specification files, you MUST load the corresponding skill BEFORE doing any work. The skills contain verified, version-accurate API documentation that the spec code examples depend on. Claude's training data is wrong for these libraries — do not trust it.
We recently completed all agnostic components of the selection category. Now I wanna do a full audit of them, to be able to close the Epic #221 on Github. In this audit we need to make sure that everything related to this category in the spec was properly implemented, on all selection agnostic components. Including auditing their respective proptests and spec conformance tests, and while you're in those two, take your time to properly separate the proptests and the spec conformance tests into modules for each component, as currently we have a bloat of tests for all selection components together in the same file.
Assistant
I’ll ground this in the current repo and the live epic/task state before proposing the audit plan. Because this is category-wide implementation planning, I’m using the planning and brainstorming skills, and I’ll keep this in planning mode rather than editing files.
Assistant
I found prior memory for the selection-core rollout and the recent data-display audit pattern. I’m going to verify current repo layout and the live Epic #221 instead of assuming the memory still matches this checkout.
Assistant
Current checkout is detached at HEAD, and selection still has the two category-level test blobs that need splitting: tests/spec_conformance/selection.rs and tests/proptest_state_machines/selection.rs. Next I’m checking the epic body and the spec manifest so the audit plan covers the exact component set.
Assistant
Epic #221 is still open and its acceptance criteria match your requested audit: all 9 agnostic selection cores, spec alignment, docs, ARIA/ConnectApi, collection behavior, selection patterns, and tests. I’m now reading the category test blobs and the selection source/spec index enough to make the split and audit plan decision-complete.
Assistant
The current split pattern is already established in data-display, input, navigation, overlay, and utility. The selection plan can reuse that shape: selection/mod.rs as the category aggregator, one module per component, and shared helpers only where they are actually shared.
Assistant
The audit skill’s structure maps well to this request: first spec/implementation drift, then two “anything else missing?” passes, then coverage/test breadth. I’ll bake that into the plan, with the selection-specific test split as an explicit implementation phase rather than incidental cleanup.
Assistant
There’s no repo diff from the exploration; the cargo xtask runs built/read metadata but did not modify tracked files. I’m doing one more live GitHub pass for issue/PR status so the plan includes how to prove the epic is actually closable, not only locally tidy.
Assistant
<proposed_plan>
Selection Agnostic Epic Audit Plan
Summary
Audit Epic #221 end-to-end for the 9 agnostic selection components: Autocomplete, Combobox, ContextMenu, Listbox, Menu, MenuBar, SegmentGroup, Select, and TagsInput.
The work stays in agnostic scope: crates/ars-components, spec/components/selection, spec/shared/selection-patterns.md, spec/foundation/06-collections.md, tests, and an audit record. No Leptos/Dioxus adapter implementation is included.
Key Changes
Split crates/ars-components/tests/spec_conformance/selection.rs into crates/ars-components/tests/spec_conformance/selection/mod.rs plus one module per component.
Split crates/ars-components/tests/proptest_state_machines/selection.rs into crates/ars-components/tests/proptest_state_machines/selection/mod.rs plus one module per component.
Add a small selection/common.rs helper only for shared proptest fixtures like stable keys, disabled-key strategies, and shared collections.
Add docs/implementation/selection-category-audit.md with a component-by-component disposition table covering implementation surface, spec alignment, and preserved or added tests.
Preserve existing ignored/non-ignored proptest behavior unless the audit finds a concrete reason to change it.
Audit Work
For each component, compare spec and implementation across public Props, State, Event, Context, Messages, Effect, Part, Api, Machine, ConnectApi, attrs, callbacks, and documented defaults.
Check category/shared contracts:
aria-activedescendant validity
collection navigation and typeahead
disabled behavior
controlled vs uncontrolled selection
replace/toggle selection behavior
range/select-all semantics where applicable
form-hidden-input semantics
Run the mandatory post-implementation-audit flow after fixes: spec drift, at least two “anything else missing?” passes, and test coverage audit.
If drift is found, land the best outcome in the same PR: spec-only, implementation-only, or both, always with tests.
User
PLEASE IMPLEMENT THIS PLAN:
Selection Agnostic Epic Audit Plan
Summary
Audit Epic #221 end-to-end for the 9 agnostic selection components: Autocomplete, Combobox, ContextMenu, Listbox, Menu, MenuBar, SegmentGroup, Select, and TagsInput.
The work stays in agnostic scope: crates/ars-components, spec/components/selection, spec/shared/selection-patterns.md, spec/foundation/06-collections.md, tests, and an audit record. No Leptos/Dioxus adapter implementation is included.
Key Changes
Split crates/ars-components/tests/spec_conformance/selection.rs into crates/ars-components/tests/spec_conformance/selection/mod.rs plus one module per component.
Split crates/ars-components/tests/proptest_state_machines/selection.rs into crates/ars-components/tests/proptest_state_machines/selection/mod.rs plus one module per component.
Add a small selection/common.rs helper only for shared proptest fixtures like stable keys, disabled-key strategies, and shared collections.
Add docs/implementation/selection-category-audit.md with a component-by-component disposition table covering implementation surface, spec alignment, and preserved or added tests.
Preserve existing ignored/non-ignored proptest behavior unless the audit finds a concrete reason to change it.
Audit Work
For each component, compare spec and implementation across public Props, State, Event, Context, Messages, Effect, Part, Api, Machine, ConnectApi, attrs, callbacks, and documented defaults.
Check category/shared contracts:
aria-activedescendant validity
collection navigation and typeahead
disabled behavior
controlled vs uncontrolled selection
replace/toggle selection behavior
range/select-all semantics where applicable
form-hidden-input semantics
Run the mandatory post-implementation-audit flow after fixes: spec drift, at least two “anything else missing?” passes, and test coverage audit.
If drift is found, land the best outcome in the same PR: spec-only, implementation-only, or both, always with tests.
Assistant
I’ll execute the plan now. I’m using the execution, TDD, audit, and verification skills because this is a multi-step repo change with mandatory post-implementation audit and final evidence gates.
Assistant
The plan is sound and matches the repo state I saw earlier. I’ll first get onto a named branch, then make the test split mechanically before doing the drift and coverage audit.
Assistant
This is already an isolated linked worktree, but it’s detached. I’m creating a normal branch in this worktree so the implementation has a stable branch without touching the user’s other checkouts.
Assistant
Branch is codex/selection-agnostic-epic-audit. I’m going to split the two large selection test files into directory-backed component modules, matching the existing category patterns.
Assistant
I’m creating the new selection test directories first, then using apply_patch for tracked file edits so the module split is explicit in the diff.
Assistant
I’m moving the anatomy assertions one-for-one into component modules, keeping the same assertions and shared assert_anatomy convention.
Assistant
The anatomy split is staged in files. Now I’m splitting the property tests: shared key/collection fixtures go into selection/common.rs, while each component owns its event strategy, invariant assertions, and proptest! block.
Assistant
The two category blobs are now split. I’m running the focused structure tests next; any compile errors here should be limited to module visibility/import cleanup from the split.
Assistant
Spec-conformance passed after the split. The proptest target found only split-related import cleanup: one missing Collection trait import and several unused trait imports. I’m fixing those now.
Assistant
The split is compiling and preserving the previous proptest ignore behavior: 2 active selection proptests run, 7 remain ignored. I’m starting the audit pass now by checking component file sizes and public surface/spec landmarks before deciding if any large file needs targeted reads.
Assistant
A few files are over 100KB, so I’m using targeted reads around public surfaces and contract sections instead of dumping them whole. The first pass is checking whether the spec examples still match the shipped public surface.
Assistant
Autocomplete’s public surface matches the current spec landmarks. I’m checking shared selection-pattern requirements now, especially range selection and selection behavior, because that is where category-level drift is most likely to hide.
Assistant
The shared selection pattern is broader than some component specs. I’m checking whether Select and Combobox/Listbox intentionally specialize that contract or whether there’s real drift around Ctrl/Cmd and range selection.
Assistant
The first concrete audit finding is spec drift in Listbox and Select: implementations expose sync/description events, and Listbox exposes range/page navigation events that the component specs do not list. These are established behavior in code, so I’m going to align the specs and broaden the proptest event strategies to cover the missing events.
Assistant
The event drift is broader than two files: several implementations have adapter-sync or interaction events that are real public API but missing from their component specs or proptest strategies. I’m landing spec alignment and extending event generation so the property tests exercise those public event variants.
Assistant
The component specs now list the public event variants the implementations already expose. Next I’m broadening the proptest event strategies component-by-component, without changing the expected active/ignored proptest split.
Assistant
The proptest strategies now include the public sync, collection update, range/page navigation, and controlled-value events. I’m running the focused proptest target to verify the broader strategies still preserve invariants.
Assistant
The broadened active SegmentGroup proptest found a real gap: SetValue(Some(disabled_key)) can put a disabled item into selected state. I’m treating that as an implementation bug and fixing the state-machine sync path.
Assistant
I found a failing input before touching production code, so this is a proper red step. The fix is to sanitize externally synced SegmentGroup values the same way user selection already does: only present, enabled item keys can become selected.
Assistant
The focused SegmentGroup proptest now passes. I’m adding a direct unit regression too, so the disabled controlled sync case is explicit and not only covered through a generated sequence.
Assistant
I’m placing the regression next to the existing SegmentGroup prop-sync tests, since the bug is in SetValue/controlled prop synchronization rather than click selection.
Assistant
The direct regression exposed the exact early-return mistake: invalid controlled values were sanitized, but the no-op check still compared against the old internal value. I’m tightening that check so invalid controlled values sync to controlled None.
Assistant
The full focused proptest target also passed before the early-return correction because the previous active generated run did not hit that exact old-controlled-value case. I’m rerunning both the explicit regression and proptest target after the correction.
Assistant
The SegmentGroup regression and broadened property event generation are green. I’m doing a second drift pass with a small read-only parser over the event enums so I can verify the specs and implementations now agree on event variant names.
Assistant
Event variants now match across all 9 component specs and implementation files. I’m running the same check for Part enums and then I’ll record the audit disposition.
Assistant
The Part pass showed ContextMenu and MenuBar specs declare parts in prose rather than a Rust enum snippet, but the declared part lists match the implementations and the spec-conformance tests cover them. I’m writing the audit record now with the actual findings and dispositions.
Assistant
I’m adding docs/implementation/selection-category-audit.md as the closure artifact for Epic #221, mirroring the existing category-audit style but recording the selection-specific spec drift and proptest split.
Assistant
The audit record is in place. I’m moving into verification now: focused tests first, then spec gates, then coverage-oriented checks.
Assistant
Focused selection test targets are green. I’m running the broader selection/unit, snapshot, and spec gates next.
Assistant
The broader selection unit, snapshot, and spec gates passed. I’m running the coverage audit commands from the plan now; these may take longer because they rebuild with instrumentation.
Assistant
cargo +nightly fmt --check found only import ordering in the new split files. I’m formatting the workspace and then I’ll rerun the fmt check after the coverage commands finish.
Assistant
Formatting has been applied. The two coverage jobs are still running; I’m polling those rather than starting more heavy checks on top of them.
Assistant
The focused cargo llvm-cov run was killed by the OS with SIGKILL while cargo xcov was also running. I’ll let cargo xcov finish, then rerun the focused coverage command without competing instrumentation work.
Assistant
I’m continuing from the completed implementation and audit split. The remaining work is verification: let the native coverage gate finish, rerun formatting and the focused selection checks after rustfmt, then summarize the exact diff and any remaining caveats.
Assistant
The native coverage run has cleared the full nextest execution: 7,678 tests passed with 140 skipped. It is now in the lcov/threshold phase, so I’m waiting for the final coverage verdict before rerunning the focused checks.
Assistant
Coverage passed, including ars-components exactly at the 90% branch threshold. I’m rerunning the formatted focused gates now, then I’ll run the selection llvm-cov text report separately so it doesn’t contend with another instrumented build.
Assistant
The post-format focused structure tests are green: spec conformance has 9 component modules passing, and proptest keeps the intended 2 active / 7 ignored behavior. I’m running the selection unit and snapshot filters once more, then the instrumented coverage text report.
Assistant
Selection unit and snapshot-filtered tests are green after the split. The snapshot command had no new snapshots to review; it matched 482 tests because the selection filter also catches shared selection tests outside the selection category.
Assistant
The instrumented ars-components selection coverage command is compiling under cargo llvm-cov. I’m keeping this one isolated because the earlier parallel coverage attempt was killed by the OS while another coverage job was active.
Assistant
The isolated cargo llvm-cov test -p ars-components --text -- selection:: run completed successfully. I’m doing a final diff/status pass now to catch accidental churn and to make the review summary concrete.
Assistant
The status is scoped to the intended agnostic files: selection implementation/tests/specs plus the audit note. One caveat in git diff --stat: Git does not include untracked split modules until they are added, so I’m listing those explicitly before I wrap up.
Assistant
The only spec drift I found was missing event variants in four selection specs; the implementation was already richer than the examples. Those spec snippets are now aligned with the public event enums, and the broadened proptest strategies include the added events.
Assistant
The split created 22 new files: 10 spec-conformance modules, 11 proptest modules including common.rs, and the audit document. The root test harnesses now point at selection/mod.rs, which keeps the existing public test filter paths.
Assistant
I spotted one wording issue in the new proptest module doc comment: it called the whole selection suite “ignored nightly” even though Autocomplete and SegmentGroup intentionally remain active. I’m correcting that comment only.
Assistant
That was a comment-only cleanup in the new test module root. I’m rerunning the light checks affected by it so the final state is current.
Assistant
The final light rerun is clean: fmt, spec-conformance, and proptest all pass after the comment adjustment. I’m taking one last status snapshot and then I’ll hand over the review summary.
Assistant
Implemented the selection agnostic audit on codex/selection-agnostic-epic-audit.
What changed:
Split selection spec-conformance tests into per-component modules under selection/mod.rs.
Split selection proptests into per-component modules under selection/mod.rs, with shared fixtures in common.rs.
Added the audit record at selection-category-audit.md.
Fixed spec drift in Combobox, Listbox, Menu, and Select event snippets.
Fixed a SegmentGroup controlled-value bug where SetValue(Some(disabled_key)) could accept a disabled value, with a unit regression in mod.rs.
Verification passed:
cargo +nightly fmt --check
cargo test -p ars-components --test spec_conformance -- selection::
cargo test -p ars-components --test proptest_state_machines -- selection::
cargo test -p ars-components --lib -- selection::
cargo insta test -p ars-components --lib -- selection
cargo xtask spec validate
cargo xtask spec compile-snippets
cargo llvm-cov test -p ars-components --text -- selection::
cargo xcov with ars-components at 98.5% lines / 90.0% branches, passing thresholds
I did not stage, commit, push, or run cargo xci --profile fast; per repo workflow that comes after your review/approval.
I reviewed here and staged all files, let's commit and push a PR to github
Assistant
I’ll use the GitHub publish workflow for this: first confirm the staged scope, run the required fast pre-push gate, then commit, push, and open a ready PR targeting main.
Assistant
The staged set matches the audit scope, with one extra staged spec sync in menu-bar.md that is still selection-category work. I’m checking that diff quickly, then I’ll start cargo xci --profile fast before committing/pushing as required.
Assistant
gh is installed and authenticated, and the remote is fogodev/ars-ui. The menu-bar.md staged change is just markdown table width normalization, so I’ll keep it with the reviewed staged set.
Assistant
cargo xci --profile fast is running. Formatting passed and it is currently in the workspace clippy step.
Assistant
Clippy passed. The fast gate has moved into the unit test stage.
Assistant
The unit stage is doing a larger rebuild for the fast profile, so this will take a bit. I’ll keep polling until the gate either completes or produces a concrete failure.
Assistant
The fast gate is still in the unit rebuild, now compiling the workspace crates. No failures yet.
Assistant
Workspace crate compilation has reached the adapter test harnesses in the unit stage. Still no actionable failure.
Assistant
The unit test binaries finished building cleanly. Nextest is starting/running now; I’ll keep watching through the remaining fast-profile gates.
Assistant
Nextest is well into the unit stage, past 7,100 of 8,586 tests in the latest output. Still green.
Assistant
The unit stage is at the tail end: 8,582 of 8,586 tests have passed in the latest output, with only the slower UI test binaries still running.
Assistant
The remaining unit tests are the long-running core/derive UI contract suites. They are marked slow, not failed.
Assistant
The same four UI suites are still running past two minutes. I’m leaving the gate alone and waiting for nextest’s final result.
Assistant
Two of the four slow UI suites have finished and passed. The last two are still running.
Assistant
The main unit nextest run passed: 8,586 passed, 143 skipped. The fast profile is now running the separate ars-i18n unit variants.
Assistant
The ars-i18n variant is still running without new output. I’m polling again.
Assistant
The ars-i18n ICU4X unit variant passed. The fast gate is now compiling/running the web-intl unit variant.
Assistant
The web-intl i18n unit variant is at the end of its nextest run and still passing.
Assistant
Only the ars-i18n translate derive UI test remains in that variant; it is slow but not failed.
Assistant
Unit and integration gates passed. The fast profile is now in the adapter gate and compiling adapter-side tests.
Assistant
Adapter compilation has reached ars-leptos and ars-test-harness-dioxus; still no failures.
Assistant
Adapter and spec snippet gates passed. The fast profile is through 6 of 10 gates and is now checking error variant coverage.
Assistant
Error coverage, mutual exclusion, and snapshot count all passed. The final fast-profile gate is native coverage, which is starting the instrumented nextest run.
Assistant
Native coverage is compiling the instrumented crates now. This is the slowest remaining part of xci-fast.
Assistant
Native coverage is in its nextest run. It is still early in the 7,678-test pass, so I’ll continue polling without touching the branch.
Assistant
cargo xci --profile fast passed all 10 gates, including native coverage. I’m checking that the staged tree is still intact, then I’ll commit with the required Codex co-author trailer and push the branch.
Assistant
There are no unstaged changes after the fast gate. The full reviewed diff remains staged.
Assistant
Committed af418c14 with the co-author trailer. I’m pushing the branch with upstream tracking now, then I’ll open the PR.
Assistant
Push succeeded and the branch is tracking origin/codex/selection-agnostic-epic-audit. I’m opening a ready PR against main with Closes #221 in the body.
Assistant
PR #720 is open and ready for review. Per repo workflow, I’m invoking the Codex-review loop now: post the review trigger, then watch for the reaction/review state and handle anything actionable.
Assistant
The review-loop skill requires an initial top-level @codex review trigger. I’m posting that now, then I’ll poll the PR reactions and unresolved Codex threads.
Assistant
The @codex review trigger is posted. I’m taking the first reaction/thread snapshot now; if Codex has not started yet, I’ll wait and poll again.
Assistant
Codex has added the eyes reaction, so the review is actively running. I’ll poll again after a short wait for the terminal review state.
Assistant
Waiting two minutes between polls per the review-loop cadence.
Assistant
Still waiting for the scheduled poll interval to finish.
Assistant
The poll delay is nearly done; I’ll check reactions and threads as soon as it returns.
Assistant
The wait interval finished. I’m polling the PR now for Codex’s reaction state and any unresolved review threads.
Assistant
Codex is still reviewing: eyes is present, no threads or review submissions yet. I’ll wait another polling interval.
Assistant
Waiting another two minutes for Codex’s review verdict.
Assistant
Codex is still inside the same review cycle; I’m letting the poll timer complete.
Assistant
One more short wait for this interval, then I’ll check the PR state again.
Assistant
Polling Codex’s state again now.
Assistant
Codex still has eyes on the PR and has not posted threads. I’ll do one more two-minute poll cycle; after that we’ll be around the normal review window but not yet at the stall threshold.
Assistant
Waiting on the next Codex poll interval.
Assistant
Still in the wait interval.
Assistant
One more poll after this sleep finishes.
Assistant
The wait interval is done. I’m checking whether Codex approved, posted findings, or is still reviewing.
Assistant
Codex finished with two P2 findings and no approval. I’m addressing them now: first by reproducing the failure shapes with tests, then fixing the implementation/proptest generator, pushing a follow-up commit, replying inline, and re-triggering review.
Assistant
I verified the comments against the code. Both are real: SegmentGroup SetValue was using the old context when prop sync can introduce items or disable the group, and the ignored TagsInput proptest can generate controlled values that violate its own invariants.
Assistant
I’m first reproducing the TagsInput ignored proptest failure before editing it. For SegmentGroup I’ll add direct regression tests around the two prop-sync cases Codex called out.
Assistant
The TagsInput failure reproduces exactly: max = Some(1) with SetValue(Some(["alpha", "alpha"])) violates the test’s own max/duplicate invariants. I’m applying the targeted fixes now.
Assistant
SegmentGroup now validates controlled values against the item collection and per-item disabled state, not whole-group disabled state or stale registered ordering. It also applies SetProps before SetValue when both props and value change.
Assistant
I added the SegmentGroup regressions for same-sync item introduction and disabled-group controlled updates. Next I’m constraining only the TagsInput controlled-value generator so it still covers SetValue without generating values that contradict the invariant under the smallest max.
Assistant
The TagsInput generator now still emits SetValue(None) and SetValue(Some(...)), but the generated controlled list is unique and length <= 1 so it is valid for every generated max. I’m running the focused regressions now.
Assistant
The behavioral fixes pass their targeted tests, including the previously failing ignored TagsInput proptest. Rustfmt wants one local formatting change, so I’m applying formatting and rerunning the focused checks.
Assistant
Formatting applied. I’m rerunning the focused checks plus the regular selection proptest target.
Assistant
The review fixes are passing the direct regressions and the regular selection proptest target. I’m running the affected component unit suites and native coverage before committing the fix.
Assistant
The affected component unit suites passed: 180 tests. The focused llvm-cov run is still compiling/running.
Assistant
I’m resuming at the review-fix point: the PR is already open, and there are two local fixes for Codex’s comments that need staging, committing, pushing, then re-triggering review. I’ll inspect the current diff first so I only publish those intended changes.
Assistant
The diff is limited to the two Codex findings: SegmentGroup controlled-value sanitization and the TagsInput proptest generator. I’m staging just those files and committing them as a review-fix commit.
Assistant
The files are staged. I’m creating the follow-up commit now with the required Codex co-author trailer, then I’ll push and update the review threads.
Assistant
The commit hook is still running, so I’m waiting for it to finish before pushing.
Assistant
The review-fix commit is in place as 9d7de65d. I’m pushing the branch and then I’ll reply to the two Codex threads with the concrete fixes.
Assistant
The push is still in progress. Once GitHub has the new commit, I’ll resolve the review threads and re-run Codex review.
Assistant
The branch is pushed with the fix commit. I’m posting inline replies, resolving the two Codex threads, and re-triggering review on PR #720.
Assistant
The GitHub connector wants numeric review comment IDs for replies; the thread data I had was GraphQL node IDs. I’m fetching the current review threads to get the numeric IDs, then I’ll reply and resolve.
Assistant
I have the numeric IDs now. I’m replying with the fix details, resolving both outdated threads, and posting a fresh @codex review trigger.
Assistant
Both review threads are replied to and resolved. I’m posting the new @codex review request and then I’ll poll for the review reaction and CI state.
Assistant
Codex has been re-triggered on the updated PR. I’m checking the PR reactions, unresolved threads, and current check status now.
Assistant
Codex is actively reviewing again (eyes), and the earlier two threads are resolved. CI has only just started on the new push, so I’m giving both a bit of time before polling again.
Assistant
Still waiting on the review/check cycle. I’ll poll again as soon as this wait finishes.
Assistant
I’m polling Codex reactions, unresolved threads, and CI again now.
Assistant
The resolved threads remain clean. Codex still has its review in progress, and CI is moving through the rerun with Clippy pending, so I’m waiting another interval.
Assistant
The wait is running; I’ll poll again after it completes.
Assistant
I’m checking the latest Codex and CI state again.
Assistant
No new review threads have appeared; Codex is still in eyes. CI is still waiting on Clippy for this run, which likely means the workflow queue is slow rather than a code failure.
Assistant
I’m giving the GitHub-side jobs another few minutes, then I’ll poll again.
Assistant
Polling again now for Codex approval, unresolved review threads, and checks.
Assistant
Most CI gates are now passing; the longer feature, unit, adapter, release, and coverage jobs are pending. Codex still has only an eyes reaction and no new unresolved threads, so I’m continuing the review wait loop.
Assistant
I’m waiting through the longer GitHub jobs and Codex pass. I’ll check again after this interval.
Assistant
I’m polling again; this should show whether Codex has moved from eyes to either approval or more findings, and whether the long CI jobs completed.
Assistant
The PR is mostly green now; the remaining pending checks are Coverage, Unit Tests, Release Verification, and Dioxus feature flags. Codex has not posted a second review yet, so I’m checking whether the trigger comment was recorded and then I’ll continue polling.
Assistant
Codex completed the second pass and found two more SegmentGroup controlled-value edge cases, both related to revalidation timing. I’m going back into the same review-fix loop: reproduce with focused tests, patch SegmentGroup, then verify and push another fix commit.
Assistant
I’m adding focused regression tests for the two new findings before changing the machine: initial invalid controlled values, and item-list changes that invalidate an unchanged controlled value.
Assistant
The machine change is in: initial controlled props use the same item-definition sanitization, and item collection changes requeue controlled value validation after props sync. I’m adding the regression tests that lock those cases down.
Assistant
The regression tests are added. I’m running the focused SegmentGroup tests first, then formatting and the same selection verification subset used for the previous fix.
Assistant
The focused test build is running. I’ll wait for the result before moving on to broader checks.
Assistant
The new focused tests pass. I’m running rustfmt check next; if it changes anything, I’ll rerun the focused suite and the selection proptest subset.
Assistant
Formatting is still running.
Assistant
Formatting passed without changes. I’m running the broader focused tests now: SegmentGroup and TagsInput unit coverage plus the selection proptest module.
Assistant
The SegmentGroup and TagsInput unit subset passed. The selection proptest binary is still compiling/running.
Assistant
The active selection proptest subset also passes. I’m checking the diff, then I’ll stage, commit, push, and update the two new review threads.
Assistant
The diff is exactly the SegmentGroup revalidation fix and its tests. I’m staging and committing it now.
Assistant
The commit hook is running for the SegmentGroup follow-up commit.
Assistant
The follow-up commit is 1a0ffc2c. I’m pushing it and then I’ll reply to and resolve the two new Codex threads.
Assistant
The push is in progress.
Assistant
The branch is pushed at 1a0ffc2c. I’m fetching the latest review thread IDs so I can reply, resolve, and request another Codex pass.
Assistant
The two new threads are present. I’m getting the numeric review comment IDs for replies, then I’ll resolve both.
Assistant
I have the numeric IDs. I’m replying to both findings with the new commit and resolving the threads.
Assistant
Those threads are replied to and resolved. I’m triggering Codex review again and then I’ll poll the new CI run.
Assistant
Codex has been re-triggered after the second fix commit. I’m checking the immediate review/check state, then I’ll wait as needed.
Assistant
Codex is reviewing the latest commit (eyes), all four review threads are resolved, and the new CI run has started. I’ll wait and poll again.
Assistant
Waiting through the Codex and CI cycle; I’ll check again shortly.
Assistant
I’m polling the third Codex pass and CI now.
Assistant
The latest pass is still in progress: Codex remains on eyes, and CI has formatting/snapshot green with Clippy pending. No new unresolved threads yet.
Assistant
I’m waiting a longer interval for the Codex pass and CI queue.
Assistant
I’m polling again now for Codex approval and CI.
Assistant
CI is progressing and most short gates are green; the longer jobs remain pending. Codex still has no new review result yet, and all known threads are resolved.
Assistant
I’m waiting another interval for the GitHub-side work to finish.
Assistant
I’m checking again now; this should catch completed CI and whether Codex has left a final reaction or more comments.
Assistant
Codex has now left 👍, and all review threads are resolved. I’m waiting on the remaining CI jobs: Coverage, Feature Flags Dioxus, Release Verification, and Unit Tests.
Assistant
I’m letting the remaining GitHub checks finish.
Assistant
I’m checking the final CI state now.
Assistant
The worktree is clean and Codex approval is still present. The gh pr checks command is still returning; I’m waiting for the check list.
Assistant
Only Coverage and Release Verification remain pending; all other checks are green. I’ll wait for those last two before wrapping this up.
Assistant
Waiting on the final two CI jobs.
Assistant
I’m checking those last CI jobs again.
Assistant
Coverage and Release Verification are still pending after the wait; the rest remain green. I’ll give them another interval.
Assistant
Still waiting on the final two CI jobs.
Assistant
The wait command is still running; I’m polling it once more before checking CI.
Assistant
I’m checking Coverage and Release Verification again now.
Codex has left 👍, all review threads are resolved, and all GitHub checks are passing, including Coverage, Release Verification, Unit Tests, and Codecov. Local worktree is clean.
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 doc is the single source of truth for what "adapter task complete" means.
--min
cargo xcrap --update-baseline
lcov.info
coverage-lcov
deliberate
--epsilon
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.)
Test Plan
Focused structure checks:
cargo test -p ars-components --test spec_conformance -- selection::
cargo test -p ars-components --test proptest_state_machines -- selection::
Component/unit coverage:
cargo test -p ars-components --lib -- selection::
cargo insta test -p ars-components --lib -- selection
Spec gates:
cargo xtask spec validate
cargo xtask spec compile-snippets
Coverage audit:
cargo llvm-cov test -p ars-components --text -- selection::
cargo xcov
Final pre-push gate after user approval:
cargo xci --profile fast
Assumptions
The audit PR may fix any selection agnostic drift it finds; no findings are deferred.
Closing Epic #221 happens only after the audit PR is merged, CI is green, and Codex review leaves approval.
The checkout is currently detached, so implementation should create or switch to a codex/ branch before any commit.
</proposed_plan>
Test Plan
Focused structure checks:
cargo test -p ars-components --test spec_conformance -- selection::
cargo test -p ars-components --test proptest_state_machines -- selection::
Component/unit coverage:
cargo test -p ars-components --lib -- selection::
cargo insta test -p ars-components --lib -- selection
Spec gates:
cargo xtask spec validate
cargo xtask spec compile-snippets
Coverage audit:
cargo llvm-cov test -p ars-components --text -- selection::
cargo xcov
Final pre-push gate after user approval:
cargo xci --profile fast
Assumptions
The audit PR may fix any selection agnostic drift it finds; no findings are deferred.
Closing Epic #221 happens only after the audit PR is merged, CI is green, and Codex review leaves approval.
The checkout is currently detached, so implementation should create or switch to a codex/ branch before any commit.