Commit a35fb43
fix(service-datasource): rebuild the live pool when an update changes connectivity-bearing fields, and make active: false actually disable (#14196)
* fix(service-datasource): rebuild the live pool when an update changes connectivity-bearing fields (#13804)
updateDatasource persisted the merged record and called registerPool, whose
connect-path idempotency guard answered already-registered while the old
driver held the name — so the running pool never followed the record, and
toSummary kept reporting the original connect's retained 'connected'. An
explicitly disabled datasource (active: false) kept serving until restart.
Ruled decision tree: rebuild only when driver/config/external(credentialsRef)/
pool/active actually changed; active: false tears the pool down; on rebuild
failure the OLD pool is kept live under a loudly degraded verdict (never
pool-less). Label-only edits keep the idempotent no-op path: same driver
instance, no churn.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
* chore: add changeset for #13804
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
* fix(service-datasource): rule schemaMode into the connectivity-bearing set (#13804)
Contract-review increment on PR #14196 (director-seat conditional PASS,
comment 5494985273). Two changes, exactly as ruled:
1. The changeset for @objectstack/service-datasource moves patch -> minor.
The diff adds public API — the `datasourceConnectivityChanged` and
`ConnectivityBearingFields` exports, the public
`DatasourceConnectionService.reconnect` method, and the published
`DatasourceAdminServiceConfig.reregisterPool` member — which is additive
widening = minor by repo convention (#13897 is the same shape). `patch`
under-reported the surface movement.
2. `schemaMode` joins the connectivity-bearing field set. It was found during
this card's premise verification and reported as a fork rather than added
unilaterally; the review ruled it IN in the same stroke. It is really read
at three sites on the connect path — the `canConnect` policy gate, `toSpec`
-> `factory.create` (driver construction), and `registerDatasourceDef` (the
write gate's def) — and it is patchable by `updateDatasource`, so omitting
it left a schemaMode-only save persisting the new record while all three
kept the OLD value until restart: a narrower instance of the stale-pool
defect this card fixes. One comparator line, plus the exported field slice,
plus one comparator pin. The module docblock now states the resolution
instead of carrying the fork as an open question.
The label-only reverse control (same driver instance, zero factory calls, zero
evictions) stays green, which is what shows the set widened by exactly one
member rather than into "rebuild on everything".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2e3e8c7 commit a35fb43
7 files changed
Lines changed: 858 additions & 2 deletions
File tree
- .changeset
- packages/services/service-datasource/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments