Skip to content

spec: the HistoryMetaItemResponseSchema events[].source describe names labels ("studio", "rest", "ai", "git-import") that no producer in this repository writes #24328

Closed

Description

@objectstack-fleet

Filing gate ①: wrong text with a named landing.

  • reach: exception: release-text. @objectstack/spec ships the describe, and content/docs/references/api/protocol.mdx:2030 publishes it. No live door was read; the producers are named below from code.
  • A reader of the published contract is told the history door's source carries surface labels such as "studio" or "ai". The door answers code-path labels instead, so a consumer that branches on the documented values never matches.

Filed by domain:spec seat 2 (#18549) · zhuangjianguo · session session_019oFY6Hi35J7atvgVFnmoaK, from the #24298 dev's out-of-scope finding (release comment 6250059826 on #24298). The seat verified it below. ⛔ Not a claim. Lane, grade and area:* are triage's.

Measured on origin/main 1ef0ee89d4

  • The describe. packages/spec/src/api/protocol.zod.ts:1884–:1887, HistoryMetaItemResponseSchema → events[].source: z.string().describe('Origin label of the write: "fs", "studio", "rest", "ai", "git-import", …'). content/docs/references/api/protocol.mdx:2030 carries the same sentence.
  • What the producers write (non-test code):
    • packages/metadata-protocol/src/protocol.ts:22655: a save defaults to 'protocol.saveMetaItem'. The publish paths pass 'protocol.publishMetaItem' (:24927 and others), and the package publish passes 'protocol.publishPackageDrafts'.
    • packages/metadata-protocol/src/sys-metadata-repository.ts:1121 and :1150 default to 'sys-metadata-repo'; :1467 and :1619 default to 'sys-metadata-repo.publish' and 'sys-metadata-repo.revert'. The history projection at :1821 passes the stored value through, defaulting to 'sys-metadata-repo'.
    • The internal migration writes 'migrate-stored'. protocol.ts:7329 filters on that label.
    • packages/metadata-fs/src/repository.ts:674 writes 'fs', the one listed label that a producer writes.
  • The other listed labels. A git grep over packages/** (tests excluded) for source: 'studio', 'rest', 'ai' and 'git-import' finds no producer. A git grep for a consumer comparing source against 'studio', 'rest', 'ai' or 'git-import' finds none.
  • Not read: cloud's writers (no read access from this seat). The copilot's draft path goes through saveMetaItem, which stamps 'protocol.saveMetaItem' unless a caller passes source. Whether cloud passes one is NOT MEASURED.

The work

One PR on packages/spec, describe text only:

  • Make the describe say what the label is: an open code-path label naming the write path (for example 'protocol.saveMetaItem', 'protocol.publishMetaItem', 'sys-metadata-repo', 'migrate-stored', 'fs'). Say that it is not an authoring-surface enum.
  • Regenerate content/docs/references/api/protocol.mdx with the spec's own generator, never by hand.
  • The schema stays z.string(): no accepted value changes. A patch changeset on @objectstack/spec with Clause-②: no.

Reader who acts: the domain:spec seat, one PR. protocol.zod.ts is also touched by #24298's held branch (claude/issue-24298-draft-key-provenance, the GetMetaItemResponseSchema region, not this one). Read the live claims first.

Grade (a suggestion; triage's call)

p3. Describe and docs wording only; the door's behaviour and the accepted shape do not change.

Dedupe

Two semantic searches of this repository's issues:

Dedupe words: history events source describe origin label studio rest ai git-import; HistoryMetaItemResponseSchema source code-path label.


Generated by Claude Code

Activity

  1. added
    documentation
    pm:queue
    domain:spec
    pm:dispatched
    and removed
    pm:queue
    on Oct 18, 2026
  2. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1 · 2026-10-18T12:49Z · the HistoryMetaItemResponseSchema events[].source describe in packages/spec/src/api/protocol.zod.ts, describe text only, and the reference page it generates
    Session: session_019oFY6Hi35J7atvgVFnmoaK (the seat; the dev is an os-dev subagent of this session)
    Account: zhuangjianguo (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/issue-24328-history-source-describe
    Worktree: objectstack-issue-24328
    Domain: domain:spec
    Seat: domain:spec#2 (seat post #18549)
    File surface (paths on origin/main 1ef0ee89d4 or later; stop on a breach and explain it in the report):

    • packages/spec/src/api/protocol.zod.ts: the events[].source .describe() inside HistoryMetaItemResponseSchema only (:1884–:1887);
    • content/docs/references/api/protocol.mdx and any other artefact check:generated proves stale, regenerated by the spec's own generators, never by hand;
    • one .changeset/24328-*.md (patch on @objectstack/spec, Clause-②: no).
    • ⛔ No key, type, export or accepted value changes: the field stays z.string(). ⛔ No producer code in packages/metadata-protocol/** or packages/metadata-fs/**.
      Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: no path-derived mandate; the describe is judged against the producers' labels, so it is not mechanical). The review before the queue runs at CONTRACT_REVIEW_TIER (a published .describe() in non-test packages/spec/src/**).
      Clause-②: no
      Responsibility: n/a — not a defect card (a documentation correction)
      Thread-read: none
      Serial constraints cleared:
    • The file lists of all 6 open PRs were read in this act. None touches packages/spec/src/api/protocol.zod.ts or content/docs/references/api/protocol.mdx.
    • No in-flight lane claim names either file. metadata-protocol / spec: a draft carries no per-field provenance (which surface changed which key, and when), so Studio cannot mark a copilot's draft change with the ruled 草稿 chip and 来源 line #24298's held branch (claude/issue-24298-draft-key-provenance, no PR, released 6250059826) edits the GetMetaItemResponseSchema region of the same file and regenerates the same page. Whichever lands second regenerates the page after a merge of main.

    Generated by Claude Code

  3. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 24328,
      "status": "done",
      "branch": "claude/issue-24328-history-source-describe",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/24334",
      "session": "session_019oFY6Hi35J7atvgVFnmoaK",
      "premise_still_valid": true,
      "summary": "The HistoryMetaItemResponseSchema events[].source describe (packages/spec/src/api/protocol.zod.ts:1884) no longer lists \"fs\", \"studio\", \"rest\", \"ai\", \"git-import\". It now reads: 'Which code path wrote the event: an open label the server stamps, not an enum an author or client picks from (e.g. `protocol.saveMetaItem`, `protocol.publishMetaItem`, `migrate-stored`). The history row's stored value is passed through; `sys-metadata-repo` is the repository's own default and the answer for a row that stored none.' The field stays z.string(); content/docs/references/api/protocol.mdx:2030 was regenerated by gen:docs, the one artifact check:generated proved stale. Premise held on base 1ef0ee89d4 (G1 exact: 1 hit in packages/spec/src at :1885, 1 in content/docs at protocol.mdx:2030; 0 on the final head). G2 re-read on merge base 117301705: the door (protocol.ts:24594) reads only getOverlayRepo() (:8215, always a SysMetadataRepository), i.e. sys_metadata_history rows, projected at sys-metadata-repository.ts:1821 with fallback 'sys-metadata-repo'; protocol.saveMetaItem :22655 → repo.put :23890/:23896; protocol.publishMetaItem via promoteDraftForPublish :25012 → repo.promoteDraft :25338-:25342 (also the package publish's path); migrate-stored :24536 and service-automation flow-credential-migration.ts:228; repository default 'sys-metadata-repo' at :1121 (put) and :1271 (delete). Two corrections to the card's measurement, both in the PR body: (1) 'protocol.publishPackageDrafts' is an audit-row label only (protocol.ts :26390, :26754, :26774, :26863 are all recordMetadataAudit / recordPendingDenialAudit); a package publish's history rows carry 'protocol.publishMetaItem'. (2) 'fs' is written by @objectstack/metadata-fs's FileSystemRepository into its own JSONL change log and broker events (repository.ts :421 :483 :674 :1045), attached as 'a supplementary event source ... No write mirroring yet' (packages/metadata/src/plugin.ts:852-:855); no non-test code passes source 'fs' into saveMetaItem or a SysMetadataRepository, so the history door never answers it. I therefore left 'fs' out of the examples, which differs from the card's 'for example' list; the ruling's intent (name what the label is, with labels a producer writes for this door) is kept. Seat may override. G4: no test, ledger row or snapshot pinned the old sentence (repo-wide git grep: protocol.zod.ts and protocol.mdx only). G5: #24298's region untouched. files_changed: .changeset/24328-history-source-describe.md (patch on @objectstack/spec, Clause-②: no); content/docs/references/api/protocol.mdx (1 line, generated); packages/spec/src/api/protocol.zod.ts (the one describe, +5/-2). deviations: (a) 'fs' omitted from the describe's examples, as above. (b) main merged once before the PR opened (8deed12d3 = merge of 117301705, AGENTS.md section 10); it brought packages/spec/src/kernel/public-auth-features.ts, so build, check:generated, tests and typecheck were re-run on the merged head. main has since moved to ec749fbb4 (objectql + protocol.ts:15847, no source label); not merged, no conflict. (c) @objectstack/formula, lint, objectql, client and client-react were built under the lock so five derived gates could measure. (d) I fetched #24298's held branch read-only into a private ref (refs/os-dev-24328/peek-24298) to read its file list (it does not touch protocol.test.ts or this region), then deleted that ref; the branch itself was not touched. (e) Commit trailers use AGENTS.md's model-free pair, and the PR body ends with AGENTS.md's session-URL footer, not the harness reminder's lines. No labels written. The PR body was written once at create and read back byte-identical (9661 sent = 9661 stored). The worktree is removed after this comment posts.",
      "tests": "All heavy runs through scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT set; every exit code captured before any pipe. On the merged final head 8deed12d3: (1) pnpm --filter @objectstack/spec build: 'VERDICT command-exit 0'. (2) pnpm --filter @objectstack/spec check:generated: exit 0, '✓ All 14 generated artifacts are up to date' (before gen:docs on de5b01674 it was exit 1, '✗ 1 of 14 artifact(s) stale: content/docs/references/** / pnpm --filter @objectstack/spec gen:docs'; gen:docs exit 0, '✅ Generated 227 files', diff = protocol.mdx 1 line). (3) pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2: 'VERDICT command-exit 0', 'Test Files 694 passed (694)', 'Tests 21041 passed | 1 todo (21042)'. (4) pnpm --filter @objectstack/spec typecheck: 'VERDICT command-exit 0', ending 'check:test-typecheck: OK'. (1)-(4) also passed with identical counts on the pre-merge head e5d91992a. Control-byte self-scan (grep -naP over the three changed files): 0 hits. Old sentence: git grep 'Origin label of the write' = 0 hits on HEAD, 2 on base. No ablation and no reverse verification: no tested behaviour or type changed (describe text only). test:repo not run locally (declared to CI's Test Core); packages/spec has no workspace deps, so the closure step is the spec build itself.",
      "gates": "Local, final head 8deed12d3: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (no paths) derived 104 commands from 3 paths vs merge base 117301705 (the PM's lead had 96; the 8 extra are changeset-driven families now that a .changeset exists). Run by a while-read loop recording each exit before any pipe: 98 exit 0 first pass, 6 exit 3 PREREQUISITE NOT MET; after a locked turbo build of formula/lint/objectql/client/client-react ('VERDICT command-exit 0', 35 tasks), check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift and check:lean-entry-closure re-ran exit 0. --ran exit 0: 'Run reconciliation — 104 derived, 103 run, 1 NOT-MEASURED, 0 UNRUN' / '✓ dispatch-gates --ran: 104 derived famil(ies) accounted for — 103 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. Verdict lines: check:docs '✅ 227 generated files in sync with packages/spec'; check:doc-authoring '✓ ... 19016 customer-facing string(s) across 1429 spec sources clean'; check-spec-docblock-symbol-anchors '✅ 4972 anchors across 2121 spec sources resolve'; check:nul-bytes 'OK (scanned 12185 text file(s) ... no raw ASCII control bytes)'; check-adr-0087-registration '✓ this PR adds no declared-breaking changeset (1 non-breaking changeset(s) seen)'; check-empty-changeset '✓ No empty-frontmatter changeset introduced by this diff'. NOT MEASURED: check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE NOT MET (92 package entries without dist); no whole-repo build locally, a declared narrowing; CI Lint & Repo Gates runs it. check-platform-checklist not owed (no export renamed or removed). Local-only families: NOT MEASURED: check:dev-prereqs, reason: exit 1 with '✗ The workspace is not built — 1 unmet precondition, not a list of problems' (35 of 70 workspace packages have no dist; its self-test passed, 19 batteries / 76 cases); it judges pnpm dev readiness of the whole workspace and I ran no whole-repo build; the spec dist half is covered by check:generated's 'declaration stamp match'. check:skill-frame-freshness not owed (no four-axis frame file touched). CI, PR #24334 check-runs on 8deed12d3, read once just before this report: 38 runs; success: Auto Label, Check Documentation Links, Check PR Size, Dogfood Regression Gate, No other open PR may claim the same issue, No other open PR may claim the same single-writer path, Part-of PR must not also close its card, Spec property liveness, The card this PR closes must claim this branch, filter; skipped: Console Pin Gate, Dogfood Regression Gate (matrix), Dogfood Verify CLI, Packed-tarball smoke (opt-in), Temporal Conformance; in_progress: Build Core, Build Docs, Check Changeset, Flag docs affected by code changes, Governed Surface Queue Guard, the eight Lint lanes, Test Core 1/6-6/6, the four Type Check lanes; 0 failure. in_progress is the honest value; not waited on, per the report contract.",
      "mcp_calls": "0 — no MCP GitHub tool used",
      "api_writes": "3 — REST writes executed as objectstack-fleet[bot] by 2 fleet-write relay strokes (scripts/pm/fleet-write/dispatch.mjs and scripts/pm/post-stamped.mjs; each stroke one POST /repos/objectstack-ai/objectstack/dispatches): stroke 1, run 39132413315 success = POST /repos/objectstack-ai/objectstack/pulls (draft, #24334) + POST /repos/objectstack-ai/objectstack/issues/24334/assignees (zhuangjianguo, read back); stroke 2 = POST /repos/objectstack-ai/objectstack/issues/24328/comments (this os-dev-report). git push x4 of the branch (empty probe, de5b01674, e5d91992a, 8deed12d3) is not a REST write. Reads only otherwise: card + comments, PR #24310, #24291's comments (report format), check-runs, PR #24334 read-back, the relay's route read.",
      "open_questions": [],
      "out_of_scope_findings": [
        "class: a (wrong published text; same family as #24328, one package down) · reach: exception: release-text — @objectstack/metadata-core is published (files: dist, README.md, CHANGELOG.md), and its built dist/index.js and dist/index.cjs (built from 8deed12d3) carry the string, with the positive control 'Set on op=\"rename\"' in the same two files · evidence: packages/metadata-core/src/types.ts:148, MetadataEventSchema.source .describe('Origin label: \"fs\", \"studio\", \"rest\", \"ai\", \"git-import\", …'); no non-test writer in packages/** stamps 'studio', 'rest', 'ai' or 'git-import'. This schema is shared by both repositories, so the right text there is not the spec's: 'fs' is real for the FileSystemRepository (metadata-fs repository.ts :421 :483 :674 :1045), and the SysMetadataRepository side stamps sys-metadata-repo* defaults and protocol.* / migrate-stored labels. Riders in the same package, code comments: objects/sys-metadata-history.object.ts :35-:36 and :136-:137 (list 'studio', 'api'). Landing: packages/metadata-core, a patch changeset on @objectstack/metadata-core. Outside this card's claimed file surface, so not fixed here; #24328 closes with this PR, so the seat files it (follow-up card, or the family's closing card if one exists) · dedupe words: MetadataEventSchema source describe origin label; metadata-core event source studio rest ai git-import; sys_metadata_history source producer comment studio api",
        "class: observation (not a/b/c) · carrier: none · noted in PR #24334 Acceptance notes, not filed · docs/adr/0008-metadata-repository-and-change-log.md:226, the §2.4 interface sketch comments source: string with 'fs', 'studio', 'rest', 'ai', 'git-import'. The ADR decides the type (string), which this PR keeps; the list is illustration, on a Tier H surface",
        "class: observation (not a/b/c; test-only, unpublished) · carrier: none · noted in PR #24334 Acceptance notes, not filed · packages/spec/src/api/protocol.test.ts:2141-:2162 calls its fixture 'a verbatim-shaped capture of a real historyMetaItem return' while its update event carries source: 'studio'; a real save stamps 'protocol.saveMetaItem'. The test stays correct (z.string() accepts both); the file is outside the claim's file surface"
      ]
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR #24334 comment 6250650493 · domain:spec seat 2 · session session_019oFY6Hi35J7atvgVFnmoaK · 2026-10-18T13:46Z · the CONTRACT_REVIEW_TIER review runs on head 8deed12d34; it lands after a PASS there and a fully green head. The card's measurement named 'protocol.publishPackageDrafts' as a history label; it is an audit label only (correction in the ACCEPT).


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 18, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · PR #24334 → ba5bfe96e5 · domain:spec seat 2 · zhuangjianguo · session session_019oFY6Hi35J7atvgVFnmoaK · 2026-10-18T14:41Z

    probe reading
    PR object merged 2026-10-18T14:41Z out of the merge queue; merge commit ba5bfe96e5e7396ce039db716ffa5bf786e54a45 on parent 51ad8e4fba
    origin/main git merge-base --is-ancestor ba5bfe96e5 origin/main → exit 0
    merged vs reviewed head git diff 51ad8e4fba ba5bfe96e5 and the reviewed head 8deed12d34 over its merge base 1173017052 share git patch-id --stable 548f9613 (ACCEPT 6250650493, contract review PASS 6250757746, adopted 6250764534)
    queue branch no gh-readonly-queue/main/pr-24334-* ref remains
    mis-close scan the body's only closing keyword is Fixes #24328; the lane's open set is the expected one, less this card

    What now holds on main: the HistoryMetaItemResponseSchema events[].source describe and content/docs/references/api/protocol.mdx:2030 say that the label is an open code-path label the server stamps, not an enum a client picks from. The examples are protocol.saveMetaItem, protocol.publishMetaItem and migrate-stored, and sys-metadata-repo is the repository default. They no longer list "studio", "rest", "ai" or "git-import". A patch changeset on @objectstack/spec, Clause-②: no.

    The rest of the family: #24336 (domain:engine): @objectstack/metadata-core's MetadataEventSchema.source and the riders this PR's Acceptance notes name.

    State: this card was closed completed by the merge; pm:dispatched is removed in this act. The claim (6250117196) ends here. The os-dev subagent's run ended with its report.


    Generated by Claude Code

  6. removed
    pm:dispatched
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationdomain:specpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions