Repository navigation
fix(sessions): preserve legacy data when exclusive projection fails - #11469
Merged
diegosouzapw merged 2 commits intoAug 26, 2026
Conversation
5 tasks done
KaspaPulse
force-pushed
the
fix/sessions-exclusive-projection-fallback
branch
from
August 25, 2026 08:19
6ba813c to
e9a9692
Compare
diegosouzapw
merged commit Aug 26, 2026
be6cbe7
into
diegosouzapw:release/v3.8.51
7 of 16 checks passed
This was referenced Aug 28, 2026
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…iegosouzapw#11469) Validated in a combined sub-batch worktree off release/v3.8.51 tip. - Focused test: exclusive-session-observability.test.ts — part of sub-batch's 165/165 node:test run - typecheck:core, file-size, changelog-integrity, complexity, cognitive-complexity — all OK - Full-repo lint: 228 pre-existing dashboard react-hooks/* findings, unrelated to this diff Thanks for the narrow failure boundary and the privacy-conscious warning (proven not to leak the caught error's sensitive fields) — a projection failure discarding valid legacy data was a real regression from diegosouzapw#11389.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The additive exclusive-session projection introduced by #11389 ran inside the same outer
tryas the legacy/api/sessionssnapshot. A database or projection failure therefore returned500and discarded already-availablecount,sessions, andbyApiKeydata.Graceful fallback
The exclusive projection now has a narrow failure boundary. On projection failure the endpoint keeps its legacy data and returns
exclusiveSessions: []with one static warning per contiguous outage, without changing lease authority, routing, schema, storage, or UI behavior. A successful projection re-arms the warning for a later distinct outage.Privacy guarantee
The warning never includes the caught error. The failure-injection regression test places an owner hash, generation, API-key ID, credential, token, connection identity, lease ownership, and fencing material in the thrown error and proves that none appears in the response or warning.
Duplicate search
Authenticated GitHub searches covered open and closed issues, open/closed/merged PRs, Discussions, recent commits, current
release/v3.8.51code, and all 28 open PRs for the required terms. No equivalent fallback or open PR touchingsrc/app/api/sessions/route.tswas found; the only directly relevant result was merged PR #11389.Focused validation
5 passed, 1 failedbefore the graceful fallback (500 !== 200), then6 passed, 0 failedafter it.5 passed, 1 failedbefore warning deduplication (the second consecutive failed poll warned again), then6 passed, 0 failedafter it.git diff --check: pass.The changelog also records the maintainer clarification from #11389 that the Sessions badge intentionally shows the merged legacy and exclusive row count.
Refs #11389