feat!: cardinality as its own axis with per-source splitting and validated defaults - #115
feat!: cardinality as its own axis with per-source splitting and validated defaults#115kjanat wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
dreamcli | d82e91a | Commit Preview URL Branch Preview URL |
Aug 03 2026, 01:36 PM |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (43)
Comment |
commit: |
…dated defaults
Internal Cardinality union (one, many, entries, count) projected from
flat carriers; flag.array, flag.keyValue, flag.count, and arg variadic
normalize onto it, and flagValueSchema becomes total by returning the
element value for collections, deleting both unreachable-kind guards.
New public surface per Decision 3: arg.boolean() consumes literal
true/false tokens, arg.keyValue() aggregates k=v tokens with
duplicate-key policies, and element-level sugar like
flag.array(flag.path()) is legal with per-element path checks from
every source. Per-source splitting per Decision 6: .split({cli, env,
stdin}) with whole/lines/delimiter/json policies, CLI defaulting to
the .separator() carrier, env defaulting to comma with JSON only
explicit, entries splitting at the first equals; env and config no
longer inherit the CLI separator (breaking). Decision 7 splicing: '-'
in a repeated collection represents the stdin source at that
occurrence and decoded elements splice in order, for flags, keyValue
flags, and keyValue args, with preflight eligibility detecting the
sentinel inside collections. Decision 5 lines semantics exact,
including the single structural terminal empty element. Defaults are
validated per Decision 4 (breaking): typed values checked against
codec domain, constraints, cardinality shape, and sync Standard Schema
at construction from every declaration order and both construction
paths, async validators and filesystem checks at resolution. Standard
Schema splits into element and aggregate levels on both surfaces.
Fragments redesigned cleanly at schemaVersion 1 with satisfies guards
pinning the meta-schema to the fragment types.
Targets v4. Stacked on #114. L16 of the input-model unification.
Cardinality becomes its own internal axis (one, many, entries, count) projected from flat carriers;
flag.array,flag.keyValue,flag.count, and arg variadic normalize onto it. New public surface per Decision 3:arg.boolean()consumes literal true/false tokens,arg.keyValue()aggregates k=v tokens with duplicate-key policies, and element-level sugar likeflag.array(flag.path())is legal with per-element path checks from every source. Per-source splitting per Decision 6:.split({ cli, env, stdin })with whole/lines/delimiter/json policies; env defaults to comma with JSON only explicit; entries split at the first equals; env and config no longer inherit the CLI separator (breaking). Decision 7 splicing:-in a repeated collection represents the stdin source at that occurrence and decoded elements splice in order. Decision 5 lines semantics exact, including the single structural terminal empty element. Defaults are validated per Decision 4 (breaking): codec domain, constraints, cardinality shape, and sync Standard Schema at construction from every declaration order and both paths; async validators and filesystem checks at resolution. Standard Schema splits into element and aggregate levels on both surfaces.The review's severe catch: preflight tested the sentinel against the scalar shape only, so explicit
-on collections never read stdin in a real invocation; fixed and pinned end to end. Also killed a phantom trim field in the published meta-schema and addedsatisfiesguards pinning the meta-schema to the fragment types.