Skip to content

refactor(core)!: drop the deprecated value alias on result envelopes (canonical data) - #491

Merged
rejifald merged 2 commits into
mainfrom
refactor/drop-result-value-alias
Jul 24, 2026
Merged

refactor(core)!: drop the deprecated value alias on result envelopes (canonical data)#491
rejifald merged 2 commits into
mainfrom
refactor/drop-result-value-alias

Conversation

@rejifald

Copy link
Copy Markdown
Owner

What

Extracts the valuedata slice from #470 (the contract-freeze sweep) into a standalone, independently-mergeable PR.

data has been canonical on the result envelopes since the P5 rename; value lingered as a @deprecated alias, co-emitted alongside data. This is the hard break (P19): the alias is removed.

Changes (core only)

  • Remove the alias field from Inspection and the result StitchEvent (types.ts) + the JSDoc that documented { value, … }.
  • Drop the co-emission: makeInspection (stitch.ts), the engine result event (resultEvt), and the trace JSONL double-cap (trace.ts no longer caps a second value key).
  • Rename the internal surface-interpret envelope SurfaceOutcome / CacheHit field valuedata (surface.ts, cache.ts) and its readers/producers (engine.ts, download.ts, llm.ts).
  • Tests: the graphql-surface interpret assertions, the trace/cache/inspect result reads.
  • Docs: inspection.value.data (twoslash example), the result-event shape in README/DESIGN, trace/sentry/helpers prose, regenerated completions, and the resolved P5 row in CONTRACT.md.

How the scope was bounded (compiler-driven)

value is highly ambiguous, so the slice was found by removing the alias and letting typecheck flag every real consumer — not by grepping. The full-workspace check:types is green, which proves no binding or integration reads the envelope .value. Explicitly excluded as red herrings / separate concerns:

  • Standard-Schema { value, issues } (json-schema, validate-schemas result.value) — spec-mandated, untouched.
  • RunOutcome.value — an internal type that keeps .value (only the claim.settle payload key → data).
  • SchemaFingerprint.valuetoken — a separate P5 rename (not this slice).
  • SSE data: (nest/elysia/hono), store value+ttlMs (react-native/redis), value params/locals, "unwrapped"/value prose — unrelated refactor(api)!: contract freeze — hard-break sweep of the entire published surface #470 renames or generic usage.

No contract-baseline change — the alias was @deprecated, so the ratchet never flagged it.

Verification — all gates green

format · lint · contract · typecheck (all 38 pkgs) · typecheck-d (tsd) · test (core 1213 + full workspace) · exports · build-docs (full twoslash — validates the inspection.data example).

Relation to #470 / #489 / #490

Independent off main, disjoint from #489 (query→document) and #490 (scope→pool). After they land, #470 rebases to drop all carved slices.

🤖 Generated with Claude Code

rejifald and others added 2 commits July 24, 2026 12:50
…es (canonical `data`)

Extracts the value→data slice from #470 (the contract-freeze sweep) into a
standalone PR so it can land on its own.

`data` has been canonical on the result envelopes since the P5 rename; `value`
lingered as a `@deprecated` alias co-emitted alongside `data`. This is the hard
break (P19): remove the alias from `Inspection` and `StitchEvent.result`, drop
the co-emission (`makeInspection` / the engine `result` event / the trace JSONL
double-cap), and rename the internal surface-interpret envelope
(`SurfaceOutcome` / `CacheHit`) field `value`→`data` with its readers.

Scope is core-only: the full-workspace typecheck confirms no binding or
integration reads the envelope `.value`. Standard-Schema `{ value, issues }`,
`RunOutcome`'s internal `.value`, and unrelated `value` params/locals are
untouched. The separate P5 renames — `SchemaFingerprint.value`→`token` and the
generic `value` verb in prose — are NOT part of this slice.

BREAKING CHANGE: the `@deprecated` `value` alias on `.inspect()` / `.report()`
results (`Inspection`) and on the `result` `StitchEvent` is removed. Use `data`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rejifald
rejifald enabled auto-merge (squash) July 24, 2026 10:07
@rejifald
rejifald merged commit 44682d9 into main Jul 24, 2026
12 checks passed
@rejifald
rejifald deleted the refactor/drop-result-value-alias branch July 24, 2026 10:12
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