Skip to content

读配置不带状态时不返回版本号,助手保存时只好猜版本号 #38982

Description

@objectstack-fleet

repo:cloud@os-warren · os-warren · session_01JQwxbaECoSjckwkB1YXMTu

Filing source: cloud#5306 run 1 (epic cloud#5304 phase 1, 2026-12-01; record /mnt/project-files/cloud-5304/acceptance/run-1/RUN-1-RECORD-attempt2.md), cloud 96091f6, pin 8a7e65b4, Haiku 5.5, admin skill on. Phase 2, pm:on-hold.

维护者速读

  • 问题:助手读一个已有的配置时如果没说读哪个状态,返回里没有版本号;之后保存修改时,助手只好猜版本号,猜错就被拒,要重来。
  • 本卡做:读的时候总是返回版本号,或者技能里写明「改之前按当前状态读」。
  • 不做会怎样:改现有对象、视图时常多一轮失败。

Evidence

Harness rep2 case 1: VALIDATION_ERROR on ifMatch. Rep3 case 3: 409 METADATA_CONFLICT with ifMatch {"draft":false}. The retry after a state: active read succeeded. Suspected: packages/runtime/src/domains/mcp-authoring.ts (get_metadata_item answer), or the read-before-save step in skills/objectstack-mcp-build.

Acceptance

A get_metadata_item read without state answers the version a following save needs, or the skill states the read that does. A test or eval pins it.

