Skip to content

test(sessions): scope the held-store gate's no-alternate-store check to gated actions - #117829

Closed
teknium1 wants to merge 1 commit into
mainfrom
fix/b466-held-store-gate-db-scope
Closed

teknium1 wants to merge 1 commit into
mainfrom
fix/b466-held-store-gate-db-scope

Conversation

@teknium1

Copy link
Copy Markdown
Collaborator

main is red: #117687 and #117684 are each green alone and conflict on landing.

Failing on main: tests/hermes_cli/test_sessions_held_store_gate.py::test_store_rewrites_refuse_and_name_the_holder_until_forced[optimize|optimize-storage|prune] (AssertionError: assert not ['--db']).

set-journal-mode is not gated by cmd_sessions; it runs its own holder scan (foreign_state_db_holders) against the path it is handed, so the invariant is intact for the gated actions. This scopes the assertion to _HELD_STORE_ACTIONS rather than deleting it.

Verified: red on current main (3 failed, 1 passed), green with this change; test_sessions_held_store_gate.py, test_sessions_set_journal_mode.py, test_sessions_delete.py all green together.

Part of #110054

…to gated actions

#117687 asserted that no `hermes sessions` subcommand exposes `--db`, which is what makes
`_default_db_path()` provably the store the gated command opened. #117684 then added
`hermes sessions set-journal-mode --db PATH`. Both are green alone and red together: main
fails test_store_rewrites_refuse_and_name_the_holder_until_forced[optimize|optimize-storage|prune].

set-journal-mode is not gated by cmd_sessions — it runs its own holder scan against the path it
is handed — so the invariant still holds for every action in _HELD_STORE_ACTIONS. Scope the
assertion there instead of dropping it.

Part of #110054
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

૮ >ﻌ< ა ci review

ran on 357b924 — test(sessions): scope the held-store gate's no-alternate-sto

debug info

CI timings

CI timings · View report · View job

Wall time 5m47s vs 6m20s (-8.7%). 5 job(s) slower, 7 faster,

  • Profile artifact check / Reject profile archives: +47.0s
  • All required checks pass: +37.0s
  • OS-specific tests / Windows-only tests: +14.0s
  • Python tests / e2e: -8.0s
  • Python lints / Windows footguns (blocking): -8.0s

@teknium1

Copy link
Copy Markdown
Collaborator Author

Superseded: main already carries the equivalent scoping (tests/hermes_cli/test_sessions_held_store_gate.py now restricts the no-alternate-store assertion to _HELD_STORE_ACTIONS). Closing as redundant.

@teknium1 teknium1 closed this Sep 21, 2026
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants