Skip to content

Commit 44232c2

Browse files
committed
fix(changeset): correct the type name, declare the break, and bump minor
Three defects in the changeset text, all found in PM review of #10691: 1. `AuthManagerConfig` does not exist. The type is `AuthManagerOptions` (auth-manager.ts:375, public via `export * from './auth-manager.js'`), and the tightened `logger` field is :647 inside it. Measured: `AuthManagerConfig` has ZERO hits in `packages/**` source and only two in a stale CHANGELOG.md — so an embedder who hit the compile error and grepped the name this changeset shipped would have found an already-retired spelling and been led away from the fix. That is what makes it worse than a typo: a changeset body IS the published CHANGELOG. 2. `patch` contradicted the changeset's own text. `check-changeset-no-major.mjs` records the convention in its own WHY THIS EXISTS block: "During the launch window we ship breaking changes as `minor` (pre-1.0 semantics ...)" — every publishable package is in the Changesets `fixed` group and versions in lockstep, so the bump level is the only channel that tells the stack a release can break a build. A changeset that says "an external embedder ... will now see a compile error" cannot also be `patch`. Now `minor`; `major` is banned by that same guard. 3. The break is now DECLARED (`**BREAKING**`) and carries its ADR-0087 disposition, which a declared-breaking changeset must state in writing (AGENTS.md, enforced by `check:adr-0087-registration`). The marker is `runtime-interface-only`, naming the seven exported symbols, and it was chosen by reading the gate rather than by pattern-matching the common case: `no-migration-prescription` is REFUSED when the body carries a prescription, and `runtime-interface-only` inherits that same refusal (#8299) — it is a narrowing, never an escape. It is claimable here because it is TRUE and mechanically re-checkable: every tightened type is a plain TS logger interface, no Zod projection, no metadata surface and unreferenced by one, so `objectstack migrate meta` provably has nothing to rewrite. Nothing is removed or renamed, so AGENTS.md's FROM → TO requirement (scoped to removals and renames) is not triggered; the consumer action is stated plainly instead. Changeset text only — no source file is touched by this commit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PnJHU45vPJj5UQrxe946Bx
1 parent 5243df4 commit 44232c2

1 file changed

Lines changed: 61 additions & 40 deletions

File tree

Lines changed: 61 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,64 @@
11
---
2-
"@objectstack/cloud-connection": patch
3-
"@objectstack/metadata-protocol": patch
4-
"@objectstack/plugin-approvals": patch
5-
"@objectstack/plugin-audit": patch
6-
"@objectstack/plugin-auth": patch
7-
"@objectstack/plugin-email": patch
8-
"@objectstack/plugin-reports": patch
9-
"@objectstack/plugin-sharing": patch
10-
"@objectstack/plugin-webhooks": patch
11-
"@objectstack/service-knowledge": patch
2+
"@objectstack/cloud-connection": minor
3+
"@objectstack/metadata-protocol": minor
4+
"@objectstack/plugin-approvals": minor
5+
"@objectstack/plugin-audit": minor
6+
"@objectstack/plugin-auth": minor
7+
"@objectstack/plugin-email": minor
8+
"@objectstack/plugin-reports": minor
9+
"@objectstack/plugin-sharing": minor
10+
"@objectstack/plugin-webhooks": minor
11+
"@objectstack/service-knowledge": minor
1212
---
1313

