HERMES-GIELIE/api
nesquena-hermes b149a975c6 fix(#4842): update #4385 archive tests to real sidecar files + document stat-gate assumption
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.
2026-06-25 04:56:00 +00:00
..
__init__.py
agent_health.py
agent_sessions.py
auth.py
background.py
background_process.py
clarify.py stage #4524: clarify 409-terminal (id-guarded, loading-cleared) + SSE-notify on expiry (#4504) + v0.51.534 CHANGELOG 2026-06-20 05:36:56 +00:00
commands.py
compression_anchor.py
config.py fix(#4728): clear stale custom:* base_url + default wins without loaded session (gate findings) 2026-06-24 20:17:29 +00:00
dashboard_probe.py
extensions.py Remove unused Request import (ruff F401) 2026-06-25 04:21:50 +00:00
gateway_chat.py fix(#4550): harden gateway reasoning forwarding follow-up 2026-06-20 18:44:25 +00:00
gateway_watcher.py
goals.py
helpers.py Release v0.51.564 — loopback sidecar diagnostics (#4612) (#4632) 2026-06-21 13:07:32 -07:00
kanban_bridge.py rebase(#2814): resolve i18n onto current master + add kanban_view_* keys to all 13 locales 2026-06-23 23:40:45 +00:00
metering.py
models.py fix(#4842): update #4385 archive tests to real sidecar files + document stat-gate assumption 2026-06-25 04:56:00 +00:00
oauth.py
onboarding.py
passkeys.py
paths.py
plugin_providers.py
plugins.py
profiles.py fix(#4783): prune dependency trees in mtime probe to match compute path (gate finding 4) 2026-06-24 21:27:22 +00:00
providers.py fix(#3961): complete credential scrub with non-registry agent creds (CUSTOM_API_KEY, AWS/Bedrock) 2026-06-22 19:19:56 +00:00
request_diagnostics.py
rollback.py
route_approvals.py
routes.py feat(extensions): add gallery browse, install, and uninstall (#4746) 2026-06-25 04:21:50 +00:00
run_journal.py
runner_client.py
runtime_adapter.py
session_discoverability.py
session_events.py
session_lifecycle.py
session_ops.py fix(#4767): review fixes - more edge cases 2026-06-24 18:08:50 +00:00
session_recovery.py
skill_usage.py
sse_chunked.py
startup.py
state_sync.py
streaming.py Update api/streaming.py 2026-06-24 18:08:50 +00:00
system_health.py
terminal.py
todo_state.py
turn_journal.py
updates.py harden(#4694): broaden query-secret redaction before surfacing fetch diagnostics (gate finding) 2026-06-24 19:29:06 +00:00
upload.py
usage.py
webui_session_db.py fix(#4767): review fixes - more edge cases 2026-06-24 18:08:50 +00:00
workspace.py Prevent stale escape errors from collapsing live browse grants 2026-06-23 02:53:12 -04:00
workspace_git.py
worktrees.py