Uh oh!
There was an error while loading. Please reload this page.
fix(spec): implement-objectos Rule #3 names the real request/response validation surface (#9614) - #9731
Merged
os-elon merged 2 commits intoAug 18, 2026
Conversation
…c exports RequestEnvelope and ResponseEnvelope are named in prose but neither is an export of the package. Rule #3 now names the real validation surface.
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 115 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-elon
marked this pull request as ready for review
August 18, 2026 18:23
os-elon
enabled auto-merge
August 18, 2026 18:23
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#9614
packages/spec/prompts/implement-objectos.mdRule #3 told an agent implementing theruntime kernel to "Validate
RequestEnvelope" and "Wrap inResponseEnvelope".Neither is an export of
@objectstack/spec. This is a published prompt whose audienceis AI authors, so a fabricated name in prose is read as authoritative and copied into an
import by whoever follows it.
Premise re-verified before editing
Re-measured on the file as it stands after #9615 (
890b38f, the same-day churn on thisexact file), not on the card's snapshot:
api-surface/*.json.d.tsRequestEnvelopeResponseEnvelopeResponseEnvelopeConfig/ResponseEnvelopeConfigParsed/ResponseEnvelopeConfigSchemado exist in
./api, but they configure an envelope rather than being one, so the card wasright that they are not a drop-in referent.
What Rule #3 now names, and why
The choice was between inventing one referent and describing the surface the package
actually has.
packages/spec/src/api/contract.zod.tsdeliberately has several shapeson the request side and one skeleton plus per-route extensions on the response side, so
the rule is reworded to say that rather than to point at a single symbol that would have
had to be created. Nothing was added or aliased in
packages/spec/src/**.Requests — there is no single request envelope, by design.
StandardApiContracts(section 4 of
contract.zod.ts) maps each standard operation to itsinput:createtoCreateRequestSchema,updatetoUpdateRequestSchema,getanddeletetoIdRequestSchema, thebulk*family toBulkRequestSchema, andlisttoQuerySchema(that one from
@objectstack/spec/data, stated in the prose because the entrypointdiffers). The rule also now reaches
ApiEndpointSchema, which makesapi/endpoint.zod.ts— a file the rule already cited in its opening sentence — actuallyreferenced by one of its bullets instead of cited and then unused.
Responses —
BaseResponseSchemais the real name of the response envelope, and itsown docstring says the thing an implementer most needs and would otherwise get wrong:
it is a plain
z.object, sosafeParsealone does not prove a body isenvelope-conformant. It strips unknown keys and accepts
{ success: true }carrying nopayload — which is how
{ success: true, data: link, link }shipped undetected in theshare-links dispatcher.
envelopeViolations(body)is the check that answers "is thisactually the declared envelope", and the rule now sends the reader there. The concrete
bodies (
SingleRecordResponseSchema,ListRecordResponseSchema,BulkResponseSchema,DeleteResponseSchema) are named as the extensions that adddata.The referents moved from prose into a fenced import — on purpose
The card notes why this defect survived every sweep:
check:published-readme-exportsresolves
import { ... } from '...'clauses andX.member(call sites, and a bare symbolname in a bullet matches neither. Rule #3 now carries a fenced
typescriptimport ofStandardApiContracts,BaseResponseSchemaandenvelopeViolations, so the threeload-bearing referents are inside the gate's coverage from now on. That does not close the
structural blind spot — prose symbols are still invisible, and that stays #9532's lane —
but it does mean this particular rule can no longer drift silently.
Verification
Every symbol Rule #3 names in prose was resolved against the built type surface, the
way the card measured. Full gate union at
26b33cf, on a fully built workspace(
pnpm build, 71/71 tasks) — 15/15 pass, including the two the dispatch mandatedregardless of derivation:
Reverse verification. Renaming one symbol in the new fence to
envelopeViolationzturns the gate red on exactly that symbol and nothing else, which is the evidence that the
fence is genuinely inside the gate's coverage rather than merely green:
Restoring the symbol returns the gate to green, and the marker's absence was confirmed
before the restored leg was read. Markdown is not compiled, so the artifact the gate reads
is the source file itself;
@objectstack/specwas built once beforehand and unchangedacross both legs, and the mutation leg proves the gate was reading the edited bytes.
One note for whoever runs these locally: on an unbuilt tree
check:published-readme-exportsreports the missingdist/entries and returns before itreaches any finding, so it cannot verify or falsify a change like this until
pnpm buildhas run. Both legs above were measured after a full build.Scope
One prompt file plus its changeset. Rule #4's
EventSchemaand workflow step 3'sApiRoutesSchemawere verified real and left untouched, as the card asked; the rest of thefile is not restyled. No schema, runtime behaviour or authorable surface changes, so the
changeset is
patch.Generated by Claude Code