Skip to content

spec: define complete multi-selector lookup receipts - #6868

Merged
josephfarina merged 1 commit into
mainfrom
joeyfarina/ast-053-multi-selector-lookups-20261001
Oct 1, 2026
Merged

josephfarina merged 1 commit into
mainfrom
joeyfarina/ast-053-multi-selector-lookups-20261001

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

Exact decision needed

When one lookup accepts several exact selectors, what must it return for successes, misses, ambiguity, ordering, duplicates, version-qualified packages, and process failure?

Existing authority searched

spec:AST-042 owns CLI/API parity and the shared text-output vocabulary. architecture:cli-surface owns the response envelope, error codes, generated help, and command structure. Neither settles a multi-selector receipt's row states, ordering, compatibility boundary, or exit status.

#6867 implements the first adopter in astryx component. #6802 owns free-text package discovery and remains separate.

Decision

A lookup that opts into several exact selectors returns one complete ordered receipt. It keeps duplicates, gives every selector one found, not_found, ambiguous, or error row, exposes every ambiguity candidate, and never falls through from an exact package version to another installed version.

The CLI prints every row before it exits nonzero for any unresolved row. Existing zero and one selector CLI responses do not change. A programmatic API uses input shape explicitly: omitted means browse, a string means single lookup, and an array always means batch, including empty and one-item arrays.

Rejected alternatives

  • Fail on the first miss. It loses later answers.
  • Drop failed selectors. It makes partial work look complete.
  • Pick the first ambiguous package. It turns catalog order into an undocumented answer.
  • Make an array's response depend on its length. Filtering selectors would silently change the response type.
  • Always return a batch for strings. It would change every existing caller's JSON shape.

Claim scope and non-goals

This record owns the generic complete-receipt contract only for lookup commands that opt in. It does not require every lookup command to support batches, change free-text search, rank ambiguity candidates, add network discovery, or prescribe an internal implementation.

Evidence and implementation relationship

#6867 exercises ordered and duplicate selectors, every row state, exact package versions, mixed and all-failed receipts, every focused component projection, detail and language controls, empty and one-item arrays, JSON/text parity, and zero/one CLI compatibility. The specification remains valid for any equivalent implementation and for later lookup adopters.

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
  • Prettier
  • git diff --check

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 75e5138

@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 Ready Ready Preview Oct 1, 2026 9:00pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. 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
🔄 In progress (for maintainers only) Oct 1, 2026, 9:02 PM UTC

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

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

@josephfarina
josephfarina merged commit b72c05d into main Oct 1, 2026
35 checks passed
@github-actions
github-actions Bot deleted the joeyfarina/ast-053-multi-selector-lookups-20261001 branch October 2, 2026 06:24

This branch was successfully deployed

1 active deployment
Preview — 75e5138a 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