14-
**Contract tightening (types only, no runtime behaviour change):** twelve logger
15-
sink types that declared an optional `error` now declare a **non-optional**
16-
`warn`, so a durability report always has somewhere to land (#9754, #10556).
17-
18-
`error` stays optional on every one of them — hosts legitimately inject reduced
19-
sinks, and requiring `error` was measured and rejected as #9754 option C. What
20-
changes is that its *absence* now has a declared, guaranteed destination. Call
21-
sites keep the `logger?.warn?.(…)` spelling as the backstop for hosts the type
22-
cannot reach.
23-
24-
Who has to change: a caller that hands one of these sinks an object with **no
25-
`warn` method**. Every construction site in this repo already supplies one, so
26-
the in-tree cost was zero; an external embedder passing a reduced `{ info }` or
27-
`{ error }` sink will now see a compile error, which is the point — that caller
28-
was silently discarding the reports.
29-
30-
The sinks: `PluginContext['logger']` (cloud-connection), `IndexMigrationLogger`
31-
(metadata-protocol), `MinimalLogger` (plugin-approvals lifecycle-hooks),
32-
`AuthEventAuditLogger` and `ReadAuditLogger` (plugin-audit), `LoggerLike` and
33-
`ReconcileMembershipDeps['logger']` (plugin-auth), `ReclaimLogger`
34-
(plugin-email), `ReportServiceOptions['logger']` (plugin-reports),
35-
`MinimalLogger` (plugin-sharing bulk-recompute), `OptionalLogger`
36-
(plugin-webhooks) and `KnowledgeLogger` (service-knowledge).
37-
38-
Three forwarding seams were tightened with them, because `tsc` reported that
39-
they would otherwise re-open the silence one module downstream of where it was
40-
closed: `MinimalLogger` in plugin-sharing's `rule-hooks.ts` and
41-
`record-share-cascade.ts`, and `AuthManagerConfig['logger']` in plugin-auth.
42-
The last of those is the only externally visible one: `AuthManager`'s `logger`
43-
option stays optional, but a logger that *is* supplied must now carry `warn`.
14+
**BREAKING** (compile-time only): twelve logger sink types that declared an
15+
optional `error` now declare a **non-optional** `warn`, so a durability report
16+
always has somewhere to land (#9754, #10556).
17+
18+
`minor`, not `major`: during the launch window this stack ships breaking changes
19+
as `minor` — every publishable package versions in lockstep, so a `major` would
20+
promote the whole release. `patch` would be wrong in the other direction, because
21+
this *can* break a consumer's build.
22+
23+
`error` stays optional on every one of these types — hosts legitimately inject
24+
reduced sinks, and requiring `error` was measured and rejected as #9754 option C.
25+
What changes is that its *absence* now has a declared, guaranteed destination.
26+
Call sites keep the `logger?.warn?.(…)` spelling as the backstop for hosts the
27+
type cannot reach, so **no runtime behaviour changes**: nothing that printed
28+
before stops printing, and nothing silent starts printing.
29+
30+
### Who has to change, and what to do
31+
32+
Only a caller that hands one of these sinks an object with **no `warn` method** —
33+
for example `{ info }` or `{ error }` alone. Add a `warn` member; there is no
34+
rename, no removal, and no stored value or metadata key to rewrite. Every
35+
construction site inside this repo already supplied one, so the in-repo cost was
36+
zero; the compile error is reserved for the callers that were silently discarding
37+
these reports.
38+
39+
The affected types, by package:
40+
41+
- `@objectstack/cloud-connection` — the internal `PluginContext['logger']`
42+
- `@objectstack/metadata-protocol` — `IndexMigrationLogger`
43+
- `@objectstack/plugin-approvals` — the internal `MinimalLogger` of `lifecycle-hooks`
44+
- `@objectstack/plugin-audit` — `AuthEventAuditLogger`, `ReadAuditLogger`
45+
- `@objectstack/plugin-auth` — `ReconcileMembershipDeps['logger']`, the internal
46+
`LoggerLike` of `member-role-canonical`, and `AuthManagerOptions['logger']`
47+
- `@objectstack/plugin-email` — `ReclaimLogger`, via `ReclaimAttachmentContentOptions`
48+
- `@objectstack/plugin-reports` — `ReportServiceOptions['logger']`
49+
- `@objectstack/plugin-sharing` — the internal `MinimalLogger` of `bulk-recompute`,
50+
`rule-hooks` and `record-share-cascade`
51+
- `@objectstack/plugin-webhooks` — `OptionalLogger`, via `AutoEnqueuerOptions`
52+
- `@objectstack/service-knowledge` — `KnowledgeLogger`
53+
54+
`AuthManagerOptions['logger']` is the one most likely to be reached from outside:
55+
`AuthManager` is public surface, its `logger` option stays optional, and a logger
56+
that *is* supplied must now carry `warn`. The only non-test construction site in
57+
this repo passes the kernel `Logger`, whose `warn` is already required.
58+
59+
`ReportService` and `AutoEnqueuer` additionally stopped defaulting their logger
60+
field to `{}`. The field is now honestly optional rather than holding an empty
61+
object that declared it could report and discarded everything. Behaviour is
62+
unchanged in both directions.
63+
64+
<!-- adr-0087: not-required (runtime-interface-only packages/plugins/plugin-auth/src/auth-manager.ts#AuthManagerOptions, packages/plugins/plugin-auth/src/reconcile-membership.ts#ReconcileMembershipDeps, packages/metadata-protocol/src/migrations/partial-index-probe.ts#IndexMigrationLogger, packages/plugins/plugin-audit/src/auth-event-audit.ts#AuthEventAuditLogger, packages/plugins/plugin-audit/src/read-audit.ts#ReadAuditLogger, packages/plugins/plugin-reports/src/report-service.ts#ReportServiceOptions, packages/services/service-knowledge/src/knowledge-service.ts#KnowledgeLogger) every tightened type is a plain TypeScript logger interface -- no Zod projection, no metadata surface, and none is referenced by one -- so `objectstack migrate meta` has nothing to rewrite. Nothing is removed or renamed and no stored value moves; the only consumer action is adding a `warn` member at a construction site the compiler names. -->

0 commit comments

Comments
 (0)