Skip to content

chore!: P1 heaviness wave — purge legacy migration (BREAKING) + dedup CI + defer manager split - #66

Merged
klpanagi merged 1 commit into
devfrom
chore/p1-heaviness
Sep 8, 2026
Merged

chore!: P1 heaviness wave — purge legacy migration (BREAKING) + dedup CI + defer manager split#66
klpanagi merged 1 commit into
devfrom
chore/p1-heaviness

Conversation

@klpanagi

@klpanagi klpanagi commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Consolidated P1 heaviness reduction wave (3 items). Replaces #65 with professional scope and verification. Targets dev (never master).

P1.1 — Remove legacy migration layer (BREAKING) ✅ Included

Removes permanent runtime shims retained since renames:

  • src/shared/migration/agent-category.ts (60 LOC, @deprecated)
  • src/shared/migration/agent-names.ts (79 LOC, 18 aliases Prometheus→oracle, Atlas→architect etc.)
  • src/shared/migration/hook-names.ts (38 LOC)
  • src/shared/migration/model-versions.ts (49 LOC)
  • src/shared/migration/config-migration.ts (178 LOC, orchestrator + _migrations Set)
  • src/shared/migration.ts barrel + tests/shared/migration.test.ts (1,271 LOC)

Call sites updated: src/plugin-config.ts, src/plugin-handlers/agent-config-handler.ts, src/shared/index.ts.

Breaking: configs using legacy keys (Morpheus, Atlas, Prometheus (Planner)…) or legacy hook names will no longer auto-migrate. Users on <2.6 must update to current names (see docs/configurations.md). Recommend bump to 3.0 on merge.

Diff: 11 files, +2 −1,690.

P1.3 — Dedup CI mock-heavy exclusion ✅ Already merged

Triplicated 30-file mock.module() isolation list (ci.yml / publish.yml / script/run-ci.sh grep -v -F) → single source script/mock-heavy-list.txt. PR #64 merged to dev (d285466) — included here by being on dev base. No extra changes in this PR.

P1.2 — Split background-agent/manager.ts (1,749 LOC hotspot) ⏸ Deferred

Analysis complete: single BackgroundManager class dominates src/features/background-agent (siblings concurrency 138, loop-detector 102, notification-builder 140 etc. are already extracted). Attempted blind extraction of 11 manager-*.ts stubs broke typecheck (missing imports, private field access). Full split requires Oracle domain plan (facade + 5 modules ≤200 LOC each: lifecycle / polling / queue / notifications / cleanup). Tracked separately — not in this PR to keep CI green.

Verification

  • grep -rn "migrateAgentNames\|AGENT_NAME_MAP\|HOOK_NAME_MAP" src/ → 0 hits (outside tests)
  • bun run typecheck → pass (tsc --noEmit)
  • bun test tests/shared/migration.test.ts → removed (no longer applicable); bun test tests/features/task-storage/* 45 pass (from prior P0 fix)
  • bash -n script/run-ci.sh + YAML lint pass (P1.3)
  • No .serena/ committed, no manager-*.ts stubs in this branch

Risk & Rollback

Low for P1.3 (already merged), medium for P1.1 (breaking but gated by version). Rollback: revert single commit a068447.

@klpanagi
klpanagi force-pushed the chore/p1-heaviness branch 2 times, most recently from 6906472 to 696d545 Compare September 8, 2026 16:45
P1 heaviness reduction — migration purge (P1.1 of 3).

Removes permanent runtime compatibility shims retained since renames
(Prometheus→oracle, Atlas→architect, Metis→seraph etc.):

- src/shared/migration/agent-category.ts (60 LOC, @deprecated)
- src/shared/migration/agent-names.ts (79 LOC, 18 aliases)
- src/shared/migration/hook-names.ts (38 LOC)
- src/shared/migration/model-versions.ts (49 LOC)
- src/shared/migration/config-migration.ts (178 LOC, orchestrator)
- src/shared/migration.ts barrel + tests/shared/migration.test.ts (1271 LOC)

Updates call sites: src/plugin-config.ts, src/plugin-handlers/agent-config-handler.ts,
src/shared/index.ts.

BREAKING: configs using legacy keys (e.g. "Morpheus", "Atlas",
"Prometheus (Planner)") or legacy hook names will no longer be auto-migrated.
Users on matrixx <2.6 must update to new names (see docs/configurations.md).
Bump to 3.0 on merge.

Verification: typecheck pass, 0 hits for migrateAgentNames/AGENT_NAME_MAP outside tests.

Includes P1.3 (PR #64) already merged to dev (mock-heavy dedup).
P1.2 background-agent/manager.ts split deferred — 1749 LOC hotspot analyzed,
requires Oracle domain plan; tracked separately.
@klpanagi
klpanagi merged commit 87e7244 into dev Sep 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant