Skip to content

Test coverage: mailbox owner-resolution wiring (escalateHeldToOwner) and cleanupBuilder() held-row dismissal #1477

Description

@mohidmakhdoomi

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:

  1. 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.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/towerArea: Tower server / agent farm CLI

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions