Skip to content

Revert #36, log multi-part xAI messages, bring in SQLite tweaks - #37

Merged
robdevops merged 17 commits into
mainfrom
claude/compassionate-heisenberg-pz23nq
Oct 18, 2026
Merged

robdevops merged 17 commits into
mainfrom
claude/compassionate-heisenberg-pz23nq

Conversation

@robdevops

Copy link
Copy Markdown
Owner

Why

#36 (session words, news prompt, forced search for "at close"-style chat questions) was built on a wrong diagnosis. The bad replies it targeted ("(no tool calls needed)", a draft glued to the final answer) came from a build older than main: claude/next still joins every xAI message (resp.output_text), which #34 already fixed on main. Nothing shows a problem in current main, so this undoes #36.

What

  • Reverts the Force a news search for trading-session questions #36 changes: SESSION_WORDS/is_session_question in lib/llm/gate.py, the session flag in lib/prompts.py and lib/telegram/handlers.py, the forced must_search, and their tests. The tree matches main from before Force a news search for trading-session questions #36.
  • lib/llm/xai.py: adds one log line, xAI message had N text parts (...), when a message has several non-empty text parts. Behaviour is unchanged (parts are still joined); the line only tells us whether that case happens. Test included.
  • Brings in 281c13f from claude/next: SQLite synchronous=NORMAL under WAL and period_cache WITHOUT ROWID (lib/store.py, tools/period_cache_without_rowid.py, tests, CLAUDE.md). claude/next itself is untouched.

Testing

make check on Python 3.13.5: ruff clean, 292 tests pass. Not run against a live model.


Generated by Claude Code

claude added 17 commits October 12, 2026 02:32
New databases get the compact table; tools/period_cache_without_rowid.py converts an existing one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…evops fork

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…eplies

"at close" matched no gate keyword, so the model got the no-tools prompt and
answered from the transcript, opening with "(no tool calls needed)".

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
…heisenberg-pz23nq

# Conflicts:
#	lib/telegram/handlers.py
…ssages

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014k4kywyN5dAo39izUPvxbw
@robdevops
robdevops merged commit 59d45dc into main Oct 18, 2026
1 check passed
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.

2 participants