Skip to content

fix(config): add general agent, differentiate model tiers; feat(wave6): dead code cleanup - #884

Open
d-oit wants to merge 10 commits into
mainfrom
fix/delegation-config-and-wave6-cleanup
Open

fix(config): add general agent, differentiate model tiers; feat(wave6): dead code cleanup#884
d-oit wants to merge 10 commits into
mainfrom
fix/delegation-config-and-wave6-cleanup

Conversation

@d-oit

@d-oit d-oit commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Config fix: Add missing general agent for subagent delegation, upgrade standard model group to mimo-v2.5-pro for real tier differentiation, remove invalid agent type overrides
  • Wave 6 dead code cleanup: Remove unused exports/types across web/worker packages, resolve circular dependencies, extract core.ts API module and notes-types.ts, update knip baseline to zero

Changes

Config (.mimocode/mimocode.jsonc)

Change Why
Add general agent config Enables general subagent delegation (was missing, causing actor tool failures)
Add plan agent config Explicit plan agent model assignment
Upgrade standard group to mimo-v2.5-pro Differentiate from lite — was identical model, no tier benefit
Remove research, design, reviewer, vision overrides Not valid built-in subagent types; no custom agent .md files exist
Remove trailing commas Clean JSONC

Wave 6 Dead Code (31 files)

  • Remove unused exports and types across web/worker packages
  • Resolve 3 circular dependencies in API and auth modules
  • Extract core.ts API module and notes-types.ts
  • Update knip baseline: 0 unused exports, 0 unused types
  • Clean up auth middleware and edge-cache modules

Quality Gate Results

Check Status
Lint PASS
Typecheck PASS
Unit tests (coverage) PASS
Build PASS
Shell check PASS
Circular deps (madge) PASS — 0 found
Dead code (knip) PASS — 0 unused exports
E2E smoke (Chromium + Pixel) PASS — 18/18
E2E smoke (Firefox/WebKit) SKIP — browsers not installed (pre-existing, documented in KNOWN-ISSUES.md)
Impeccable design 4 findings (non-blocking warning)

Plans Analysis

All 28 SWARM gaps (G1-G28) are CLOSED. All waves 1-6 completed. No missing implementations blocking the project. Remaining items are accepted limitations:

  • i18n plural rules (ADR-199, deferred)
  • Email transport binding (needs Cloudflare SendEmail)
  • Telemetry persistence (console-only, accepted)

Test Plan

  1. Verify config parses: mimo models cline-pass shows both models
  2. Test delegation: spawn a general subagent via actor tool
  3. CI: all checks pass (lint, typecheck, test, build)
  4. Smoke tests: Chromium + Pixel pass (Firefox/WebKit skipped per KNOWN-ISSUES.md)

…ep cleanup

Config changes:
- Add general agent for subagent delegation
- Upgrade standard model group to mimo-v2.5-pro
- Remove invalid agent type overrides

Wave 6 dead code cleanup:
- Remove unused exports and types across web/worker packages
- Resolve circular dependencies in API and auth modules
- Extract core.ts API module and notes-types.ts
- Update knip baseline to zero unused exports
- Clean up auth middleware and edge-cache modules
@repowise-bot

repowise-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

✅ Health: 8.5 (unchanged)
🚨 Change risk: high, riskier than 79% of this repo's commits.

📋 At a glance
5 hotspots touched · 5 files with recent fix history · 10 dead-code findings. Scoped to apps.

📌 Before you merge

  • Run .../reader/ReaderPage.test.tsx, .../__tests__/Input.test.tsx, .../__tests__/Modal.test.tsx, .../__tests__/Tooltip.test.tsx (+20 more): they import the changed files

🎯 Blast radius (symbols whose signature this PR changed, and who calls them)

  • apiRequest in .../api/index.ts removed. Called by 13 symbols outside this PR: .../__tests__/api.test.ts::__module__, .../admin/AdminRecoverPage.tsx::AdminRecoverPage, .../admin/BooksPage.tsx::AdminBookResponsesPage (+10 more)
  • getApiUrl in .../api/index.ts removed. Called by 1 symbol outside this PR: .../__tests__/api.test.ts::__module__
🔎 More signals (3)

🗺️ Change map

flowchart LR
  subgraph PR ["Changed in this PR (2 modules)"]
    m_apps_web["apps/web (12 files)"]:::changed
    m_apps_worker["apps/worker (6 files)"]:::changed
  end
  classDef changed fill:#dbeafe,stroke:#1d4ed8,color:#1e3a5f
  classDef warn fill:#fef3c7,stroke:#b45309,color:#78350f
  classDef guard fill:#dcfce7,stroke:#15803d,color:#14532d
Loading

Solid arrows: code that imports the changed files (61 direct dependents, from the last indexed snapshot). Dashed: history/tests.

🔥 Hotspots touched (5)

  • .../audit/index.ts: 5 commits/90d, 12 dependents
  • .../auth/middleware.ts: 4 commits/90d, 18 dependents
  • .../src/main.tsx: 15 commits/90d, 9 dependents
2 more
  • .../api/annotations.ts: 1 commits/90d, 5 dependents
  • .../api/index.ts: 3 commits/90d, 42 dependents