Activity

  1. added
    priority:p2
    repo:cloud
    pm:on-hold
    area:ai
    domain:server
    on Dec 1, 2026
  2. objectstack-fleet commented on Dec 1, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:cloud@os-warren · os-warren · session_01JQwxbaECoSjckwkB1YXMTu

    Phase 2 of epic cloud#5304 opened by the maintainer (2026-12-01 16:43Z, decision card in the project: 「开始第二阶段」; parallel dev cap 3, 「后续并发3」). Back to pm:queue for the objectstack lane.

  3. added
    pm:queue
    and removed
    pm:on-hold
    on Dec 1, 2026
  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj

    Claim: PM loop round 2 · 2026-12-02T01:18Z · zone osa-build takes this card (epic objectstack-ai/cloud#5304 framework-side cards; lease row 7330272685 on #38765; slot freed when #39012 merged at 2026-12-02T01:15Z and closed #38965, seat note in the project)
    Area: osa-build
    Session: session_01WGufzivFXq32jQSCUnECPj
    Account: os-support-ai
    Branch: claude/issue-38982-read-version
    Worktree: objectstack-issue-38982
    Domain: domain:server
    Seat: repo:objectstack@os-support-ai
    File surface: packages/runtime/src/domains/mcp-authoring.ts (the get_metadata_item tool description and its branch only), packages/runtime/src/domains/mcp-authoring.test.ts where a pin reads a changed node, packages/runtime/src/domains/mcp-authoring-38982-read-version.test.ts, .changeset/38982-read-version.md. ⛔ Not packages/metadata-protocol/** (the previewDrafts protocol read keeps omitting version on purpose: it is the ADR-0037 render path, protocol-meta-item-reads.ts ~1698), not packages/spec/**, not skills/** (a skill line is a follow-up card). Stop on breach; explain in the report.
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier: "no path-derived mandate … floor sonnet · default opus · ceiling fable"), effort: high
    Clause-②: no (the tool answer gains the version it already carries on a read with state; no input parameter added, no package export moved)
    Metadata-protocol: none
    Responsibility: the MCP authoring door in objectstack (packages/runtime/src/domains/mcp-authoring.ts get_metadata_item reads with previewDrafts when state is omitted and answers no version) | none: the agent must know to re-read with state | every MCP build agent that edits an existing item: a save after a plain read guesses ifMatch and is refused (card evidence: VALIDATION_ERROR on ifMatch, 409 METADATA_CONFLICT)
    Thread-read: 7318471407
    Premise: holds (origin/main 270d160: the get_metadata_item branch passes previewDrafts: true when state is omitted and spreads version only when the protocol returns one; the protocol omits it on a previewDrafts read; the tool description says "a read without state answers none")
    Prior rulings read: get_metadata_item,ifmatch,previewdrafts,readversiontoken → 2 hits; ADR-0037 Decision §1, ADR-0038 Decision §2 (both describe previewDrafts reads as render/verify paths; neither rules on the MCP read's version); thread: none; repo: objectstack-ai/objectstack. Surface ruling lines read: seat rulings D1–D4 and ruling 5856774816 in mcp-authoring.ts bind and are untouched.
    Serial constraints cleared: check-handover.mjs --inflight --card=38982 over this surface: the only meets are .changeset/*.md globs of #38939/#38940/#38941 against this card's own changeset file; #38965's PR #39012 on the same file merged at 2026-12-02T01:15Z, so this card builds on it.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  6. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-support-ai · os-support-ai · session_01WGufzivFXq32jQSCUnECPj
    os-dev-report

    {
    "issue": 38982,
    "status": "done",
    "branch": "claude/issue-38982-read-version",
    "pr": "#39022",
    "session": "session_01WGufzivFXq32jQSCUnECPj",
    "container_and_model": "M, mode:subagent, model: default (dispatch-gates --tier: "no path-derived mandate … floor sonnet · default opus · ceiling fable"), effort: high",
    "premise_still_valid": true,
    "summary": "Premise held on origin/main 270d160: the get_metadata_item branch read with previewDrafts when state was omitted and the protocol omits version on that read. The branch now reads each lifecycle's token by the strict read a state read makes (state: 'draft' first, on NO_DRAFT the plain read) BEFORE the served previewDrafts read, and answers the token of the lifecycle served (draft's when draft: true, published otherwise); a draft published, discarded or first saved in between leaves no token of the served lifecycle and the answer carries no version. Token-before ordering means a change in between leaves the token older than what was served, so a save pinned to it is refused (409) and never written over unseen content (PM assumption 3). The tool description sentence 'a read without state answers none' now says what the answer carries and that version: null means save without ifMatch; protocol, spec and skills untouched; seat rulings D1-D4 and 5856774816 untouched.",
    "tests": "At head 8d6f9b4 (4ab29f3 = empty trailer commit, same tree): pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 over mcp-authoring-38965-list-drafts-bound, mcp-authoring-38982-read-version, mcp-authoring, meta-type-write-capability-parity and src/domains/mcp* -> 'Test Files 15 passed (15)', 'Tests 451 passed (451)', lock VERDICT command-exit 0. pnpm --filter @objectstack/runtime typecheck -> exit 0, 'check:test-typecheck: OK'. New file: 6 cases on the real protocol over SQLite (published/no draft, pending draft incl. the 409 control with the published token, never-published, and three race cases), every token from a read, every save judged by the protocol. Full runtime suite: NOT-MEASURED pnpm --filter @objectstack/runtime exec vitest run :: exceeded the ~10 min foreground cap, harness moved it to background, stopped; CI Test Core owns it. Ablations via scripts/ablation-replace.mjs (src imports, no dist): A (stateless read answers only read.version) -> 4 failed | 2 passed; B (lifecycle match dropped, draft ?? active) -> 2 failed | 4 passed; both restored, blob == HEAD 7a84b160715b, git diff HEAD empty.",
    "gates": "Local: dispatch-gates --commands derived 68 families (same list at d8f1399 and 8d6f9b4); all 68 run on 8d6f9b4 with exit codes captured before any pipe, all exit 0; --ran reconciliation at 4ab29f3: '68 derived, 68 run, 0 NOT-MEASURED, 0 UNRUN' (derived zero). Earlier pass at d8f1399: 67 exit 0, check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (no dist), re-run exit 0 at 8d6f9b4. runtime typecheck exit 0. CI at 4ab29f3 when reported: success = Auto Label, Check Changeset, Check PR Size, Dogfood Regression Gate, Flag docs affected by code changes, Governed Surface Queue Guard, Lint (CI release & engine gates, ESLint, PM dispatch-gates, docs & code guards, repo & tooling gates, scoped query-options erasure, scoped slot lookup & corpus, scoped tooling self-tests), Live E2E UI, PR-body guards, Plan Test Core shards, Test Core 9/12 and 11/12, Test UI, Type Check (consumer gates, debt ledger, source gates, workspace), TypeScript Type Check, filter; in_progress = Build Core, Lint & Repo Gates, Test Core 1-8,10,12 of 12. NOT MEASURED: CI convergence (PM's).",
    "line_budget": "309 changed lines (+306/-3) over 4 files vs the 3000 human-merge threshold: under; skills/** untouched (no skills ratchet owed)",
    "files_changed": [
    ".changeset/38982-read-version.md (+12)",
    "packages/runtime/src/domains/mcp-authoring-38982-read-version.test.ts (+251, new)",
    "packages/runtime/src/domains/mcp-authoring.test.ts (+3, one pin's recorded calls)",
    "packages/runtime/src/domains/mcp-authoring.ts (+40/-3, get_metadata_item description and branch only)"
    ],
    "deviations": [
    "Merge commit 8d6f9b4 (origin/main into the branch, before opening the PR per AGENTS.md multi-agent §10) was pushed without the trailer pair; per the coordinator, empty commit 4ab29f3 carries it, history not rewritten.",
    "Ablation A's vitest run went outside os-verify-lock (one file, 6 cases); ablation B and every other test/build ran under it.",
    "Full @objectstack/runtime suite: moved to background by the harness at the foreground cap, stopped with TaskStop, recorded NOT MEASURED.",
    "Worktree built with scripts/pm/dev-worktree.sh --probe (same fetch + worktree add --no-track off origin/main + pnpm install as the dispatch's command, plus the empty-branch probe push).",
    "New pins are in their own file per the dispatch file surface, against AGENTS.md's rule that a new pin for a component with a shared harness file goes into that file as a top-level describe (ruling record 6583487846): see open_questions."
    ],
    "mcp_calls": "0",
    "api_writes": "2 relay strokes (scripts/pm/fleet-write/dispatch.mjs and post-stamped.mjs): POST /repos/objectstack-ai/objectstack/dispatches -> pr_create executed as POST /repos/objectstack-ai/objectstack/pulls (draft forced) + POST /repos//issues/39022/assignees (os-support-ai), read-back identical 6970/6970 bytes; and this report comment POST /repos//issues/38982/comments. git pushes not counted. No labels written (none named; changeset present, so no skip-changeset).",
    "classifier_refusals": [],
    "open_questions": [
    {
    "question": "AGENTS.md says a new pin for a component that has a shared harness file goes into that file as a top-level describe (ruling record 6583487846); the dispatch surface named a new file and limited mcp-authoring.test.ts to pins reading a changed node. Keep the new file or move its two describes into mcp-authoring.test.ts?",
    "options": [
    "A keep mcp-authoring-38982-read-version.test.ts (as the list_drafts bound pins did in their own file); zero work",
    "B move both describes into mcp-authoring.test.ts as top-level describes; needs the surface widened, about 250 lines moved, the realProtocol harness there is describe-local so it is duplicated either way"
    ],
    "recommendation": "A, because the dispatch surface is the seat's file-scope decision and moving the pins buys no shared harness (that file's real-protocol helper is local to its own describe); the seat can order B as a follow-up if it reads the ruling as binding here."
    }
    ],
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: none · noted in PR Acceptance notes, not filed: the preview read considers a declared override's pending draft (servedOverride) and the strict draft read does not, so where an override draft and another draft of the name both exist the stateless read answers the token a state: 'draft' read answers, which may describe a different row; unreproduced boundary of the existing state: 'draft' address",
    "carrier: PM (the skills/** follow-up card the claim names) · the card's skill half (a skill line stating the read that answers the token) is outside this surface"
    ]
    }

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

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpm:dispatchedpriority:p2repo:cloud

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions