Skip to content

metadata-core: MetadataEventSchema.source's describe and the sys_metadata_history.source docs name labels ("studio", "rest", "ai", "git-import") that no producer writes — the family's collector after #24328 #24336

Closed

Description

@objectstack-fleet

Filing gate ①: wrong text with a named landing. This is the family's collector card under the same-family rule: #24328 (the spec half, PR #24334) was the first position, and this card covers the rest.

Filed by domain:spec seat 2 (#18549) · zhuangjianguo · session session_019oFY6Hi35J7atvgVFnmoaK, from the #24328 dev's out_of_scope_findings[0] (PR #24334, report on #24328). The seat verified it below. ⛔ Not a claim. Self-labelled domain:engine under the filer exception (packages/metadata-core); grade and area:* are triage's.

Measured on origin/main ec749fbb44

The positions (the enumeration nail: git grep -n '"git-import"' and git grep -n "'studio'" over packages/, docs/adr/ and content/):

position text shipped?
packages/metadata-core/src/types.ts:148, MetadataEventSchema.source .describe('Origin label: "fs", "studio", "rest", "ai", "git-import", …') yes: the package dist
packages/metadata-core/src/objects/sys-metadata-history.object.ts:35–:36, the module header "source records the producer ('sys-metadata-repo', 'fs', 'studio', …)" code comment
the same file, :136–:137, above the source field "Producer of the event ('sys-metadata-repo', 'fs', 'studio', 'api', …)" code comment
packages/spec/src/api/protocol.test.ts:2141–:2162 the fixture is called "a verbatim-shaped capture of a real historyMetaItem return", but its update event carries source: 'studio' test only
docs/adr/0008-metadata-repository-and-change-log.md:226, the §2.4 sketch source: string; // 'fs', 'studio', 'rest', 'ai', 'git-import', … governed (Tier H): illustration only
packages/spec/src/api/protocol.zod.ts:1884, the spec's history response the same list fixed by PR #24334 (#24328), not here

What the producers write (non-test code; the #24328 seat check 6250650493 re-read these):

  • SysMetadataRepository defaults to 'sys-metadata-repo' (sys-metadata-repository.ts:1121, :1150, :1271), plus 'sys-metadata-repo.publish' (:1467) and 'sys-metadata-repo.revert' (:1619).
  • The protocol passes 'protocol.saveMetaItem' (protocol.ts:22655) and 'protocol.publishMetaItem', and the internal migration passes 'migrate-stored'.
  • @objectstack/metadata-fs's FileSystemRepository writes 'fs' into its own change log and events (packages/metadata-fs/src/repository.ts:674, :1045). This schema is shared by both repositories, so for this schema 'fs' is a real label. The spec's history response is different: that door reads SysMetadataRepository only.
  • No non-test code under packages/** writes 'studio', 'rest', 'ai' or 'git-import'. No consumer compares source against them. Cloud's writers were not read.

The work

One PR on packages/metadata-core, describe text and comments only:

  • Make MetadataEventSchema.source's describe say what the label is: an open label naming the write path, not an authoring-surface enum, with labels the producers really write (for example 'sys-metadata-repo', 'protocol.saveMetaItem', 'migrate-stored', 'fs'). Keep it z.string().
  • Make the two sys-metadata-history.object.ts comments agree with that.
  • Riders, if the reader agrees: the protocol.test.ts fixture label (a packages/spec test, domain:spec's file; say so in the PR's file-surface declaration), so that a "verbatim-shaped capture" carries a label a real save stamps. ⛔ The ADR-0008 sketch is a governed surface: leave it, or name it in Acceptance notes for a person.
  • A patch changeset on @objectstack/metadata-core with Clause-②: no. Regenerate anything check:generated proves stale.

Reader who acts: the domain:engine seat (packages/metadata*), one PR.

Grade (a suggestion; triage's call)

p3. Describe and comment wording only. No door's behaviour or accepted shape changes.

Dedupe

Two semantic searches of this repository's issues:

Dedupe words: MetadataEventSchema source describe origin label; metadata-core event source studio rest ai git-import; sys_metadata_history source producer comment studio api.


Generated by Claude Code

Activity

  1. added
    documentationImprovements or additions to documentation
    pm:queueReady for the PM dispatch loop
    domain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they land
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Oct 18, 2026
  2. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 4 · 2026-10-19T22:20Z
    Session: session_01AHeUBbe6S3JRawcpbLejXD (the dispatching seat; the dev runs as this session's subagent, identified by the branch)
    Account: os-warren (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/issue-24336-metadata-event-source-describe
    Worktree: objectstack-issue-24336
    Domain: domain:engine
    Seat: domain:engine#2 (seat post #20966)
    File surface: packages/metadata-core/src/types.ts (MetadataEventSchema.source's .describe() only; it stays z.string()) and packages/metadata-core/src/objects/sys-metadata-history.object.ts (the module header and the comment above source), plus anything check:generated-style gates prove stale from that describe; one .changeset/24336-*.md (@objectstack/metadata-core patch). ⛔ Not the packages/spec test fixture (domain:spec's file) and ⛔ not ADR-0008 (governed, Tier H): both go to the PR's Acceptance notes. (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate; published describe text whose correctness no gate judges, so not the floor)
    Clause-②: no
    Responsibility: n/a — not a defect card (published describe and comment wording; the filer's exception is release-text)
    Thread-read: none
    Serial constraints cleared: none — no lane claim and no open PR touches either file (every open PR's file list read this fire). #24639 (this seat, in flight) edits packages/objectql/src/engine.ts only.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report
    {
    "issue": 24336,
    "status": "done",
    "branch": "claude/issue-24336-metadata-event-source-describe",
    "pr": "#24675",
    "session": "session_01AHeUBbe6S3JRawcpbLejXD (subagent: the dispatching seat's id, per the claim comment 6278643856)",
    "premise_still_valid": true,
    "summary": "Premise held on origin/main bfc1539: MetadataEventSchema.source still read 'Origin label: "fs", "studio", "rest", "ai", "git-import", …' and both sys-metadata-history.object.ts comments still named 'studio'/'api'. The describe now says the field is the write path that produced the event, an open label its writer stamps rather than an enum of authoring surfaces to pick from or match against, with examples real producers stamp (protocol.saveMetaItem, protocol.publishMetaItem, migrate-stored, sys-metadata-repo as SysMetadataRepository's default, fs from FileSystemRepository); it stays z.string(). The two history-object comments list the labels that really reach sys_metadata_history.source and drop 'fs', which FileSystemRepository writes to its own JSONL log, never to that table. Producers the card missed and the PR body tables: DatabaseLoader ('database-loader', written straight into sys_metadata_history), protocol.deleteMetaItem / protocol.rollbackMetaItem / protocol.revertCommit, the CLI's 'os migrate security-catalog-overlays', service-automation's 'migrate-stored', InMemoryRepository 'in-memory' and LayeredRepository's 'LAYER:SOURCE' prefix (the last two have no non-test instantiation). One patch changeset on @objectstack/metadata-core with Clause-②: no; nothing reads the describe, so no artifact was regenerated. Worktree and node_modules removed after the PR opened; main had not moved past bfc1539, so no merge was needed.",
    "tests": "At head 197216c: pnpm --workspace-concurrency=2 --filter '@objectstack/metadata-core...' build under os-verify-lock, VERDICT command-exit 0; dist/index.js and dist/index.cjs each carry 'Which write path produced the event' 1 time and 'git-import' 0 times. pnpm --filter @objectstack/metadata-core test: 'Test Files 18 passed (18)', 'Tests 774 passed (774)'; pnpm --filter @objectstack/metadata-core typecheck (tsc --noEmit && tsc --noEmit -p tsconfig.test.json) exit 0, in the same locked run, VERDICT command-exit 0. No ablation or reverse verification: the diff changes describe and comment prose only, and no test pins that text. test:repo was not run locally: the diff touches no file in that project, so it is declared to CI.",
    "gates": "Derived with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (stderr: tree objectstack-ai/objectstack at 197216c, 3 paths vs merge base bfc1539, 41 changed lines): 57 commands, each run with its exit captured before any pipe (redirect, then EXIT). 55 exited 0 on the first run. pnpm check:lean-entry-closure exited 3 (PREREQUISITE NOT MET, objectql dist absent), then exited 0 after pnpm turbo run build --filter=@objectstack/objectql under the lock ('2 published condition(s) measured from a real load'). NOT MEASURED: pnpm check:dual-build-cjs-loads, exit 3, reason: it needs every workspace package's dist and only a whole-workspace build satisfies it. This is a declared narrowing; CI's Lint & Repo Gates runs it. --ran reconciliation exit 0: '57 derived famil(ies) accounted for — 56 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. Record: node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0; node scripts/check-adr-0087-registration.mjs --self-test :: exit 0; node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0; node scripts/check-changeset-no-major.mjs --self-test :: exit 0; node scripts/check-ci-filter-parity.mjs :: exit 0; node scripts/check-closing-keyword-parity.mjs :: exit 0; node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0; node scripts/check-comment-mask-adoption.mjs :: exit 0; node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0; node scripts/check-comment-mask-corpus.mjs :: exit 0; node scripts/check-dts-emitted.mjs --self-test :: exit 0; node scripts/check-empty-changeset.mjs --base origin/main :: exit 0; node scripts/check-empty-changeset.mjs --self-test :: exit 0; node scripts/check-issue-citations.mjs :: exit 0; node scripts/check-keyed-text-bounds.mjs :: exit 0; node scripts/check-keyed-text-bounds.mjs --self-test :: exit 0; node scripts/check-platform-object-tenancy-census.mjs :: exit 0; node scripts/check-platform-object-tenancy-census.mjs --self-test :: exit 0; node scripts/check-plugin-teardown-shape.mjs :: exit 0; node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0; node scripts/check-position-name-fold-loaders.mjs :: exit 0; node scripts/check-position-name-fold-loaders.mjs --self-test :: exit 0; node scripts/check-registry-log-declared.mjs :: exit 0; node scripts/check-registry-log-declared.mjs --self-test :: exit 0; node scripts/check-rest-log-spy-declared.mjs :: exit 0; node scripts/check-rest-log-spy-declared.mjs --self-test :: exit 0; node scripts/check-system-context-census.mjs :: exit 0; node scripts/check-system-context-census.mjs --self-test :: exit 0; node scripts/check-undeclared-dep-imports.mjs :: exit 0; node scripts/check-undeclared-dep-imports.mjs --self-test :: exit 0; node scripts/docs-audit/check-affected-docs.mjs :: exit 0; node scripts/docs-audit/check-drift-comment.mjs :: exit 0; node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0; node scripts/release-pending-publish.mjs --self-test :: exit 0; pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0; pnpm check:changeset-gate-self-tests :: exit 0; pnpm check:cross-package-test-inputs :: exit 0; pnpm check:doc-authoring :: exit 0; pnpm check:driver-memory-census :: exit 0; pnpm check:dts-closure :: exit 0; pnpm check:dual-build-cjs-loads :: exit 3; pnpm check:gitlink-declared :: exit 0; pnpm check:issue-citations :: exit 0; pnpm check:lean-entry-closure :: exit 0; pnpm check:logger-receiver-detach :: exit 0; pnpm check:nul-bytes :: exit 0; pnpm check:objectui-changeset :: exit 0; pnpm check:org-identifier :: exit 0; pnpm check:page-declaration-shape :: exit 0; pnpm check:pm-changeset-deadline-census :: exit 0; pnpm check:published-files :: exit 0; pnpm check:refd-timer-probe :: exit 0; pnpm check:slot-lookup :: exit 0; pnpm check:sourcemap-no-sources-content :: exit 0; pnpm check:test-source-alias :: exit 0; pnpm check:tier-file-adoption :: exit 0; pnpm check:watch-hint-literal :: exit 0. CI check-runs on 197216c, read once after the PR opened: 23 runs. 'No other open PR may claim the same issue' and 'No other open PR may claim the same single-writer path' were success, 'Packed-tarball smoke (opt-in)' was skipped, and the other 20 were in_progress (Lint lanes, Type Check lanes, Governed Surface Queue Guard, Check Changeset, Check PR Size, the claim-branch check). Test Core and Build Core were not yet listed. Not awaited, per the contract.",
    "mcp_calls": "0 — none",
    "api_writes": "2 relay strokes (each a POST /repos/objectstack-ai/objectstack/dispatches executed as objectstack-fleet[bot]): (1) pr_create, run 39336935971 success: POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /repos//issues/24675/assignees ['os-warren'], read back 5801 bytes sent, 5801 stored, identical; (2) comment: POST /repos//issues/24336/comments (this os-dev-report). git push x2 (branch probe, then the commit) are not REST writes.",
    "open_questions": [],
    "out_of_scope_findings": [
    "carrier: none (承接者:无) · noted, not filed · packages/spec/src/api/protocol.test.ts about lines 2141-2162: the fixture called 'a verbatim-shaped capture of a real historyMetaItem return' carries source 'studio', while a real save stamps 'protocol.saveMetaItem'. Test-only, domain:spec's file, named in the PR's Acceptance notes as a rider for domain:spec, as the dispatch directed",
    "carrier: the maintainer (governed Tier H) · noted, not filed · docs/adr/0008-metadata-repository-and-change-log.md:226, the section 2.4 sketch, still lists 'fs', 'studio', 'rest', 'ai', 'git-import'. Illustration only, named in the PR's Acceptance notes for a person"
    ],
    "files_changed": [
    ".changeset/24336-metadata-event-source-describe.md",
    "packages/metadata-core/src/objects/sys-metadata-history.object.ts",
    "packages/metadata-core/src/types.ts"
    ],
    "line_budget": "n/a — no skills/** or ledgered file touched; diff +35/-6 over 3 files",
    "deviations": [
    "Declared narrowing: check:dual-build-cjs-loads is NOT MEASURED locally (needs a whole-workspace build); CI runs it",
    "The gate battery ran under nohup with per-command exit capture, and the foreground waited on it with tail --pid; no sleep and no polling",
    "Commit trailers are AGENTS.md's model-free pair (Claude-Session + Co-authored-by: Claude), not the harness reminder's model-named Co-Authored-By line; the PR footer is AGENTS.md's session-URL block, not the harness two-line block. Both follow the precedence os-dev.md states"
    ]
    }


    Generated by Claude Code

  4. objectstack-fleet commented on Oct 19, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR #24675 comment 6279088248 · domain:engine seat 2 · session_01AHeUBbe6S3JRawcpbLejXD · 2026-10-19T22:51Z. It lands when main's full battery is green or its red is attributed to another lane (held per #24512 6278925351), and every check on the PR head is green. Triage gap: this self-labelled card carries no area:*.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 20, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:engine seat 2 · session_01AHeUBbe6S3JRawcpbLejXD · 2026-10-20T01:47Z

    reading result
    PR #24675 merged through the queue 2026-10-20T01:41Z, merge 78b1a63bc4
    origin/main carries 78b1a63bc4 (git merge-base --is-ancestor); git grep -c "an open label its writer stamps" in packages/metadata-core/src/types.ts = 1

    State: closed completed by the PR's Fixes; pm:dispatched removed in this act. The @objectstack/metadata-core patch rides the next Version Packages PR.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationdomain:engineRetired 2026-10-22, alias of domain:server (engine surface); in-flight cards keep it until they landpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions