|
1 | 1 | --- |
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 |
12 | 12 | --- |
13 | 13 |
|
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