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
fix(hono,plugin-hono-server,runtime): one CORS source and one registry key — the last derivable copies from the #3786 sweep
Re-ran the sweep across all 72 packages. The earlier pass globbed
`packages/*/src`, one level deep, so it missed everything under
`packages/plugins/` and `packages/adapters/` — "the sweep is basically clean"
was based on an incomplete scan.
A STALE CORS DEFAULT, on the one description callers actually read.
`HonoCorsOptions.allowHeaders`' TSDoc promised `['Content-Type', 'Authorization',
'X-Requested-With']` "sufficient for cookie and bearer-token auth". The real
default carries three more: `X-Tenant-ID`, `X-Environment-Id` (multi-tenant
routing) and `If-Match` (OCC token on record PATCHes, objectui#2572). Sizing a
custom allowHeaders against that sentence drops all three and breaks every
cross-origin save.
Three Hono CORS sites each kept their own copy under "keep in sync" comments.
The copies agreed; the DOC — the only description with no counterpart to be
diffed against, and the only one a caller reads — is what drifted. Both defaults
are now single constants exported from plugin-hono-server and imported by the
adapter (which already depends on it). The TSDoc links them instead of
restating, and documents the asymmetry it never mentioned: allowHeaders
REPLACES the default, exposeHeaders MERGES.
hono-plugin.test.ts stopped stubbing ./adapter wholesale and keeps the real
constants via importOriginal — it asserts exact header lists, so a mocked copy
would make the test agree with itself rather than with what ships. Verified:
removing `If-Match` fails `should allow If-Match by default`, by name.
A HAND-COPIED REGISTRY KEY. runtime's share-links domain resolved 'shareLinks'
as a literal, copied from SHARE_LINK_SERVICE — whose own comment says "keep in
sync with the SharingPlugin registration". Now imports the constant. A drifted
copy resolves nothing, so every share link 501s "Sharing is not configured for
this environment" on an environment where it is.
PLUS A DUPLICATE LEDGER ENTRY, the same defect one level up: check-generated.ts
carried two NO_GENERATOR entries for check:strictness-ledger, because #4203 and
#4252 each added one without seeing the other. Harmless (the ledger is read into
a Set) but two comments told overlapping versions of one story. #4203's is kept —
the fuller account, from the PR that fixed the underlying problem.
NOT included, because main already has it: wiring the reconciliation into CI.
#4203 landed it as `check:generated --reconcile-only` in lint.yml's unfiltered
job, which is strictly better than what this branch first proposed — it runs only
the reconciliation rather than re-running all eight artifact gates that already
have their own steps, and it sits in an unfiltered required job so it cannot go
dormant behind a paths filter.
Checked and left alone: ApprovalStatus (5 values) and ApprovalActionKind (12
values) vs their plugin-approvals selects — diffed verbatim, no drift today,
still hand-copied across a package boundary.
Verified: 28/28 turbo test tasks green (plugin-hono-server 149, hono 73, runtime
67 files), affected builds clean, check:generated --reconcile-only PASS.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UXGj3Z5TmwSV6RK2oGc3cb
0 commit comments