You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: os meta register can save a draft, and os lint can judge one item #34777
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesarea:builddomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Filing gate: ④ a child of the cross-lane parent #34659 (the 「MCP 二期与问数」 epic), filed on the maintainer's word in this seat's chat, 2026-11-17, verbatim: 「三点都同意,按最终计划把后续里程碑的卡全部立出来」, and, on the list of thirteen cards the seat then showed: 「同意」. The ruling records are #34659 comment 6940528935 and #34691 comment 6943107981. Readings: objectstack a0326b06, cloud 53a5844, 2026-11-17.
Why
The code-first path can only save a live item, and can only lint a whole project. A client that builds one item at a time has no fast local check and no way to stage for review from the command line.
Who acts: the server lane (packages/cli). Reader: a developer or an AI client working item by item.
Evidence
os meta register declares no flag for mode: "adding one is a separate widening" (packages/cli/src/commands/meta/register.ts:75-76). It saves an active item.
os lint takes a configuration file and lints the whole stack (packages/cli/src/commands/lint.ts:905-1071).
Scope
os meta register --mode draft stages a draft through the same REST route with ?mode=draft and prints the publish verdict.
os lint --item <file> --type <type> runs the rules that can judge one item alone, and says which rules it could not run without the rest of the stack.
Done when
Both commands work against a self-hosted runtime with an API key; a draft staged this way appears in Studio's Changes.
Released by the maintainer (recorded on #34659 at 23:01Z, comment 6963538703: 「云端的任务你说暂缓,他也不会排的呀,是不是应该先放回队列」 and 「其他技能体系的卡如果改动面大不是理由啊…那就应该开放」). pm:on-hold → pm:queue. Theme: MCP, epic #34659 (in focus).
os meta register --mode draft and os lint --item. It depends on nothing (the REST draft route exists). It is local authoring tooling with no customer break, so p2.
Claim: PM loop · 2026-11-19 · p2, on the seat's 21:17Z order ("测量的同时可以开工 #34777,effort 按卡的规模定"), dispatched to an os-dev subagent of this area thread.
Area: b1-B
Session: session_01L6bhgTyMahdAdhXSzgy2nt
Account: os-sales
Branch: claude/issue-34777-meta-register-draft-lint-item
Worktree: objectstack-issue-34777
Domain: domain:server
Seat: repo:objectstack#1 (area b1-B)
File surface: packages/cli/src/commands/meta/register.ts (a --mode draft flag mapped onto SaveMetaItemOptions.mode, plus printing the publish verdict), packages/cli/src/commands/lint.ts and the lint helpers it calls (an --item <file> --type <type> mode), their tests, the CLI docs pages that list these commands' flags, and one changeset. Stop on breach.
Container & model: M, mode:subagent, model: default (opus) — dispatch-gates --tier: no path-derived mandate, effort: high
Clause-②: yes (widening)
Metadata-protocol: none
Responsibility: objectstack packages/cli/src/commands/meta/register.ts:75-76 and packages/cli/src/commands/lint.ts:905-1071 (read at origin/main) | none | a developer or an AI client authoring metadata item by item from the command line against a self-hosted runtime with an API key
Thread-read: 6963632226
Premise: holds. On origin/main, metaRegisterOptions maps only --package and --force ("SaveMetaItemOptions also carries ifMatch and mode; this command declares no flag for them, and adding one is a separate widening"). os lint takes a configuration path and lints the whole stack; it has no single-item mode.
Route (from the card): os meta register --mode draft stages through the same REST route with ?mode=draft and prints the publish verdict. os lint --item <file> --type <type> runs the rules that can judge one item alone and names the rules it could not run without the rest of the stack. E4 = A (the local path uses an API key), ruled on #34659.
Pre-claim lane: packages/cli/** is area b1-B of repo:objectstack#1; the seat routed this card 21:17Z.
Pre-claim deps: none (the REST draft route exists); no open PR references #34777 (search, 2026-11-19 21:2xZ); overlap-check runs before each push.
Prior rulings read: #34659 6940528935, #34691 6943107981 (E4 = A); release 6963538703; thread: triage 6963632226; repo: objectstack-ai/objectstack
Serial constraints cleared: the in-flight b1-B PR #35635 is in the merge queue on packages/verify/** (a different package); the #35640 measurement writes no code
{
"issue": 34777,
"status": "needs_decision",
"branch": "claude/issue-34777-meta-register-draft-lint-item",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35675",
"session": "session_01L6bhgTyMahdAdhXSzgy2nt",
"premise_still_valid": true,
"summary": "Delivered, at e16ec8dcd5: (1) `os meta register --mode draft` maps onto SaveMetaItemOptions.mode (?mode=draft). An unflagged run and `--mode publish` stay byte-identical (no query string, active save). The text face prints `Draft saved ... not published` and the --package's Studio Changes route. (2) `os lint --item FILE --type TYPE` places one JSON item alone under its stack key (SINGULAR_TO_PLURAL) and runs every entry of authoringRulesFor('lint') through a proxy that records the top-level stack keys the entry reads. An entry that read only the item's own collection is JUDGED (findings reported); one that read any other key is listed under notJudged with the keys it read, and its findings are dropped; one that never read the collection does not judge that type and is skipped. os lint's per-entry naming, label and structure checks, extracted unchanged into entryConventionIssues, run on the item. namespace-prefix, i18n coverage and (objects) data-model are listed under familiesNotRun. Measured coverage of that classification: object 10 judged / 28 not, view 1/17, flow 4/9, dashboard 1/9, app 0/11. NOT delivered: printing the publish verdict on a draft save. On REST a draft save's 2xx carries no verdict (drafts are not a gate surface, AUTHORING_SURFACES / #4463 D1). The verdict is served only on the strict draft read (GET /meta/TYPE/NAME?state=draft, _diagnostics), and @objectstack/client's meta.getItem cannot request that read. The fix belongs in packages/client, outside the claim's file surface, so I stopped there (open_questions[0]). For that reason the PR body says `Part of #34777`, not the `Fixes` the dispatch named. Done-when, measured live: a self-hosted runtime (pnpm dev --fresh, showcase), an API key minted at POST /api/v1/keys and passed as OS_TOKEN (E4=A). The CLI draft save exited 0, GET /meta/_drafts?package=com.qa.items listed the draft (the read Studio's Changes drawer uses; Studio itself was not driven), the active read answered 404, and the unauthenticated save answered 401. A titleFormat draft was also staged: its strict draft read answered _diagnostics.valid false (title-format-retired), the same rule `os lint --item` exits 1 on. Clause-2 yes (widening) and Metadata-protocol none: my reading agrees (new CLI flags; no authorable metadata changed).",
"tests": "Red first: test/lint-item.test.ts with lint.ts restored to base eca20d2219 failed 11/11 (restored by git checkout HEAD; blob == HEAD, git diff HEAD empty). Green at e16ec8dcd5: src/lint/item-lint.test.ts + test/lint-item.test.ts 17/17 (unit); packages/lint src/authoring-rule-wiring.test.ts 26/26; register-draft + register-package + register-force 21/21 (--project integration; register-draft is a new integration-tier file); vitest-tiers-partition 22/22; published-subpath-console/hook-body pins + docs-cli-enumeration-parity + item-lint + lint-item 59/59 after building the CLI; pnpm --filter @objectstack/cli typecheck VERDICT command-exit 0. Full unit layer at 1545a86f96: 430/433 files. The 3 failures: 2 published-subpath pins (CLI not built at the time) and lint-item, 2 cases over the 5 s default under load; the cases got a 30 s timeout and passed once the CLI was built. One ablation, on the source the test resolves, so no build was needed: scripts/ablation-replace.mjs replaced `if (flags.mode === 'draft') options.mode = 'draft';` in register.ts (anchor 1->0, blob 6c6ddb2ed4f4 -> 740fc7d8c8f4); register-draft.test.ts failed 3/6 (mapping, wire/state, JSON face) and the unflagged/publish negative control stayed green; restored to blob == HEAD with an empty git diff HEAD. CI caught one red my local set missed: packages/lint authoring-rule-wiring.test.ts (Test Core 8/10 on 24bfc9face) counted `lintItem(` in lint.ts as a hand-wired rule, because its detector matches lint/validate-prefixed calls. The judge runs every registry entry and is not a rule, so it was renamed judgeItemAlone (e16ec8dcd5); local 26/26, and CI is green on the new head.",
"gates": "Derived: dispatch-gates --commands at e16ec8dcd5 gave 98 commands (82 by path, 9 by kind, 9 whole-tree). All 98 ran with exit 0 captured before any pipe. --ran reconciliation: '98 derived, 98 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero: all 98 recorded an exit code). At the first head, 5 had exited 3 (PREREQUISITE NOT MET: CLI, client-react and workspace not built); they went green after building. overlap-check: 'origin/main: merges cleanly', 0 PR heads sharing a file, VERDICT clean exit 0. PR check-runs on e16ec8dcd5: Lint & Repo Gates success, TypeScript Type Check success, Test Core success (10/10 shards), Build Core success, Governed Surface Queue Guard success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, PR-body guards success, Spec property liveness success; Lint UI, Type Check UI and Build & E2E UI skipped by path selector. The relay read-back of pr_create: 8561 bytes sent, 8561 stored, identical; assignee os-sales listed.",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "3: one relay dispatch for pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft; POST /repos/objectstack-ai/objectstack/issues/35675/assignees [os-sales]), and one os-dev-report comment on #34777 via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34777/comments). Not REST writes: two branch pushes (git push). Local only: an API key minted on my own throwaway --fresh dev server (POST localhost /api/v1/keys) and a test package installed there; the server was torn down by its recorded listener pid.",
"open_questions": [
{
"question": "Card scope 1 asks for the publish verdict to be printed. The REST door answers a draft save without one; it serves the verdict only on the strict draft read (?state=draft, _diagnostics), which @objectstack/client's meta.getItem cannot request. How should the remaining half land?",
"options": [
"A: widen this card's surface to packages/client. Add `state: 'draft'` to meta.getItem's options (sends ?state=draft beside ?package=), and have register read the draft after a draft save and print _diagnostics (valid, errors, warnings). About 30 lines plus an SDK URL pin; a @objectstack/client patch changeset; one extra GET per draft save.",
"B: have the REST door return the judgement on a draft save, as the MCP draft door does (draftPublishJudgement). This widens SaveMetaItemResponseSchema in spec and touches metadata-protocol and rest. A judgement on every draft save also lands on Studio's autosave path. A contract change: needs its own card and ruling.",
"C: leave it. The CLI points the author to Studio, where the draft carries its verdict. The card's scope 1 then stays undelivered, and the card is closed by a decision instead."
],
"recommendation": "A. The server already computes and serves the verdict, so the gap is one missing SDK read option. It costs one GET per draft save, only on this command, and moves no contract."
},
{
"question": "What should `os lint --item` do with a rule-table entry that read stack keys beyond the item? The measured, conservative classification judges few entries: object 10 of 38, view 1 of 18, flow 4 of 13, app 0 of 11. Most entries (validateStackExpressions, validateReferenceIntegrity, lintLivenessProperties, ...) walk several collections, even where they would judge one item alone.",
"options": [
"A (shipped): do not report its findings; name it with the keys it read. It never reports a verdict that depended on absent metadata, at the cost of low coverage.",
"B: run every entry. Report the findings of the not-judged ones in a separate bucket marked 'may be incomplete or invented without the rest of the stack', which never moves the exit code. Higher coverage, at the risk of a finding the full stack would not raise.",
"C: classify at member/pass level. The reference-integrity suite and validateStackExpressions already declare per-member/per-pass reach for the runtime per-write gate (runtimeTypes, runtimeWriteType); reuse that in packages/lint so a pass over the item's own body counts as judged. More coverage without guessing. A packages/lint card, M."
],
"recommendation": "A now, and C as a follow-up card. B gives up the property the card asked for: name what could not be judged rather than guess."
},
{
"question": "Should `os meta register --mode draft` require --package? Studio's Changes lists drafts per package (DraftChangesPanel reads _drafts?package=), so a package-unbound draft of a new item appears in no package's Changes. The MCP draft door refuses a save naming no package (seat ruling D4).",
"options": [
"A (shipped): allow it, as the REST door does. The text face says Studio lists drafts per package and to name one with --package.",
"B: refuse `--mode draft` without --package before any request, as the MCP draft door does. The flag is new, so no existing run breaks."
],
"recommendation": "B, for parity with ruling D4 and so that every CLI draft is reviewable in Studio's Changes. A one-line refusal in metaRegisterOptions."
},
{
"question": "The PR body was written before the rename lintItem -> judgeItemAlone (e16ec8dcd5) and still names `lintItem` in its Tests and Read first sections. It also says `Part of #34777` where the dispatch said `Fixes`. Dev may not PATCH a PR body, so the seat decides both.",
"options": [
"A: the seat edits the body: rename the three mentions, and keep Part of until open_questions[0] lands.",
"B: leave the body as it is."
],
"recommendation": "A."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: the packages/lint registry wiring guard (authoring-rule-wiring.test.ts ruleCallsIn) classifies by name prefix, so any lint- or validate-prefixed helper called from lint.ts reads as a hand-wired rule. Observation; the guard behaved as designed."
]
}
Claim revision: 2026-11-19T23:41Z · area b1-B · on the seat's 23:41Z ruling of the three forks in os-dev-report 7025323819. This revises claim 7022499252 in place; the branch, PR #35675 and the session are unchanged.
Area: b1-B
File surface (revised): the claim's surface, plus packages/client/src/index.ts (meta.getItem gains a draft-read option that sends ?state=draft beside ?package=), its URL pin test in packages/client/src/, and a @objectstack/client patch changeset. Stop on breach.
Clause-②: yes (widening)
Metadata-protocol: none
Route (revised):
Fork 1 = A. After a --mode draft save, os meta register reads the draft back through the strict draft read and prints its publish verdict (_diagnostics: valid, errors, warnings). The server already computes it; no REST or spec contract moves. The PR body then says Fixes #34777.
Fork 2 = A. os lint --item ships as is: an entry that read keys beyond the item reports no finding and is named with the keys it read. The member/pass-level classification (C) goes to a separate card for triage.
Fork 3 = B. --mode draft without --package is refused before any request, as the MCP draft door does (ruling D4), and the refusal tells the author how to name one with --package.
Review: L1-a on the final head, then an isolated L2; the record ids go to the seat.
{
"issue": 34777,
"status": "done",
"branch": "claude/issue-34777-meta-register-draft-lint-item",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35675",
"session": "session_01L6bhgTyMahdAdhXSzgy2nt",
"premise_still_valid": true,
"summary": "Continuation on the seat's 23:41Z ruling (claim revision 7025384476), head f0520d6a23 on the same branch and PR. Fork 1 = A: @objectstack/client meta.getItem takes state: 'draft' and sends ?state=draft beside ?package= on both declarations (unscoped and environment-scoped); after a --mode draft save, os meta register reads the draft back (GET /meta/TYPE/NAME?package=P&state=draft) and prints its _diagnostics publish verdict (valid, errors with rule code and path, warnings) on the text face and as publishVerdict on --format json|yaml. The read counts as the saved draft's only when it answers the saved draft row's version, because the door answers a caller not admitted to drafts with the published item; otherwise it prints 'Publish verdict not printed: REASON' and never shows another row's diagnostics. A valid:false verdict is printed and the run still exits 0 (the draft is stored either way; os lint --item is the failing pre-flight). Fork 2 = A: --item unchanged; #35695 named for coverage. Fork 3 = B: --mode draft without --package is refused in metaRegisterOptions before the client exists (ruling D4); the message names --package PACKAGE_ID. Unflagged and --mode publish runs still send one PUT with no query string and no read. Merged origin/main first (K was 15; clean merge 7c12291fde). Docs: cli.mdx draft-and-verdict sentence, and content/docs/api/client-sdk.mdx documents the draft read (the coordinator's docs-drift order; that page is not named in claim revision 7025384476's list, so the file surface widened on the coordinator's word). Changesets: new @objectstack/client patch; the @objectstack/cli patch note (this PR's own, not on main) was revised to describe the verdict and the refusal. Measured live at f0520d6a23 on pnpm dev --fresh showcase with an API key (POST /api/v1/keys, OS_TOKEN): the clean draft printed 'Publish verdict: valid: true, 0 error(s), 0 warning(s).'; the titleFormat draft printed 'Publish verdict: valid: false, 1 error(s), 0 warning(s)' and 'title-format-retired items_bad: titleFormat is retired (ADR-0079) ...'; --format json carried publishVerdict.valid false with code title-format-retired; without --package it exited 1 with the refusal; GET /meta/_drafts?package=com.qa.items listed both drafts (Studio itself was not driven). The server was stopped by its recorded process tree and the key files deleted. pr_body below is the body text for the seat to write: it says Fixes #34777. Deviation: commit 35f8494af2 was pushed before overlap-check ran; it ran right after the push (clean, exit 0) and before the next push (clean, exit 0).",
"tests": "Red first (register.ts and client index.ts restored to merge commit 7c12291fde, new tests kept): client meta-get-item-draft-read 4/6 failed (the two controls held); cli register-draft (integration) 6/10 failed (flag declaration, mapping, review lines and the unflagged/publish negative control held). Restored with git checkout HEAD; both blob hashes equal HEAD's (b470fca86094 register.ts, 8d67a2db7ea1 index.ts), git diff HEAD empty. Ablation (one; CLI's own source, no build): scripts/ablation-replace.mjs replaced the saved-version guard `typeof savedVersion === 'string' && read?.version !== savedVersion` with `false` (anchor 1 to 0, blob b470fca86094 to 9a02b77f0f7f); register-draft failed 1/10 (the version-mismatch case); restored to blob == HEAD, git diff HEAD empty. Green at f0520d6a23: client meta-get-item-draft-read + package-addressing 89/89; whole client suite with --maxWorkers=2 59 files / 818 tests, VERDICT command-exit 0 (the first run without --maxWorkers was killed, exit 137); register-draft + register-package + register-force (integration) 25/25; register-requires-name + remote-api-commands + vitest-tiers-partition (unit) 48/48; pnpm --filter @objectstack/cli typecheck and pnpm --filter @objectstack/client typecheck VERDICT command-exit 0 (tsc and check:test-typecheck both ran). Import-side consumers of the client were not re-tested: the public surface widened by one optional member and its absence sends the same bytes (pinned by the control).",
"gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at f0520d6a23: 104 families. All ran; exit codes were captured before any pipe. 102 exited 0 on the first pass. check:skill-examples (exit 3, PREREQUISITE NOT MET: client dist older than src after the red-leg restore touched src mtime) and check:dts-closure (exit 1, run during the workspace rebuild) were re-run after building @objectstack/client and client-react directly, and both exited 0. --ran: '104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED (a DERIVED zero)'. overlap-check: before the second push 'origin/main: merges cleanly', VERDICT clean exit 0. CI on f0520d6a23 (70 check-runs): 60 success, 10 skipped, 0 failing. The successes include Test Core (10/10 shards), TypeScript Type Check, Type Check workspace/consumer/source/debt-ledger, Build Core, Lint & Repo Gates, Lint ESLint, Lint PM dispatch-gates, Check Changeset, PR-body guards, Spec property liveness, Dogfood Regression Gate, Governed Surface Queue Guard, Flag docs affected by code changes, Test UI (16 shards), Live E2E UI and Build Docs. The skipped runs are opt-in or path-selected (Lint UI, Dogfood shards matrix, Temporal Conformance, 18.x upgrade harness, Packed-tarball smoke, among others).",
"dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "1: the os-dev-report comment on #34777 via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34777/comments). Not REST writes: two git pushes (35f8494af2, f0520d6a23). Reads only: claim revision 7025384476 and check-runs via gh api GET. Local only: an API key minted and a package installed on my own throwaway --fresh dev server.",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: a `git checkout HEAD -- FILE` restore after a build makes check:skill-examples refuse with PREREQUISITE NOT MET (dist older than src by mtime) until the package is rebuilt directly; a turbo cache hit does not rewrite it. The gate behaved as designed."
],
"pr_body": "Fixes #34777\n\nClause-②: yes (widening)\nMetadata-protocol: none\n\n## 维护者速读\n\n- 用户能看到什么变化:逐个编写元数据的开发者或 AI 客户端,现在可以在命令行把一个条目存成某个软件包的待审草稿(不上线),命令会立刻打印这份草稿能否发布的判定和具体问题;不加新参数时与以前完全一样。此外不需要项目也能对单个条目跑本地检查,检查会列出哪些规则需要整个项目才能判断。\n- 为什么做:属于「MCP 二期与问数」专题,替用命令行和 API 密钥逐条编写的客户端补上「先本地检查、再提交审核、当场看到发布判定」的路径。\n- 出错会怎样:草稿只是暂存,不会自动发布;判定不通过只是打印出来,草稿照样保存;没有指定软件包的草稿请求会在发出前被拒绝。出问题可以直接撤回本次改动。\n- 要你做什么:无。\n\n## What changes\n\n- **`@objectstack/client` `meta.getItem`** takes `state: 'draft'` and sends `?state=draft` beside `?package=`, on the unscoped client and on the environment-scoped twin. This is the strict draft read the REST door already serves; its `item._diagnostics` carries what publishing that draft would refuse (#26707). `'active'` is the default said out loud and sends nothing, so a call without the member is the URL it always was. `content/docs/api/client-sdk.mdx` shows the read. Changeset: `@objectstack/client` patch.\n- **`os meta register TYPE --data FILE --package P --mode draft`** saves through the same door with `?package=P&mode=draft`. It then reads the draft back (`GET /meta/TYPE/NAME?package=P&state=draft`) and prints the publish verdict the runtime serves on it:\n - the text face prints `Publish verdict: valid: true|false, N error(s), M warning(s)`, then each error as `RULE at PATH: MESSAGE`, then each warning;\n - the `--format json|yaml` faces print the door's answer plus `publishVerdict: { valid, errors, warnings }`.\n \n The read is taken as the saved draft's verdict only when it answers the saved draft row's `version`. The door answers a caller it does not admit to drafts with the published item instead, and a draft edited in between is another body. In either case the command prints `Publish verdict not printed: REASON` (`publishVerdict: null` and `publishVerdictUnread` on JSON); it never prints another row's diagnostics as this draft's. A `valid: false` verdict is printed, not turned into a failed run, because the draft is stored either way.\n- **`--mode draft` without `--package` is refused before any request** (ruling D4, the MCP draft door's rule). No client is made and nothing reaches the wire. The message names the remedy: `Name the package the draft is staged into with --package PACKAGE_ID (for example --package com.acme.crm).`\n- **Unflagged and `--mode publish` runs are unchanged.** They send the same single `PUT` with no query string, and no read follows it.\n- **`os lint --item FILE --type TYPE`** (unchanged from the first round) judges one JSON item without a project (`packages/cli/src/lint/item-lint.ts`, `judgeItemAlone`). Each entry of the shared rule table (`authoringRulesFor('lint')`) runs through a proxy that records the top-level stack keys the entry reads:\n - only the item's own collection: the entry judged the item, and its findings are reported;\n - the item's collection plus any other key: the entry is listed under `notJudged` with those keys, and its findings are dropped;\n - never the item's collection: the entry does not judge that type and is skipped.\n\n `os lint`'s per-entry naming, label and structure checks (`entryConventionIssues`, lifted unchanged out of `lintConfig`) run on the item. The namespace-prefix, i18n-coverage and (for objects) data-model families are listed under `familiesNotRun`. Measured at 1545a86f96: object 10 judged / 28 not, view 1/17, flow 4/9, dashboard 1/9, app 0/11. Classifying per member or per pass, which would judge more entries, is the follow-up card #35695.\n- `content/docs/deployment/cli.mdx`: the `os lint` options rows, the **One item** paragraph, and the draft-and-verdict sentence. Changeset: `@objectstack/cli` patch.\n\n## Tests\n\n- `packages/client/src/meta-get-item-draft-read.test.ts` (new) pins the URL on both declarations: `?package=P&state=draft`, `?state=draft` alone, and the control, where an omitted state or `'active'` gives the URL it always sent.\n- `packages/cli/src/commands/meta/register-draft.test.ts` (integration tier) runs the real `RestServer`, protocol and `sys_metadata` on SQLite, with the real SDK. Cases:\n - **draft:** the wire is exactly `PUT ...?package=P&mode=draft`, then `GET ...?package=P&state=draft`, and the text face prints `valid: true`;\n - **JSON face:** carries `publishVerdict`;\n - **refused publish:** an object carrying the retired `titleFormat` prints `Publish verdict: valid: false` with `title-format-retired` on both faces, and is still stored as a draft;\n - **D4:** `--mode draft` without `--package` exits 1 on both faces, with `createApiClient` not called, an empty wire and no save request;\n - **controls:** unflagged and `--mode publish` send no request but the `PUT`;\n - **unit:** `draftPublishVerdictOf` (another row's `version` is no verdict) and the refusal message.\n- `packages/cli/src/lint/item-lint.test.ts` and `packages/cli/test/lint-item.test.ts`: as in the first round.\n\n## Acceptance notes\n\n- **Measured live** on a self-hosted runtime (`pnpm dev -- --fresh -p 38777`, showcase), signed in with an API key minted at `POST /api/v1/keys` and passed as `OS_TOKEN`, with package `com.qa.items` installed. At f0520d6a23:\n - `os meta register object --data ticket.json --package com.qa.items --mode draft` exited 0 and printed `Publish verdict: valid: true, 0 error(s), 0 warning(s).`\n - The same command on the `titleFormat` item exited 0 and printed `Publish verdict: valid: false, 1 error(s), 0 warning(s)`, then `title-format-retired items_bad: titleFormat is retired (ADR-0079) ...`.\n - `--format json` on that item carried `publishVerdict.valid: false` with code `title-format-retired`.\n - Without `--package`, the command exited 1 with the refusal.\n - `GET /meta/_drafts?package=com.qa.items` listed both drafts. This is the read Studio's Changes drawer lists a package's drafts from; Studio itself was not driven.\n - `os lint --item` on the `titleFormat` item exits 1 on the same rule.\n- The verdict read is one extra `GET`, sent only on a `--mode draft` run.\n- Exit code 0 on a `valid: false` verdict is deliberate. The command stages; `os lint --item` is the pre-flight that fails a run.\n\n## Verification\n\n- **Red first** (sources restored to the merge commit 7c12291fde, new tests kept):\n - client pin: 4 of 6 failed (the two controls held);\n - `register-draft`: 6 of 10 failed (flag declaration, mapping, review lines and the negative control held).\n - Restored with `git checkout HEAD`; both blobs equal HEAD's, and `git diff HEAD` was empty.\n- **Ablation:** `scripts/ablation-replace.mjs` replaced the saved-version guard in `draftPublishVerdictOf` with `false` (anchor 1 to 0, blob b470fca86094 to 9a02b77f0f7f). `register-draft` then failed 1 of 10, the version-mismatch case. Restored to blob == HEAD with an empty `git diff HEAD`. No build was needed: the subject is the CLI's own source.\n- **Green at f0520d6a23:**\n - client pins plus `package-addressing`: 89 of 89;\n - the whole client suite (`--maxWorkers=2`): 59 files, 818 tests;\n - `register-draft`, `register-package` and `register-force` (integration): 25 of 25;\n - `register-requires-name`, `remote-api-commands` and the tier partition pin (unit): 48 of 48.\n- **Typecheck:** `pnpm --filter @objectstack/cli typecheck` and `pnpm --filter @objectstack/client typecheck` gave VERDICT command-exit 0.\n- **Derived gates** (`dispatch-gates --commands`, 104 families): all exit 0. `--ran`: 104 run, 0 NOT-MEASURED. `check:skill-examples` and `check:dts-closure` first answered as prerequisites, because the workspace build was running beside them. They are green after the client was rebuilt directly.\n- **CI on f0520d6a23:** 60 success, 10 skipped, 0 failing.\n\n## Read first\n\n1. `packages/cli/src/commands/meta/register.ts`, `draftPublishVerdictOf` and `reportDraft`. The risk is the version guard: it is what keeps the published item's diagnostics from being printed as the draft's.\n2. `packages/cli/src/commands/meta/register.ts`, `metaRegisterOptions`. The D4 refusal runs before the client exists. The risk is any path that saves before it.\n3. `packages/client/src/index.ts`, both `getItem` declarations. Only `'draft'` puts a parameter on the wire.\n\nTwo-minute check: `os meta register object --data ITEM.json --package PACKAGE_ID --mode draft` against a runtime, with a `titleFormat` in the item, prints `Publish verdict: valid: false` and a `title-format-retired` line.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt\n\n---\n\n_Generated by [Claude Code](https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt)_\n"
}
Claim revision: 2026-11-20T00:33Z · area b1-B · amends revision 7025384476 by one file, so that the claim names every path in PR #35675.
Area: b1-B
File surface (revised): revision 7025384476's surface plus content/docs/api/client-sdk.mdx, the SDK page that documents meta.getItem's options. The PR's Docs Drift Check named it for the new draft read, and this area thread ordered the dev to document the option there. Stop on breach.
Clause-②: yes (widening)
Metadata-protocol: none
State: the dev's continuation landed at head f0520d6 (os-dev-report 7026419736). The PR body now says Fixes #34777. Next is L1-a on that head, then an isolated L2.
Delivered · 2026-11-20T01:13Z · PR #35675 merged as f5b2eea. Its Fixes line closed this card.
What changed:
os meta register --mode draft --package <id> stages an item as a package draft without publishing it. It then reads the draft back and prints the runtime's publish verdict: valid, the errors with their rule codes, and the warnings. A valid: false verdict exits 0, because the draft is stored either way. --mode draft without --package is refused before any request is made (ruling D4). Runs without the flag, and runs with --mode publish, behave as before.
@objectstack/clientmeta.getItem takes state: 'draft' (?state=draft). Calls without it send the same request as before.
os lint --item FILE --type TYPE judges one item without a project. It names every rule that needed more of the stack than the item.
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesarea:builddomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 17, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Released by the maintainer (recorded on #34659 at 23:01Z, comment 6963538703: 「云端的任务你说暂缓,他也不会排的呀,是不是应该先放回队列」 and 「其他技能体系的卡如果改动面大不是理由啊…那就应该开放」).
pm:on-hold→pm:queue. Theme: MCP, epic #34659 (in focus).os meta register --mode draftandos lint --item. It depends on nothing (the REST draft route exists). It is local authoring tooling with no customer break, so p2.objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Claim: PM loop · 2026-11-19 · p2, on the seat's 21:17Z order ("测量的同时可以开工 #34777,effort 按卡的规模定"), dispatched to an os-dev subagent of this area thread.
Area: b1-B
Session:
session_01L6bhgTyMahdAdhXSzgy2ntAccount:
os-salesBranch:
claude/issue-34777-meta-register-draft-lint-itemWorktree:
objectstack-issue-34777Domain:
domain:serverSeat:
repo:objectstack#1(area b1-B)File surface:
packages/cli/src/commands/meta/register.ts(a--mode draftflag mapped ontoSaveMetaItemOptions.mode, plus printing the publish verdict),packages/cli/src/commands/lint.tsand the lint helpers it calls (an--item <file> --type <type>mode), their tests, the CLI docs pages that list these commands' flags, and one changeset. Stop on breach.Container & model: M,
mode:subagent,model: default (opus) — dispatch-gates --tier: no path-derived mandate,effort: highClause-②: yes (widening)
Metadata-protocol: none
Responsibility:
objectstack packages/cli/src/commands/meta/register.ts:75-76 and packages/cli/src/commands/lint.ts:905-1071 (read at origin/main) | none | a developer or an AI client authoring metadata item by item from the command line against a self-hosted runtime with an API keyThread-read: 6963632226
Premise: holds. On
origin/main,metaRegisterOptionsmaps only--packageand--force("SaveMetaItemOptionsalso carriesifMatchandmode; this command declares no flag for them, and adding one is a separate widening").os linttakes a configuration path and lints the whole stack; it has no single-item mode.Route (from the card):
os meta register --mode draftstages through the same REST route with?mode=draftand prints the publish verdict.os lint --item <file> --type <type>runs the rules that can judge one item alone and names the rules it could not run without the rest of the stack. E4 = A (the local path uses an API key), ruled on #34659.Pre-claim lane:
packages/cli/**is area b1-B of repo:objectstack#1; the seat routed this card 21:17Z.Pre-claim deps: none (the REST draft route exists); no open PR references #34777 (search, 2026-11-19 21:2xZ); overlap-check runs before each push.
Prior rulings read: #34659 6940528935, #34691 6943107981 (E4 = A); release 6963538703; thread: triage 6963632226; repo: objectstack-ai/objectstack
Serial constraints cleared: the in-flight b1-B PR #35635 is in the merge queue on
packages/verify/**(a different package); the #35640 measurement writes no codeobjectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
os-dev-report
{ "issue": 34777, "status": "needs_decision", "branch": "claude/issue-34777-meta-register-draft-lint-item", "pr": "https://github.com/objectstack-ai/objectstack/pull/35675", "session": "session_01L6bhgTyMahdAdhXSzgy2nt", "premise_still_valid": true, "summary": "Delivered, at e16ec8dcd5: (1) `os meta register --mode draft` maps onto SaveMetaItemOptions.mode (?mode=draft). An unflagged run and `--mode publish` stay byte-identical (no query string, active save). The text face prints `Draft saved ... not published` and the --package's Studio Changes route. (2) `os lint --item FILE --type TYPE` places one JSON item alone under its stack key (SINGULAR_TO_PLURAL) and runs every entry of authoringRulesFor('lint') through a proxy that records the top-level stack keys the entry reads. An entry that read only the item's own collection is JUDGED (findings reported); one that read any other key is listed under notJudged with the keys it read, and its findings are dropped; one that never read the collection does not judge that type and is skipped. os lint's per-entry naming, label and structure checks, extracted unchanged into entryConventionIssues, run on the item. namespace-prefix, i18n coverage and (objects) data-model are listed under familiesNotRun. Measured coverage of that classification: object 10 judged / 28 not, view 1/17, flow 4/9, dashboard 1/9, app 0/11. NOT delivered: printing the publish verdict on a draft save. On REST a draft save's 2xx carries no verdict (drafts are not a gate surface, AUTHORING_SURFACES / #4463 D1). The verdict is served only on the strict draft read (GET /meta/TYPE/NAME?state=draft, _diagnostics), and @objectstack/client's meta.getItem cannot request that read. The fix belongs in packages/client, outside the claim's file surface, so I stopped there (open_questions[0]). For that reason the PR body says `Part of #34777`, not the `Fixes` the dispatch named. Done-when, measured live: a self-hosted runtime (pnpm dev --fresh, showcase), an API key minted at POST /api/v1/keys and passed as OS_TOKEN (E4=A). The CLI draft save exited 0, GET /meta/_drafts?package=com.qa.items listed the draft (the read Studio's Changes drawer uses; Studio itself was not driven), the active read answered 404, and the unauthenticated save answered 401. A titleFormat draft was also staged: its strict draft read answered _diagnostics.valid false (title-format-retired), the same rule `os lint --item` exits 1 on. Clause-2 yes (widening) and Metadata-protocol none: my reading agrees (new CLI flags; no authorable metadata changed).", "tests": "Red first: test/lint-item.test.ts with lint.ts restored to base eca20d2219 failed 11/11 (restored by git checkout HEAD; blob == HEAD, git diff HEAD empty). Green at e16ec8dcd5: src/lint/item-lint.test.ts + test/lint-item.test.ts 17/17 (unit); packages/lint src/authoring-rule-wiring.test.ts 26/26; register-draft + register-package + register-force 21/21 (--project integration; register-draft is a new integration-tier file); vitest-tiers-partition 22/22; published-subpath-console/hook-body pins + docs-cli-enumeration-parity + item-lint + lint-item 59/59 after building the CLI; pnpm --filter @objectstack/cli typecheck VERDICT command-exit 0. Full unit layer at 1545a86f96: 430/433 files. The 3 failures: 2 published-subpath pins (CLI not built at the time) and lint-item, 2 cases over the 5 s default under load; the cases got a 30 s timeout and passed once the CLI was built. One ablation, on the source the test resolves, so no build was needed: scripts/ablation-replace.mjs replaced `if (flags.mode === 'draft') options.mode = 'draft';` in register.ts (anchor 1->0, blob 6c6ddb2ed4f4 -> 740fc7d8c8f4); register-draft.test.ts failed 3/6 (mapping, wire/state, JSON face) and the unflagged/publish negative control stayed green; restored to blob == HEAD with an empty git diff HEAD. CI caught one red my local set missed: packages/lint authoring-rule-wiring.test.ts (Test Core 8/10 on 24bfc9face) counted `lintItem(` in lint.ts as a hand-wired rule, because its detector matches lint/validate-prefixed calls. The judge runs every registry entry and is not a rule, so it was renamed judgeItemAlone (e16ec8dcd5); local 26/26, and CI is green on the new head.", "gates": "Derived: dispatch-gates --commands at e16ec8dcd5 gave 98 commands (82 by path, 9 by kind, 9 whole-tree). All 98 ran with exit 0 captured before any pipe. --ran reconciliation: '98 derived, 98 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero: all 98 recorded an exit code). At the first head, 5 had exited 3 (PREREQUISITE NOT MET: CLI, client-react and workspace not built); they went green after building. overlap-check: 'origin/main: merges cleanly', 0 PR heads sharing a file, VERDICT clean exit 0. PR check-runs on e16ec8dcd5: Lint & Repo Gates success, TypeScript Type Check success, Test Core success (10/10 shards), Build Core success, Governed Surface Queue Guard success, Test UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, PR-body guards success, Spec property liveness success; Lint UI, Type Check UI and Build & E2E UI skipped by path selector. The relay read-back of pr_create: 8561 bytes sent, 8561 stored, identical; assignee os-sales listed.", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "3: one relay dispatch for pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft; POST /repos/objectstack-ai/objectstack/issues/35675/assignees [os-sales]), and one os-dev-report comment on #34777 via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34777/comments). Not REST writes: two branch pushes (git push). Local only: an API key minted on my own throwaway --fresh dev server (POST localhost /api/v1/keys) and a test package installed there; the server was torn down by its recorded listener pid.", "open_questions": [ { "question": "Card scope 1 asks for the publish verdict to be printed. The REST door answers a draft save without one; it serves the verdict only on the strict draft read (?state=draft, _diagnostics), which @objectstack/client's meta.getItem cannot request. How should the remaining half land?", "options": [ "A: widen this card's surface to packages/client. Add `state: 'draft'` to meta.getItem's options (sends ?state=draft beside ?package=), and have register read the draft after a draft save and print _diagnostics (valid, errors, warnings). About 30 lines plus an SDK URL pin; a @objectstack/client patch changeset; one extra GET per draft save.", "B: have the REST door return the judgement on a draft save, as the MCP draft door does (draftPublishJudgement). This widens SaveMetaItemResponseSchema in spec and touches metadata-protocol and rest. A judgement on every draft save also lands on Studio's autosave path. A contract change: needs its own card and ruling.", "C: leave it. The CLI points the author to Studio, where the draft carries its verdict. The card's scope 1 then stays undelivered, and the card is closed by a decision instead." ], "recommendation": "A. The server already computes and serves the verdict, so the gap is one missing SDK read option. It costs one GET per draft save, only on this command, and moves no contract." }, { "question": "What should `os lint --item` do with a rule-table entry that read stack keys beyond the item? The measured, conservative classification judges few entries: object 10 of 38, view 1 of 18, flow 4 of 13, app 0 of 11. Most entries (validateStackExpressions, validateReferenceIntegrity, lintLivenessProperties, ...) walk several collections, even where they would judge one item alone.", "options": [ "A (shipped): do not report its findings; name it with the keys it read. It never reports a verdict that depended on absent metadata, at the cost of low coverage.", "B: run every entry. Report the findings of the not-judged ones in a separate bucket marked 'may be incomplete or invented without the rest of the stack', which never moves the exit code. Higher coverage, at the risk of a finding the full stack would not raise.", "C: classify at member/pass level. The reference-integrity suite and validateStackExpressions already declare per-member/per-pass reach for the runtime per-write gate (runtimeTypes, runtimeWriteType); reuse that in packages/lint so a pass over the item's own body counts as judged. More coverage without guessing. A packages/lint card, M." ], "recommendation": "A now, and C as a follow-up card. B gives up the property the card asked for: name what could not be judged rather than guess." }, { "question": "Should `os meta register --mode draft` require --package? Studio's Changes lists drafts per package (DraftChangesPanel reads _drafts?package=), so a package-unbound draft of a new item appears in no package's Changes. The MCP draft door refuses a save naming no package (seat ruling D4).", "options": [ "A (shipped): allow it, as the REST door does. The text face says Studio lists drafts per package and to name one with --package.", "B: refuse `--mode draft` without --package before any request, as the MCP draft door does. The flag is new, so no existing run breaks." ], "recommendation": "B, for parity with ruling D4 and so that every CLI draft is reviewable in Studio's Changes. A one-line refusal in metaRegisterOptions." }, { "question": "The PR body was written before the rename lintItem -> judgeItemAlone (e16ec8dcd5) and still names `lintItem` in its Tests and Read first sections. It also says `Part of #34777` where the dispatch said `Fixes`. Dev may not PATCH a PR body, so the seat decides both.", "options": [ "A: the seat edits the body: rename the three mentions, and keep Part of until open_questions[0] lands.", "B: leave the body as it is." ], "recommendation": "A." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: the packages/lint registry wiring guard (authoring-rule-wiring.test.ts ruleCallsIn) classifies by name prefix, so any lint- or validate-prefixed helper called from lint.ts reads as a hand-wired rule. Observation; the guard behaved as designed." ] }objectstack-fleet commentedon Nov 19, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Claim revision: 2026-11-19T23:41Z · area b1-B · on the seat's 23:41Z ruling of the three forks in os-dev-report 7025323819. This revises claim 7022499252 in place; the branch, PR #35675 and the session are unchanged.
Area: b1-B
File surface (revised): the claim's surface, plus
packages/client/src/index.ts(meta.getItemgains a draft-read option that sends?state=draftbeside?package=), its URL pin test inpackages/client/src/, and a@objectstack/clientpatch changeset. Stop on breach.Clause-②: yes (widening)
Metadata-protocol: none
Route (revised):
--mode draftsave,os meta registerreads the draft back through the strict draft read and prints its publish verdict (_diagnostics: valid, errors, warnings). The server already computes it; no REST or spec contract moves. The PR body then saysFixes #34777.os lint --itemships as is: an entry that read keys beyond the item reports no finding and is named with the keys it read. The member/pass-level classification (C) goes to a separate card for triage.--mode draftwithout--packageis refused before any request, as the MCP draft door does (ruling D4), and the refusal tells the author how to name one with--package.Review: L1-a on the final head, then an isolated L2; the record ids go to the seat.
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
os-dev-report
{ "issue": 34777, "status": "done", "branch": "claude/issue-34777-meta-register-draft-lint-item", "pr": "https://github.com/objectstack-ai/objectstack/pull/35675", "session": "session_01L6bhgTyMahdAdhXSzgy2nt", "premise_still_valid": true, "summary": "Continuation on the seat's 23:41Z ruling (claim revision 7025384476), head f0520d6a23 on the same branch and PR. Fork 1 = A: @objectstack/client meta.getItem takes state: 'draft' and sends ?state=draft beside ?package= on both declarations (unscoped and environment-scoped); after a --mode draft save, os meta register reads the draft back (GET /meta/TYPE/NAME?package=P&state=draft) and prints its _diagnostics publish verdict (valid, errors with rule code and path, warnings) on the text face and as publishVerdict on --format json|yaml. The read counts as the saved draft's only when it answers the saved draft row's version, because the door answers a caller not admitted to drafts with the published item; otherwise it prints 'Publish verdict not printed: REASON' and never shows another row's diagnostics. A valid:false verdict is printed and the run still exits 0 (the draft is stored either way; os lint --item is the failing pre-flight). Fork 2 = A: --item unchanged; #35695 named for coverage. Fork 3 = B: --mode draft without --package is refused in metaRegisterOptions before the client exists (ruling D4); the message names --package PACKAGE_ID. Unflagged and --mode publish runs still send one PUT with no query string and no read. Merged origin/main first (K was 15; clean merge 7c12291fde). Docs: cli.mdx draft-and-verdict sentence, and content/docs/api/client-sdk.mdx documents the draft read (the coordinator's docs-drift order; that page is not named in claim revision 7025384476's list, so the file surface widened on the coordinator's word). Changesets: new @objectstack/client patch; the @objectstack/cli patch note (this PR's own, not on main) was revised to describe the verdict and the refusal. Measured live at f0520d6a23 on pnpm dev --fresh showcase with an API key (POST /api/v1/keys, OS_TOKEN): the clean draft printed 'Publish verdict: valid: true, 0 error(s), 0 warning(s).'; the titleFormat draft printed 'Publish verdict: valid: false, 1 error(s), 0 warning(s)' and 'title-format-retired items_bad: titleFormat is retired (ADR-0079) ...'; --format json carried publishVerdict.valid false with code title-format-retired; without --package it exited 1 with the refusal; GET /meta/_drafts?package=com.qa.items listed both drafts (Studio itself was not driven). The server was stopped by its recorded process tree and the key files deleted. pr_body below is the body text for the seat to write: it says Fixes #34777. Deviation: commit 35f8494af2 was pushed before overlap-check ran; it ran right after the push (clean, exit 0) and before the next push (clean, exit 0).", "tests": "Red first (register.ts and client index.ts restored to merge commit 7c12291fde, new tests kept): client meta-get-item-draft-read 4/6 failed (the two controls held); cli register-draft (integration) 6/10 failed (flag declaration, mapping, review lines and the unflagged/publish negative control held). Restored with git checkout HEAD; both blob hashes equal HEAD's (b470fca86094 register.ts, 8d67a2db7ea1 index.ts), git diff HEAD empty. Ablation (one; CLI's own source, no build): scripts/ablation-replace.mjs replaced the saved-version guard `typeof savedVersion === 'string' && read?.version !== savedVersion` with `false` (anchor 1 to 0, blob b470fca86094 to 9a02b77f0f7f); register-draft failed 1/10 (the version-mismatch case); restored to blob == HEAD, git diff HEAD empty. Green at f0520d6a23: client meta-get-item-draft-read + package-addressing 89/89; whole client suite with --maxWorkers=2 59 files / 818 tests, VERDICT command-exit 0 (the first run without --maxWorkers was killed, exit 137); register-draft + register-package + register-force (integration) 25/25; register-requires-name + remote-api-commands + vitest-tiers-partition (unit) 48/48; pnpm --filter @objectstack/cli typecheck and pnpm --filter @objectstack/client typecheck VERDICT command-exit 0 (tsc and check:test-typecheck both ran). Import-side consumers of the client were not re-tested: the public surface widened by one optional member and its absence sends the same bytes (pinned by the control).", "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at f0520d6a23: 104 families. All ran; exit codes were captured before any pipe. 102 exited 0 on the first pass. check:skill-examples (exit 3, PREREQUISITE NOT MET: client dist older than src after the red-leg restore touched src mtime) and check:dts-closure (exit 1, run during the workspace rebuild) were re-run after building @objectstack/client and client-react directly, and both exited 0. --ran: '104 derived famil(ies) accounted for — 104 run, 0 NOT-MEASURED (a DERIVED zero)'. overlap-check: before the second push 'origin/main: merges cleanly', VERDICT clean exit 0. CI on f0520d6a23 (70 check-runs): 60 success, 10 skipped, 0 failing. The successes include Test Core (10/10 shards), TypeScript Type Check, Type Check workspace/consumer/source/debt-ledger, Build Core, Lint & Repo Gates, Lint ESLint, Lint PM dispatch-gates, Check Changeset, PR-body guards, Spec property liveness, Dogfood Regression Gate, Governed Surface Queue Guard, Flag docs affected by code changes, Test UI (16 shards), Live E2E UI and Build Docs. The skipped runs are opt-in or path-selected (Lint UI, Dogfood shards matrix, Temporal Conformance, 18.x upgrade harness, Packed-tarball smoke, among others).", "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "1: the os-dev-report comment on #34777 via post-stamped (POST /repos/objectstack-ai/objectstack/issues/34777/comments). Not REST writes: two git pushes (35f8494af2, f0520d6a23). Reads only: claim revision 7025384476 and check-runs via gh api GET. Local only: an API key minted and a package installed on my own throwaway --fresh dev server.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed: a `git checkout HEAD -- FILE` restore after a build makes check:skill-examples refuse with PREREQUISITE NOT MET (dist older than src by mtime) until the package is rebuilt directly; a turbo cache hit does not rewrite it. The gate behaved as designed." ], "pr_body": "Fixes #34777\n\nClause-②: yes (widening)\nMetadata-protocol: none\n\n## 维护者速读\n\n- 用户能看到什么变化:逐个编写元数据的开发者或 AI 客户端,现在可以在命令行把一个条目存成某个软件包的待审草稿(不上线),命令会立刻打印这份草稿能否发布的判定和具体问题;不加新参数时与以前完全一样。此外不需要项目也能对单个条目跑本地检查,检查会列出哪些规则需要整个项目才能判断。\n- 为什么做:属于「MCP 二期与问数」专题,替用命令行和 API 密钥逐条编写的客户端补上「先本地检查、再提交审核、当场看到发布判定」的路径。\n- 出错会怎样:草稿只是暂存,不会自动发布;判定不通过只是打印出来,草稿照样保存;没有指定软件包的草稿请求会在发出前被拒绝。出问题可以直接撤回本次改动。\n- 要你做什么:无。\n\n## What changes\n\n- **`@objectstack/client` `meta.getItem`** takes `state: 'draft'` and sends `?state=draft` beside `?package=`, on the unscoped client and on the environment-scoped twin. This is the strict draft read the REST door already serves; its `item._diagnostics` carries what publishing that draft would refuse (#26707). `'active'` is the default said out loud and sends nothing, so a call without the member is the URL it always was. `content/docs/api/client-sdk.mdx` shows the read. Changeset: `@objectstack/client` patch.\n- **`os meta register TYPE --data FILE --package P --mode draft`** saves through the same door with `?package=P&mode=draft`. It then reads the draft back (`GET /meta/TYPE/NAME?package=P&state=draft`) and prints the publish verdict the runtime serves on it:\n - the text face prints `Publish verdict: valid: true|false, N error(s), M warning(s)`, then each error as `RULE at PATH: MESSAGE`, then each warning;\n - the `--format json|yaml` faces print the door's answer plus `publishVerdict: { valid, errors, warnings }`.\n \n The read is taken as the saved draft's verdict only when it answers the saved draft row's `version`. The door answers a caller it does not admit to drafts with the published item instead, and a draft edited in between is another body. In either case the command prints `Publish verdict not printed: REASON` (`publishVerdict: null` and `publishVerdictUnread` on JSON); it never prints another row's diagnostics as this draft's. A `valid: false` verdict is printed, not turned into a failed run, because the draft is stored either way.\n- **`--mode draft` without `--package` is refused before any request** (ruling D4, the MCP draft door's rule). No client is made and nothing reaches the wire. The message names the remedy: `Name the package the draft is staged into with --package PACKAGE_ID (for example --package com.acme.crm).`\n- **Unflagged and `--mode publish` runs are unchanged.** They send the same single `PUT` with no query string, and no read follows it.\n- **`os lint --item FILE --type TYPE`** (unchanged from the first round) judges one JSON item without a project (`packages/cli/src/lint/item-lint.ts`, `judgeItemAlone`). Each entry of the shared rule table (`authoringRulesFor('lint')`) runs through a proxy that records the top-level stack keys the entry reads:\n - only the item's own collection: the entry judged the item, and its findings are reported;\n - the item's collection plus any other key: the entry is listed under `notJudged` with those keys, and its findings are dropped;\n - never the item's collection: the entry does not judge that type and is skipped.\n\n `os lint`'s per-entry naming, label and structure checks (`entryConventionIssues`, lifted unchanged out of `lintConfig`) run on the item. The namespace-prefix, i18n-coverage and (for objects) data-model families are listed under `familiesNotRun`. Measured at 1545a86f96: object 10 judged / 28 not, view 1/17, flow 4/9, dashboard 1/9, app 0/11. Classifying per member or per pass, which would judge more entries, is the follow-up card #35695.\n- `content/docs/deployment/cli.mdx`: the `os lint` options rows, the **One item** paragraph, and the draft-and-verdict sentence. Changeset: `@objectstack/cli` patch.\n\n## Tests\n\n- `packages/client/src/meta-get-item-draft-read.test.ts` (new) pins the URL on both declarations: `?package=P&state=draft`, `?state=draft` alone, and the control, where an omitted state or `'active'` gives the URL it always sent.\n- `packages/cli/src/commands/meta/register-draft.test.ts` (integration tier) runs the real `RestServer`, protocol and `sys_metadata` on SQLite, with the real SDK. Cases:\n - **draft:** the wire is exactly `PUT ...?package=P&mode=draft`, then `GET ...?package=P&state=draft`, and the text face prints `valid: true`;\n - **JSON face:** carries `publishVerdict`;\n - **refused publish:** an object carrying the retired `titleFormat` prints `Publish verdict: valid: false` with `title-format-retired` on both faces, and is still stored as a draft;\n - **D4:** `--mode draft` without `--package` exits 1 on both faces, with `createApiClient` not called, an empty wire and no save request;\n - **controls:** unflagged and `--mode publish` send no request but the `PUT`;\n - **unit:** `draftPublishVerdictOf` (another row's `version` is no verdict) and the refusal message.\n- `packages/cli/src/lint/item-lint.test.ts` and `packages/cli/test/lint-item.test.ts`: as in the first round.\n\n## Acceptance notes\n\n- **Measured live** on a self-hosted runtime (`pnpm dev -- --fresh -p 38777`, showcase), signed in with an API key minted at `POST /api/v1/keys` and passed as `OS_TOKEN`, with package `com.qa.items` installed. At f0520d6a23:\n - `os meta register object --data ticket.json --package com.qa.items --mode draft` exited 0 and printed `Publish verdict: valid: true, 0 error(s), 0 warning(s).`\n - The same command on the `titleFormat` item exited 0 and printed `Publish verdict: valid: false, 1 error(s), 0 warning(s)`, then `title-format-retired items_bad: titleFormat is retired (ADR-0079) ...`.\n - `--format json` on that item carried `publishVerdict.valid: false` with code `title-format-retired`.\n - Without `--package`, the command exited 1 with the refusal.\n - `GET /meta/_drafts?package=com.qa.items` listed both drafts. This is the read Studio's Changes drawer lists a package's drafts from; Studio itself was not driven.\n - `os lint --item` on the `titleFormat` item exits 1 on the same rule.\n- The verdict read is one extra `GET`, sent only on a `--mode draft` run.\n- Exit code 0 on a `valid: false` verdict is deliberate. The command stages; `os lint --item` is the pre-flight that fails a run.\n\n## Verification\n\n- **Red first** (sources restored to the merge commit 7c12291fde, new tests kept):\n - client pin: 4 of 6 failed (the two controls held);\n - `register-draft`: 6 of 10 failed (flag declaration, mapping, review lines and the negative control held).\n - Restored with `git checkout HEAD`; both blobs equal HEAD's, and `git diff HEAD` was empty.\n- **Ablation:** `scripts/ablation-replace.mjs` replaced the saved-version guard in `draftPublishVerdictOf` with `false` (anchor 1 to 0, blob b470fca86094 to 9a02b77f0f7f). `register-draft` then failed 1 of 10, the version-mismatch case. Restored to blob == HEAD with an empty `git diff HEAD`. No build was needed: the subject is the CLI's own source.\n- **Green at f0520d6a23:**\n - client pins plus `package-addressing`: 89 of 89;\n - the whole client suite (`--maxWorkers=2`): 59 files, 818 tests;\n - `register-draft`, `register-package` and `register-force` (integration): 25 of 25;\n - `register-requires-name`, `remote-api-commands` and the tier partition pin (unit): 48 of 48.\n- **Typecheck:** `pnpm --filter @objectstack/cli typecheck` and `pnpm --filter @objectstack/client typecheck` gave VERDICT command-exit 0.\n- **Derived gates** (`dispatch-gates --commands`, 104 families): all exit 0. `--ran`: 104 run, 0 NOT-MEASURED. `check:skill-examples` and `check:dts-closure` first answered as prerequisites, because the workspace build was running beside them. They are green after the client was rebuilt directly.\n- **CI on f0520d6a23:** 60 success, 10 skipped, 0 failing.\n\n## Read first\n\n1. `packages/cli/src/commands/meta/register.ts`, `draftPublishVerdictOf` and `reportDraft`. The risk is the version guard: it is what keeps the published item's diagnostics from being printed as the draft's.\n2. `packages/cli/src/commands/meta/register.ts`, `metaRegisterOptions`. The D4 refusal runs before the client exists. The risk is any path that saves before it.\n3. `packages/client/src/index.ts`, both `getItem` declarations. Only `'draft'` puts a parameter on the wire.\n\nTwo-minute check: `os meta register object --data ITEM.json --package PACKAGE_ID --mode draft` against a runtime, with a `titleFormat` in the item, prints `Publish verdict: valid: false` and a `title-format-retired` line.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt\n\n---\n\n_Generated by [Claude Code](https://claude.ai/code/session_01L6bhgTyMahdAdhXSzgy2nt)_\n" }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Claim revision: 2026-11-20T00:33Z · area b1-B · amends revision 7025384476 by one file, so that the claim names every path in PR #35675.
Area: b1-B
File surface (revised): revision 7025384476's surface plus
content/docs/api/client-sdk.mdx, the SDK page that documentsmeta.getItem's options. The PR's Docs Drift Check named it for the new draft read, and this area thread ordered the dev to document the option there. Stop on breach.Clause-②: yes (widening)
Metadata-protocol: none
State: the dev's continuation landed at head f0520d6 (os-dev-report 7026419736). The PR body now says
Fixes #34777. Next is L1-a on that head, then an isolated L2.objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt
Delivered · 2026-11-20T01:13Z · PR #35675 merged as f5b2eea. Its
Fixesline closed this card.What changed:
os meta register --mode draft --package <id>stages an item as a package draft without publishing it. It then reads the draft back and prints the runtime's publish verdict:valid, the errors with their rule codes, and the warnings. Avalid: falseverdict exits 0, because the draft is stored either way.--mode draftwithout--packageis refused before any request is made (ruling D4). Runs without the flag, and runs with--mode publish, behave as before.@objectstack/clientmeta.getItemtakesstate: 'draft'(?state=draft). Calls without it send the same request as before.os lint --item FILE --type TYPEjudges one item without a project. It names every rule that needed more of the stack than the item.Reviews: L1-a ACCEPT 7026552984, isolated L2 PASS 7026697115, seat adoption 7026743852.
Follow-ups, unclaimed and waiting on triage (7026804300): #35695 (per-pass
--itemcoverage) and #35704 (L2 nits F1+F3).State:
pm:dispatchedremoved. Nothing is left open on this card.