What
Two pieces of the Spec 1313 maintainer round (starvation-alarm + cleanup) are verified today by inspection and reuse of already-tested resolvers, but have no dedicated test. Add direct coverage for both:
- Owner-resolution wiring (
escalateHeldToOwner). Exercise the live resolution path — architect-skip (never notify an architect about held mail), the spawning-architect → main → first-registered fallback, and the supersede-keyed enqueue (one coalesced notice, no notice-about-notice) — via the exported makeDeliveryPorts seam against a seeded global.db registry. cleanupBuilder() held-row dismissal. Assert that afx cleanup transitions a removed agent's held rows to dismissed (via dismissHeldForAgent) so they stop pinning heldCount / escalated state forever.
Why
These are the two glue points where the round-3 primitives meet the live system, and they're exactly the parts a refactor could silently break without a test noticing — the resolvers underneath (resolveAgentInRegistry) and the drainer→port contract are already covered, but the wiring that invokes them from the escalation drainer and from cleanupBuilder is not. The maintainer flagged this as an optional fast-follow (optional-2) rather than a merge blocker.
Notes
What
Two pieces of the Spec 1313 maintainer round (starvation-alarm + cleanup) are verified today by inspection and reuse of already-tested resolvers, but have no dedicated test. Add direct coverage for both:
escalateHeldToOwner). Exercise the live resolution path — architect-skip (never notify an architect about held mail), the spawning-architect →main→ first-registered fallback, and the supersede-keyed enqueue (one coalesced notice, no notice-about-notice) — via the exportedmakeDeliveryPortsseam against a seeded global.db registry.cleanupBuilder()held-row dismissal. Assert thatafx cleanuptransitions a removed agent's held rows todismissed(viadismissHeldForAgent) so they stop pinningheldCount/ escalated state forever.Why
These are the two glue points where the round-3 primitives meet the live system, and they're exactly the parts a refactor could silently break without a test noticing — the resolvers underneath (
resolveAgentInRegistry) and the drainer→port contract are already covered, but the wiring that invokes them from the escalation drainer and fromcleanupBuilderis not. The maintainer flagged this as an optional fast-follow (optional-2) rather than a merge blocker.Notes
resolveAgentInRegistryand the round-3 drainer→port contract are tested; this covers the invocation/wiring layer on top.codev/reviews/1313-afx-send-mailbox-first-delivery.md(maintainer optional-2).