Skip to content

Release CS: stage-batch3 — 4-PR low-risk batch (v0.51.121) — state.db merge / display counts / compression marker / Windows launcher#2813

Merged
nesquena-hermes merged 5 commits into
masterfrom
release/stage-batch3
May 24, 2026
Merged

Release CS: stage-batch3 — 4-PR low-risk batch (v0.51.121) — state.db merge / display counts / compression marker / Windows launcher#2813
nesquena-hermes merged 5 commits into
masterfrom
release/stage-batch3

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release CS — v0.51.121 — stage-batch3 — 4-PR low-risk batch

Third batch from the May 24 sweep. Four contributor PRs that are mechanical, well-tested, and pre-cleared by Opus advisor:

PR Author LOC Surface Risk
#2788 @Carry00 +21/-12 api/models.py state.db reader low — additive profile= param + missing id column fix
#2797 @ai-ag2026 +78/-0 api/routes.py messaging-session branch low — aligns count to display-merged value
#2803 @simjak +49/-12 api/compression_anchor.py + streaming low — consolidates two predicates to the strict one
#2783 @Koraji95-coder +163/-1 start.ps1 (new) + README.md low — Windows-only, zero impact on Linux/Mac

Cherry-picks

ee672df4 fix: prevent state.db messages being silently dropped during sidecar merge (#2788)
cd029d80 fix: align messaging session display counts                                  (#2797)
35c55e12 fix(compression): ignore tool output for compaction cards                    (#2803)
49f340d9 feat(windows): native Windows community-guide link + start.ps1 launcher      (#2783)
10838ae8 Stamp CHANGELOG for v0.51.121

#2783 was squashed from 3 contributor commits (initial PR + Copilot review fixes + agent-dir validation). CHANGELOG entry merged into stamp commit.

Defensive fix folded into #2788

Test test_issue1436_context_indicator_load_path.py mocks Session.load() returning a MagicMock whose .profile attribute is also a MagicMock. The contributor's original if profile: was truthy on the mock and tried to resolve it through api/profiles._resolve_profile_home_for_name(), which rejects non-strings. Tightened the guard to isinstance(profile, str) and profile: — defensive against any caller that didn't read the docstring. Folded into the contributor's commit via git rebase --autosquash.

Pre-Opus gate

Check Result
Python ast.parse on all touched .py PASS
Merge-marker grep clean
CHANGELOG placeholder grep clean
Cross-stage surface overlap check clean (api/routes.py touched by #2788 + #2797 in different line ranges)
New regression tests (61 across 2 files) pass in isolation
Full pytest 6270 passed, 7 skipped, 0 failed (up 11 from 6259 baseline — matches the new tests added)

Opus advisor verdict

SHIP all four. Severity if held: none/low.

What's NOT in this batch

Carry00 and others added 5 commits May 24, 2026 03:55
…merge

Two bugs combined to cause historical messages to vanish from the WebUI
after a session was continued in a later conversation.

**Bug 1 — missing `id` in state.db SELECT (models.py)**
`get_state_db_session_messages()` did not include the `id` column in its
SELECT, so every row got a `("legacy", ...)` merge key instead of
`("message_id", ...)`.  The timestamp gate in
`merge_session_messages_append_only()` explicitly exempts `message_id`-keyed
rows from its "skip if older than newest sidecar message" rule, but
legacy-keyed rows are unconditionally dropped.  With a session that has any
new sidecar messages (max_sidecar_timestamp == today), all older state.db
rows were silently discarded.

Fix: include `id` when the column is present so rows get proper
`("message_id", ...)` keys and survive the timestamp filter.

**Bug 2 — always reads active profile's state.db, not the session's (models.py + routes.py)**
`get_state_db_session_messages()` always called `_active_state_db_path()`,
which returns the currently-active profile's database.  Sessions belonging to
a different profile (e.g. `jump`) were read from the wrong state.db, returning
either no rows or unrelated ones.

Fix: add an optional `profile` parameter; when supplied, resolve the path via
`_get_profile_home(profile)` with a fallback to the active path if the
profile-specific db does not exist.  The call-site in `routes.py` now reads
`session.profile` and passes it through.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…er (#1952)

PR #2783 by @Koraji95-coder — squashed from 3 commits (initial PR + Copilot review fixes + agent-dir validation). CHANGELOG entry merged into stamp commit.
…isk batch)

Cherry-picked PRs:
- #2788 (Carry00) — state.db merge: include id column + per-profile reads
- #2797 (ai-ag2026) — align messaging session display counts (raw->merged)
- #2803 (simjak) — compression marker strict predicate (no tool output)
- #2783 (Koraji95-coder) — native Windows start.ps1 + README community link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants