Skip to content

Fix/misumi native thinking#5488

Open
tyecam1 wants to merge 47 commits into
odysseus-dev:devfrom
tyecam1:fix/misumi-native-thinking
Open

Fix/misumi native thinking#5488
tyecam1 wants to merge 47 commits into
odysseus-dev:devfrom
tyecam1:fix/misumi-native-thinking

Conversation

@tyecam1

@tyecam1 tyecam1 commented Jul 12, 2026

Copy link
Copy Markdown

Summary

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

How to Test

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js/ module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change affects mobile.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. If you are, please open an issue describing the problem first — bulk auto-generated PRs that don't match the project's visual style are closed on sight, even when the underlying fix is correct.

Screenshots / clips

tyecam1 and others added 30 commits July 6, 2026 00:47
…ading

feat: load Misumi seed order in runtime prompts
feat(misumi): add household control plane
…wdiepie-archdaemon#5107)

_load() returned whatever json.loads() produced without checking it was a
dict; _update() did the same before assigning data[key] = value. If the
oauth_tokens column ever held a JSON array or primitive (DB corruption,
manual edit, migration drift), _load()'s callers crashed with
AttributeError on .get(), and _update() crashed with TypeError trying to
item-assign into a list/string/int.

Validate the parsed value is a dict in both methods, falling back to {}
otherwise - same recovery behavior already used elsewhere in the codebase
for this exact JSON-blob-is-not-a-dict shape (_parse_tool_args,
_is_sensitive_path's siblings).

Adds 3 regression tests for _load, get_tokens, and _update against a
non-dict oauth_tokens value.

Fixes pewdiepie-archdaemon#5082
…s-dev#5110)

_scheduled_poll_once selected rows WHERE status='pending' and only wrote
status='sent'/'failed' after the SMTP send and IMAP append completed -
no atomic claim in between. Two overlapping callers (the in-process 30s
poller and an externally cron/systemd-driven 'odysseus-mail
poll-scheduled', or the CLI run manually) can both SELECT the same
pending row before either UPDATEs it, and both send it. _start_poller's
own docstring already names this exact risk ('avoid two copies of
_scheduled_poll_once racing on the same SQLite') but nothing in the code
enforced it - it was advisory only.

Add an atomic per-row claim: UPDATE ... SET status='sending' WHERE
id=? AND status='pending', proceeding only when rowcount == 1. The
loser of the race sees rowcount == 0 and skips the row instead of
sending a duplicate.

Adds a regression test that drives two real threads through the real
_scheduled_poll_once against a shared SQLite file, synchronized with a
barrier and a widened send-path window, and asserts exactly one send
fires. Reverting the fix makes the test fail reliably (5/5 runs); with
the fix it passes reliably (5/5 runs).

Fixes odysseus-dev#5109
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tyecam1 and others added 17 commits July 11, 2026 19:54
feat(misumi): complete Phase A passive memory
fix(misumi): accept interface string context
fix(misumi): route interface context as prompt
fix(misumi): require relevant general retrieval hits
fix(misumi): ignore common retrieval stopwords
llm_call_async gains allow_reasoning_fallback opt-out (default unchanged); Misumi path: 480-token budget, distinct reasoning-only failure, exception logging. 27 tests pass locally (14 misumi + 13 llm_core regressions).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Seed context gains registry v0.2 + routing contract; new persona_capabilities loads config/personas.yaml (mtime-cached, never raises) and appends a compact capability block per persona incl. panels and the passive-memory line. 19 tests pass locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(misumi): surface real model errors and handle reasoning-only replies
feat(misumi): inject persona capabilities into the reply context
Aoteru plan requests consult <=2 personas (named-in-reply + intent ranked, registry consult edges), labelled contributions appended; plan captured as memory capsule with linked handoff packets. MISUMI_CONSULT kill-switch; additive response fields (consulted, capsule_id, handoff_ids); no autonomy, no household writes. 40 tests pass locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(misumi): bounded within-request persona consultation
Native Ollama (/api) replies for callers that disable reasoning fallback
now send think:false and never surface message.thinking as content, so
qwen3 stops returning empty content that degraded to "no working model
backend". Both the primary reply and within-request persona consultation
go through this path.

Restore routes.* warning propagation to the root logging sink (was
swallowed after basicConfig), and add an admin-only model_resolution
block to /misumi/status (sanitized url, model, source, env-fallback
presence, last cached model error) to diagnose endpoint selection.

Co-Authored-By: GPT-5.6 Sol <noreply@openai.com>
@github-actions

Copy link
Copy Markdown

⚠️ PR description — action needed

The following required sections are missing or incomplete. Please update the PR description to address them:

  • Summary is empty or too short — describe what changed and why.
  • Linked Issue — add a reference like Fixes #NNN, a bare #NNN, or a link to the issue.
  • Type of Change — check at least one box.
  • Checklist — check the duplicate-search box to confirm you searched existing issues and PRs.
  • How to Test — explain how a reviewer can verify this change. Numbered steps, the commands you ran, or a short code block all work — give a sentence or two of real detail (not just "tested locally").

This comment is deleted automatically once all sections are complete.

@github-actions github-actions Bot added merge conflict Conflicts with the base branch; needs a rebase before review. needs work PR description incomplete — please update before review labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Conflicts with the base branch; needs a rebase before review. needs work PR description incomplete — please update before review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants