Repository navigation
Open the physics page and the sim config save to anyone - #508
Conversation
/sim/physics bounced a visitor to the login card while every read behind it (config, ground truth, solver stats, nodes) was already public; only the PUT was admin-only. The console has no identity provider yet and the fleet it reconfigures is synthetic, so the save is open now and the page goes with it: isPublicRoute admits the whole /sim subtree like the other open routes, the route and both navs mount on AuthProvider's one syntheticFleet answer (/me for a session, /api/health for a visitor), and the Physics Layer entry is advertised beside Simulation wherever there is a fleet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
Claude finished @jehanazad's task in 1m 38s —— View job Re-review after new commits
Review completeThe only commit added since the last review is a merge of Standing finding:
|
Summary
test-app.retina.fm/sim/physicssent a visitor to the login card while every read behind the page (config, ground truth, solver stats, nodes) was already served to anyone; only the configPUTwas admin-only. The console has no identity provider yet and the fleet the page reconfigures is synthetic, so this opens the save and lets the page follow it: no session needed to open/sim/physicsor to apply a change.Changes
Backend
PUT /api/simulation/configdropsrequire_admin. The docstring says why.PUT /api/test/known-holdkeeps its gate.Dashboard
isPublicRouteadmits the whole/simsubtree like the other open routes; theexactescape hatch is gone.PublicRoute.exactbecomesend, a nav-only flag that stops/simlighting up beside/sim/physics./sim/physicsjoinsPUBLIC_ROUTESwithneedsFleet, so the signed-out nav advertises Physics Layer right after Simulation wherever there is a fleet.AuthProviderfolds the two fleet answers into onesyntheticFleet:/api/auth/mefor a session,/api/healthfor a visitor.Appmounts the physics route on that flag andSidebarbuilds both navs from it.utils/physics.ts(showsPhysics(user)) is deleted.Docs
Test coverage
PUTis accepted while the known-holdPUTstill returns 401.publicRoutes.test: physics and the rest of the/simsubtree now admitted; Physics Layer advertised directly after Simulation and only with a fleet;/simcarriesend.physicsRoute.test: sidebar entry and the route open for a visitor with no session; the "not current" check runs signed in and out; theshowsPhysicsblock is gone with the helper.signedOutChrome.test: the "never offers the physics page" case is replaced by offered-with-fleet / withheld-without.pytest tests/test_sim_ingest.py(43 passed), dashboardtsc --noEmit,vitest run(1090 passed),eslint(no errors), pre-commit on the changed files.Review notes
Depends(require_admin)to put back.SYNTHETIC_FLEET_ENABLEDis off there, the fleet routes are not mounted, and the physics route is not rendered./api/healthanswers, so a direct load of/sim/physicsmay render blank for one round trip before the page appears. A session gets it on the first settled render.workflow_dispatchonly; redeploy the test droplet by hand after merge.🤖 Generated with Claude Code