Fix/misumi native thinking#5488
Open
tyecam1 wants to merge 47 commits into
Open
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
…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>
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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