Fix/misumi native thinking#5488
Conversation
…ading feat: load Misumi seed order in runtime prompts
fix: harden typed chat validation
fix: normalize chat stream payloads
feat(misumi): add household control plane
…ysseus-dev#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 odysseus-dev#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>
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>
|
The following required sections are missing or incomplete. Please update the PR description to address them:
This comment is deleted automatically once all sections are complete. |
|
Thanks for the work here. I am closing this version because its scope is not reviewable as a focused fix. The title describes a native-thinking fix, but the PR changes 97 files with more than 6,000 additions. It bundles an entire Misumi control plane, persona policies and skills, household and task routing, passive memory, host lifecycle scripts, APIs, evaluations, autonomy pilots, chat-stream changes, and several unrelated CI, TTS, MCP, and email fixes. The PR also conflicts with dev, has failing title and description checks, and provides no completed summary, linked issue, test plan, or explanation of the intended boundary. If a native-thinking bug still needs fixing, please open an issue with a concrete reproduction and bring back a fresh narrow PR based on current dev containing only that fix and its focused regression tests. Please do not reuse this bundled branch. |
Summary
Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Fixes #
Type of Change
Checklist
devdocker compose uporuvicorn 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.--red,--fg,--bg,--card,--border, etc.) — do not introduce new color values, font sizes, or spacing units.static/index.html) or plain text.Fira Code) for primary UI text. Don't override.Screenshots / clips