Skip to content

feat(draft): selector-shaped dataSource inference + curated exclusions sidecar - #116

Merged
ShocOne merged 1 commit into
mainfrom
feat/draft-datasource-inference
Aug 5, 2026
Merged

feat(draft): selector-shaped dataSource inference + curated exclusions sidecar#116
ShocOne merged 1 commit into
mainfrom
feat/draft-datasource-inference

Conversation

@ShocOne

@ShocOne ShocOne commented Aug 5, 2026

Copy link
Copy Markdown
Member

Closes the systemic gap behind "we only have 2 data sources": blueprint draft skipped 73 readable families per run with "dataSource inference is not implemented". Now implemented — targeting the m365-provider-shaped pattern chosen for it, not the raw path shapes:

  • One data source per family, exactly one selector per lookup. The list operation is the resolver: selectors narrow it to exactly one element, zero and several matches both refused — a lookup must be predictable, never a guess. With a direct by-id read present, the matched element only supplies the identifier and the direct read fetches, so state maps from one response shape.
  • IR + validation + checker + emitter: DataSourceBinding gains list/collectionField/elementType/selectors/elementIdField; validation enforces the contract; bindings check resolves every new name against the real SDK; the read template renders exactly-one enforcement, list-and-match, both refusals, and the id handoff. Both pilots' existing data sources hold byte-identical (drift checks green).
  • Exclusions are curation, not inference: the document can't say which readable surfaces are telemetry (a time-windowed read is a hint, not proof), so a draft-exclusions.json sidecar beside the snapshots carries each exclusion with a required reason, echoed as a named skip per run.
  • Inferred selectors: the identifier (viaRead) plus every name-shaped string field on the element.

First run against the pinned document: 16 selector-shaped drafts (test, monitor, alert, …) and named refusals for the rest (composed schemas, collection-less lists — hand-authoring material).

Unit-pinned: resolver view + full template render, exclusions load/match, validation rules. All suites green; docs drift test green.

🤖 Generated with Claude Code

…lusions sidecar

blueprint draft answered 73 of the document's readable families with the
same skip line for months: dataSource inference is not implemented. Now
it is, and it targets the shape a practitioner actually uses rather than
the shape the API paths suggest: one data source per family, looked up by
exactly one of its selectors. The list operation is the resolver --
selectors narrow it to exactly one element, with zero and several matches
both refused, because a lookup must be predictable, never a guess -- and
where the family offers a direct by-identifier read, the matched element
only supplies the identifier and the direct read does the fetching, so
state always maps from one response shape.

The IR grows the binding for it: a list operation beside the read, the
collection accessor and element type, the selector table, and the
element-to-identifier handoff. Validation enforces the contract's shape,
the bindings check resolves every new name against the real SDK -- the
list chain, the collection accessor, each selector's element field, the
identifier handoff -- and the read template renders the whole contract
with both pilots' existing data sources held byte-identical.

Which families must not be drafted is curation, not inference: the
document does not say which of its readable surfaces are telemetry, and a
heuristic would guess silently. A draft-exclusions.json sidecar beside
the snapshots names each exclusion with a required reason, and the run
repeats it as a named skip. Inferred selectors are the identifier plus
every name-shaped string field on the element -- the fields an object is
actually known by.

Against the pinned ThousandEyes document the first run drafts 16
selector-shaped data sources, test and monitor and alert among them, and
names its refusals: composed schemas and collection-less lists remain for
hand-authoring.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ShocOne
ShocOne merged commit 90df35c into main Aug 5, 2026
@ShocOne
ShocOne deleted the feat/draft-datasource-inference branch August 5, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant