Repository navigation
docs: mark IMetadataService interface fence as an excerpt, restore getDiagnosed/subscribe - #17407
Merged
baozhoutao merged 2 commits intoSep 10, 2026
Merged
Conversation
… and restore getDiagnosed/subscribe The `## Interface Definition` fence on metadata-service.mdx was introduced as the interface itself and silently omitted 4 of 38 members declared in packages/spec/src/contracts/metadata-service.ts. Reframe it explicitly as a non-exhaustive excerpt pointing at the contract source, and restore getDiagnosed and subscribe — the two omissions that contradicted a subsection the page itself devotes to their pattern (diagnosed-twin reads, watch/subscribe). loadMany and matchEndpoint are left out of the excerpt; neither backs a pattern the page teaches in prose. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
…depends on Restoring subscribe? to the Interface Definition fence brought in MetadataWatchEvent, the only Metadata* type in that fence without a row in the page's own Types Reference table. Read the shape from its actual declaration (packages/spec/src/system/metadata-persistence.zod.ts, MetadataWatchEventSchema) rather than inferring it from MetadataWatchCallback's differently-shaped event. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
Contributor
|
Fixed and re-pushed (no amend/force-push -- plain new commit on top).
Generated by Claude Code |
baozhoutao
marked this pull request as ready for review
September 10, 2026 12:12
baozhoutao
enabled auto-merge
September 10, 2026 12:13
baozhoutao
deleted the
claude/issue-16255-metadata-service-fence-excerpt
branch
September 10, 2026 12:48
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.
Clause-②: no
Closes #16255
What changed
content/docs/kernel/contracts/metadata-service.mdx's## Interface Definitionfence was introduced as
IMetadataServiceitself (export interface IMetadataService { … }with grouping comments reading as a complete tour) while silently omitting 4 of the
38 members the contract source actually declares. Per the maintainer ruling on
#16255 (repair as an excerpt, not a mirror — no gate added in this card):
the fence pointing at
IMetadataServiceinpackages/spec/src/contracts/metadata-service.tsas the authoritative, complete member list, plus an in-fence leading comment
(
// Excerpt — grouped by concern, not exhaustive. See packages/spec/src/contracts/metadata-service.ts for the full declaration.).getDiagnosed?andsubscribe?— the two omissions that eachcontradict a subsection the page itself devotes to their pattern (
### load / loadDiagnosedteaches the diagnosed-twin pattern right above a fence that,before this PR, implied
gethad no diagnosed counterpart;## Watch / Subscribeis built onwatch?, and the fence's own grouping comment says// Watch / subscribe (optional)while never declaringsubscribe).loadMany?andmatchEndpoint?out of the excerpt (see "Members left out" below).Fence-vs-source member diff (my own, independent of triage's/the PM's)
Method: extract the first
```typescriptfence under## Interface Definition(3355 bytes / 57 lines after this PR; 3002 bytes / 54 lines before), then extract
member declaration lines only — lines at the interface body's own indent level
that open a declaration (
name/name?followed by(,<or:) — explicitlyexcluding
//comment lines and multi-line signature continuation lines (e.g.a wrapped
Promise<...>return-type line, which a naive regex misreads as amember named
Promise). Same declaration-line rule applied to theexport interface IMetadataService { … }body inpackages/spec/src/contracts/metadata-service.ts(338–866), with block commentsstripped and only exactly-4-space-indented lines counted (so wrapped parameter
lines like
type: string,at deeper indent are not misread as members either).Before this PR:
This reproduces the PM's
2bafbfdca9reading exactly (including the samesubscribefalse-positive trap from the grouping comment// Watch / subscribe (optional), which my declaration-line filter also has to explicitly dodge sincea naive "name + paren" regex matches that comment line too).
After this PR: fence members = 36,
{fence} - {source} = ∅,{source} - {fence} = {loadMany, matchEndpoint}(left out deliberately, see below).Members restored / left out and why
getDiagnosed?,subscribe?— per the ruling's ground 3: "anexcerpt may omit members, but not the principal member of the pattern it is
itself teaching." Both back a named subsection on this exact page.
loadMany?,matchEndpoint?— neither has a subsection on thispage building a pattern around it (no
##/###section is built on eithername;
matchEndpointis dispatcher-internal per its own TSDoc,loadManyisthe bulk-read counterpart to
listwith no dedicated teaching passage here).Omitting them from a fence that now explicitly calls itself a non-exhaustive
excerpt and points at the full source does not reproduce the misleading
inference the issue is about — there is no prose passage on this page a reader
could hold up against their absence.
Excerpt wording
Added, right before the fence:
And the fence's own first line:
// Excerpt — grouped by concern, not exhaustive. See packages/spec/src/contracts/metadata-service.ts for the full declaration.Generated-page reading
content/docs/kernel/contracts/metadata-service.mdxis hand-written, notgenerated: it is listed in
scripts/docs-audit/handwritten-docs.json, and theonly generated docs tree in this repo is
content/docs/references/**(confirmed by
turbo.json's per-task inputs andscripts/check-corpus-claim-drift.mjs'sown header). Hand-editing it is the correct path.
content/docs/**gate family (dispatch-gates §③)node scripts/pm/dispatch-gates.mjs --commands(from merge-base776d64cd3d) names 39 commands (26 pnpm, 13 direct node) plus 7whole-tree-population families run identically on every card. After
pnpm installand building the packages these gates read compiled outputfrom (
@objectstack/formula,@objectstack/lint,@objectstack/spec,@objectstack/client-react,@objectstack/client— none of them touched bythis diff, needed only because a fresh worktree ships no
dist/), all 39pass (captured pre-pipe,
EXIT=$?per command):(the
--self-testcompanions ofcheck-closing-keyword-parity,check-doc-frontmatter,check-doc-route-spelling,check-docs-section-name, andcheck-section-landing-indexare listed inline above as
[+ --self-test], each independently EXIT=0.)The 48 artifact-roster families, the 11 checker-health-only
--self-testfamilies and the 14 pending-changeset families that
dispatch-gatesalsoprints are outside this scope by its own account (none of their rosters live
under a path this diff touches).
Build closure (①)
content/docs/**is not a workspace package, so this diff has no dependencyclosure to build. Confirmed directly:
pnpm exec turbo ls --affected --filter='...[origin/main]'(from HEADa7a3b194b8) → 0 packages. (A bareturbo ls --affectedwith no explicit base misreads this worktree's historyand reports the whole 80-package graph — the explicit-base form is the one
that answers the actual question and is what's quoted above.)
Changeset
skip-changeset(label applied on the PR, not just asserted here).Measured, not assumed:
apps/docs(which servescontent/docs/**) is"private": true, and none of the repo's 22 published packages'package.jsonfiles[]arrays referencecontent/docs(grepped after building — zero hits).Nothing this diff touches ships in any published tarball.
Serial / boundaries
main(31baf09440, merged before I branched) —not in flight, no re-read needed beyond confirming it landed clean.
MetadataManager.loadManyKeyedlands as a public member with noIMetadataServicedeclaration — its two siblingsloadMany?andloadDiagnosed?are declared, and the call site narrows with a local structural type instead #15385 remains open,domain:spec, unassigned,Blocked-by: #14423— not inflight, untouched by this PR.
loadManyKeyedis intentionally not added here;that is
MetadataManager.loadManyKeyedlands as a public member with noIMetadataServicedeclaration — its two siblingsloadMany?andloadDiagnosed?are declared, and the call site narrows with a local structural type instead #15385's job in the spec lane.content/docs/kernel/contracts/metadata-service.mdxtouched;packages/spec/**untouched.Generated by Claude Code