💀 Dead code (10 findings)

  • 💀 .../audit/index.ts MAX_SANITIZE_DEPTH (confidence 0.65)
  • 💀 .../audit/index.ts FORBIDDEN_KEYS (confidence 0.65)
  • 💀 .../audit/index.ts SENSITIVE_KEYS (confidence 0.65)
7 more
  • 💀 .../api/index.ts DEFAULT_TIMEOUT_MS (confidence 0.65)
  • 💀 .../api/index.ts MAX_RETRIES (confidence 0.65)
  • 💀 .../api/index.ts INITIAL_BACKOFF_MS (confidence 0.65)
  • 💀 .../auth/admin-middleware.ts ADMIN_SESSION_TOKEN_BYTES (confidence 0.65)
  • 💀 .../auth/admin-middleware.ts ADMIN_SESSION_TTL_HOURS (confidence 0.65)
  • 💀 .../hooks/useExportNotes.ts highlightToExported (confidence 0.65)
  • 💀 .../hooks/useExportNotes.ts commentToExported (confidence 0.65)

📊 See the full report for this PR
Your repo map with this PR's blast radius lit up, every caller of the contracts it changes, and health before and after. No sign-in. · ⭐ Star Repowise · 📥 Install bot · Silence on a single PR with [skip repowise] in the title · Per-repo toggle on repowise.dev/settings?tab=bot · Updated 2026-07-31 18:25 UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying do-epub-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 806186a
Status: ✅  Deploy successful!
Preview URL: https://b466032d.do-epub-studio.pages.dev
Branch Preview URL: https://fix-delegation-config-and-wa.do-epub-studio.pages.dev

View logs

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🚀 Performance Report

⚡ Startup & Interaction

Metric Value (ms) Limit (ms) Trend Status
First Contentful Paint 228.00 1500 -
Chapter Switch Latency 0.00 300 -
Offline Rehydrate Time 215.80 800 -
DOM Interactive 25.90 - - -
Load Event End 154.90 - - -

🛠️ CI & Workflow

Metric Value Limit Status
Total CI Duration 12.62 min 15.00 min
Pnpm Cache Hit Hit -

@codacy-production

codacy-production Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 16 complexity · -9 duplication

Metric Results
Complexity 16
Duplication -9

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@d-oit

d-oit commented Jul 31, 2026

Copy link
Copy Markdown
Owner Author

PR Review / Roast — #884

Summary

Config fix (delegation support + model tier differentiation) + Wave 6 dead code cleanup (31 files, -667/+359 lines). Clean, well-scoped, and well-documented.

What's Good

  • Circular dependency resolution: All 3 cycles cleanly broken by extracting shared modules (core.ts, notes-types.ts)
  • Dead code cleanup: Knip baseline from 46 unused exports → 0. Every removal is deliberate.
  • Dynamic baseline: dead-code-check.sh now reads from JSON instead of hardcoded constant — nice improvement
  • Plan documentation: GOAP 206 is thorough — tables, phases, results, acceptance criteria all present
  • Config fix: general agent added, model tiers differentiated, trailing commas cleaned

Issues Found

# Severity File Issue
1 Medium apps/web/src/features/reader/hooks/useExportNotes.ts Re-exports NOTES_FORMAT_VERSION, NOTES_MIME_TYPE, NotesExport for "backward compatibility". But this is dead code cleanup — update the importers to use notes-types.ts directly instead of maintaining shim re-exports.
2 Low apps/web/src/App.tsx Added comment // App is exported as a named export (no default) to avoid a duplicate export knip warning. The knip warning is resolved by removing the default export — the comment explains the fix but reads as self-documenting for a one-line change.
3 Low apps/web/src/components/navigation/shared.tsx Left an extra blank line where NavItemKey type was removed.
4 Low apps/worker/src/auth/middleware.ts Extra blank line at end of file after generateToken removal.
5 Low apps/worker/src/lib/edge-cache.ts Two consecutive blank lines where CacheLookup interface was removed.
6 Info .mimocode/mimocode.jsonc standard and ultra now both map to mimo-v2.5-pro — same model, no tier differentiation. Either differentiate or merge to one group.
7 Info plans/206-*.md Good GOAP doc. Minor: test results section could link to CI run for verifiability.

CI Status (latest run)

  • Passing: Lighthouse, bundle budget, markdown validation, Cloudflare Pages, path detection, Typecheck, CodeQL, dependency scan, Worker build
  • Pending: Codacy (was fixed for MD058), Unit tests, Lint, Analyze
  • Skipping: Cross-browser E2E (Firefox/WebKit not installed — pre-existing)

Verdict

Approve with minor nits. The re-export shim (#1) is the only substantive concern — it defeats the purpose of dead code cleanup by maintaining unused backward-compat paths. Everything else is cosmetic.

The config change is clean: general agent now exists for delegation, lite uses deepseek-v4-flash (cheap/fast), standard uses mimo-v2.5 (capable). The ultra group being identical to standard is a minor config smell but won't cause issues.

@d-oit
d-oit force-pushed the fix/delegation-config-and-wave6-cleanup branch from aa15c04 to bef40e6 Compare July 31, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant