Skip to content

spec: batch eligible exact lookups by default - #6871

Merged
josephfarina merged 1 commit into
mainfrom
ast053-batch-adoption-20261001
Oct 1, 2026
Merged

josephfarina merged 1 commit into
mainfrom
ast053-batch-adoption-20261001

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Exact decision needed

When should an exact CLI lookup accept several selectors, and what stable contract must every adopter expose?

Existing authority searched

These records settle the individual pieces, but they don't say which other lookup commands must batch or require one shared batch type and admission rule.

Decision

AST-053 now uses one E1-E5 eligibility test. A lookup is eligible when it is read-only, resolves exact selectors independently, returns a finite complete receipt, can safely accept at least two selectors in every supported mode, and owns the final positional argument.

New eligible commands batch from their first public release. Existing eligible commands migrate incrementally. Every adopter preserves zero- and one-selector CLI behavior, treats every programmatic array as a batch, returns one ordered row per accepted selector, uses shared BatchResponse and BatchRow types with a <subject>.batch discriminator, and exits 1 after output when any row is unresolved.

AST-042 now requires the E1-E5 classification during command admission. Typed CommandDoc metadata and the generated manifest become the public inventory when the enforcement phase lands.

Rejected alternatives

  • Leave batching optional for each lookup.
  • Treat every multi-argument command as a batch.
  • Truncate, deduplicate, or stop an accepted batch at the first failure.
  • Let each command invent its own discriminator, row states, or response fields.

Claim scope and non-goals

This does not change runtime code. It does not batch free-text search, mutations, streams, comparisons, ranges, workflows, or commands whose selector isn't the final positional argument. Pre-existing batch responses on ineligible commands keep their current contracts and don't claim AST-053 conformance from a .batch suffix alone.

Evidence and implementation relationship

#6867 remains the separate first implementation. This specification stays valid without it. The final text passed independent review after the eligibility, cardinality, work-bound, response-envelope, link, compatibility, and admission cases were challenged.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a review transcript or rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge
  • pnpm exec prettier --check docs/specs/AST-042-cli-command-admission/spec.md docs/specs/AST-053-multi-selector-lookups/spec.md
  • git diff --check

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 1, 2026
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Building Building Preview Oct 1, 2026 9:46pm UTC

Request Review

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec aa81088

@github-actions github-actions Bot added the spec-auto-merge Auto-merge was enabled by the spec owner gate label Oct 1, 2026
@astracat-bot

astracat-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
⏳ Queued (for maintainers only) Oct 1, 2026, 9:52 PM UTC

@josephfarina
josephfarina merged commit 9995276 into main Oct 1, 2026
29 of 30 checks passed
@github-actions
github-actions Bot deleted the ast053-batch-adoption-20261001 branch October 2, 2026 06:24

This branch was successfully deployed

1 active deployment
Preview — aa810883 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant