Repository navigation
fix(service-datasource): migrateCredential's drop-inline refusal names an empty stored credential as empty - #29192
Conversation
…s an empty stored credential as empty The refusal blamed a missing sys_secret row or a changed encryption key when the existing ref decrypted to ''. It now names the credential as empty in the connect path's wording; the missing-row / changed-key branch keeps its sentence. Same refused status, same outcome. Claude-Session: https://claude.ai/code/session_01ADHkmP66rDL21VeBrVWovN Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 3 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 147817e97160419bd5f72d1720fcaa6f7d28058a && git checkout 147817e97160419bd5f72d1720fcaa6f7d28058a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c44c8ac4e282c8f4e8135dc90ff1d34e1615d2d6 b213c369f60be4e644ae08c252cdc028177b555b && git checkout -B drift-repro c44c8ac4e282c8f4e8135dc90ff1d34e1615d2d6 && git merge --no-ff b213c369f60be4e644ae08c252cdc028177b555b
node scripts/docs-audit/affected-docs.mjs --json c44c8ac4e282c8f4e8135dc90ff1d34e1615d2d6 |
|
domain:server#3 · os-steve · session_01ADHkmQJdgarUjPLNgFBY67 席位核对 · ACCEPT · PR #29192 · 2026-11-02T09:17ZHead-sha: 维护者速读(席位终稿)
核对六项
|
Requested by Steve · project thread
Fixes #29069
Clause-②: no
Metadata-protocol: none
维护者速读
refused、什么都不写、内联凭据保留。回滚即 revert。packages/services/service-datasource/src/datasource-admin-service.ts的migrateCredential里新拆出的resolved === ''分支。pnpm --filter @objectstack/service-datasource exec vitest run src/__tests__/datasource-admin-service.test.ts,预期Tests 39 passed (39)(main 上新用例红)。What changes
migrateCredential's drop-inline step (datasource-admin-service.ts) splits its refusal. A ref that resolves to''is refused with: "Datasource 'NAME' already references a stored secret, but credential 'REF' is empty (its sys_secret row holds an empty value). Removing the inline credential would leave this datasource with no working credential at all." The middle clause is the connect path's sentence from PR fix(service-datasource)!: the datasource admin doors refuse an empty secret instead of sealing it over the working credential #29064 (DatasourceConnectionService.connect, thesecret === ''branch), byte for byte. The remedy says to set the datasource's secret again.undefined: a missing row or a decrypt failure) keeps its sentence and remedy unchanged.status: 'refused', no write, the inline copy kept. No new error code, status or member; the result shape is unchanged..changeset/29069-migrate-credential-empty-refusal.md:patchon@objectstack/service-datasource.Tests
src/__tests__/datasource-admin-service.test.ts,migrateCredential (#8155)block:toContain('could not be resolved')to an exact pin of the missing-row sentence, plus its remedy, so the unchanged text is held (the card asks a test to pin both texts).''is refused with the empty-credential sentence exactly, the reason names neither "could not be resolved" nor "encryption key", the remedy says to set the secret again, the inline password stays and the only store call is the read.Red on base, green on head, ablation
fea2dbb7):Tests 1 failed | 38 passed (39); the new case received the missing-row sentence. The missing-row pin was green on base, as it should be.b213c369):Tests 39 passed (39).scripts/ablation-replace.mjs, the wholeresolved === ''branch replaced by the old conflated conditionif (resolved == null || resolved === '') {, anchor 1 -> 0, blob144b0a89->bcdb23c3):Tests 1 failed | 38 passed (39); Expected the empty sentence, Received "…but it could not be resolved or decrypted (a missingsys_secretrow, or a changed encryption key)…". Restore: blob after restore144b0a89equals HEAD's,git diff HEADempty.Acceptance notes
datasource-connection-service.ts; each spelling is pinned by its own test.Verification
All readings at head
b213c369.Package suite, typecheck, lint
pnpm --filter @objectstack/service-datasource test:Test Files 69 passed (69),Tests 1153 passed (1153), exit 0.pnpm --filter @objectstack/service-datasource typecheck: exit 0.--no-inline-configon the two changed source files: exit 0. Repo-widepnpm lintis CI's.Derived gates (dispatch-gates.mjs --commands, 61 families)
check-plugin-teardown-shape --self-testfirst exited 3 on a shallow clone; aftergit fetch --unshallowit passed (48 cases).pnpm check:dual-build-cjs-loadsneeds every package built; the full build runs and the reading goes in the os-dev-report, otherwise CI's check-run is the reading.Dogfood battery: not owed (no
!in the title, no(narrowing)arm).Generated by Claude Code