docs(spec): align sys_metadata environment_id docblock with AGENTS.md:8 - #13749
Merged
Conversation
The `environment.zod.ts` module docblock listed `sys_metadata` among the Control-Plane tables "(with `environment_id`)", the same phrasing used for the correct `sys_package_installation (with environment_id)` entry above it (ADR-0003; untouched here). On the metadata tables `environment_id` is retired, not live (AGENTS.md:8; ADR-0006 v4), so the parenthetical taught the wrong thing to two published surfaces: the docs site (regenerated here via gen:docs) and the published .d.ts. Reworded to match AGENTS.md:8 exactly -- asserting only that environment_id is deprecated on the metadata tables in favor of organization_id, and saying nothing about the cloud control plane's own sys_metadata table (a fact this tree cannot settle, per the issue). The docblock edit added one line, shifting every subsequent line number in environment.zod.ts down by one; content/docs/permissions/system-context.mdx cited environment.zod.ts:136 for the Environment.isSystem field, now :137 -- updated in the same commit (check:system-context-census caught it). Claude-Session: https://claude.ai/code/session_01PBjwYLS6BciTQW3c9xQiD2 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Aug 31, 2026
os-warren
marked this pull request as ready for review
August 31, 2026 09:53
os-warren
enabled auto-merge
August 31, 2026 09:53
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.
Fixes #13664
What
packages/spec/src/cloud/environment.zod.ts:26-31(module docblock) listedsys_metadataamong the Control-Plane tables "(withenvironment_id)" —the same wording as the correct
sys_package_installation (with environment_id)entry on the line above it (ADR-0003, UNIQUE(environment_id, package_id), untouched by this PR).On the metadata tables
environment_idis retired, not live (AGENTS.md:8;ADR-0006 v4), and this docblock ships verbatim to two consumer-facing
surfaces: the docs site (
content/docs/references/cloud/environment.mdx,auto-generated — regenerated here via
gen:docs, not hand-edited) and thepublished
.d.ts(editor tooltip for@objectstack/spec/cloudconsumers).Per triage, the fix aligns the parenthetical with
AGENTS.md:8's wording,which is true under either reading of the open question the issue itself
raised (whether the cloud control plane's own
sys_metadatacopy still keysby
environment_id, which this tree cannot settle):It asserts only what's true on the metadata tables and says nothing about
the cloud control plane's own table — no schema lookup needed, no reading to
resolve.
Side effect: one doc anchor shifted
The docblock edit added one line, shifting every subsequent line number in
environment.zod.tsdown by one.check:system-context-censuscaught astale line-number citation as a direct, mechanical consequence:
content/docs/permissions/system-context.mdx:52citedenvironment.zod.ts:136for theEnvironment.isSystemfield; that's now:137. Updated in the same PR (still just a text alignment, no newbehaviour).
What did NOT change
sys_package_installation (withenvironment_id)— correct, untouched.content/docs/references/cloud/environment.mdx— regenerated viapnpm --filter @objectstack/spec gen:docs, never hand-edited (it carriesAUTO-GENERATED — DO NOT EDIT).packages/spec/dist/**— gitignored, rebuilt at publish time.Tests
pnpm --filter @objectstack/spec build— clean.pnpm --filter @objectstack/spec check:generated— all 14 generatedartifacts up to date (only
check:docswas stale beforegen:docs; cleanafter).
pnpm --filter @objectstack/spec typecheck— clean.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack—derived 48 local gate families for this diff, plus 8 more once the
changeset existed (56 total). Ran all 56:
check:doc-formula-expressionsandcheck:doc-security-postureafter building@objectstack/formula/@objectstack/lint(their ownPREREQUISITE NOT METprerequisites).check:system-context-censusinitially red on the shifted anchor(see above) — fixed in this PR and re-verified green.
check:skill-examples— the 2 surfaces this diff can affect (skills+docs,227 blocks; spec-source TSDoc, 10 blocks) type-checked clean; the 3rd
surface (client SDK, 23 blocks — none touched by this diff) is
NOT MEASURED: it needs
@objectstack/client-reactbuilt, which afresh worktree doesn't do and which this diff doesn't touch.
check:dual-build-cjs-loadsandcheck-dev-prereqs.mjsneed a fullpnpm buildacross the workspace;check-test-completeness.mjsneeds asaved
turbo run testlog (CI-only by design);check-half-states.mjshit this container's REST-channel egress restriction on repo-scoped
reads (pre-existing container constraint, unrelated to this diff).
packages/speccloud docblock listssys_metadataas a control-plane table "(withenvironment_id)" — the column is deprecated on the metadata tables, and the line ships to both the docs site and the published .d.ts #13664.Clause-②: no — prose-only change, accept/reject surface unchanged.
Generated by Claude Code