You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(runtime): /ready reports cluster driver health when multi-replica is declared (#3814) #31601
/ready checks only the primary datasource. With Redis stopped, a replica's /ready stayed 200 throughout, and an operator has no signal that the cluster has lost coordination.
Do
When multi-replica is declared on the Redis driver, /ready includes the cluster driver's health (from F3a's health seam, or a ping if F3a is not merged) and, when Redis is down, answers 200 with status: degraded and a cluster entry naming the driver as unreachable. PM decision D4 (2026-11-08): not 503. Every replica loses Redis together, so 503 would turn a degraded cluster into a total outage while the DB is still the source of truth.
Single node: body and status byte-identical to today.
Tests: declared + Redis down = 200 degraded with the cluster entry; declared + Redis up = 200 ok; single node unchanged; the stopping (SIGTERM) 503 path unchanged.
Rules that bind every #3814 child (verbatim rulings on the parent)
R1 peer round-robin. R2 Redis required for multi-replica only. R3 「同意:每张卡都只在"声明多副本并接上 Redis 驱动"时才生效」: the single-node default path is unchanged, multi-replica behaviour switches on only behind declared replicas>1 AND a connected Redis cluster driver, the split-brain guard is never weakened, and the deploy README "multi-node unsupported" line stays until the final gate.
Done when
PR merged; operators can see a degraded cluster from /ready without replicas leaving rotation; single node unchanged.
Claim: PM loop round 1 · #31601 · 2026-11-08T21:32Z
Session: session_01ADHkmP8JJo4zF2sjTBRwnX (seat); dev = card thread session_01ADHkmQwuHPnJPK768Mta39
Account: os-steve
Branch: claude/project-thread-niooue
Worktree: the card thread's checkout of objectstack-ai/objectstack
Domain: domain:server
Seat: domain:server#4
File surface: packages/runtime/src/** (the /ready handler in http-dispatcher.ts / dispatcher-plugin.ts), a health read on packages/services/service-cluster/src/** if #31596's seam is not on main, their tests, .changeset/31601-*.md (stop on breach; stop if /ready's body has a published schema in packages/spec)
Container & model: S, mode:thread, model: default tier (dispatch-gates --tier on runtime: no path-derived mandate), effort: medium
Clause-②: yes (widening)
Metadata-protocol: none
Responsibility: the readiness probe in objectstack (packages/runtime) checks only the primary datasource · no platform path covers it today (a replica with Redis down answers 200 ok) · reached by every /ready probe on a deployment that declares replicas>1 on the Redis driver
Thread-read: 6724391071
Premise: holds (PM decision D4 2026-11-08: 200 status: degraded, never 503; #3814 R3 binds)
Serial constraints cleared: #31596 (seat 1, F3a health seam) is read, not waited on: the dev pings the driver if the seam is not merged.
{
"issue": 31601,
"status": "done",
"branch": "claude/project-thread-niooue",
"pr": "https://github.com/objectstack-ai/objectstack/pull/31711",
"session": "session_01ADHkmQwuHPnJPK768Mta39",
"premise_still_valid": true,
"summary": "Declared multi-node (declaresMultiNode: OS_EXPECT_MULTI_NODE=true or OS_CLUSTER_REPLICAS>1) AND a cluster service offering a redis connection: /ready's 200 body gains cluster {driver, reachable, reason?}; Redis unreachable answers 200 status 'degraded' (D4, never 503). The probe is new probeClusterDriverHealth in @objectstack/service-cluster (one PING bounded at 500 ms over readClusterDriverConnection, closed reason set, never throws, no address in the body), memoized 1 s in HttpDispatcher and consulted on the two 200 branches only, so single node / memory driver / no cluster stay byte-identical and the booting/stopping 503 and primary-datasource 503 return before it. #31596's seam was not merged (no PR), so the driver connection is pinged directly as dispatched.",
"tests": "head 04ca432f: runtime test 563 files / 9047 passed, 19 skipped; runtime typecheck exit 0 (after building driver-turso, a devDep outside the closure: TS2307 on a turso-remote test, missing dist); service-cluster test 9 files / 123 passed, typecheck exit 0; service-cluster-redis test 3 files / 39 passed; eslint --no-inline-config on packages/runtime and packages/services/service-cluster exit 0/0. Head ce30cfbf (adds one collection-time import to the /ready test): http-dispatcher.ready.test.ts 41 passed. Base leg: merge-base 1a20cbc8's http-dispatcher.ts under the new pins answers 200 {status:'ready',state:'running'} (4 cluster pins red). Real redis-server smoke, real ioredis driver, OS_CLUSTER_REPLICAS=3: up 200 ready+reachable; stopped 200 degraded ping-failed (188 ms) then timeout (501 ms); restarted 200 ready+reachable; undeclared: 200 {status:'ready',state:'running'} throughout. Ablations via ablation-replace (src imports, no dist leg), all red then restored blob==HEAD, git diff HEAD empty: A1 drop declaration gate (3 red), A2 degraded as 503 (1 red), A3 probe before state 503 (4 red), A4 probe on primary 503 (1 red; first attempt refused by the tool, anchor inside replacement, no test ran), A5 no-probe as healthy (1 red), A6 leak error text, nested (2 red).",
"gates": "ce30cfbf: dispatch-gates --commands derived 71; all 71 ran, each exit 0; --ran: '71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED' exit 0. Earlier round on 04ca432f: teardown-shape --self-test exit 3 (fixture commit absent; fetched, exit 0), dual-build-cjs-loads exit 3 (dists outside closure; exit 0 after packages build), test-source-alias exit 1 (fixed in ce30cfbf). PR check-runs: in_progress at report time (not awaited).",
"dogfood_battery": "04ca432f · VERDICT command-exit 0 (lock 26m36s) · Test Files 440 passed, 3 skipped (443) · Tests 3652 passed, 41 skipped (3693) · no failures. Run because the delta named dogfood (no ! title, no narrowing arm). Not re-run on ce30cfbf: test-file-only commit dogfood does not load.",
"mcp_calls": "5 — issue_read x4 (get, get_comments x3), pull_request_read get x1; no write tools",
"api_writes": "2 — relay pr_create (PR #31711, request fw-20261108T224648Z-fa4ccc, 15337 bytes sent = stored), this os-dev-report comment via post-stamped",
"files_changed": [
".changeset/31601-ready-cluster-driver-health.md",
"packages/runtime/src/http-dispatcher.ts",
"packages/runtime/src/http-dispatcher.ready.test.ts",
"packages/services/service-cluster/src/driver-health.ts",
"packages/services/service-cluster/src/driver-health.test.ts",
"packages/services/service-cluster/src/index.ts"
],
"line_budget": "+484 / -4 over 6 files (PR additions/deletions); source 81 (runtime) + 112 (driver-health) + 8 (index); tests 188 + 80; changeset 19",
"deviations": [
"Runtime typecheck needed @objectstack/driver-turso built (devDependency outside the runtime closure); first reading was TS2307 from a missing dist, not this diff.",
"A full packages build was started with OS_SKIP_DTS=1 (a turbo globalEnv, so it rebuilt dists without .d.ts); stopped my own run after ~62 tasks and rebuilt ./packages/** without the flag (81 tasks, 66 cached) before the final gate round, which then read every dts gate green.",
"Ablation A4's first attempt was refused by ablation-replace (anchor contained in the replacement, count 1 -> 1); no test ran; re-run with another anchor.",
"Dogfood measured on 04ca432f, not the final head ce30cfbf (test-file-only commit)."
],
"open_questions": [
{
"question": "New public export names in @objectstack/service-cluster: probeClusterDriverHealth, DEFAULT_CLUSTER_PROBE_TIMEOUT_MS, ClusterDriverHealth, ClusterDriverUnreachableReason, ProbeClusterDriverHealthOptions; and the /ready body key 'cluster' with values driver/reachable/reason (timeout | ping-failed | unexpected-reply | no-probe). Seat's call on names.",
"options": [
"A keep as named (follows readClusterDriverConnection / ClusterDriverConnection)",
"B rename before landing"
],
"recommendation": "A, because it sits beside the existing driver-connection seam and F3a (#31596) can feed or replace it in one place."
},
{
"question": "Card acceptance says 'declared + Redis up = 200 ok'; today's healthy body is status 'ready'. Kept 'ready' (plus cluster reachable:true) rather than introducing 'ok'.",
"options": [
"A keep 'ready'",
"B use 'ok' on declared deployments"
],
"recommendation": "A, because 'ready' is the published healthy value and 'ok' would change it for every declared deployment."
},
{
"question": "The #13408 degraded-SECONDARY branch keeps status 'ready' with a degraded object, while the cluster reading uses status 'degraded' (card/D4). Unify later?",
"options": [
"A leave as is",
"B follow-up card to align the secondary branch"
],
"recommendation": "A for this card; B is a separate decision because it changes a single-node body."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"class: none (noted) · reach: real redis-server stopped under the redis driver · ioredis prints '[ioredis] Unhandled error event: ECONNREFUSED' per reconnect attempt (driver client has no error listener) · carrier: #31596 (F3a, seat 1) · noted, not filed",
"class: none (noted) · content/docs/protocol/kernel/lifecycle.mdx GET /ready block and content/docs/deployment/self-hosting.mdx probe table do not mention the cluster entry; outside the claim's file surface · carrier: seat 4 · noted, not filed"
]
}
File surface (added): content/docs/protocol/kernel/lifecycle.mdx (the GET /ready section) and content/docs/deployment/self-hosting.mdx (its multi-node / cluster driver passage), prose only: the cluster entry, status: 'degraded' at 200 (D4, never 503), the closed reason set, and what a single node keeps seeing. The widening is documented in the PR that ships it.
Activity
objectstack-fleet commentedon Nov 8, 2026
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U
Path: none
Triage: confirmed ·
domain:server· p2 ·pm:queue· 2026-11-08T17:01Z⛔ Not a claim.
domain:server. The fix is in objectstack packages only.lockRecord,客户端只能假定「有 pending 就是锁死」 #3814 child, maintainer-directed batch.domain:devxanddomain:serveras separate lanes, or merge them? Measured load and boundary friction, 2026-11-08 #31424 rule 2).Generated by Claude Code
objectstack-fleet commentedon Nov 8, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim: PM loop round 1 · #31601 · 2026-11-08T21:32Z
Session:
session_01ADHkmP8JJo4zF2sjTBRwnX(seat); dev = card threadsession_01ADHkmQwuHPnJPK768Mta39Account:
os-steveBranch:
claude/project-thread-niooueWorktree: the card thread's checkout of
objectstack-ai/objectstackDomain:
domain:serverSeat:
domain:server#4File surface:
packages/runtime/src/**(the/readyhandler inhttp-dispatcher.ts/dispatcher-plugin.ts), a health read onpackages/services/service-cluster/src/**if #31596's seam is not onmain, their tests,.changeset/31601-*.md(stop on breach; stop if/ready's body has a published schema inpackages/spec)Container & model:
S,mode:thread,model: default tier (dispatch-gates --tier on runtime: no path-derived mandate),effort: mediumClause-②: yes (widening)
Metadata-protocol: none
Responsibility: the readiness probe in objectstack (
packages/runtime) checks only the primary datasource · no platform path covers it today (a replica with Redis down answers 200 ok) · reached by every/readyprobe on a deployment that declares replicas>1 on the Redis driverThread-read: 6724391071
Premise: holds (PM decision D4 2026-11-08: 200
status: degraded, never 503; #3814 R3 binds)Serial constraints cleared: #31596 (seat 1, F3a health seam) is read, not waited on: the dev pings the driver if the seam is not merged.
objectstack-fleet commentedon Nov 8, 2026
domain:server#4 · os-steve · session_01ADHkmQwuHPnJPK768Mta39
os-dev-report
{ "issue": 31601, "status": "done", "branch": "claude/project-thread-niooue", "pr": "https://github.com/objectstack-ai/objectstack/pull/31711", "session": "session_01ADHkmQwuHPnJPK768Mta39", "premise_still_valid": true, "summary": "Declared multi-node (declaresMultiNode: OS_EXPECT_MULTI_NODE=true or OS_CLUSTER_REPLICAS>1) AND a cluster service offering a redis connection: /ready's 200 body gains cluster {driver, reachable, reason?}; Redis unreachable answers 200 status 'degraded' (D4, never 503). The probe is new probeClusterDriverHealth in @objectstack/service-cluster (one PING bounded at 500 ms over readClusterDriverConnection, closed reason set, never throws, no address in the body), memoized 1 s in HttpDispatcher and consulted on the two 200 branches only, so single node / memory driver / no cluster stay byte-identical and the booting/stopping 503 and primary-datasource 503 return before it. #31596's seam was not merged (no PR), so the driver connection is pinged directly as dispatched.", "tests": "head 04ca432f: runtime test 563 files / 9047 passed, 19 skipped; runtime typecheck exit 0 (after building driver-turso, a devDep outside the closure: TS2307 on a turso-remote test, missing dist); service-cluster test 9 files / 123 passed, typecheck exit 0; service-cluster-redis test 3 files / 39 passed; eslint --no-inline-config on packages/runtime and packages/services/service-cluster exit 0/0. Head ce30cfbf (adds one collection-time import to the /ready test): http-dispatcher.ready.test.ts 41 passed. Base leg: merge-base 1a20cbc8's http-dispatcher.ts under the new pins answers 200 {status:'ready',state:'running'} (4 cluster pins red). Real redis-server smoke, real ioredis driver, OS_CLUSTER_REPLICAS=3: up 200 ready+reachable; stopped 200 degraded ping-failed (188 ms) then timeout (501 ms); restarted 200 ready+reachable; undeclared: 200 {status:'ready',state:'running'} throughout. Ablations via ablation-replace (src imports, no dist leg), all red then restored blob==HEAD, git diff HEAD empty: A1 drop declaration gate (3 red), A2 degraded as 503 (1 red), A3 probe before state 503 (4 red), A4 probe on primary 503 (1 red; first attempt refused by the tool, anchor inside replacement, no test ran), A5 no-probe as healthy (1 red), A6 leak error text, nested (2 red).", "gates": "ce30cfbf: dispatch-gates --commands derived 71; all 71 ran, each exit 0; --ran: '71 derived famil(ies) accounted for — 71 run, 0 NOT-MEASURED' exit 0. Earlier round on 04ca432f: teardown-shape --self-test exit 3 (fixture commit absent; fetched, exit 0), dual-build-cjs-loads exit 3 (dists outside closure; exit 0 after packages build), test-source-alias exit 1 (fixed in ce30cfbf). PR check-runs: in_progress at report time (not awaited).", "dogfood_battery": "04ca432f · VERDICT command-exit 0 (lock 26m36s) · Test Files 440 passed, 3 skipped (443) · Tests 3652 passed, 41 skipped (3693) · no failures. Run because the delta named dogfood (no ! title, no narrowing arm). Not re-run on ce30cfbf: test-file-only commit dogfood does not load.", "mcp_calls": "5 — issue_read x4 (get, get_comments x3), pull_request_read get x1; no write tools", "api_writes": "2 — relay pr_create (PR #31711, request fw-20261108T224648Z-fa4ccc, 15337 bytes sent = stored), this os-dev-report comment via post-stamped", "files_changed": [ ".changeset/31601-ready-cluster-driver-health.md", "packages/runtime/src/http-dispatcher.ts", "packages/runtime/src/http-dispatcher.ready.test.ts", "packages/services/service-cluster/src/driver-health.ts", "packages/services/service-cluster/src/driver-health.test.ts", "packages/services/service-cluster/src/index.ts" ], "line_budget": "+484 / -4 over 6 files (PR additions/deletions); source 81 (runtime) + 112 (driver-health) + 8 (index); tests 188 + 80; changeset 19", "deviations": [ "Runtime typecheck needed @objectstack/driver-turso built (devDependency outside the runtime closure); first reading was TS2307 from a missing dist, not this diff.", "A full packages build was started with OS_SKIP_DTS=1 (a turbo globalEnv, so it rebuilt dists without .d.ts); stopped my own run after ~62 tasks and rebuilt ./packages/** without the flag (81 tasks, 66 cached) before the final gate round, which then read every dts gate green.", "Ablation A4's first attempt was refused by ablation-replace (anchor contained in the replacement, count 1 -> 1); no test ran; re-run with another anchor.", "Dogfood measured on 04ca432f, not the final head ce30cfbf (test-file-only commit)." ], "open_questions": [ { "question": "New public export names in @objectstack/service-cluster: probeClusterDriverHealth, DEFAULT_CLUSTER_PROBE_TIMEOUT_MS, ClusterDriverHealth, ClusterDriverUnreachableReason, ProbeClusterDriverHealthOptions; and the /ready body key 'cluster' with values driver/reachable/reason (timeout | ping-failed | unexpected-reply | no-probe). Seat's call on names.", "options": [ "A keep as named (follows readClusterDriverConnection / ClusterDriverConnection)", "B rename before landing" ], "recommendation": "A, because it sits beside the existing driver-connection seam and F3a (#31596) can feed or replace it in one place." }, { "question": "Card acceptance says 'declared + Redis up = 200 ok'; today's healthy body is status 'ready'. Kept 'ready' (plus cluster reachable:true) rather than introducing 'ok'.", "options": [ "A keep 'ready'", "B use 'ok' on declared deployments" ], "recommendation": "A, because 'ready' is the published healthy value and 'ok' would change it for every declared deployment." }, { "question": "The #13408 degraded-SECONDARY branch keeps status 'ready' with a degraded object, while the cluster reading uses status 'degraded' (card/D4). Unify later?", "options": [ "A leave as is", "B follow-up card to align the secondary branch" ], "recommendation": "A for this card; B is a separate decision because it changes a single-node body." } ], "security_findings": "none", "out_of_scope_findings": [ "class: none (noted) · reach: real redis-server stopped under the redis driver · ioredis prints '[ioredis] Unhandled error event: ECONNREFUSED' per reconnect attempt (driver client has no error listener) · carrier: #31596 (F3a, seat 1) · noted, not filed", "class: none (noted) · content/docs/protocol/kernel/lifecycle.mdx GET /ready block and content/docs/deployment/self-hosting.mdx probe table do not mention the cluster entry; outside the claim's file surface · carrier: seat 4 · noted, not filed" ] }Stamped 2026-11-08T22:47Z.
objectstack-fleet commentedon Nov 8, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Claim amendment · #31601 · 2026-11-08T22:48Z · amends claim 6727414288 · File surface only (Branch, Clause-②, Metadata-protocol unchanged)
content/docs/protocol/kernel/lifecycle.mdx(theGET /readysection) andcontent/docs/deployment/self-hosting.mdx(its multi-node / cluster driver passage), prose only: theclusterentry,status: 'degraded'at 200 (D4, never 503), the closedreasonset, and what a single node keeps seeing. The widening is documented in the PR that ships it.probeClusterDriverHealth(and its types) and the body keyclusterare kept; the healthy declared case keepsstatus: 'ready'; the availability: a datasource whose driver fails to start pins /api/v1/ready to 503 cluster-wide and is not evicted on delete — one bad tenant datasource drains every LB upstream #13408 secondary branch keepsstatus: 'ready'and turns'degraded'only when the store is unreachable, as built.objectstack-fleet commentedon Nov 9, 2026
domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX
Landed · #31601 · 2026-11-09T00:39Z
00205e1057. The merged head iseddeda2669(ACCEPT 6728588970, TIER_DEFAULT review 6728568993 PASS).Fixes #31601State change:
pm:dispatchedis removed in this stroke. No follow-up card is owed.fix(runtime,cli): /ready reports the boot seed, and os serve prints t…