Skip to content

fix(spec): describe CompleteUploadRequest.eTag as stored, not compared - #24695

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-24648-etag-describe
Oct 20, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-24648-etag-describe

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Closes #24648

Clause-②: no

What changes

CompleteUploadRequestSchema.eTag (packages/spec/src/api/storage.zod.ts) described itself as S3 ETag verification. No runtime path verifies it. The description now says what runs:

ETag the client reports for the uploaded object. Stored on the file record as sent and not compared with anything: no storage adapter reports a stored object's ETag. Before committing, the door checks that the storage backend holds bytes under the file's key and, when the upload declared a size, that the held size equals it.

Route: amend the describe, per the triage lean and the claim. No shape change, no new check, no retirement. The key keeps the same type and optionality.

Evidence the new sentence is accurate (read on origin/main 3a931fc)

  • packages/services/service-storage/src/storage-routes.ts, POST /storage/upload/complete: the body's eTag goes into store.updateFile(fileId, { status: 'committed', etag: eTag ?? undefined }). It is stored verbatim and never read before that write.
  • In the same file, heldBytesRefusal (added with PR fix(service-storage): the upload commit door refuses a file whose bytes the storage backend does not hold #24643) runs before the write. It refuses when storage.exists(file.key) is false. When the row declares a size, it also refuses when storage.getInfo(file.key).size differs from that size. Its own docblock says the eTag is not compared, because no adapter's getInfo reports the stored object's ETag.
  • StorageFileInfo (packages/spec/src/contracts/storage-service.ts) has no etag member.

Files

  • packages/spec/src/api/storage.zod.ts: the describe.
  • content/docs/references/api/storage.mdx: regenerated by pnpm --filter @objectstack/spec check:generated --fix, which proved only check:docs stale and ran gen:docs. Not edited by hand.
  • .changeset/24648-etag-describe.md: @objectstack/spec patch.

No test pins the old sentence. The only occurrences of S3 ETag verification were the schema and the generated reference page. The key is not in any packages/spec/liveness/*.json ledger. The one hit in qa.json is the substring inside parseTagsFlag. No other open PR touches storage.zod.ts or references/api/storage.mdx; I read the file lists of all open PRs before opening this one.

Verification (head 57b0e5a, after merging origin/main)

  • pnpm --filter @objectstack/spec build: exit 0.
  • pnpm --filter @objectstack/spec typecheck: exit 0, including the check:test-typecheck layer.
  • pnpm --filter @objectstack/spec test: 702 files passed, 21349 tests passed, 1 todo.
  • pnpm --filter @objectstack/spec check:generated: red before the regeneration (1 of 14 stale: content/docs/references/**). Green after --fix.
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: derived 104 commands. All 104 ran. 103 exit 0 (6 of them were re-run after building their declared prerequisites: @objectstack/lint and its closure, @objectstack/formula, @objectstack/client-react, @objectstack/objectql).
  • NOT MEASURED: pnpm check:dual-build-cjs-loads. Reason: it needs a whole-workspace pnpm build (29 or more packages have no dist/), and that build does not fit the local budget. The diff changes one describe string and no package entry point. Declared to CI.

Acceptance notes

  • Enforcing the eTag would be a contract addition: an etag on StorageFileInfo, the S3 adapter reporting HeadObject's ETag, and a compare at the commit door. Retiring the key would be a protocol change. Both are left out, per triage.

Generated by Claude Code

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling labels Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 3 documentable anchor(s).

3 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via storage.upload (sdk, the route ledger binds it to POST /api/v1/storage/upload/complete))
  • content/docs/api/plugin-endpoints.mdx (via storage.upload (sdk, the route ledger binds it to POST /api/v1/storage/upload/complete))
  • content/docs/kernel/runtime-services/storage-service.mdx (via storage.upload (sdk, the route ledger binds it to POST /api/v1/storage/upload/complete))
What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 143 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 5018fc303d3c36f973d0cce4866d69530ddfeb64 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 2a913ab8d88826ecfba88bd227ed19b23bd09ee6 — the merge of head 57b0e5a1979df1d13f3504bf03ef55ad6338086e into base 5018fc303d3c36f973d0cce4866d69530ddfeb64, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 2a913ab8d88826ecfba88bd227ed19b23bd09ee6 && git checkout 2a913ab8d88826ecfba88bd227ed19b23bd09ee6
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 5018fc303d3c36f973d0cce4866d69530ddfeb64 57b0e5a1979df1d13f3504bf03ef55ad6338086e && git checkout -B drift-repro 5018fc303d3c36f973d0cce4866d69530ddfeb64 && git merge --no-ff 57b0e5a1979df1d13f3504bf03ef55ad6338086e

node scripts/docs-audit/affected-docs.mjs --json 5018fc303d3c36f973d0cce4866d69530ddfeb64

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 5018fc303d3c36f973d0cce4866d69530ddfeb64 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 20, 2026 00:08
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 20, 2026 00:08
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 39349100593 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (6/6) — 失败步骤: Run this shard's tests

    @objectstack/runtime:test:  FAIL   local  src/domains/share-links-refusal-order.test.ts > [#23328] share-link resolve refusal order — the dispatcher twin > [#23372] email audience: the refusal is the 
      ↳ 失败原因: @objectstack/runtime:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 2 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

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

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

2 participants