fix: repair web interface + restore model tiering + add CI - #2
Merged
Conversation
The platform-structure refactor (ed8fdbd) left the project half-migrated: the web app was moved to apps/monarch-web/ (a non-importable hyphenated path) while main.py and the test suite still imported interfaces.web.app; the Claude-call test seam bypassed the _call_claude wrapper, the API client was renamed, per-agent model routing collapsed to Sonnet-only, and HUB_READ_ONLY defaulted to true under the write-path tests. Suite was 71 passed/28 failed/50 errors. - Move the web app back to interfaces/web/ (its canonical in-process home next to cli.py and telegram_bot.py); drop the stale .gitignore legacy entry. - Restore per-agent model tiering: Opus for heavy reasoning (discovery, architecture, planning, devils-advocate, implementer, reviewer, security), Sonnet for prioritization/testing/deploy, Haiku for documentation/observability. - Route run() through the _call_claude wrapper so tests can stub the LLM call. - Record task history under the agent name (not display label), matching the orchestrator convention and the tests. - Set HUB_READ_ONLY=false in the test env; fix stale _client and path references. - Update the project-detail test for the execution/implementation summaries. - Apply ruff safe autofixes repo-wide and tune lint config. Test suite: 149 passed, 0 failed. ruff: all checks passed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Runs ruff lint and the core pytest suite on push/PR to main (Python 3.12). mypy strict is not yet wired in (118 pre-existing annotation gaps in the web layer and main.py) and is left for a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The file was still under a .gitignore entry when ruff --fix first ran, so its issues were missed locally and surfaced in CI: remove unused StaticFiles and TaskStatus imports, hoist 'import os' to the top import block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ewertonslv
added a commit
that referenced
this pull request
Jun 9, 2026
fix: repair web interface + restore model tiering + add CI
Ewertonslv
added a commit
that referenced
this pull request
Jun 11, 2026
fix: repair web interface + restore model tiering + add CI
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.
Problem
The platform-structure refactor (
ed8fdbd) left Monarch-IA half-migrated. On a clean checkout the test suite was 71 passed / 28 failed / 50 errors andpython main.pycrashed on startup:apps/monarch-web/— a hyphenated, non-importable path — whilemain.pyandtest_web_app.pystill importedinterfaces.web.app→ 50 import errors + broken entry point.BaseAgent.run()called_call_claude_apidirectly, bypassing the_call_claudewrapper the tests stub → tests hit the real API (401).self.label(persona display name) instead ofself.name.HUB_READ_ONLYnow defaults totrue, blocking the write-path web tests (403).agents.base._client→_api_client).Fix
interfaces/web/— its canonical in-process home next tocli.pyandtelegram_bot.py(it's an interface, not a standalone service;main.pyruns it in-process). Drop the stale.gitignorelegacy entry.run()through_call_claudeso the LLM call is stubbable.HUB_READ_ONLY=falsein the test env; fix the stale_clientpatch and the project-detail summary test.ruff+pytest, Python 3.12).Result
ruff check .→ all checks passed.python main.pyimports resolve again.mypy strict is not yet wired in (118 pre-existing annotation gaps, mostly missing return types in the web layer +
main.py) — left for a follow-up.🤖 Generated with Claude Code