Repository navigation
spec: batch eligible exact lookups by default - #6871
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
/approve-spec aa81088 |
Contributor
|
AI review status for this pull request.
|
4 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exact decision needed
When should an exact CLI lookup accept several selectors, and what stable contract must every adopter expose?
Existing authority searched
architecture:cli-surfaceowns the response envelope, formatter vocabulary, generated help, and API-to-CLI parity.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
BatchResponseandBatchRowtypes with a<subject>.batchdiscriminator, 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
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
.batchsuffix 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
Validation
pnpm check:knowledgepnpm exec prettier --check docs/specs/AST-042-cli-command-admission/spec.md docs/specs/AST-053-multi-selector-lookups/spec.mdgit diff --check