refactor(core)!: drop the deprecated value alias on result envelopes (canonical data) - #491
Merged
Merged
Conversation
…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>
…value-alias # Conflicts: # docs/CONTRACT.md
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.
What
Extracts the
value→dataslice from #470 (the contract-freeze sweep) into a standalone, independently-mergeable PR.datahas been canonical on the result envelopes since the P5 rename;valuelingered as a@deprecatedalias, co-emitted alongsidedata. This is the hard break (P19): the alias is removed.Changes (core only)
Inspectionand theresultStitchEvent(types.ts) + the JSDoc that documented{ value, … }.makeInspection(stitch.ts), the engineresultevent (resultEvt), and the trace JSONL double-cap (trace.ts no longer caps a secondvaluekey).SurfaceOutcome/CacheHitfieldvalue→data(surface.ts, cache.ts) and its readers/producers (engine.ts, download.ts, llm.ts).interpretassertions, the trace/cache/inspect result reads.inspection.value→.data(twoslash example), theresult-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)
valueis highly ambiguous, so the slice was found by removing the alias and letting typecheck flag every real consumer — not by grepping. The full-workspacecheck:typesis green, which proves no binding or integration reads the envelope.value. Explicitly excluded as red herrings / separate concerns:{ value, issues }(json-schema, validate-schemasresult.value) — spec-mandated, untouched.RunOutcome.value— an internal type that keeps.value(only theclaim.settlepayload key →data).SchemaFingerprint.value→token— a separate P5 rename (not this slice).data:(nest/elysia/hono), storevalue+ttlMs(react-native/redis),valueparams/locals, "unwrapped"/valueprose — 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 theinspection.dataexample).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