Multi-user audit: upload DoS, quota lock stall, scoped app passwords, cookie prefix, global rate limits #663
Closed
opened 2026-10-21 11:34:40 +00:00 by kayg
·
158 comments
No Branch/Tag specified
main
port/tasks-float-2
fix/train-1116-2
fix/train-1116-3
fix/train-1116-1
fix/flake-1134
fix/server-1182
dev
port/notes-float-3c
docs/auto-update-ig
feat/dav-transport
port/tasks-float-1
wip/mail1011-sv-order-1116
fix/flake-1179
fix/flake-1178
fix/guards-1153-fsio-split
fix/guards-1153-notes-split-we
fix/guards-1153-notes-lib
fix/guards-1153-notes-home
fix/guards-1153-ui-primitives
fix/guards-1153-primitives-e2e
fix/guards-1153-visibility-doc
feat/paper-grey-1116
fix/flake-1165
fix/flake-1119
docs/imap-766-plan-v2
fix/e2e-unique-ports
t3/paged-search-reconcile-final
wip/mail1011-final-1115
docs/tasks-float-port
perf/editor-first-paint-1c
feat/imap-notes-fetch
feat/imap-notes-projection
feat/imap-notes-readonly
feat/imap-notes-auth
feat/imap-notes-server-foundation
wip/mail1011-txn-ownvocab-1115
wip/mail1011-txn-novocab-1115
perf/p1117-final-harness
perf/single-shot-repeats
port/tasks-matrix
wip/mail1011-txn-1115
fix/static-gates-1155
feat/files-s1-identity-r7
fix/files-r7-idle-loop
fix/daily-train-1152
port/notes-float
fix/editor-tables-test-types
port/notes-float-listscript
feat/tasks-actions
port/notes-float-phone-preload
perf/sound-comparator
port/notes-float-listscroll
port/notes-float-budgets
port/notes-float-suite-fix-b
port/notes-float-sidebar-fix
port/notes-float-trim
port/notes-float-3-lists
fix/attachments-meta-capability
docs/carddav-writes-v2-plan
feat/contacts-companion-pure
issue/carddav-read-perf-fix-r2
issue/carddav-read-r2
port/notes-float-devsync2
review/calendar-2
review/switcher-a-pills
port/notes-float-switcher-a
port/port-tables-2
review/switcher-ends
wip/whiteboard-s1-1114
port/port-tables
wip/mail1011-perfneutral
review/photo-tint
port/notes-float-shell
wip/local/collections-db
wip/local/mail-p1
wip/local/cold-growth-on-tiering
wip/local/tiering-v3-s1
wip/local/wal1051-cap
wip/local/tiering-v3-s1-resume
wip/local/index-position-startup-scan
port/notes-float-flat
port/notes-float-promote
wip/handover/mail1011-candidate
wip/handover/files-s1-candidate
port/notes-float-shell-only
port/notes-float-perf
feat/whiteboard-s1
feat/tiering-v5
fix/app-switch-hitch
wip/local/files-s1-dev-v4-final
feat/files-s1-dev-v4
fix/c2-glass-shared
feat/flat-lists
wip/handover/whiteboard-s1-resume
wip/att-lazy-861
feat/switcher-browse
wip/att-lazy-860
feat/tasks-float
recovered/flat-backup-candidate
perf/stalls-1054-kc
land/ai-toolbar
feat/collections-db
feat/collections-db-fixes
codex/mail-1011-redesign-20261111
fix/ai-toolbar
backup/macos-vm/st3-head
perf/trim-candidate-phonestack
feat/switcher-three
fix/1051-index-idle-checkpoint
perf/stalls-1054-kb
perf/stalls-1054-k
perf/stalls-1054-r3
fix/c2-contrast-tail
perf/stalls-1054-r3-preview
feat/collections-before
feat/tiering-v4
fix/timelog-caret
wip/local/tasks-actions
docs/tasks-writes-v2-plan
st3-r3
feat/pass8
review/calendar-2-before-1111
wip/tiering-v3-cold4
perf/stalls-1054-r2
fix/suite-A4
fix/suite-A5-probe
fix/suite-A6
fix/suite-A3
fix/suite-A2
fix/suite-A5
fix/suite-A1
wip/local/attachments-861-fix
feat/contrast
wip/local/ports-861
storage/wal-checkpoint-off-save-1051
wip/local/mail-1011-reconcile-20261110
feat/style-sheet-fixes
feat/money-round
perf/stalls-1054
wip/tiering-v3-cold5
t3/mail-1011-liveness
feat/iphone-fixes
feat/notes-approve
wip/local/shrow-work
feat/files-s1-identity
feat/quickfix
wip/tiering-v3-cold
wip/local/shared-row-swipes
backup/macos-vm/pfx-B
backup/macos-vm/pfx-C
backup/macos-vm/pfx-D
feat/contrast-r1
feat/tiering-v3-s2-tags
feat/folder-drop
t3/photos-s1
feat/tiering-v3-s1-namespace
wip/local/photos-s1
t3/photos-plan-slice-one
recovered/backup/p1b-61505
t3/paged-search-reconcile
t3/smooth-pane-transitions
t3/index-position-startup-scan
fix/private-staging-759b-r2
backup/macos-vm/hk/hk1009/pr877
backup/macos-vm/hk/hk1009/pr878
docs/undo-block-ids-plan
fix/undo-768
backup/macos-vm/hk/hk1009/pr875
backup/macos-vm/hk/hk1009/pr904
proto/block-identity-v7d
backup/macos-vm/hk/hk1009/pr846
backup/macos-vm/hk/hk1009/pr860
backup/macos-vm/hk/hk1009/pr861
backup/macos-vm/hk/hk1009/pr849
backup/macos-vm/hk/hk1009/pr848
backup/macos-vm/hk/hk1009/pr853
backup/macos-vm/hk/hk1009/pr957
backup/macos-vm/hk/hk1009/pr893
backup/macos-vm/hk/hk1009/pr889
backup/macos-vm/hk/hk1009/pr902
docs/imap-notes-plan
docs/quota-plan-2
fix/parallel-test-flakes
docs/calendar-backend-v2-plan
feat/calendar-ical-converter
backup/macos-vm/hk/hk1009/pr808
docs/contacts-import-v2-plan
issue/610-pm-midnight
feat/calendar-v2-s1-containment
backup/macos-vm/hk/hk1009/pr854
backup/macos-vm/hk/hk1009/pr845
backup/macos-vm/hk/hk1009/pr917
docs/dav-recorder-v2-plan
plan/previews-865
plan/save-log-durable-entry
backup/macos-vm/hk/hk1009/pr934
fix/e2e-data-on-ram
backup/macos-vm/hk/hk1009/pr888
feat/appwindow3
feat/appwindow2
feat/appwindow
feat/money-p1
feat/keys-sheet
review/calendar-2-themes
feat/smooth-cursor
fix/float-style
review/calendar-2-float
release/2026-11-06-hotfix
archive/port/rows-drop-code
archive/port/rows-actions
archive/port/rows
scratch/tasks-894-ui-gates
review/calendar-2-night-wip
recovered/flaky/toast-reduced
release/2026-11-05
archive/flaky/rows-drop-fixed
archive/flaky/rows-actions
archive/flaky/rows
sim/bm15-final
sim/bm15-bis-932
sim/bm15-bis-909
sim/bm15
sim/bm15-bis-887
perf/tiering-option-b
fix/sw-lazy-precache
archive/plan/save-log-durable-entry
mock/money-fix2
archive/fix/e2e-data-on-ram
mock/appearance-all
mock/pill-press
mock/pill-press-mac
backup/macos-vm/appearance-after
mock/auto-swipes
mock/mail-actions
backup/macos-vm/mock/mail-actions
mock/money-static
archive/review/standards-917
perf/tiering-761-fix
mock/type-audit
mock/third-pane
feat/contacts-import-v2-s1
perf/executor-hot-path
archive/port/hidden-blocks
archive/port/devices
scratch/executor-on-894
scratch/executor-spans2
scratch/executor-spans
archive/port/rows-drop
feat/tiering-761-d-scale
feat/tiering-761-c-index
feat/tiering-761-b-reader
archive/review/sharing-pr3-review-9fec3d1f
perf/ports-lazy-budgets
feat/tiering-761-a-migration
archive/review/sharing-pr3-review
archive/review/sharing-pr3-review-code
archive/plan/previews-865
archive/port/port-attachments-3
archive/port/contacts-merge
fix/motion-audit-859
fix/motion-audit-859-mac
archive/port/port-pickers
archive/port/port-tables-2
archive/port/port-tables
recovered/local/sharing-s1-pr2-room-snapshot-candidate
archive/fix/parallel-test-flakes-code-minipc01
docs/imap-766-readonly-slice
feat/dav-recorder-v3
research/788-diagnosis
archive/fix/parallel-test-flakes
archive/perf/pr792-cold-index-edit
docs/sharing-slice-1
recovered/feat/dav-recorder-v2
recovered/feat/dav-recorder-v2-edd7bbb
spike/imap-766-s0-cases
archive/fix/undo-768
recovered/feat/dav-recorder
recovered/feat/dav-recorder-901acd4
feat/contacts-import
perf/cold-growth-on-764
perf/cold-growth-on-tiering
recovered/feat/tasks-set-status
feat/tasks-move-reorder
feat/tasks-delete-promote-duplicate
feat/carddav-writes
perf/quota-on-tiering
perf/quota-simple
perf/cold-growth-on-quota-stack
recovered/perf/cold-growth-on-tiering
feat/calendar-identity
feat/calendar-event-parser
feat/calendar-props-maps
port/glass-when-ring
recovered/feat/tiering-761-s1-wip-8132a84
recovered/feat/tiering-761-s1-wip-9da4094
recovered/feat/tiering-761-s1-wip-724512c
recovered/feat/tiering-761-s1-wip-66e667e
recovered/feat/tiering-761-s1
wip/6by32-01-tier-761-s1-pause-20261030
spike/imap-766-s0
wip/6by32-02-calternal-pause-20261030
wip/8by64-01-review-688-pause-20261030
wip/6by32-01-verify-744-pause-20261030
wip/6by32-01-verify-742-pause-20261030
fix/private-staging-759b
wip/6by32-01-review-748-pause-20261030
wip/6by32-01-review-733c-pause-20261030
wip/6by32-01-review-733b-pause-20261030
review/calendar-month
wip/local/bm15-trash
plan/759b-staging
review/767b-tests
review/preview-2026-10-29
docs/tiering-731-plan
wip/c6b02-review-733d
wip/c6b02-bm1-full-a
docs/deploy-plan
fix/storage-owner-liveness-642
fix/storage-fix-7
feat/tiering-731
wip/tiering-731-first-attempt
perf/idle-honest-2
fix/storage-private-tmp-642-dev
fix/storage-exact-file-quarantine-642
perf/one-flush-save
review/calendar-static
review/indexing-ring
review/when-field-2
proto/block-identity-2-review
proto/block-identity-review
review/when-field
issue/tasks-create-ids
issue/tasks-create
review/combined
review/task-polish
review/top-buttons
review/q1-q5
archive/integ325-293
archive/integ325-ci
issue/calendar-adr
archive/old/train/2026-10-23bk2
archive/old/train/2026-10-23bk
issue/469-mockup-9a
issue/smart-tasks-mockup
issue/469-menus
issue/652-signout-flake
issue/652-history-fix7
issue/652-history-fix6
archive/old/issue/spring-check-perf
issue/spring-check-perf
issue/659-rename-fast
archive/old/train/2026-10-21ar
issue/search-hardening-3
issue/652-history-fix5
issue/660-port-sheets-glass
issue/652-history-fix4
issue/652-history-fix3
issue/652-history-fix2
issue/652-history-flake
train/2026-10-21an
issue/settings-admin-port
issue/search-port
train/2026-10-20am
issue/storage-split-fix2
issue/storage-split
archive/old/issue/folder-ids-fix
train/2026-10-20al
archive/old/issue/folder-ids
train/2026-10-20ak
issue/tables-mockup
train/2026-10-19aj
train/2026-10-19ai
issue/469-merge-fixes
issue/sidebar-band
archive/old/issue/608-settings-spec
train/2026-10-19ah
issue/swipe-offscreen
train/2026-10-19ag
archive/old/issue/590-nlp-adr
archive/old/issue/587-event-after-write-2
train/2026-10-19af
archive/old/issue/587-event-after-write
issue/469-pill-room-c
issue/469-pill-room
train/2026-10-19ae
issue/469-narrow-handle
issue/397-ios-swipe-2
issue/469-desk-fixes
archive/old/issue/auto-update-adr
issue/469-filter-gap
issue/469-port-1b
issue/442-opacity-flake
issue/327-web-fast-3
archive/old/issue/469-port-1
issue/469-port-1
issue/327-web-fast-2
archive/old/issue/327-web-fast
archive/old/issue/425-stt-bench-vq1
archive/old/issue/445-no-bleed
archive/old/issue/400-swipe-mockup-2
issue/426-client-review
issue/426-client-2
issue/426-client
archive/old/issue/476-safe-area-lab
archive/old/issue/445-top-light
issue/471-blocks-mockup
archive/old/issue/448-links-app-2
archive/old/issue/448-links-app
archive/old/issue/398-cold-links
issue/434-442-small-2
issue/434-442-small
archive/old/issue/398-unload
archive/old/issue/445-bottom-band
issue/445-bottom-band
issue/351-rem-3
issue/351-rem-2
issue/351-rem
archive/old/issue/327-first-note
issue/395-width-phone
archive/old/issue/327-typing
issue/396-ios-edges
issue/397-ios-swipe
archive/old/issue/327-notes-index
issue/345-347-contrast-empty-2
archive/old/issue/44-arenas
issue/44-arenas
archive/integ325
archive/old/issue/327-perf-harness
archive/old/issue/44-thp
issue/44-thp
archive/old/issue/285-sticky-pills
archive/old/issue/44-trim-3
issue/44-trim-3
archive/old/issue/165-cards
archive/old/issue/165-picker-2
archive/old/issue/212-multi-select
No results found.
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
kayg/calternal#663
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Defensive multi-user audit of origin/dev
8b30062, done before kayg's wife joins. Full report, with file:line, tests and fixes for each item: calternal-research/audits/MULTIUSER-AUDIT-2026-10-21.md (on the build host).No P0: isolation between people and admin checks hold.
P1
P2
4. The failure rate limit (20 per minute) and the passkey prompt cap (10k) are global, so anyone anonymous can lock out sign-in and invites.
5. The session cookie lacks the
__Host-prefix, so next. and preview. subdomains can plant a cookie (http.rs:400,423).6.
calternal user recover <name>picks the first of duplicate names (setup.rs:84-96). Names allow invisible and RTL characters.7. Quota only checks attachments over 1 MiB.
P3: see the report. Invite expiry has no upper bound and editing revives expired invites; the invite key is backed up with the links; a group manager can remove the admin from a group; inviting can grant unlimited quota; events go only to the actor; an admin can't sign someone out everywhere; a losing redeemer keeps an orphan passkey.
Plan: fix P1 1–2 and P2 4–6 before the second person relies on the server. Fix 3 inside ADR 0064 piece 5 (app passwords).
Starting the approved multi-user hardening job on branch issue/663-multiuser-fixes, based on origin/dev at
8b30062e1c. Reading the defensive audit and adding permanent regression coverage before fixes. No PR, merge or deployment.Confirmed the audit findings in the current source: quota::admit and people.list call a full Home walk inside Db::run; backdrop uploads disable the body limit and extract Bytes; session_token returns the first matching cookie. The fixes now in progress replace quota walks with a maintained file counter and a separate background recount, bound streamed backdrops, and split auth hardening into source/target limits and cookie migration. Safe scope choice for item 7: enforce quota on small attachments and backdrops and retain trash usage. Notes/history write refusal and SSD history caps need a follow-up because saves have a separate durability pipeline.
Auth regression evidence before the fixes: the abuse suite had 8 passing tests and 3 failing tests. New regressions reproduced an anonymous prompt flood returning 429 to another client, a different trusted peer returning 429 after another source's failures, and duplicate session cookies returning 200. The changes now key attempts by source and target, reserve prompt capacity, reject ambiguous cookies, and migrate HTTPS sessions to __Host-calternal_session. Forwarded client addresses will only count through explicitly configured trusted proxy CIDRs.
Identity regression evidence before the fixes: setup unit tests rejected none of the following unsafe cases: a bidi override (U+202E), a fullwidth lookalike of an admin name, and recovery addressed by display name. The new tests produced 3 failures and 3 passes before implementation. The chosen unattended recovery policy is to require an exact username or a stable UUID and never resolve display names. Name validation will use NFC and Unicode confusable skeletons and will also protect admin promotion and invitation completion against races.
Storage and upload findings now have passing targeted checks. Verbatim quota test output:
running 2 tests
test small_uploads_spend_the_same_allowance_as_large_uploads ... ok
test signin_during_large_recount_finishes_under_fifty_ms ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.96s
The sign-in test overlaps a background recount of 50,000 files. Backdrop streaming regression also passes: a 64 MiB JPEG stream with absent, dishonest or oversized Content-Length returns 413 too_large, stops after at most 321 chunks of 64 KiB, and leaves the upload directory empty. Production will apply the attachment upload limit with a stricter 20 MiB ceiling for backdrop images.
Backdrop fail-before evidence is now confirmed from an isolated copy with the original Bytes/save handler: streaming_upload_stops_at_byte_limit_and_leaves_no_artifact and backdrop_quota_refuses_new_files_and_releases_space_on_delete both returned 201 where their permanent tests require 413 (19 passed, 2 failed, 1 ignored). With bounded streaming and quota enabled, the full backdrop crate suite passes: 22 passed, 0 failed, 1 existing internet-only test ignored. No evidence files are being committed.
The full authentication suite is green: 100 tests, zero failures and no warnings. Cookie migration is recorded per Installation in schema v6; only pre-existing sessions may claim the old HTTPS cookie once, and all newly created sessions require the __Host- cookie name. The quota counter now publishes a lock-free usage snapshot, merges writes made during recounts, and has regression coverage for stale metadata ordering and concurrent recount writes/deletes. Whole-workspace verification and browser gates are in progress. Remaining scope from item 7 is note-save quota enforcement and SSD history limits; small attachments, backdrops and trash retention are included here.
Quota fail-before evidence is now confirmed in an isolated copy reverting only quota.rs and people.rs to the original behavior. Both permanent quota regressions fail: small_uploads_spend_the_same_allowance_as_large_uploads accepts a file beyond quota, and signin_during_large_recount_finishes_under_fifty_ms measures 713.386527 ms while 20 admissions walk 50,000 files. Verbatim summary:
test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.65s
The current branch replaces those disk walks with the incrementally maintained snapshot; its earlier targeted tests passed. Final workspace gates will rerun the strengthened admission/recount overlap test.
Browser gate setup is temporarily blocked before tests start: this fresh worktree has no node_modules, and Playwright reports ERR_MODULE_NOT_FOUND for @playwright/test. Installing the repository's frozen bun.lock dependencies through a build slot, then rerunning the unchanged browser gate. Final binary build and latest clippy -D warnings have passed; workspace tests are still compiling/running.
Final recovery CLI choice: require a stable UUID, rather than adding any unattended confirmation path. Exact usernames remain supported by trusted local account lookup helpers, but
calternal user recoverwill reject names and usernames at argument parsing. This follows the stricter option in the approved task. A permanent CLI regression is being added. The complete workspace test run has passed; it will be repeated after this final CLI check is in place.The integrated workspace run passed 800 tests (0 failures, 2 existing ignored tests), and the dedicated per-person isolation gate passed. Browser dependency setup is resolved by frozen-lockfile installation. Chromium desktop and phone sign-out checks pass; WebKit desktop checks pass and phone checks are progressing without failures. Final CLI regression validation is currently waiting for one of the three required shared build slots; keeping the job queued and leaving other jobs untouched.
The browser gate is green. Verbatim final output:
48 passed (7.5m)
It ran with --workers=1 against this branch's binary: sign-in flow, sign-out, invites and admin, using Chromium and WebKit at 390 and 1440. Invite creation/copy/revocation runs in both engines; virtual-passkey registration/redemption uses Chromium as in the existing harness. The added member gate passed: direct Admin navigation makes no people.invites/groups.list request, and forced people.invite-create returns 404. Logs and artifacts remain outside the repository. Final Rust rerun and UUID-only recovery CLI check remain queued for a shared build slot.
The permanent recovery CLI regression has now reproduced the old behavior before the fix. Verbatim result:
test args::tests::user_recover ... FAILED
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 21 filtered out; finished in 0.00s
A separate controlled CLI check also confirmed that the old binary issued a token for a username; token output was captured and suppressed. The CLI now requires a canonical stable UUID and prints that selected id with the recovery message. The final verification batch will run all required gates, including a fresh browser gate, against the frozen final source.
Final gate output for
046e76616d: fmt, part 1/1. Exit 0. Command:cargo fmt --all -- --check.No stdout or stderr (empty output).
Final gate output for
046e76616d: clippy, part 1/1. Exit 0. Command:cargo clippy --workspace --all-targets -j4 -- -D warnings.Final gate output for
046e76616d: test, part 1/3. Exit 0. Command:cargo test --workspace -j4.Final gate output for
046e76616d: test, part 2/3. Exit 0. Command:cargo test --workspace -j4.Final gate output for
046e76616d: test, part 3/3. Exit 0. Command:cargo test --workspace -j4.Final gate output for
046e76616d: isolation, part 1/1. Exit 0. Command:cargo test -p calternal -j4 isolation.Final gate output for
046e76616d: binary, part 1/1. Exit 0. Command:cargo build -p calternal -j4.Final gate output for
046e76616d: quota, part 1/1. Exit 0. Command:cargo test -p calternal-auth -j4 --test quota_counter -- --nocapture.Final gate output for
046e76616d: e2e, part 1/1. Exit 0. Command:bunx playwright test --workers=1 --output=/tmp/sec663-playwright-results flow.spec.ts signout.spec.ts admin.spec.ts admin-invite.spec.ts --project=flow --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --project=admin-chromium-1440 --project=admin-chromium-390 --project=admin-webkit-1440 --project=admin-webkit-390.Finished and pushed branch issue/663-multiuser-fixes at
046e76616d. All required gates passed; complete gate output is quoted verbatim in the preceding comments. Every local heavy command ran inside the required build slot; cargo used -j4, and Playwright used one worker. No evidence or artifacts were committed.This includes bounded streamed backdrops, maintained lock-free quota reads with background drift reconciliation, small attachment/backdrop quota enforcement and trash accounting, independent auth limits and prompt pools, host-prefixed cookies with one-time legacy migration, and UUID-only CLI recovery with normalized and protected person names.
Follow-up from item 7: enforce note-save and SSD history budgets while preserving unsaved writing, and consider quota checks before attachment staging without rejecting duplicate uploads at quota. Configure CALTERNAL_TRUSTED_PROXIES with the actual proxy CIDRs when deploying this code; absent that setting forwarded IPs are ignored. Existing ignored tests remain the internet-only Unsplash test and the reload-speed benchmark. Browser invite registration uses Chromium virtual passkeys; invite administration runs in both engines at both widths. No PR was opened and the issue remains open.
Independent defensive review started. Worktree is detached at
046e76616d(issue/663-multiuser-fixes); review base origin/dev is8b30062e1c. No commits or pushes will be made. Independent adversarial tests and requested gates are being run; findings will be posted as verified.Review update at
046e76616d. These are source-confirmed findings; independent executable reproducers are prepared and waiting for a build slot.P2: IPv6 source budgets use the full address, not a /64. crates/auth/src/http.rs source_key ends with client.to_string(). Changing the low 64 bits creates another login/setup bucket. A single IPv6 allocation can bypass the per-source cap and fill the 10,000-entry limiter map, at which point limit.rs refuses every previously unseen source for up to a minute. The requested /64 grouping is absent.
P2: Setup target limiting hashes the pasted text, not the verified token. http.rs hashes input.token.as_bytes() after setup::check; setup.rs normalizes case, dashes and whitespace for the database lookup. The same recovery token therefore gets many target buckets. Use the verified canonical token hash.
P2: Legacy cookie migration is consumed by the first request, before its response reaches the browser. session.rs claim_legacy_cookie changes host_cookie from 0 to 1, and subsequent requests with the same old cookie are rejected by authenticate. Concurrent requests during the migration can receive 401 before the successful response installs the new cookie. The independent test sends two first requests together and checks both preserve sign-in.
The original fmt check passed (cargo fmt --all -- --check, exit 0). The heavy gates and independent tests have not started: all three shared build slots are occupied by other jobs. I am leaving those processes alone and continuing the review while the required wrapper waits.
Independent review is waiting for a local build slot. All three locks remain held by other jobs. No process was stopped. fmt completed directly, exit 0. The required heavy gates and independent Rust harness are queued through the mandated build-slot wrapper. Source-confirmed findings are already posted above. No runtime pass is being claimed before the queued commands execute.
P1 finding from source review: slow backdrop uploads can exhaust the blocking pool used for authentication.
In crates/backdrops/src/uploads.rs:112-125, receive starts a spawn_blocking writer which loops on rx.blocking_recv() for the entire body. There is no upload idle deadline or semaphore that leaves blocking workers free. Me authentication runs before receive, so one signed-in person can start many unfinished uploads, even before any quota admission. crates/auth/src/db.rs:160-166 puts every auth database operation into the same spawn_blocking pool. When slow uploads occupy that pool, sign-in/status/setup and other blocking storage work wait indefinitely. The server uses the default tokio::main runtime.
An independent test is prepared with the exact same code and a two-worker blocking pool: start two bodies that send a PNG header then remain pending, wait until both temporary files exist, and require /api/v1/auth/status to respond within 100 ms. It aborts only its own tasks after measurement. Execution is still waiting for a shared build slot. This is source-confirmed; no measured timeout is claimed yet.
The streaming implementation should avoid holding general blocking workers while waiting for network bytes, and bound active uploads plus idle body time while retaining cleanup on cancellation.
Gate progress on
046e76616d:Existing full-server isolation tests passed (11), and the real-session isolation integration target passed. The branch's sign-in-during-recount test also passed. Independent adversarial tests and the browser gate follow; these passes do not resolve the findings above.
P1: Slow uploads block authentication
The independent test slow_uploads_must_not_starve_authentication_blocking_pool reproduced blocking-pool starvation. It uses two blocking workers and two bodies that send a PNG header then stay pending, and waits for both temporary files to exist. Auth status baseline was 83.115 µs; the same endpoint then exceeded a 100 ms timeout. It aborts only its own tasks and releases both writers. This scales with the shared pool: the local Tokio 1.53.2 builder defaults to 512 blocking threads, and the server uses tokio::main with no upload concurrency or idle-body bound. Location: crates/backdrops/src/uploads.rs:112-125; crates/auth/src/db.rs:160-166.
Tested against checkout
046e76616dwith an external independent Rust harness. No product files were changed.P2: IPv6 address rotation bypasses source limits; login prompts still affect other sources
Independent test ipv6_prefix_must_share_budget exhausted a two-attempt budget from 2001:db8:42:1::1, then got 200 from 2001:db8:42:1::2 in the same /64 (expected 429). Source keys use the complete IP at crates/auth/src/http.rs:487. The associated pool test, with a two-prompt cap, started a victim prompt and two prompts from another source; the victim then received 401 passkey_failed. Global oldest-prompt eviction is deliberate in this patch but does not preserve in-flight source isolation. The missing /64 grouping also permits a single IPv6 allocation to fill the 10,000-key limiter map and refuse new sources.
Tested against checkout
046e76616dwith an external independent Rust harness. No product files were changed.P2: Formatting bypasses the verified setup token limit
Independent test normalized_setup_token_must_share_target_budget consumed both allowed target starts from different sources, then uppercased the same token and replaced dashes with spaces. That third start returned 200 (expected 429). Token verification normalizes these spellings; http.rs:169 hashes the raw input to select its target bucket. Use the verified token hash instead. Test tokens were kept in memory and are not printed.
Tested against checkout
046e76616dwith an external independent Rust harness. No product files were changed.P2: Parallel legacy cookie migration rejects a valid session
Independent test cookie_migration_flags_ambiguity_and_parallel_requests sent two first requests with the same legacy session: statuses were [200, 401], expected [200, 200]. The successful response had the required __Host name, Secure, HttpOnly, SameSite=Lax, Path=/ and no Domain. Duplicate and mixed-name cookies were rejected in either order. Migration consumes the database flag before the browser receives its replacement, at session.rs:149-154 and http.rs:524-547. A lost migration response also leaves the old cookie unusable. The web action handler forwards unauthorized errors to sessionEnded, which shows sign-in and reloads.
Tested against checkout
046e76616dwith an external independent Rust harness. No product files were changed.P3: No account failure budget across sources
Independent test repeated_bad_signatures_for_one_account_must_share_budget sent six invalid signatures for the same registered account from six sources, with a two-start source budget. All six finishes returned 401; none was slowed by an account budget. Source-only limits still slow one fixed source, and the independent source-isolation and trusted/untrusted-proxy tests passed. This does not bypass WebAuthn verification, but the requested account-wide failure throttling is absent.
Tested against checkout
046e76616dwith an external independent Rust harness. No product files were changed.Independent checks that passed on
046e766:Independent harness output verbatim:
The ignored helper is deliberately run as a subprocess by the passing restart test. The six failed assertions correspond to the findings above, including the related prompt eviction check.
Starting round 2 on branch issue/663-multiuser-fixes. Base SHA:
046e76616d. Merged origin/dev first; already up to date. Reading the independent tests and fixing upload isolation, source and target budgets, cookie migration and account back-off. No PR, merge or deployment will be made.Round 2 findings and choices:
The review worktree is clean at
046e766. Its test code is available in /home/kayg/codex-jobs/sec663-review/independent/tests/review.rs; its common helper matches crates/auth/tests/common/mod.rs exactly. Copied the harness into crates/auth/tests/reliability_review.rs as permanent tests. No reviewer files were edited.Source evidence confirms all five requested fixes: uploads.rs kept a blocking worker in blocking_recv while network bytes were pending; Db::run used the same Tokio blocking pool; source_key returned full IPv6 addresses; setup_start hashed raw pasted text after checking the normalized token; claim_legacy_cookie consumed migration before the first response; finish_login had no account failure budget. The prompt pool evicted the global oldest login regardless of its source.
The independent harness also has two checks added after its earlier 17-test summary. One rotates 10,000 IPv6 addresses and requires all starts to return 200. That expectation conflicts with the requested /64 budget. Kept its fresh-source availability assertion and allow 200 or 429 during the rotation. The /64 enforcement test still explicitly requires 429. A separate bounded-map unit test will check eviction across distinct sources.
The other added test moves a directory while its initial recount holds the old handle. usage::moved records only children already in state.files, which can be empty during that first walk. The walk can publish old child paths after the move. Adding a directory-move generation check to retry that snapshot before publishing.
Chosen limits: at most 4 active backdrop uploads per person and 32 total; a 30-second idle-body timeout; a bounded 64-job queue on a dedicated auth database worker; ten minutes of durable legacy-cookie grace. No deployment or PR.
Additional source finding while checking migration: auth routes install cookie_middleware themselves, and app.rs:85 installs it again around the merged application router. Completing migration when the host cookie is seen would otherwise mistake the outer layer's rewritten legacy cookie for a browser acknowledgement. Added an internal request-extension marker so cookie checks run once per request, and the permanent secure-router test now covers the same two-layer arrangement as the real server. Grace is completed only by an actual browser host cookie, or expires after ten minutes. Parallel legacy requests and lost responses remain usable during grace.
Account back-off starts after three known-key signature failures, doubles from one second to a maximum of sixty seconds, and rejected retries do not extend the deadline. A successful sign-in clears it. Added both deadline/cap tests and a real owner sign-in after expiry.
Validation is currently queued behind the three occupied shared build slots. The wrapper is still waiting; no other process has been stopped.
All six original failing review assertions now pass, including prompt isolation. Permanent harness output verbatim:
Measured evidence from that run, verbatim:
The ignored crash helper is deliberately executed as a subprocess by the passing restart test. Added tests also passed for dedicated auth worker isolation, lost migration responses across restart, grace expiry, and owner recovery after account back-off.
The first clippy gate found four forbidden std::fs calls in the copied harness. Those tests deliberately simulate outside filesystem changes or a crash before application notification. Added a scoped allowance to those four test functions, preserving their behavior. Product code had no clippy findings. Continuing the full gates through the shared build-slot wrapper.
Full workspace first run found two older tests whose assumptions conflict with the requested fixes. Evidence verbatim:
The source-budget test configured a single prompt slot, then required a second source to be admitted. That requires evicting the first source's in-flight prompt, which round 2 explicitly forbids. Changed that test to two slots so it tests source budgets independently. Added a separate one-slot unit test that requires the new source to get 429 and the existing prompt to survive.
The malformed-credential test reused a registered account and a signature from an earlier challenge across all cases. The new failure budget correctly throttled it. Each malformed shape now gets a fresh registered account and matching challenge, so the test still strictly requires 401 and passkey_failed from credential validation. The independent account-budget test separately requires 429 after repeated failures, and the owner recovery test verifies successful sign-in and reset after expiry.
Formatting and clippy with -D warnings passed before these test adjustments. Re-running gates with these changes. No product behavior was weakened to satisfy the older tests.
Validation is temporarily blocked on shared local build capacity. The required build-slot wrapper is waiting to run the full gates after the older test adjustments. The independent regression run already passed, and fmt and clippy passed before those test-only adjustments. No other process has been stopped and no slot restriction has been bypassed. I am continuing to wait for the authorized gate run, then the browser gate, before pushing.
The next gate attempt passed fmt and clippy again. The malformed credential test now passes all isolated cases. The source-budget fixture still returned 429 for its final new source: I had left only two prompt slots, but the fixture starts two first-source prompts before starting the second source. Corrected its capacity to three slots. The separate full-pool test strictly verifies that a one-slot pool rejects another source and retains its live prompt. No product code changed in this correction.
Workspace attempt output verbatim:
Running the abuse tests first on the next gate attempt, then the full workspace and browser gates.
The shared build slot was acquired and the Rust gates are now complete. Final status so far, verbatim:
The workspace run passed 827 tests with zero failures across its test binaries and doc tests. It includes the permanent review harness, the upload admission and idle-body tests, the bounded-map and account back-off tests, the full-pool prompt protection test, and the updated strict malformed-credential tests. Complete gate output will be quoted with the final head SHA.
Browser gate progress: all sixteen sign-out tests passed on Chromium and WebKit at 1440 and 390 pixels. The real passkey setup, sign-out and sign-in flow passed, as did admin sign-in setup. Admin and invite tests are running next, still using one worker inside the same build slot. No browser failures so far.
Round 2 gate evidence for head
8703faef34. fmt, part 1 of 1.Command:
cargo fmt --all -- --checkOutput verbatim:
Round 2 gate evidence for head
8703faef34. clippy, part 1 of 1.Command:
cargo clippy --workspace --all-targets -j4 -- -D warningsOutput verbatim:
Round 2 gate evidence for head
8703faef34. workspace, part 1 of 3.Command:
cargo test --workspace -j4Output verbatim:
Round 2 gate evidence for head
8703faef34. workspace, part 2 of 3.Command:
cargo test --workspace -j4Output verbatim:
Round 2 gate evidence for head
8703faef34. workspace, part 3 of 3.Command:
cargo test --workspace -j4Output verbatim:
Round 2 gate evidence for head
8703faef34. review, part 1 of 1.Command:
cargo test -j4 -p calternal-auth --test reliability_review -- --nocaptureOutput verbatim:
Round 2 gate evidence for head
8703faef34. server-build, part 1 of 1.Command:
cargo build -p calternal -j4Output verbatim:
Round 2 gate evidence for head
8703faef34. web-e2e, part 1 of 1.Command:
bunx playwright test --config=/home/kayg/codex-jobs/sec663-round2/playwright.config.ts --workers=1 --project=flow --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --project=admin-chromium-1440 --project=admin-chromium-390 --project=admin-webkit-1440 --project=admin-webkit-390 signout.spec.ts flow.spec.ts admin.spec.ts admin-invite.spec.ts admin-setup.spec.tsOutput verbatim:
Finished round 2 on issue/663-multiuser-fixes and pushed that branch.
Base SHA:
046e76616d. origin/dev was already included when merged first.Head SHA:
8703faef34.Uploads use fixed-size writes, per-person and total admission caps, and an idle-body timeout with cancellation cleanup. Auth database operations have a dedicated bounded worker queue. IPv6 source budgets group by /64, full limiter maps evict least-recent entries, and prompts cannot evict another source's in-flight prompt. Verified canonical setup tokens share their target budget. Cookie migration has durable ten-minute grace, ends on a real host-cookie request, and runs once through the merged router. Account failures share exponential back-off capped at sixty seconds; retries do not extend the deadline and successful sign-in resets it. Directory-move recount snapshots are retried before publishing stale child paths.
Permanent review tests and added regression tests pass. The ignored crash helper is executed by its restart test. Older validation tests were adjusted to isolate source budgets and malformed credential validation from the new prompt and account budgets, as explained above.
Final gate status and review result verbatim:
Complete final gate output is quoted verbatim in the preceding comments. Earlier failed attempts and their fixes are documented above. All heavy local commands used the shared build-slot wrapper, cargo used -j4 and Playwright used one worker. Browser coverage includes sign-out on Chromium and WebKit at both widths, the real passkey sign-in flow, invites on both Chromium widths, and admin on all four projects. No PR was opened, no branch was merged, and nothing was deployed. Evidence and artifacts were kept outside the repository. This issue remains open.
Round 2 independent reliability verification started in /home/kayg/Developer/calternal-wt-sec663rev. Detached review head
8703faef34(issue/663-multiuser-fixes), previous verified head046e76616d. I will review the delta and full branch against origin/dev, run new adversarial tests, the ported regressions, isolation and browser gates. No commits or pushes.Independent round 2 progress at
8703faef34: source review and the Rust gates completed. Verbatim gate status so far:The workspace run includes per-person action, room, attachment, backdrop, auth and admin isolation checks plus the ported reliability tests. New adversarial tests and the requested browser matrix remain queued through the shared build-slot wrapper. I am investigating delayed legacy-cookie requests after host-cookie acknowledgement and overwrite accounting in the new usage counter; these are candidates until reproduced. No changes to tracked files.
P2: Attachment uploads retain unbounded blocking-worker occupancy
The backdrop repair does not cover POST /api/v1/attachments. In crates/attachments/src/stage.rs:114 the writer occupies a general blocking worker, and Queue::read at lines 246-251 waits on blocking_recv for the next network bytes. The attachment HTTP/staging path has no per-person/total active-upload cap or idle-body deadline. This is pre-existing in origin/dev, but remains within the requested upload robustness verification.
The new independent test attachment_slow_bodies_must_not_hold_all_general_blocking_workers uses the actual attachment HTTP router and a runtime with two general blocking workers. It sends five unfinished uploads from one person, each starting with 64 KiB. It waits for two pending-file markers, then waits 31 seconds. All five requests are still pending and an unrelated blocking task exceeds 100 ms. The test aborts only its own requests. Auth sign-in succeeds through the dedicated database worker, so the original authentication starvation is repaired; file operations, note work and other callers of the general blocking pool remain exposed.
Verbatim evidence:
Apply bounded admission, idle timeout and short writes to the attachment path too. This is a remaining reliability requirement, not a claim that the new auth worker failed.
Independent round 2 latency and upload evidence at
8703faef34. Fifty requests were issued to one shared backdrop service: the global cap admitted 32 unfinished bodies and refused 18. Twenty complete software-passkey sign-ins and twenty auth status requests ran while those bodies were pending. Verbatim output:These are in-process server-router measurements on the shared host, including challenge generation and signature verification. Fifty simultaneously accepted backdrop bodies are intentionally impossible with the new cap. Temp-file cleanup and renewed admission passed. The rename overwrite candidate was ruled out: rename_safely refuses an existing target before changing usage.
The independent adversarial suite has acquired a build slot and is running, including a real-time test of the 60-second account back-off cap. The browser matrix is temporarily waiting for a shared build slot. No other job, PID or lock has been changed; the required wrapper will keep waiting. One new mapped-address fixture initially omitted Content-Type and received the expected 400 before reaching its budget assertion. That harness error is corrected and will be rerun; it is not a product finding. The product workspace and ported reliability gates already passed.
P2: Host-cookie acknowledgement ends grace while old requests are still in flight
The original two-request migration test now passes, and lost migration responses can retry within the durable deadline. A delayed old-cookie request can still sign the browser out. cookie_middleware calls saw_host_cookie for the first host-cookie request (crates/auth/src/http.rs:541-546); saw_host_cookie immediately stores host_cookie=1 (crates/auth/src/session.rs:163-177). An earlier request still travelling with the legacy cookie then fails migration. For auth/status, lines 135-140 clear both cookie names, including the newly installed host cookie.
The new independent test migration_host_ack_must_not_sign_out_delayed_parallel_old_request creates a pre-migration session and starts a legacy-cookie status request. An outer middleware barrier holds that request before the cookie middleware. A sibling legacy request migrates successfully; its host-cookie follow-up succeeds. The test releases the held request while the ten-minute deadline would still be live. It receives signed_in=false and a Set-Cookie that expires the new host cookie. No session secret is printed.
Verbatim evidence:
Keep the bounded legacy grace for outstanding requests after a host-cookie acknowledgement, or otherwise ensure a stale legacy response cannot clear the active migrated session. The hard deadline still needs to reject legacy cookies afterward.
Independent round 2 checks on
8703faef34passed the real maximum account back-off, limiter capacity, prompt survival and ordinary cookie grace checks. Verbatim output:The capacity test finishes each temporary prompt, keeps a separate victim prompt open across the 10,002-source churn, and completes that victim's real signature successfully afterward. Account testing walks through exponential delays up to sixty seconds, sends additional refused failures during the final deadline, then completes the owner's real signature and checks failure history resets.
Independent round 2 gate output at head
8703faef34. fmt, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. clippy, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. workspace-tests, part 1/4. Output verbatim:Independent round 2 gate output at head
8703faef34. workspace-tests, part 2/4. Output verbatim:Independent round 2 gate output at head
8703faef34. workspace-tests, part 3/4. Output verbatim:Independent round 2 gate output at head
8703faef34. workspace-tests, part 4/4. Output verbatim:Independent round 2 gate output at head
8703faef34. binary-build, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. independent, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. ipv4-fixture-corrected, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. independent-ported, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. cookie-isolated, part 1/1. Output verbatim:Independent round 2 gate output at head
8703faef34. web-e2e, part 1/2. Output verbatim:Independent round 2 gate output at head
8703faef34. web-e2e, part 2/2. Output verbatim:Verification complete. Verdict: do not merge head
8703faef34of issue/663-multiuser-fixes. The worktree remains detached and clean. Reviewed 046e76616d96a9a0c839e08e78ff36e7acd9c793..8703faef346b8436a4c7d7c99d3504b5c88a1f45 and the whole branch against origin/dev8b30062e1c. No commits, pushes, merges or deployments. This issue stays open.Two P2 findings remain; no P0 or P1 was identified:
The other original fixes pass. IPv6 /64 grouping, mapped IPv4 grouping, full-map admission and in-flight prompt survival passed, including 10,002 distinct sources. The setup target uses the verified token and shares its budget across formatting variants. Account failures from six sources back off; a real-time test reached the sixty-second cap and admitted the owner after 60.114395048 seconds despite refused retries, then reset the history on success.
Fifty slow backdrop requests produced 32 active bodies and 18 refusals, as required by the cap. Twenty complete software-passkey sign-ins had p50 650.944 microseconds and maximum 1.082593 ms; auth/status maximum was 288.554 microseconds. Cleanup, per-person admission, renewed capacity and the real 30-second idle deadline passed. These are in-process server-router measurements. Fifty accepted simultaneous backdrop bodies are deliberately prevented by the cap.
Formatting, warnings-denied Clippy, server build and the entire workspace passed: 827 tests, zero failures. All per-person action, room, attachment, backdrop, auth and admin isolation checks passed. The external ported suite passed 21 tests. The ten new checks have eight passes and two confirmed product failures after correcting one missing-content-type fixture. The initial runner's trailing shell parse error was caused by editing that shell script during execution; a separate runner completed the intended follow-ups. Original evidence is retained and the fixture failure is not counted as a product issue.
All 48 existing browser checks passed, with one worker: sign-out and admin on Chromium/WebKit at 390/1440; the real passkey setup/sign-out/sign-in flow; and invite redemption on both Chromium widths. As in the existing suite, software passkey creation uses Chromium; WebKit exercises transferred real sessions, sign-out and admin flows. Full verbatim gate output is in comments 63061-63071 and the following browser evidence comment. All heavy local commands used the supplied build-slot wrapper, cargo -j4, the requested target directory and the supplied browser environment.
Final gate-status record verbatim:
Selected final gate output verbatim:
Full findings and independent test source are outside the repository at /home/kayg/codex-jobs/sec663-verify/findings.md and /home/kayg/codex-jobs/sec663-verify/independent/. All logs and browser artifacts are alongside them. No evidence or artifacts were added to the repository.
Starting fix round 3 on issue/663-multiuser-fixes, base/head
8703faef34. Fetched origin and merged origin/dev first; already up to date. Read the verifier findings and latest issue comments. Will preserve bounded legacy-cookie grace after host acknowledgement, prevent stale legacy responses from clearing the host cookie, and share bounded streaming upload handling across attachment and backdrop routes. Will port verifier regressions, run all requested gates, and push this same branch. No PR, merge or deployment.Round 3 findings and repairs in progress:
The remaining auth to_bytes consumer is bounded JSON, not file upload. Both disk routes now use calternal_server::upload for admission, nonempty-body idle timeout, and owned bounded disk writes. The same data root shares 4 uploads per person and 32 total across both route types. No blocking worker waits for network bytes. Temp-file and attachment crash-marker guards move into each short write, so cancellation cleans up even when a disk write is still finishing. Streamed writes retain the 1 MiB flush pacing through the shared fsio helper.
Ported all ten new verifier checks into permanent auth integration tests and added coverage for cross-route limits, attachment idle outcomes and cleanup, cookie expiry without host clearing, and browser attachment upload/retry/download on all four projects. Full gates follow.
Round 3 gate progress: formatting and Clippy with -D warnings passed. The first full workspace attempt stopped on two quota storm tests that expected all eight simultaneous attachment requests to reach quota checks. With the required per-person cap of four, four requests correctly received admission refusals. The tests now retry only HTTP 429 admission refusals with a bounded deadline; all original quota and deduplication assertions remain. Full gates are running again. This is a test expectation change caused by the requested upload admission behavior.
The first targeted verifier run passed all ten tests. Selected output verbatim:
Additional permanent checks now verify the two routes share the same person and total admission caps, cancellation removes both temporary files and attachment pending markers, and expired legacy status responses leave a live host cookie alone.
Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. fmt, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. clippy, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. workspace-tests-initial, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. workspace-tests, part 1/4. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. workspace-tests, part 2/4. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. workspace-tests, part 3/4. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. workspace-tests, part 4/4. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. verifier-tests, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. binary-build, part 1/1. Output verbatim:Head
3c84f883a4is committed and the worktree is clean. All Rust gates passed: fmt, warnings-denied Clippy, workspace tests (838 passed, zero failed, three ignored), all 31 external verifier tests, and binary build. Verbatim logs are posted in comments 63127-63136, including the initial quota-test expectation failures and the successful corrected run.Temporarily blocked on shared local build capacity for the web gate: all three build slots are occupied by other work. The Playwright job and a final format/Clippy/cookie check are waiting through the required wrapper. No other process or lock has been changed. Continuing to wait; not treating queued gates as passing. No push yet.
Shared capacity became available. The first browser invocation exited before collecting any tests: the new external config directory lacked package.json with type=module, so importing the repository's ESM Playwright config failed with
SyntaxError: Cannot use 'import.meta' outside a module. Added the same external package metadata used by the verifier and queued a rerun. This changes only the runner outside the repository; head remains3c84f883a4. Original output is retained and will be posted with the final gate evidence.Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. final-fmt, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. final-clippy, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. final-cookie, part 1/1. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. web-e2e-initial, part 1/1. Output verbatim:Capacity wait resolved. The corrected browser runner is now executing 52 checks with one worker against head
3c84f883a4and this worktree's binary. Chromium at 1440 has already passed its four sign-out checks and the new attachment upload/retry/download check. The final format, warnings-denied Clippy and isolated cookie regression checks also passed on the committed head; their verbatim output is in comments 63143-63145. No product source changed after the successful full workspace run; the final cookie-test assertion was changed only to avoid printing cookie values on failure.Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. web-e2e, part 1/2. Output verbatim:Round 3 gate output for issue/663-multiuser-fixes, head
3c84f883a4. web-e2e, part 2/2. Output verbatim:Fix round 3 complete. Pushed issue/663-multiuser-fixes at
3c84f883a4; git ls-remote confirms the same remote head. Started at8703faef34after fetching and merging origin/dev (already up to date). The worktree is clean. No PR, merge to a protected branch, deployment or VM operation was performed. This issue stays open.Both remaining P2s are repaired:
Ported all ten new verifier checks as permanent tests and added cross-route admission and cancellation checks. The workspace passed 838 tests with zero failures and three intentional ignored helpers. The external verifier passed all 31 checks. All 52 browser checks passed, including attachment upload/retry/download and sign-out on Chromium/WebKit at 1440/390, plus the existing sign-in, invite and admin matrix. As in the existing suite, real software-passkey sign-in and invite redemption use Chromium; WebKit uses transferred real sessions and covers admin invite management.
Full verbatim Rust gate output is in comments 63127-63136, final format/Clippy/cookie checks in 63143-63145, and browser output in 63159-63160. The initial quota-storm tests assumed eight simultaneous uploads; they now retry only admission refusals before retaining all original quota assertions. The first browser invocation failed before test collection because the external runner lacked ESM package metadata; the corrected runner passed. Initial failure output is retained in comments 63129 and 63146.
Gate status record verbatim (the first web-e2e entry is the runner initialization failure):
External verifier and final browser output verbatim:
Evidence and artifacts remain outside the repository at /home/kayg/codex-jobs/sec663-round3 and in these issue comments. Only product code and tests were committed.
Reliability verification round 3 started. Worktree is detached at
3c84f883a4. Base for this review is8703fae; I will also review the whole branch against origin/dev. No branch will be created, committed, or pushed, as requested. I will check migration cookies, every upload route, latency with 50 slow uploads, earlier security fixes, and all required gates.Round 3 progress: fmt, clippy -D warnings, workspace tests and the server build passed at
3c84f883a4. Workspace coverage includes the IPv6 /64 and canonical setup-token budgets, capped account back-off, quota-counter regressions and per-person data isolation. Independent cookie ordering tests, mixed-route sign-in latency measurements and the browser gate are queued behind the three shared local build slots. No tracked files changed; temporary verification tests will be removed. The raw body-to-disk route audit found POST /api/v1/attachments and POST /api/v1/backdrops/uploads, both using calternal_server::upload::Limits and Receiver. Bounded JSON action dispatch reads its body before running actions; it is not a streaming disk upload route.P1 finding in round 3: delayed legacy-cookie responses can still overwrite or clear a newer session cookie. In crates/auth/src/http.rs:588-594, middleware puts the original legacy token into __Host-calternal_session on an ordinary response. It cannot account for a fresh sign-in completed before that response reaches the browser. The logout handler at lines 240-255 also unconditionally clears the host cookie for a legacy request. Independent tests exercised a fresh HTTPS WebAuthn sign-in and then applied the delayed response. Verbatim evidence:
Both required safety assertions failed. The existing same-token migration tests pass but do not cover the intervening sign-in. Fix the migration protocol so delayed old-cookie responses cannot mutate the cookie selected by a newer sign-in. Provisional verdict: do not merge.
The independent real TCP upload measurement passed:
Browser gates are still running. Verification sources and logs are kept outside the repository under /home/kayg/codex-jobs/sec663-verify2/round3.
P2 finding: unrelated invalid setup requests can erase a verified token’s active rate budget. setup_start stores source and target keys in the same Limiter (crates/auth/src/http.rs:159-177). Limiter::attempt evicts the least recently used entry when the combined map reaches 10,000 keys (crates/auth/src/limit.rs:24-35), including verified target entries. An independent test exhausted one token’s target budget, then sent invalid tokens from 10,002 distinct IPv6 /64 sources. In about five seconds the same valid token, in a canonical-equivalent spelling and from a fresh source, was accepted again. Verbatim evidence:
The isolated canonicalization and IPv6-prefix tests pass; the canonical target budget does not survive unrelated source churn. Keep verified target admission state separate from the anonymous source eviction pool, or preserve live target budgets elsewhere. This requires enough distinct transport source prefixes and a known valid token; it does not demonstrate guessing a token or bypassing WebAuthn. Verdict remains do not merge.
Round 3 finished. Verdict: do not merge.
Head:
3c84f883a4. Reviewed the complete delta from8703faeand the whole branch against origin/dev at8b30062e1c. Worktree is clean. No commits, pushes, merges, deployment or production access occurred.Ranked findings:
Upload verification passed. I searched the Rust request handlers and body consumers myself. POST /api/v1/attachments and POST /api/v1/backdrops/uploads are the two raw body-to-disk routes. Both use the same per-data-root Limits and Receiver. JSON action dispatch buffers its bounded body before dispatch and is not a raw streaming upload route. The shared helper waits asynchronously for body frames, runs bounded 64 KiB blocking disk tasks, admits four uploads per person and 32 total across both routes, enforces a 30-second idle-body deadline, and transfers temporary-file guards through disk tasks. Mixed-route cap, cancellation cleanup, pending-marker cleanup and idle expiration tests passed. With the total cap, 50 simultaneous attempts necessarily mean 32 admitted bodies and 18 refusals.
Final independent measurements, verbatim:
The real TCP check also closed the slow connections and verified that all 32 permits returned. The idle and constrained blocking-pool checks passed. The native IPv6 /64, adjacent-prefix isolation and IPv4-mapped normalization checks passed independently. Canonical token spellings share a budget in isolation, but the source-churn finding above prevents confirming that budget unconditionally. The account back-off reached its 60-second cap, refused retries did not extend it, the owner could return, and a successful sign-in reset failures. Quota-counter and per-person isolation suites passed, including actions, note rooms, attachments, backdrop accounting, concurrent quota placement, deduplication, trash and deletion.
Required gates:
The initial browser run was stopped after my invite fixture used same-document hash navigation where a full document load was needed. The second fixture needed a credentials object in this WebKit build before installing its bridge. Those fixture defects were corrected and the affected cases passed. The initial independent wrapper's 126 was a bookkeeping error; the final standalone run exited 101 with exactly the two intended cookie-property failures. An initial cleanup assertion included permanent engine state; checks of actual upload files and pending markers pass. The first churn fixture expected 401 rather than the API's unified 400 for an invalid token; after correcting that expectation, it failed on the actual target-budget bypass, 200 versus 429. Product source was never changed.
Recorded command statuses, verbatim:
Verbatim final test summaries:
Findings were appended to /home/kayg/codex-jobs/sec663-verify2/findings.md. Verification sources, logs and traces are outside the repository in /home/kayg/codex-jobs/sec663-verify2/round3. Temporary verification tests were removed. No issue was closed.
Starting fix round 4 on branch issue/663-multiuser-fixes. Initial base SHA:
3c84f883a4. Merging origin/dev first, then removing session migration and separating the canonical setup-token budget from source eviction. Required gates will run through the shared local build slots.Findings: origin/dev is already an ancestor of
3c84f883a4. The verification worktree sec663rev is clean; reliability_round3.rs already contains the relevant committed checks. In http.rs setup_start uses setup_limit for both source and verified target keys; limit.rs evicts live entries at 10,000, allowing source churn to reset target budgets. Cookie middleware still claims old cookies in SQLite and rewrites requests during grace. Invalid status and ambiguous-cookie responses also expire the host cookie, which can erase a newer cookie when responses arrive late. Choice: only the host cookie authenticates, old-name cleanup uses one clearing header when no session is being set, and no response expires the host cookie (logout revokes its server-side installation).Implementation finding: the existing startup auth path retained owned note databases but returned to the generic greeting after an old session was rejected. It now shows the ended-session sign-in message explaining retained unsent changes. Added a four-project browser test that leaves edits offline, replaces the host cookie with the old name, checks sign-in and cleanup, then restores the same account and checks the edits. Cookie migration tests were removed; unrelated verification tests remain. Added schema-v6 upgrade coverage to prove the obsolete flag is removed while passkeys survive.
Validation is temporarily waiting on the shared build-slot wrapper. Both the focused auth checks and the required Rust gates are queued; no local heavy command has bypassed the slots and no other job has been interrupted.
First gate results: fmt and workspace all-target Clippy with -D warnings passed. The new host-cookie tests all passed, including schema-v6 upgrade, stale logout/status responses and old-name cleanup. The workspace run stopped at an older schema migration test that hard-coded version 6; the schema is now version 7 because it removes the obsolete cookie column. Updated that assertion and rerunning the Rust gates. Browser gates have started against this worktree's rebuilt binary.
Further gate evidence: the source-churn integration test setup_target_budget_survives_more_than_ten_thousand_sources passed, as did the canonical recovery-token variant test and all three host-cookie regression tests. Chromium desktop and phone each passed every selected sign-out and attachment test, including the new old-name-cookie test that restores unsent edits. The workspace run reached another older schema-version assertion in security_regressions.rs (expected 6, actual 7); updated it and checked all remaining user_version assertions before restarting the full gate.
Browser finding: Chromium's 14 selected desktop/phone tests passed, but WebKit's first authenticated fixture timed out waiting for the signed-in page. The retained trace shows HTTP localhost /api/v1/auth/status requests with no Cookie header. WebKit does not send this Secure host cookie over the old HTTP test transport. Stopped only this job's recorded Playwright PID (1417824), with normal fixture cleanup. Updating authenticated sign-out and admin fixtures to use a temporary localhost HTTPS proxy and ephemeral certificates, keeping the product cookie rules intact. Certificates and failure traces remain outside version control.
HTTPS fixture verification passed: the exact WebKit desktop online sign-out test that stalled over HTTP now passes over HTTPS (1 passed, 37.0s), including service-worker startup. The fixture proxy passes through real cookies, API requests and WebSockets; the server still requires the host-only Secure cookie. The certificate and private key are generated in a temporary directory, never in the repository. Starting the complete 61-test browser gate again.
The HTTPS rerun revealed one more fixture requirement: Chromium successfully signed in and reached data-ready/data-synced, then waited at navigator.serviceWorker.ready. Its context-level ignoreHTTPSErrors setting does not cover service-worker certificate validation. Added --ignore-certificate-errors to the Chromium fixture launch options for the temporary localhost certificate. Stopped only the recorded rerun PID 1492425 and am verifying this exact fixture before restarting all browser tests. Product TLS and cookie behavior are unchanged.
The full Rust gate now passes: cargo fmt --all -- --check exit 0; cargo clippy -j4 --workspace --all-targets -- -D warnings exit 0; cargo test -j4 --workspace exit 0. This includes the canonical-token/source-churn regression, target-map capacity and expiry checks, old-cookie and duplicate-host-cookie checks, and the database upgrade tests. Complete verbatim output will follow with the final head SHA after browser verification.
Both HTTPS fixture probes now pass: WebKit desktop online sign-out (37.0s total) and Chromium desktop online sign-out (19.4s total). Chromium now includes the launch option required for service workers to trust the temporary local certificate. Starting the complete browser gate with a fresh build from the final Rust code. The completed Rust workspace gate reports 839 passed, 3 ignored, no failures.
All four browser projects passed the old-cookie sign-out, retained unsent-edit recovery, and attachment checks. The dedicated passkey flow reached the expected sign-in screen but failed an assertion that still expected the old sentence. Its error snapshot shows the new intended message: “This device was signed out. Sign in with the same account to sync any unsent changes kept on this device.” Updated that stale expected text; product behavior is correct. The remaining admin and invite cases are still running, and the flow will be rerun.
Completed browser run: 60 passed, 1 failed (9.9m). The sole failure was the stale message assertion in flow.spec.ts; all runtime behavior, four-project sign-out/attachments, passkey management, invite redemption, and four-project admin/invite management passed. Updated the assertion to the intended warning text. Candidate head is now
162935a897(only that test expectation changed after the Rust gates). Rerunning the entire selected browser gate to produce a clean final result.Fix round 4 gate output. Head SHA:
162935a897.Command: cargo fmt --all -- --check
Verbatim output, part 1 of 1:
Fix round 4 gate output. Head SHA:
162935a897.Command: cargo clippy -j4 --workspace --all-targets -- -D warnings
Verbatim output, part 1 of 1:
Fix round 4 gate output. Head SHA:
162935a897.Command: cargo test -j4 --workspace
Verbatim output, part 1 of 3:
Fix round 4 gate output. Head SHA:
162935a897.Command: cargo test -j4 --workspace
Verbatim output, part 2 of 3:
Fix round 4 gate output. Head SHA:
162935a897.Command: cargo test -j4 --workspace
Verbatim output, part 3 of 3:
Fix round 4 gate output. Head SHA:
162935a897.Command: bunx playwright test --workers=1 signout.spec.ts uploads.spec.ts flow.spec.ts passkeys.spec.ts passkeys-ui.spec.ts admin.spec.ts admin-invite.spec.ts admin-setup.spec.ts
Verbatim output, part 1 of 1:
Finished fix round 4. Pushed issue/663-multiuser-fixes at head SHA
162935a897. origin/dev was already merged into the starting base3c84f883a4.Removed legacy session claiming, grace, request rewriting and their tests. Schema version 7 removes the old claim column. Only the Secure host cookie authenticates browser requests; duplicate host cookies are refused. An old-name cookie is ignored and receives at most one clearing header on a response that is not setting a session. No response expires the host cookie: logout revokes the installation instead, so a delayed response cannot delete a newer session. The sign-in screen explains retained unsent changes, and the old-cookie recovery test passes on all four browser projects.
Verified canonical setup and recovery tokens now have a separate 256-entry budget map. Live entries cannot be evicted; capacity eviction selects only the least recently used expired entry. The integration test passed after requests from more than 10,000 different source addresses. Relevant earlier verification tests were retained; the previous verification worktree had no uncommitted changes to port.
Final gate output, verbatim summaries:
The workspace suite had 839 passed and 3 ignored. The browser gate covers sign-in, sign-out, invites, admin and attachments, including the four browser/viewport projects and dedicated passkey ceremonies. All local heavy commands used the shared build slots, cargo -j4, and Playwright --workers=1.
Complete verbatim gate output is in the six preceding comments, starting at #663 (comment) and ending at #663 (comment). The repository contains only code and tests from this round; logs, traces, temporary certificates and other artifacts remain outside version control. No PR was created. The issue remains open.
Final reliability verification round 4 started. Worktree is detached at
162935a897; no working branch will be created, committed, or pushed. Review base for the final delta:3c84f88. Full branch comparison: origin/dev. Running source review, targeted checks, and the requested gates.Round 4 source review update: no new defect established so far. The final delta removes all legacy claim/grace state and request rewriting. session_token filters for the host cookie, middleware refuses duplicate host cookies, and status/logout no longer expire the host cookie. Old-name clearing is limited to one header and skipped when a handler sets a cookie. setup_start uses the verified token_hash with a separate target limiter whose capacity eviction filters for expired windows. Added temporary independent tests for delayed legacy responses after a newer sign-in, 50 mixed raw uploads with complete sign-in timing, full-window canonical-token/source-churn behavior, IPv6 prefix grouping, and cross-source account back-off. Gate execution is waiting normally for a shared local build slot; no slot has been bypassed. Browser tests will cover both engines and both widths, with Chromium software passkeys providing enrollment for WebKit fixtures.
P3 documentation finding: ADR 0030 still describes the cookie migration that this final round deliberately removes. docs/adr/0030-every-client-is-an-installation.md:39-43 says HTTP loopback retains calternal_session and old sessions can migrate once through a persisted auth.db claim. Actual code in crates/auth/src/http.rs:401-406 always issues Secure __Host-calternal_session, session_token at 433-439 reads only that cookie, and schema v7 drops the claim column. The same ADR at lines 46-47 says a full Login pool evicts its oldest challenge, although ceremony.rs:87-107 only evicts a challenge from the requesting source and refuses a new source when all live prompts belong to others. Update this lasting operator documentation to the accepted final behavior. This is P3 because the implementation enforces the safer behavior; no runtime exploit or data loss is demonstrated. Not a merge blocker by itself.
Execution delay: local validation has waited about 12 minutes for the required shared build-slot wrapper. All three slots are occupied by other jobs, including long WebKit shards. The wrapper is still running normally, and no slot or other job has been bypassed or stopped. Source review is complete with one P3 ADR documentation mismatch already posted. The verification remains active and queued; no gate result or merge verdict is being inferred from earlier runs.
Resource-delay detail: an active test-train marker is present, and build-slot.sh explicitly gives that train priority over verification jobs. This run therefore remains queued until the train ends, even as individual slots change hands. Formatting precheck passed with exit 0. Other gates have not run yet. No priority rule is being bypassed; this unattended verification will continue once admitted.
Local gate execution has now been admitted through build-slot.sh after the train-priority and shared-slot wait. Formatting and workspace Clippy with all targets and -D warnings both passed with exit 0. Workspace tests are now running, including the temporary independent round 4 tests. Browser and detailed reliability runs are queued to follow the binary build. No new finding beyond the posted P3 ADR mismatch so far.
Independent round 4 Rust results at
162935a897: fmt, workspace Clippy with all targets and -D warnings, workspace tests, and binary build all exited 0. Workspace aggregate: 844 passed, 0 failed, 3 ignored (839 shipping tests plus 5 temporary independent checks). The delayed old-cookie response was held until a fresh WebAuthn sign-in finished and only cleared the old name; the newer session still authenticated. The mixed-route upload test issued 50 slow attachment/backdrop requests, held 32 bodies open, refused 18 at the shared cap, and asserted all 20 complete sign-ins finished below 50 ms with no leftover files. The canonical-token test exhausted one verified target across equivalent spellings, sent 10,010 invalid requests from distinct IPv6 /64 sources, confirmed the target still returned 429, and confirmed renewal only after the full window. Separate independent checks passed for /64 and cross-source account budgets and per-person quota changes on rename/delete. The shipping maximum back-off, upload timeout/cleanup, quota and person-isolation tests also passed in the workspace run. Browser validation and a detailed-output evidence run are now queued. Complete verbatim gate output will follow with the final verdict.Final independent verification round 4. Head
162935a897.Command: cargo fmt --all -- --check
Verbatim fmt.log output, part 1 of 1:
Final independent verification round 4. Head
162935a897.Command: cargo clippy --workspace --all-targets -j4 -- -D warnings
Verbatim clippy.log output, part 1 of 1:
Final independent verification round 4. Head
162935a897.Command: cargo test --workspace -j4
Verbatim test.log output, part 1 of 4:
Final independent verification round 4. Head
162935a897.Command: cargo test --workspace -j4
Verbatim test.log output, part 2 of 4:
Final independent verification round 4. Head
162935a897.Command: cargo test --workspace -j4
Verbatim test.log output, part 3 of 4:
Final independent verification round 4. Head
162935a897.Command: cargo test --workspace -j4
Verbatim test.log output, part 4 of 4:
Final independent verification round 4. Head
162935a897.Command: cargo build -p calternal -j4
Verbatim build.log output, part 1 of 1:
Final independent verification round 4. Head
162935a897.Command: cargo test -p calternal-auth -j4 --test round4_independent --test host_cookies --test reliability_round3 --test quota_counter -- --nocapture --test-threads=1
Verbatim targeted.log output, part 1 of 1:
Final independent verification round 4. Head
162935a897.Command: cargo test -p calternal -j4 isolation -- --nocapture --test-threads=1
Verbatim isolation.log output, part 1 of 1:
Final independent verification round 4. Head
162935a897.Command: timeout 5400 bunx playwright test flow.spec.ts passkeys.spec.ts passkeys-ui.spec.ts signout.spec.ts admin-setup.spec.ts admin.spec.ts admin-invite.spec.ts uploads.spec.ts --project=flow --project=passkeys --project=admin-setup --project=admin-chromium-1440 --project=admin-chromium-390 --project=admin-webkit-1440 --project=admin-webkit-390 --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1 --output=/home/kayg/codex-jobs/sec663-verify3/round4/results
Verbatim e2e.log output, part 1 of 2:
Final independent verification round 4. Head
162935a897.Command: timeout 5400 bunx playwright test flow.spec.ts passkeys.spec.ts passkeys-ui.spec.ts signout.spec.ts admin-setup.spec.ts admin.spec.ts admin-invite.spec.ts uploads.spec.ts --project=flow --project=passkeys --project=admin-setup --project=admin-chromium-1440 --project=admin-chromium-390 --project=admin-webkit-1440 --project=admin-webkit-390 --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1 --output=/home/kayg/codex-jobs/sec663-verify3/round4/results
Verbatim e2e.log output, part 2 of 2:
Final reliability verification round 4 finished. Verdict: merge.
Head:
162935a897. Reviewed the final delta 3c84f883a4309c4c2a1914b2b9a11caf724de461..162935a89795a5da6257b654aafa9fd2c27ac48c and the whole branch against origin/dev8b30062e1c.No P0, P1 or P2 finding remains from this verification. One nonblocking P3 finding: docs/adr/0030-every-client-is-an-installation.md:39-42 still promises old-name HTTP cookies and persisted legacy-cookie migration; lines 46-47 also describe login-prompt eviction too broadly. Update that lasting documentation to the final implementation. The finding and evidence were posted separately and appended to /home/kayg/codex-jobs/sec663-verify3/findings.md.
The intentionally removed migration is verified. Only the host cookie authenticates browser sessions. Old-name cookies are ignored and receive at most one clearing header per response, skipped when a response sets a session. Duplicate host cookies are refused. Ordinary legacy/status/logout responses never set or expire the host cookie. An independent test held an old-cookie response until a newer WebAuthn sign-in finished; it could clear only the old name, and the newer session still authenticated. The old-cookie browser recovery test passed on Chromium and WebKit at 390 and 1440: sign-in screen, warning about retained unsent edits, no error page, and edits recoverable by the same account.
The setup target budget uses the verified canonical token hash in a separate map. Capacity eviction selects expired entries only. Independent testing exhausted one canonical-equivalent token across sources, sent 10,010 invalid requests from different IPv6 /64 sources, confirmed the valid target still returned 429, and confirmed renewal after the full window. The target-capacity unit test also passed.
Earlier fixes were reconfirmed. Both raw upload routes use the shared bounded asynchronous receiver. With 50 mixed attachment/backdrop attempts, 32 bodies remained pending and 18 were refused at the shared cap; 20 complete sign-ins had a maximum of 2.225701 ms, below 50 ms. No upload files remained after cancellation. The separate backdrop latency run measured p50 1.397157 ms and maximum 1.899881 ms. Idle timeouts, shared per-person caps, IPv4-mapped IPv6 and /64 budgets, cross-source account back-off, capped-back-off recovery without deadline extension, per-person quota counters, and quota updates on rename/delete all passed. All 11 shipping person-isolation tests passed, including the action visibility sweep, note rooms, attachments, real upload storms, duplicates, trash/restore/deletion and split storage.
Gate output, verbatim:
Workspace tests: 844 passed, 0 failed, 3 ignored, including five temporary independent tests. The shipping suite contributes 839 passed. Detailed reliability run: 20 passed. Separate person-isolation run: 11 passed. Browser gate: 61 passed (8.5m), with one worker. It covers sign-in, sign-out, invites, admin and attachments on Chromium and WebKit at 390 and 1440; software passkey ceremonies use Chromium, and WebKit uses authenticated fixtures for the remaining flows. Vite logged two WebSocket EPIPE messages during the passing multi-window passkey test; there were no test failures or server exits.
Complete verbatim logs are in the preceding comments, from #663 (comment) through #663 (comment). Detailed reliability output: #663 (comment). Person-isolation output: #663 (comment).
All local heavy commands used the required build-slot wrapper, cargo -j4, the requested CARGO_TARGET_DIR and Playwright --workers=1. The train-priority wait was honored. Temporary independent test source, logs, browser output and certificates remain outside version control; the temporary repository test was removed. The worktree is clean and detached at the same head. No commits, pushes, merges or deployments. No PR was created, and this issue remains open.
Landed in train AQ, #665.
Train AQ ran the full suite at
162935a(run aq2): fmt, clippy, workspace tests (81 test binaries ok), the build, svelte-check, every Playwright project in parallel shards: admin 39, cr1440 300, cr390 233+199, wk1440 136+164, wk390 142+180+113, small 19 — all passed, 0 failed.Run aq1 failed once on the storage_startup Home lock flake (tracked in #664; 20/20 alone).
Contents (#663, multi-user audit fixes):
Deployed to calternal.cloud:
9ed9b9a5e8healthy at 20:12 UTC (01:42 IST 2026-10-22); data snapshot /srv/calternal-app/snapshots/20261021T201155Z. On the iOS simulator, Safari now shows the sign-in screen, as expected: the cookie migration was dropped, so everyone signs in once. Passkey sign-in can't be completed on the simulator; kayg's first sign-in on a real device is the final check.Starting this follow-up on branch issue/auth-latency-gate, based on
dadc7a26e9.Finding: crates/auth/tests/reliability_review.rs:339 puts a 50 ms maximum on 20 full sign-ins while five recounts walk 50,000 files. The reported shared-train run had p50 5.0 ms and max 61.2 ms, so host load can fail this latency budget even when the sign-in remains independent of the recount. I will keep an ordering check in the normal suite and run the 50 ms budget on the perf VM.
Finding: crates/auth/tests/quota_counter.rs:82 has a separate sign-in-under-recount assertion with the same 50 ms limit (the test prepares 50,000 files and 20 admissions at lines 35-78). I am leaving this and other pre-existing ordinary-test timing assertions unchanged per the requested scan scope; it will be listed in the report.
Workspace scan finding: other ordinary tests contain elapsed-derived wall-clock thresholds at crates/auth/tests/quota_counter.rs:82; crates/auth/tests/reliability_round3.rs:135-136,338; crates/auth/tests/reliability_review.rs:747; crates/auth/tests/security_regressions.rs:670; crates/calternal/tests/startup.rs:70,77; crates/calternal/tests/search_live.rs:171; crates/calternal/src/admin.rs:402; crates/engine/src/tests.rs:340,345; crates/notes/src/room/save/history_durability.rs:252; crates/notes/src/room/save/group_commit.rs:517; crates/notes/src/tests/tags.rs:168; crates/search/tests/search.rs:337. These remain unchanged as requested. The named recount latency budget is now an ignored perf test run by perf/auth-latency-vm.sh.
Perf VM finding: the first ignored-test run placed both TempDir roots on /mnt/b/hdd-ext4 because TMPDIR selected one parent for Home and auth state. It reported 20 full sign-ins at p50=415.337315ms and max=2.078890353s. That does not model the split layout; I am separating the test roots so the 50,000-file Home stays on HDD and auth.db stays on NVMe, then rerunning the gate.
Perf VM finding: with the 50,000-file Home on HDD and auth state on NVMe, the 20 full sign-ins stayed below the 50 ms maximum. Gate output: 20 full sign-ins during repeated 50,000-file recounts: p50=6.982319ms, max=10.131248ms
test independent_login_latency_during_recount ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 20 filtered out; finished in 9.28s
perf VM auth latency gate exit=0
Status: the local workspace clippy gate and ten auth test runs are queued behind the active train-priority marker in build-slot.sh. They have not started. Formatting and the perf-VM gate are complete; I will post the local gate output after the queue releases.
Status update: the previous train ended, but train bf1 started before the corrected clippy command acquired a slot. The required build-slot wrapper is waiting again; I have not bypassed train priority. The cargo lint-flag syntax issue was corrected to use -- -D warnings.
Status update: workspace clippy passed with -D warnings. The ten auth test runs are queued in build-slot.sh; all three local slots are currently held by other gates, so the first run has not started.
Finished on branch issue/auth-latency-gate. Head SHA
932d22ecd4. The branch was pushed to origin. No PR was opened.Gate output:
cargo fmt --check: exit 0; no stdout or stderr.
The initial clippy invocation without Cargo argument forwarding was rejected:
error: unexpected argument '-D' found
Usage: cargo check [OPTIONS]
Corrected clippy gate output:
Finished
devprofile [unoptimized + debuginfo] target(s) in 2m 11scargo test -p calternal-auth -j4 --quiet, repeated 10 times:
auth test run 1/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.98s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.68s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.16s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.73s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.21s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.64s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.38s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 3.04s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.92s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.42s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.16s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 1 exit=0
auth test run 2/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.97s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.28s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.19s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 2.19s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.90s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.57s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.66s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 2 exit=0
auth test run 3/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.60s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.92s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.64s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.80s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.34s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 3 exit=0
auth test run 4/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.46s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.17s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.16s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.62s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.80s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.42s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 4 exit=0
auth test run 5/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.93s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.22s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.21s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.21s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 2.10s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.84s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.46s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.44s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 5 exit=0
auth test run 6/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.96s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.29s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.26s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.21s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 2.18s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.83s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.39s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 6 exit=0
auth test run 7/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.85s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.18s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.19s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.99s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.84s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.38s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 7 exit=0
auth test run 8/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.49s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.18s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.07s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.78s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.77s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.34s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 8 exit=0
auth test run 9/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.50s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.44s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.27s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.24s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.95s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.88s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.83s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.44s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.13s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 9 exit=0
auth test run 10/10
running 28 tests
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.87s
running 12 tests
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.16s
running 6 tests
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 3 tests
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
running 11 tests
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
running 1 test
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
running 7 tests
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.09s
running 4 tests
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
running 2 tests
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.16s
running 21 tests
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.89s
running 10 tests
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.83s
running 14 tests
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.39s
running 8 tests
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.15s
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
auth test run 10 exit=0
Perf VM gate output:
20 full sign-ins during repeated 50,000-file recounts: p50=6.982319ms, max=10.131248ms
test independent_login_latency_during_recount ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 20 filtered out; finished in 9.28s
perf VM auth latency gate exit=0
Correction to the workspace scan: crates/calternal/src/admin.rs:398,402 and crates/calternal/tests/storage_startup.rs:493 use paused Tokio time, so they are not wall-clock assertions and are excluded. The elapsed budget in crates/auth/tests/reliability_review.rs is currently line 758 after the fixture changes. The other ordinary wall-clock assertions, left unchanged, are crates/auth/tests/quota_counter.rs:82; crates/auth/tests/reliability_round3.rs:135-136,338; crates/auth/tests/reliability_review.rs:758; crates/auth/tests/security_regressions.rs:670; crates/calternal/tests/startup.rs:70,77; crates/calternal/tests/search_live.rs:171; crates/engine/src/tests.rs:340,345; crates/notes/src/room/save/history_durability.rs:252; crates/notes/src/room/save/group_commit.rs:517; crates/notes/src/tests/tags.rs:168; crates/search/tests/search.rs:337.
Started work on
issue/auth-latency-gateat base SHAdadc7a26e963aa690782c8934254e6e8c8a7e1b7(current head932d22ecd43d0479a9a88ba64767a88ac0f66a32). The requestedCLAUDE.mdis absent from this worktree and its parent search.Inspected the ordinary-suite timing assertions and the properties they protect:
quota_counter.rs:35-85: sign-in during a 50,000-file recount and 20 admissions; the test already checks HTTP 200.reliability_round3.rs:83-136: sign-in and status while 32 upload bodies are pending and 18 requests are refused; it also checks no upload files remain. Lines 300-362 churn 10,002 distinct source buckets and preserve the original ceremony.reliability_review.rs:743-764: 10,000 attempts in one IPv6 /64 must not prevent a fresh IPv4 source from starting.security_regressions.rs:596-673: five invite failure classes must return status 400 and identical bodies; the current additional check compares median timing classes.startup.rs:45-77: the real server must answer health after launch; the ordinary test has a five-second boot timeout plus a 500 ms startup budget.search_live.rs:168-171: empty search returns recent results; the endpoint also reportstook_ms.engine/src/tests.rs:280-349: same-user and other-user actions run while a 200,000-event job remains active; current limits are 100 ms and 150 ms.history_durability.rs:240-254: 10,000 outage checks coalesce to one pending check; the added limit is two seconds.group_commit.rs:489-529: 10,000 and 100,000 outage checks stay at four pending checks and produce one answer per peer; each loop has a 20-second limit.tags.rs:132-173: a 600-note rename must preserve typing during the job; it checks more than five keystrokes and currently limits each round trip to one second.search/tests/search.rs:323-340: first query during a 3,000-document build must answer with indexing state or results; the current limit is 500 ms.I will keep the latency thresholds as ignored perf-VM cases and replace ordinary-suite time limits with the relevant status, ordering, bounded-queue, or deterministic in-flight checks.
Clippy found one lint in the new pause hook:
clippy::type-complexityon thePAUSESmap type atcrates/notes/src/bulk/mod.rs:532. I factored the map type into aPausesalias and am rerunning clippy. The first run exited 101 with:error: very complex type used. Consider factoring parts into type definitions.The clippy rerun reached
quota_counterand found a borrow error in the ordering check:error[E0596]: cannot borrow recount as mutable, as it is not declared as mutableatcrates/auth/tests/quota_counter.rs:99. I made the join handle mutable fortokio::select!; formatting and whitespace checks pass, and clippy is queued again.The first perf VM run failed its existing 50 ms sign-in budget:
sign-in during 50,000-file recount and 20 admissions: 71.604915ms. Evidence incrates/auth/tests/common/mod.rs:app_withput both auth state and Home underTMPDIRon the HDD, while the gate provides separate state and Home paths (state on NVMe, Home on/mnt/b/hdd-ext4). I am making the shared auth test helper honor those two configured paths and rerunning the gate with the same threshold.The loaded workspace gate is blocked by shared host scheduling.
/tmp/calternal-train.activestill names train PID 3314636; its admin browser job has waited 35 minutes for a slot, and the three build-slot locks are held by PIDs 3551376, 3515652, and 3546713. The loaded test wrapper has not started its 16 workers. I have left those processes untouched and will resume the gate when the slot queue opens.Test mapping
crates/auth/tests/quota_counter.rs:82perf_signin_during_large_recount_under_fifty_mson the perf VM: under 50 ms.crates/auth/tests/reliability_round3.rs:135perf_signin_and_status_during_slow_uploads_under_fifty_ms: sign-in under 50 ms.crates/auth/tests/reliability_round3.rs:136crates/auth/tests/reliability_round3.rs:338perf_source_bucket_churn_under_fifty_five_seconds: under 55 s.crates/auth/tests/reliability_review.rs:758perf_ipv6_source_rotation_under_fifty_five_seconds: under 55 s.crates/auth/tests/security_regressions.rs:670perf_invite_failure_timing_classes_within_ratio: timing ratio under 2.5x on the perf VM.crates/calternal/tests/startup.rs:70,77perf_startup_under_500ms: under 500 ms.crates/calternal/tests/search_live.rs:171took_ms.perf_live_empty_search_under_one_second: under 1 s.crates/engine/src/tests.rs:340perf_huge_job_action_latency: other-user max under 100 ms.crates/engine/src/tests.rs:345crates/notes/src/room/save/history_durability.rs:252perf_outage_checks_under_two_seconds: under 2 s.crates/notes/src/room/save/group_commit.rs:517perf_save_checks_under_twenty_seconds: each batch under 20 s.crates/notes/src/tests/tags.rs:168perf_big_tag_rename_keystrokes_under_one_second: worst typing round trip under 1 s.crates/search/tests/search.rs:337perf_search_answer_under_five_hundred_ms: under 500 ms.The perf gate ran on
root@10.69.69.63underflock -o /root/perf-vm.lock, with stdin/dev/null, source and fixtures on/mnt/b/hdd-ext4, and build output on NVMe. The auth fixture helper now honors separate state and Home temp roots so the quota fixture keeps auth state on NVMe.Gates
cargo fmt --checkproduced no stdout or stderr; exit code 0.cargo clippy --workspace --all-targets -j4 -- -D warningsoutput (verbatim):cargo test --workspace -j4normal run: process exit code 0. Per-target result lines (verbatim):cargo test --workspace -j4under 16 CPU workers: output (verbatim):Perf VM gate output (verbatim result and measurement lines):
Finished at head
aae5f67e44c7a91c8657595ba697389d1b6a8627. The branchissue/auth-latency-gateis pushed.Closing during the 26 Oct handover cleanup: Multi-user hardening landed in train AQ (#665). The load-proof timing tests landed in BK4 (#682).