v0.6.413: #742 batch B part 2b: shared sign-in, editor locks, link passwords, rotation progress; several instances supported #1195

Merged
Cordy merged 73 commits from b12v07 into main 2026-11-22 01:05:22 +00:00
Owner

Batch 11b (#742 batch B part 2b, #1179). Spec/plan/decisions: .superpowers/sdd/2026-11-21-b12v07/ (decisions-b12.md items 1-13).

Added

  • Shared sign-in records in <prefix>_auth (sealed, never backed up or migrated): browser sessions with cluster-wide ending, a watched replica per member, outage sessions promoted on recovery; two-step marks, device codes, OIDC state and back-channel logout jti decided once across members; the sign-in throttle shared.
  • #1179 strict mode: "Pause all new sign-ins" during a coordination outage (form, OIDC start, Basic with an account password); app passwords, API keys and emergency accounts keep working; audit signin-outage-strict-changed.
  • Link passwords: sealed cairn_share cookie (every mode), per-link cap 100 failures/h with a cluster-wide soft budget (one attempt per minute per link), 1,024-character limit.
  • Shared editor session table; editor locks on (lock flags for writers, one session lock per document, outside writes 423 editing incl. the editing person's own clients, manual lock 409 being-edited, F1-F4, lockdiscovery tokens hidden, guests read-only while members edit); "In the editor" with Join, End editing for everyone.
  • Rotation progress (P5): retiring keys, backups, next step, pass total and phase; Overview card K1-K8 and CLI lines.
  • Switch at v0.6.413 via the cluster minimum version (second latch); "preview" wording removed: several instances supported.

Process: 8 W1 + 4 W2 + 2 W3 + docs tasks, 6 fix rounds after wave reviews, final review (H1 guest lock take-over fixed), VM run r16 on cb-n1..3 with v0.6.413-rc1 (steps 1-8, 11, 12 passed; browser parts listed for Nikola). Mockup 742b2b approved; two later strings approved. Follow-ups filed: #1189-#1194.

Batch 11b (#742 batch B part 2b, #1179). Spec/plan/decisions: `.superpowers/sdd/2026-11-21-b12v07/` (decisions-b12.md items 1-13). **Added** - Shared sign-in records in `<prefix>_auth` (sealed, never backed up or migrated): browser sessions with cluster-wide ending, a watched replica per member, outage sessions promoted on recovery; two-step marks, device codes, OIDC state and back-channel logout jti decided once across members; the sign-in throttle shared. - #1179 strict mode: "Pause all new sign-ins" during a coordination outage (form, OIDC start, Basic with an account password); app passwords, API keys and emergency accounts keep working; audit `signin-outage-strict-changed`. - Link passwords: sealed `cairn_share` cookie (every mode), per-link cap 100 failures/h with a cluster-wide soft budget (one attempt per minute per link), 1,024-character limit. - Shared editor session table; editor locks on (lock flags for writers, one session lock per document, outside writes 423 `editing` incl. the editing person's own clients, manual lock 409 `being-edited`, F1-F4, lockdiscovery tokens hidden, guests read-only while members edit); "In the editor" with Join, End editing for everyone. - Rotation progress (P5): retiring keys, backups, next step, pass total and phase; Overview card K1-K8 and CLI lines. - Switch at v0.6.413 via the cluster minimum version (second latch); "preview" wording removed: several instances supported. **Process**: 8 W1 + 4 W2 + 2 W3 + docs tasks, 6 fix rounds after wave reviews, final review (H1 guest lock take-over fixed), VM run r16 on cb-n1..3 with v0.6.413-rc1 (steps 1-8, 11, 12 passed; browser parts listed for Nikola). Mockup 742b2b approved; two later strings approved. Follow-ups filed: #1189-#1194.
Approved 742b2b mockup E1 to E6 (decisions-b12 item 3): the chip on the
name's second line and a decorative pencil in Status (tiles: labelled
pencil, meta line), Join in the editor first in the row menu and in the
details pane instead of Edit in {app}, Lock aria-disabled with its reason,
End editing for everyone (askDanger, DELETE /api/v1/lock, focus back on
the row's actions button), the Locks page chip Editor, people count and
End editing, the editor banner for lock-broken with by, the holder's bell
nEditorEnded (how=editor), codes editing and being-edited worded in api()
and in the batch reasons (edInEditor), the list re-read after a 423.
16 new keys after lkNote; lkKindOffice, lkNone, lkNote changed;
bell1073 and empty1024 pins follow the changed keys.
Approved mockup 742b2b rev 1 (decisions-b12 item 3): the outage switch in
Two-step sign-in (coordination mode only; confirm before pausing; saved
line), signin-paused on the sign-in page (form, second step, refused
marker; never counted), clDownSessions deleted (U9), clKeepStrict and
uaSessionsRestartCl once shared sign-in is on, the audit label of
signin-outage-strict-changed, link-password-too-long as clsErrTooLong with
max 1024 (review-notes), the Keys row, the rotation card (one model per
keys.next, K7 back-out, K6 red card), the Rotation tab's cluster verdict
and note with focus kept across its refresh. Web and a11y tests.
The lock machine (LOCK, take-over, REFRESH_LOCK, UNLOCK, UnlockAndRelock)
answered 500 for any lock store write error. A state refusal
(coord-unavailable, cluster-maintenance, and the other writeStateErr
codes) now answers 503 with its code, text and Retry-After through
writeStateErr, for members and guests; only an unexpected error stays
500. TestEditorTakeOverAfterKillRealMain742d waits until m1's copy holds
the lock before the kill and then retries the LOCK itself while it
answers 503 (any other answer fails), instead of treating a CheckFileInfo
200, which the instance's copy can serve, as the store being back
(decisions-b12 item 12).
F-r16-1: an editor ended by End all editor sessions or Break lock gets
code editor-ended-by-admin / editor-lock-broken (save state, end answer,
X-Cairn-Code, WOPI 404 body) with an English text for the reason; the
#1056 reasons keep editor-item-moved. The editor page ends on all three
codes and still reads reason and by (edEndKey, E4).

F-r16-2: after End all every member answers the ended editor's WOPI
calls 401 invalid access token, as the member that ran it (and a single
instance) does once the key changed with no overlap.
A stream leader cut off from the others (or a member of a leaderless
group) still answers STREAM.INFO. During a majority loss a restarted
auth watch failed to start, the answer counted as "the bucket answers",
Behind cleared the replica's currency and existing sessions read the
unreachable leader: 503 state-unreadable. Behind and the stall judgment
now need a STREAM.INFO whose leader heard from a majority within 3 s
(the state store's quorum rule); a stalled or failing watch with a
healthy store still fails closed.

TestOutageSigninStrictOnRealMain742d forces the auth watch restart
inside the outage (CAIRN_742D_WATCHRESTARTFILE) and waits for its start
failure, so the regression is caught every run.
docs: the auth watch WARN's lookups=leader vs lookups=replica (#742 fx7)
Some checks failed
ci / test-and-build (pull_request) Failing after 25m43s
a9255e552a
Cordy merged commit b2b657277d into main 2026-11-22 01:05:22 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1195
No description provided.