Skip to content

docs(spec): align sys_metadata environment_id docblock with AGENTS.md:8 - #13749

Merged
os-warren merged 1 commit into
mainfrom
claude/issue-13664-sys-metadata-docblock
Aug 31, 2026
Merged

docs(spec): align sys_metadata environment_id docblock with AGENTS.md:8#13749
os-warren merged 1 commit into
mainfrom
claude/issue-13664-sys-metadata-docblock

Conversation

@os-warren

Copy link
Copy Markdown
Collaborator

Fixes #13664

What

packages/spec/src/cloud/environment.zod.ts:26-31 (module docblock) listed
sys_metadata among the Control-Plane tables "(with environment_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_id is 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 the
published .d.ts (editor tooltip for @objectstack/spec/cloud consumers).

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_metadata copy still keys
by environment_id, which this tree cannot settle):

`sys_metadata` (on the metadata tables, `environment_id` is deprecated in
favor of `organization_id` — ADR-0006 v4).

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.ts down by one. check:system-context-census caught a
stale line-number citation as a direct, mechanical consequence:
content/docs/permissions/system-context.mdx:52 cited
environment.zod.ts:136 for the Environment.isSystem field; that's now
:137. Updated in the same PR (still just a text alignment, no new
behaviour).

What did NOT change

  • sys_package_installation (with environment_id) — correct, untouched.
  • content/docs/references/cloud/environment.mdx — regenerated via
    pnpm --filter @objectstack/spec gen:docs, never hand-edited (it carries
    AUTO-GENERATED — DO NOT EDIT).
  • packages/spec/dist/** — gitignored, rebuilt at publish time.
  • No cloud-side schema was queried; no cross-repo read was made.

Tests

  • pnpm --filter @objectstack/spec build — clean.
  • pnpm --filter @objectstack/spec check:generated — all 14 generated
    artifacts up to date (only check:docs was stale before gen:docs; clean
    after).
  • 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:
    • 51 green, including check:doc-formula-expressions and
      check:doc-security-posture after building @objectstack/formula /
      @objectstack/lint (their own PREREQUISITE NOT MET prerequisites).
    • check:system-context-census initially 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-react built, which a
      fresh worktree doesn't do and which this diff doesn't touch.
    • 4 more NOT MEASURED (not pass/fail — each says so itself):
      check:dual-build-cjs-loads and check-dev-prereqs.mjs need a full
      pnpm build across the workspace; check-test-completeness.mjs needs a
      saved turbo run test log (CI-only by design); check-half-states.mjs
      hit this container's REST-channel egress restriction on repo-scoped
      reads (pre-existing container constraint, unrelated to this diff).
  • Full commands and pass/fail evidence in the PR-report comment on [finding] packages/spec cloud docblock lists sys_metadata as a control-plane table "(with environment_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

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>
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/spec/src/cloud/environment.zod.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/src/cloud/environment.zod.ts) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 787d757405db4f3ebbc6ca811948af4438a3fe7apackageMentionDocs.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling labels Aug 31, 2026
@os-warren
os-warren marked this pull request as ready for review August 31, 2026 09:53
@os-warren
os-warren enabled auto-merge August 31, 2026 09:53
@os-warren
os-warren added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit aa7ff56 Aug 31, 2026
35 checks passed
@os-warren
os-warren deleted the claude/issue-13664-sys-metadata-docblock branch August 31, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

2 participants