Closed
Conversation
Collaborator
Author
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
monitoras the global/admin observability surface/api/monitor/resourcesbackend/web/services/resource_common.pyso product projection no longer depends onresource_service.pyinternalsWhat This Branch Actually Changes
backend/web/routers/resources.pyGET /api/resources/overviewPOST /api/resources/overview/refreshGET /api/resources/sandbox/{lease_id}/browseGET /api/resources/sandbox/{lease_id}/read/api/monitor/*for the global monitor surface/api/monitor/resources*to/api/resources/overview*/api/monitor/sandbox/*to/api/resources/sandbox/*make_sandbox_monitor_repo()strategy-aware so Supabase mode returnsSupabaseSandboxMonitorRepomake_lease_repo(),make_terminal_repo(), andmake_chat_session_repo()tobackend/web/core/storage_factory.pybackend/web/services/activity_tracker.py,backend/web/utils/helpers.py,backend/web/services/file_channel_service.py,backend/web/routers/threads.py, andsandbox/manager.pythrough those strategy-aware factorieslist_user_leases()use runtime repo builders instead of directly constructing SQLite member/thread repossandbox/resource_snapshot.pyfrom creating or writing SQLite snapshot tables in Supabase modebackend/web/services/resource_common.pybackend/web/services/resource_projection_service.pyas the user-visible projection owner and pointresource_cache.pyat that projection boundarybackend/web/services/resource_service.pyto sandbox browse/read plus snapshot probe dutiessandbox/chat_session.py::ChatSessionwritetouch()andclose()through the injectedChatSessionRepowhen available, instead of always issuing raw SQLite updatesChatSessionManagerreuse injected terminal/lease/session repos on the rehydrate pathstorage/providers/supabase/sandbox_monitor_repo.py::list_sessions_with_leases()to match SQLite fallback semantics for terminal rows and latest-session fallbackfrontend/monitordev proxy to use the current worktree backend port instead of hardcoded8001Final Design Direction
/api/monitor/resourcesas the global monitor contract for ops/debugging/api/resources/*for user-visible product resourcesHonest Scope Boundary
ChatSessionRepoSQLiteLease.apply()andSQLiteTerminal._persist_state()remain SQLite-backed, so full Supabase-only claims remain larger than this PRReal Evidence
/resourcesGET /api/resources/overview -> 200POST /api/resources/overview/refresh -> 200/api/monitor/resourcesrequest appeared in that browser trace/leasesGET /api/monitor/leases -> 200/api/resources/*request appeared in that browser traceVerification
env -u ALL_PROXY -u all_proxy -u HTTPS_PROXY -u https_proxy -u HTTP_PROXY -u http_proxy uv run pytest -q tests/Unit/backend/web/services/test_resource_common.py tests/Fix/test_monitor_resource_overview_uniqueness.py tests/Integration/test_resources_route.py tests/Integration/test_monitor_resources_route.py tests/Unit/monitor/test_monitor_resource_probe.py tests/Fix/test_sandbox_user_leases.py tests/Unit/backend/web/core/test_storage_factory.py tests/Unit/sandbox/test_resource_snapshot_strategy.py tests/Unit/sandbox/test_sandbox_manager_volume_repo.py tests/Unit/monitor/test_sqlite_sandbox_monitor_repo.py42 passeduv run pytest -q tests/Unit/sandbox/test_manager_repo_strategy.py tests/Unit/sandbox/test_chat_session.py tests/Unit/sandbox/test_lease.py tests/Unit/backend/web/core/test_storage_factory.py54 passeduv run ruff check backend/web/core/storage_factory.py backend/web/services/activity_tracker.py backend/web/utils/helpers.py backend/web/services/file_channel_service.py backend/web/routers/threads.py sandbox/chat_session.py sandbox/manager.py sandbox/lease.py tests/Unit/backend/web/core/test_storage_factory.py tests/Unit/sandbox/test_manager_repo_strategy.py tests/Unit/sandbox/test_chat_session.py tests/Unit/sandbox/test_lease.pyuv run ruff format --check backend/web/core/storage_factory.py backend/web/services/activity_tracker.py backend/web/utils/helpers.py backend/web/services/file_channel_service.py backend/web/routers/threads.py sandbox/chat_session.py sandbox/manager.py sandbox/lease.py tests/Unit/backend/web/core/test_storage_factory.py tests/Unit/sandbox/test_manager_repo_strategy.py tests/Unit/sandbox/test_chat_session.py tests/Unit/sandbox/test_lease.pyuv run pyright backend/web/core/storage_factory.py backend/web/services/activity_tracker.py backend/web/utils/helpers.py backend/web/services/file_channel_service.py backend/web/routers/threads.py sandbox/chat_session.py sandbox/manager.py sandbox/lease.py0 errors, 0 warnings, 0 informationscd frontend/app && npm test -- src/pages/resources/api.test.ts src/pages/resources/ProviderCard.test.tscd frontend/app && npx eslint src/pages/resources/api.ts src/pages/ResourcesPage.tsx src/pages/resources/ProviderCard.tsx src/components/SandboxFileBrowser.tsx src/pages/resources/api.test.ts src/pages/resources/ProviderCard.test.tscd frontend/app && npm run buildcd frontend/monitor && npm run buildLinks