Opus gate finding (BLOCKING): the two #4385 archive-reappears regression tests mocked Session.load_metadata_only to return an archived stub WITHOUT writing a real sidecar file, and never set SESSION_DIR. The new stat-gate in _state_projection_sidecar_metadata short-circuits on SESSION_DIR/{sid}.json before consulting metadata, so those mocks were never reached -> archived=False. This is NOT a production regression (in prod, load_metadata_only reads exactly SESSION_DIR/{sid}.json and returns None when absent, so archived metadata only exists when the file does — in which case the stat() succeeds and behavior is identical). The divergence existed only at the tests' mock boundary. Fix: both tests now write a real archived sidecar JSON under a monkeypatched SESSION_DIR, exercising the actual production read path (strictly better coverage than mocking load_metadata_only). Also documented the SESSION_DIR-as-sole-source assumption on the cache function per Opus's forward-looking note. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| agent_health.py | ||
| agent_sessions.py | ||
| auth.py | ||
| background.py | ||
| background_process.py | ||
| clarify.py | ||
| commands.py | ||
| compression_anchor.py | ||
| config.py | ||
| dashboard_probe.py | ||
| extensions.py | ||
| gateway_chat.py | ||
| gateway_watcher.py | ||
| goals.py | ||
| helpers.py | ||
| kanban_bridge.py | ||
| metering.py | ||
| models.py | ||
| oauth.py | ||
| onboarding.py | ||
| passkeys.py | ||
| paths.py | ||
| plugin_providers.py | ||
| plugins.py | ||
| profiles.py | ||
| providers.py | ||
| request_diagnostics.py | ||
| rollback.py | ||
| route_approvals.py | ||
| routes.py | ||
| run_journal.py | ||
| runner_client.py | ||
| runtime_adapter.py | ||
| session_discoverability.py | ||
| session_events.py | ||
| session_lifecycle.py | ||
| session_ops.py | ||
| session_recovery.py | ||
| skill_usage.py | ||
| sse_chunked.py | ||
| startup.py | ||
| state_sync.py | ||
| streaming.py | ||
| system_health.py | ||
| terminal.py | ||
| todo_state.py | ||
| turn_journal.py | ||
| updates.py | ||
| upload.py | ||
| usage.py | ||
| webui_session_db.py | ||
| workspace.py | ||
| workspace_git.py | ||
| worktrees.py | ||