Skip to content

[转移·spec] liveness datasource.json 的 pool 四行补按驱动限定注记(#5931 裁决的 spec 半边) #6214

Description

@hotlong

Part of #5931(维护者 2026-08-07 03:21Z 裁决的 spec 半边;services 座位按 shared-contract 规则转移立单——packages/spec 恒归 spec 座位,本座位与 dev 均不触)。

要做的

packages/spec/liveness/datasource.json 中 pool.min / pool.max / pool.idleTimeoutMillis / pool.connectionTimeoutMillis 四行,现记为无限定 live;按 #5931 落地后的真值改为按驱动限定注记:

live on postgres / mysql / mongo;authoring error on sqlite / sqlite-wasm(自 #5714 / PR #5954)与 memory(自 #5931 / 其 PR)。

纯注记精确化,零行为变化;确切措辞以 spec 车道对 liveness 台账的既有词汇为准(#5931 的 rider 评论 2026-08-06 12:59Z 有原始表述)。

依赖

Blocked-by: #5931(分支 claude/issue-5931-memory-pool-reject 的 PR 合入 main 后,上面那句才为真;memory 臂的覆盖面由该 PR 定稿)。

出处链

#5714 / PR #5954(sqlite/sqlite-wasm 臂拒绝)→ #5931 rider 评论(注记依赖裁定,不塞 #5954)→ #5931 裁决(memory 并入 + 「that half touches spec, so coordinate with the spec seat」原文)。

Activity

  1. claude commented on Aug 7, 2026

    @claude
    Contributor

    Triage (lane-label repair): domain:spec.

    Filed by the services seat as a shared-contract transfer card with pm:queue but no lane label, so no seat could legally claim it (an unlabeled issue may be claimed by no one). Repairing that here — this seat is the single producer of domain:*.

    Landing site: packages/spec/liveness/datasource.json, four pool.* rows. Not domain:spec-surface: the acceptance-surface criterion sorts cards that change packages/spec source text (describe/JSDoc/tombstone prose/error guidance); the liveness ledger is the enforce-or-remove accounting itself, which the domain table names explicitly under the protocol seat (strictness 台账). A wrong ledger row misstates enforcement state — that is the protocol seat's record to keep, even though the diff is prose.

    Blocked-by: #5931 stands — #5931 is still open, so the wording this card must copy is not final. Selection skips it until that merges; this label only makes it claimable once it does.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. self-assigned this
    on Aug 10, 2026
  3. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    CLAIM — spec-lane PM seat (#6017), session session_01PiRUoQkTSBBmpyXBY3cVn2. Branch: claude/issue-6214-pool-liveness-notes. Dispatching a cloud dev session under the maintainer's 2026-08-10 acceleration instructions.

    Unblock verified this hour: the triage comment above held selection until #5931 merged — #5931 closed completed 2026-08-07, so the wording this card must copy is final. Scope per the card: the four pool.* rows in packages/spec/liveness/datasource.json gain the per-driver qualification notes that the #5931 resolution (and #5714's POOL_UNSUPPORTED_DRIVER_IDS treatment) established — the ledger stops overstating where pool is honored. The dev reads #5931's final landed state (including whether the memory arm joined the rejection set) and mirrors exactly that, copying its wording rather than paraphrasing. Ledger-only diff; no schema change.


    Generated by Claude Code

  4. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    OS-DEV-REPORT

    {
      "issue": 6214,
      "outcome": "implemented",
      "branch": "claude/issue-6214-pool-liveness-notes",
      "pr_number": 7242,
      "premise_check": {
        "verified_on": "origin/main @ f40c5b4",
        "rows_still_unqualified": true,
        "detail": "All four pool.* rows read `\"status\": \"live\"` with a single unqualified clause and named no driver arm. Not already repaired.",
        "landed_state_matches_cards": "yes, with one addition the cards could not name",
        "memory_arm_joined_rejection_set": true,
        "card_fallback_applied": "no — the card's 'if memory did NOT join, name the silent drop' branch does not fire for memory. It fires for `turso`, which the landed module names itself."
      },
      "landed_state_read": {
        "rejection_set": {
          "value": ["memory", "sqlite", "sqlite-wasm"],
          "evidence": "packages/services/service-datasource/src/datasource-pool-support.ts:79",
          "pin": "packages/services/service-datasource/src/__tests__/datasource-pool-support.test.ts:46 — 40/40 pass"
        },
        "rejection_doors": [
          "packages/services/service-datasource/src/datasource-admin-service.ts:243 (Setup wizard create)",
          "packages/services/service-datasource/src/datasource-admin-service.ts:314 (Setup wizard update)",
          "packages/services/service-datasource/src/datasource-connection-service.ts:508 (boot auto-connect pre-pass)",
          "packages/services/service-datasource/src/default-datasource-driver-factory.ts:374 (factory, last door)"
        ],
        "per_arm_reasons": {
          "sqlite + sqlite-wasm": "datasource-pool-support.ts:122-126 — knex's better-sqlite3 dialect pins {min:1,max:1} on purpose; a second connection to `:memory:` opens a SEPARATE database, so sizing would split one datasource across several stores (#5714, ruling 2026-08-06 option B)",
          "memory": "datasource-pool-support.ts:142-146 — no connection to pool at all; the store is a plain data structure reached by a direct call (#5931, ruling 2026-08-07)"
        },
        "honored_arms": {
          "postgres": "buildSqlPool(spec) → SqlDriver — default-datasource-driver-factory.ts:188-198, applied :403",
          "mysql": "same builder, applied :458",
          "mongodb": "min/max ONLY → minPoolSize/maxPoolSize — :477-483; the two timeout keys appear nowhere in this arm"
        },
        "remaining_silent_drops": [
          "turso — whole block dropped in silence; the landed module says so itself at datasource-pool-support.ts:90-99 and defers to 'the #6345 PR's follow-ups' (which never filed a card)",
          "mongodb — pool.idleTimeoutMillis / pool.connectionTimeoutMillis reach nothing (half the block honoured, half dropped)"
        ],
        "unknown_driver_ids": "deliberately NOT judged — datasource-pool-support.ts:101-105"
      },
      "rows_updated": {
        "count": 4,
        "file": "packages/spec/liveness/datasource.json",
        "status_changes": "none — all four stay `live`; the verdict was never wrong, only unqualified",
        "pool.min": "+ honoured on postgres/mysql (:191) and as Mongo minPoolSize (:482); authoring ERROR on memory/sqlite/sqlite-wasm (#5714/#5931); silent on turso",
        "pool.max": "+ same driver qualification; Mongo maxPoolSize (:483)",
        "pool.idleTimeoutMillis": "+ SQL arms only (:193) — named explicitly that mongodb reads min/max and nothing else, so this key reaches nothing there; authoring ERROR on the three rejected arms; silent on turso",
        "pool.connectionTimeoutMillis": "+ same qualification (:194-196)",
        "container_note_added": "yes — a `pool`-level note carrying the full record, following the `ssl` block's existing precedent in the same file",
        "evidence_relocated": "yes — the four rows cited :181-184, now the JSDoc above buildSqlPool; re-cited to the real reader lines :191-196 / :482-483 plus datasource-pool-support.ts:79",
        "wording": "copied from the landed module and the #5931 body's measured table (postgres → {min:3,max:9}; sqlite → {min:1,max:1}; memory → pool undefined), not paraphrased into new claims"
      },
      "gates": {
        "packages/spec check:liveness": "PASS — datasource 30 classified (live 30); 349/349 repo-local evidence paths resolve",
        "packages/spec check:generated": "PASS — 11/11 artifacts up to date (spec built first, per #7122)",
        "service-datasource datasource-pool-support.test.ts": "PASS — 40/40 (premise evidence)",
        "CI Spec property liveness": "success",
        "CI overall at report time": "no failures; Test Core / Dogfood / typecheck / ESLint still in progress",
        "changeset": "none — ledger-only precedent #7133 (`fix(spec): re-cite measured readers for 11 stale liveness-ledger rows`) landed three ledger files with no changeset"
      },
      "deviations": [
        "Scope was 'the four pool.* rows'; a container-level `pool` note was added alongside them so the shared record is written once rather than four times. Precedent: the `ssl` block in the same file already carries exactly this shape.",
        "The four rows' `evidence` line numbers were stale (:181-184 → JSDoc, not code). Re-cited while repairing the same rows. The gate resolves paths, not lines, so nothing was red — it was rotting silently.",
        "Two remaining silent-drop surfaces found while reading the landed state and named in the ledger rather than smoothed over: turso (whole block) and mongodb (the two timeout keys). Filed as #7243 (finding, domain:services) — deduped against #5714/#5931/#6214/#6268/#7099, no duplicate. NOT fixed here: tightening either is a new rejection on a public authoring surface, i.e. exactly the contract decision #5931 says an implementer may not make alone."
      ],
      "docs_adr_touched": false,
      "special_inspection_notes": [
        "The #6140 meta-ruling's boundary clause matters for #7243 and is recorded there: SQLite's rationale (`:memory:` splits one datasource across several stores) is arm-specific and does NOT carry to mongodb's timeout keys or to turso remote — so neither can take the 'joins the existing rejection set by default' shortcut.",
        "mongodb's half-honoured block is the sharper of the two findings: an author writing `pool: { max: 20, idleTimeoutMillis: 30000 }` gets maxPoolSize applied and the timeout silently discarded. 'My pool config worked' is half true, which is harder to notice than a whole block vanishing. MongoClient does expose maxIdleTimeMS / connectTimeoutMS, so unlike sqlite/memory this one has an 'implement it' option, not only a 'reject it' one.",
        "The landed module's turso paragraph defers to 'the #6345 PR's follow-ups'; #6345's acceptance comments filed the oclif-allowlist follow-up and a drivers.mdx card, but never a pool card. That pointer aimed at nothing until #7243.",
        "No .zod.ts touched, no schema change, no content/docs/releases/ and no docs/adr/**. PR #7242 is a draft; auto-merge NOT enabled. Two bot comments on the PR (Vercel skipped deployment, docs-drift advisory listing 106 pages) need no action — the diff is ledger JSON, not doc prose or schema."
      ]
    }

    Generated by Claude Code

  5. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    OS-DEV-REPORT — amendment (one field).

    gates.changeset in the report above is incomplete. Corrected:

    {
      "gates": {
        "changeset": "none + `skip-changeset` label — the label was MISSING on the first push and `Check Changeset` went red for exactly that reason (run 93347058887). Fixed by applying the label; the newer run for the same check on the same SHA is `skipped` (the gate's exemption path). Precedent is PR #7179 (`fix(spec): re-cite measured readers for 11 stale liveness-ledger rows`, #7132/#7133, merged 2026-08-10) — three ledger files, no changeset, `skip-changeset` label. My original citation named only issue #7133 and only the 'no changeset' half."
      },
      "deviations_append": "Self-inflicted CI red on the first push: the 'ledger-only diffs carry no changeset' conclusion was right, but route 2 of the Check Changeset gate requires the label to declare it. No code change was needed and none was made — the diff is still exactly the ten lines in packages/spec/liveness/datasource.json."
    }

    Everything else in the report stands. PR #7242 remains a draft with no auto-merge; Spec property liveness is green and the remaining CI is still running with no other failures.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions