Skip to content

feat(client): close the 9 metadata-family REST gaps (#3587 batch 1/5) - #3625

Merged
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx
Jul 27, 2026
Merged

feat(client): close the 9 metadata-family REST gaps (#3587 batch 1/5)#3625
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

First of five batches closing the 43 REST↔client gaps the #3587 ledger carries (the REST-surface sibling of the dispatcher tranche #3569#3579). This batch: the metadata family, 9 gaps → 0.

Seven new client.meta methods

Each speaks the exact wire shape its rest-server.ts handler mounts, and each is URL-pinned in client.test.ts:

Method Route What it is
getDiagnostics({type?, severity?, packageId?}) GET /meta/diagnostics cross-type spec-validation sweep
getReferences(type, name) GET /meta/:type/:name/references reverse-reference listing
getBookTree(name, {packageId?}) GET /meta/book/:name/tree ADR-0046 §6 book-spine resolution
getAudit(type, name, {limit?}) GET /meta/:type/:name/audit ADR-0010 §3.6 protection-audit trail
publishItem(type, name, {message?}) POST /meta/:type/:name/publish ADR-0033 per-item draft→active
rollbackItem(type, name, toVersion, {message?}) POST /meta/:type/:name/rollback restore at history version
diffItem(type, name, {from?, to?}) GET /meta/:type/:name/diff structural version diff

The two compound-name rows needed no new methods

The audit note claimed meta.getItem URL-encodes the slash and so cannot reach GET|PUT /meta/:type/:section/:name. Re-verified against the source: that's wronggetItem/saveItem interpolate names unencoded (only deleteItem encodes), so getItem('object', 'views/all_leads') already lands on the compound handler. Those two rows flip to sdk with a pinning test locking the unencoded pass-through (the property the wrong note shows nothing guarded), and the note is corrected.

Ledger & guard

  • 9 metadata rows gapsdk; the two-sided conformance guard (rest + client halves) now proves each named method exists.
  • Ratchet lowered 43 → 34 with the per-family remainder documented in the test comment.
  • client-sdk.mdx: meta namespace 11 → 18 methods, examples added for the lifecycle/introspection calls.

Verification

  • @objectstack/client: 138/138 (+8 URL-pinning tests), bare tsc clean.
  • @objectstack/rest: 394/394 (ledger guard green at the new ratchet).
  • Changeset: client minor, rest patch.

Remaining batches: reports 8, approvals 6 + record-shares 3, sharing-rules 5 + security-explain 2 + search 1, external-datasource 5 + data-actions 2 + email 1 + analytics 1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5


Generated by Claude Code

Seven new meta methods, each URL-pinned in client.test.ts:
getDiagnostics (spec-validation sweep), getReferences (reverse refs),
getBookTree (ADR-0046 §6), getAudit (ADR-0010 §3.6 protection trail),
publishItem / rollbackItem / diffItem (ADR-0033 per-item lifecycle).

The two compound-name routes (GET|PUT /meta/:type/:section/:name) were
already expressible — getItem/saveItem pass slashes through unencoded;
the audit note claiming an encoding barrier described deleteItem, not
them. Flipped to sdk with pinning tests locking the pass-through
instead of adding methods.

Ledger: 9 metadata rows gap→sdk; ratchet 43→34. client-sdk.mdx meta
section updated (11→18 methods + examples).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 27, 2026 10:49am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m and removed documentation Improvements or additions to documentation tests tooling labels Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/client, @objectstack/rest.

18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via packages/client)
  • content/docs/api/client-sdk.mdx (via @objectstack/client)
  • content/docs/api/data-flow.mdx (via @objectstack/client)
  • content/docs/api/environment-routing.mdx (via @objectstack/client)
  • content/docs/api/error-catalog.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/api/error-handling-server.mdx (via @objectstack/rest)
  • content/docs/api/index.mdx (via @objectstack/rest)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/client)
  • content/docs/kernel/runtime-services/data-service.mdx (via packages/client)
  • content/docs/kernel/runtime-services/index.mdx (via packages/client)
  • content/docs/permissions/authentication.mdx (via @objectstack/client)
  • content/docs/plugins/index.mdx (via @objectstack/rest)
  • content/docs/plugins/packages.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/protocol/kernel/i18n-standard.mdx (via packages/rest)
  • content/docs/protocol/kernel/realtime-protocol.mdx (via @objectstack/client)
  • content/docs/releases/implementation-status.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/releases/v12.mdx (via @objectstack/rest)
  • content/docs/releases/v16.mdx (via @objectstack/client)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants