Orchestrata Ultimate › Plans › evidence › d3-duplicate-twins

D3 Evidence Pack — Port-Residue Duplicate Twins (verdict per pair)

Source: plans/evidence/d3-duplicate-twins.md at 8a2cb42ad · last changed 2026-07-27 · first committed 2026-07-05 · 70 lines.

Prose pending.

Plan text

D3 Evidence Pack — Port-Residue Duplicate Twins (verdict per pair)

Source: auditor agent W3.E3 (2026-07-06). Decision: plan §D, D3. Blocks W3.3. Agent-declared not-verified: GovernanceEngine test assertions unread; LRUCache TTL/eviction semantics undiffed; dead architect-mixin tests' assertions not diffed against live tests. Chase during execution.

Verdicts

a. THREE routers — NEEDS-DECISION (plan's "rename kernel class" framing was wrong):

b. postman/types.py vs postman_types.py — MECHANICAL: types.py has 19 importers; postman_types.py 0 importers + a dedicated coverage test on dead code. Recipe: rm postman_types.py + tests/postman/test_postman_types_coverage.py.

c. kernel/error_handler.py vs core/patterns/error_handling.py — MECHANICAL (+trace-merge): byte-identical logic, both 0 importers; only @traces differ (SPEC-001/007 vs SPEC-100). Keep core/patterns; UNION kernel's @traces reqs onto survivor (protect RTM); delete kernel copy + its test; 4-5 test files duplicate- cover this dead code.

d. LRUCache ×2 — NEEDS-DECISION: core/lru_cache.py (1 consumer: governance/cache.py:21) vs kernel/performance/resources.py (package-local, Generic[T], richer). BOTH LIVE. ASK: promote kernel's to core/ + repoint, or accept two subsystem-local caches? Diff TTL/eviction semantics first.

e. Architect mixins — MECHANICAL: live = project_mixin.py + volk_context.py (imported by architect/volk.py:10,13). Dead = architect_context.py, context_mixin.py, architect_project.py (identical method sets, orphaned) + 5 dead test files. Diff assertions into live tests before deleting.

f. Flat analyst mixins — MECHANICAL: analyst_storage.py AnalystStorageMixin dead (backlog #35) AND analyst_parsing.py AnalystParsingMixin ALSO dead (NEW — widens #35). analyst/agent.py is the live path (kernel/pipeline.py:14, :155) and reimplements the logic independently (kg_store vs _kg_store divergence noted).

g. THREE policy stacks — NEEDS-DECISION (highest impact):

h. senior_dev.py — MECHANICAL (packaging safe): LIVE via importlib dynamic dispatch (harness/executor.py:142 special_cases + import_module + getattr) — invisible to static refs. Recipe: move to agents/volks/senior_dev/agent.py + init re-export (mirror analyst); loader unchanged.

Sequenced W3.3 execution (mechanical, in order; 1 refactorer task each)

  1. b (postman_types) 2. f (analyst mixins ×2) 3. e (architect mixins ×3 + 5 tests)
  2. h (package senior_dev) 5. c (ErrorHandler + traces-union). Each with refs->expected + targeted pytest verify.

Decision-gated (Mohamed, priority order)

  1. g PolicyEvaluator wire-vs-delete + GovernanceEngine keep-vs-delete
  2. a kernel.router + postman.router wire-vs-delete (2 sub-decisions)
  3. d LRUCache consolidate-vs-accept (semantics diff first)