Repository navigation
Conversation
…flush A signed-out visitor called /api/me about nine times in the first 25 s and then every few seconds for as long as the page stayed open: the hosted-AI status retried, the vault backup scheduler re-queued, and every other caller asked again. getManagedAccount now serves the last settled answer for 30 s, forgets it on focus and when a sign-in lands in this tab, and callers that wait for a sign-in read fresh.
… property A property the remote answers 404 for was fetched again on every put of a message that carries it, twice per miss (the fetch, then handle_not_found fetching the same URL). Db now remembers a definitive 404/410 for the session and no longer retries it; 5xx and network errors are still retried. The demo speaker property is added to the bundled defaults so it resolves locally and is never asked for.
|
Complexity and risk review (19 files, +462/-47, mostly tests and plumbing; I read the patches, not the surrounding Please change before merge
Simplification (optional)
CI note: the PR body says the five TS test files were not run and an unrelated compaction test failed; that is for CI to settle, not me. Generated by Claude Code |
…r registry Review of the redundant-requests PR: a property that 404ed once stayed missing for the life of the Db. The memory now expires after 5 minutes. Also proves a failed session read is not cached, merges the two listener sets in session.ts, and states what the not-found-once test covers.
|
Addressed in 3453276:
Optional: the two listener sets in Not run in the cloud container: the vitest files (no Generated by Claude Code |
|
Landed in develop through the batch #2210 (squash f39e460), tested together on Mancave run 5204. Generated by Claude Code |
Requested by Joep · project thread
Before: a Playwright recording of production (app.atomic.place guest demo) showed three kinds of wasted requests. Every in-app navigation sent two Sentry session POSTs. A signed-out visitor called
atomic.place/api/meabout 9 times in the first 25 s and then every few seconds for as long as the page stayed open. The demo fetchedatomicdata.dev/properties/demo/speaker(a 404) 12+ times a minute.After: one Sentry session per page load; the session check is asked about once per 30 s window and again when something could have changed; a missing external property is asked for once, and the demo speaker property is bundled so it is never asked for.
What changed, one commit each:
browserSessionIntegration({ lifecycle: 'page' }).getManagedAccountserves the last settled answer for 30 s. It forgets it on focus,pageshow, visibility and when a sign-in lands in this tab (noteManagedSessionChanged); callers that wait for a sign-in readfresh.useHostedAIno longer runs its timed retry loop with no session, and the vault backup scheduler drops its queue when signed out instead of re-asking on every flush.Db(Rust/WASM store) remembers a 404/410 for the session and no longer fetches the same URL a second time throughhandle_not_found; 5xx and network errors are still retried.demo/speakeris added tolib/defaults/chatroom.json.How: not all of it ran in the cloud container. The new Rust tests and the new
store-not-found-oncevitest passed; the TS changes for 1 and 2 (session, useHostedAI, vault backup, sign-in paths) are untested because node_modules could not be installed, so CI needs to runsession.test.ts,useHostedAI.test.tsx,vaultAutoBackup.test.ts,agentSession.test.tsandaccountPasskey.test.ts. Thelifecycleoption name is from memory of the v10 SDK. Oneatomic_libtest,db::compaction::tests::startup_compaction_shrinks_a_bloated_store_and_keeps_every_resource, failed in the sub-agent's full run and was not checked against a clean checkout.