Repository navigation
docs(plugin-hono-server, hono): say which 304 answers carry Vary, and that the hosted door leaves compression to the platform - #33452
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
…coding Claude-Session: https://claude.ai/code/session_016WV4cxHwXNcGcAHNerZsom Co-authored-by: Claude <noreply@anthropic.com>
… that the hosted door leaves compression to the platform Claude-Session: https://claude.ai/code/session_016WV4cxHwXNcGcAHNerZsom Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1806c968f3153a04ce74f616e69af9860df09568 && git checkout 1806c968f3153a04ce74f616e69af9860df09568
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 19cc8976bfc88e6314e0e9d41be012a1035279e9 91ade0988b78f83483694d2f2cbed673b334218e && git checkout -B drift-repro 19cc8976bfc88e6314e0e9d41be012a1035279e9 && git merge --no-ff 91ade0988b78f83483694d2f2cbed673b334218e
node scripts/docs-audit/affected-docs.mjs --json 19cc8976bfc88e6314e0e9d41be012a1035279e9 |
|
domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom ACCEPT · area A5 · head 91ade09 · 2026-11-14T22:15Z
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43649385454 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom Re-queue · area A5 · head 91ade09 · 2026-11-14T23:06Z Queue build 43649385454 went red on |
Requested by Elon · project thread
Fixes #32565
Fixes #32536
Clause-②: no
Metadata-protocol: none
Seat: domain:server#5 · os-elon-musk · session_016WV4cxHwXNcGcAHNerZsom (area-lease pilot #33059, area A5).
维护者速读
Vary行为;并写明托管入口(createHonoApp)不压缩、由平台或 CDN 负责。代码零行为变化,只改注释与文档,加一个 304 测试。Vary: Accept-Encoding",实际只有自带可压缩Content-Type的 304 才带(控制台静态文件的 304 不带);托管入口谁负责压缩此前无文档,裁决 Y′ 要求写明。packages/plugins/plugin-hono-server/src/response-compression.test.ts(新 304 用例,钉住两种 304 形态);packages/adapters/hono/README.md(托管入口规则);content/docs/deployment/production-readiness.mdx(新节)。pnpm --filter @objectstack/plugin-hono-server exec vitest run src/response-compression.test.ts,预期 25 个用例全绿。What changes
#32565 (304 and
Vary). Route chosen: make the docs say what the server does, and pin it. The middleware decides from the answer it is handed (variesByEncodingreads the answer's ownContent-Type); it cannot see the200a304stands for. Measured on this branch with two304shapes over a real socket:new Response(null, { status: 304, headers: { etag, cache-control } }),packages/cli/src/utils/console.ts): noContent-Type, noVary;res.status(304)thenres.json(undefined), which is howpackages/runtime/src/dispatcher-plugin.tswrites the translation bundle's body-less304): Hono'sc.jsonstampsContent-Type: application/json, so this304does carryVary: Accept-Encoding. The card's premise holds for the Console producer only; the i18n producer already gets theVaryon the self-hosted door.Why not the code fix: the middleware cannot tell which route would encode its
200, so "addVaryto a bare304" would mean adding it to every bare304, including ones for images and other types this server never encodes. A cache refreshing a stored answer from a304copies the304's header fields onto it, so that would add aVarythe stored answer never had. Docs that say exactly what happens is the smaller honest change; nothing is wrong in a cache today because a304withoutVaryleaves the storedVaryin place.Edited: the
## Vary and ETagparagraph of the module docblock and the comment on the early return inresponse-compression.ts(no code line changed); the plugin README;content/docs/protocol/kernel/http-protocol.mdx.#32536 (hosted door). Ruling Y′ (comment 6813607394 on #32155, item 3) records that
createHonoAppdoes not compress and that the platform or CDN does. Premise re-checked onorigin/mainba35dfd7:git grep -n "Content-Encoding\|compress" -- packages/adapters/hono/srcanswers exit 1 (no hits), andgit grep -n -i "vary\|accept-encoding" -- packages/adapters/hono/srcanswers exit 1 too. Written down inpackages/adapters/hono/README.md(new section) andcontent/docs/deployment/production-readiness.mdx(new section, a table of which door compresses), with a cross-link from the protocol page. Both say to check the host compresses, to fix it at the host rather than in the app, and to keep theETagunchanged (saves compare it strongly asIf-Match).Changeset:
.changeset/32565-compression-vary-304-hosted-door.md,patchfor@objectstack/plugin-hono-serverand@objectstack/hono(their READMEs ship in the tarball).Tests
response-compression.test.ts: a304carriesVary: Accept-Encodingonly when it carries a compressibleContent-Type, and is never encoded. Both producer shapes above, raw HTTP throughnode:http.Acceptance notes
Vary"on HEAD, 304 and 206 answers too, with the same merge rule"; the landed implementation does that for answers that pass theContent-Typegate, and this PR does not change that. It makes the docs match it; it does not reverse the ruling. Triage on plugin-hono-server compression: a 304 with no Content-Type gets no Vary: Accept-Encoding, while the README and docs say every 304 does #32565 placed the wording in the lane's discretion.Verification
Readings below were taken at head
91ade098(tests) and the derived gate run named in the report comment.plugin-hono-server test + typecheck
bash scripts/pm/os-verify-lock.sh -c "pnpm --filter @objectstack/plugin-hono-server test && pnpm --filter @objectstack/plugin-hono-server typecheck":Test Files 42 passed (42),Tests 548 passed (548); typechecktsc --noEmitboth programs clean,check:test-typecheck: OK;VERDICT command-exit 0.🤖 Generated with Claude Code
Claim records: #32565 comment 6884374681 · #32536 comment 6884780070 (branch claude/area-A5-32565).