Skip to content

chore(gastown): Delete dead patrol/scheduling/review-queue code #1403

@jrf0110

Description

@jrf0110

Summary

The reconciler replaced all patrol, scheduling, and review-queue alarm functions in Phases 3-4. The old code is still present (~2500 lines) with DEAD CODE comments but is never called from the alarm loop. Delete it to reduce confusion and binary size.

Files to clean up

  • src/dos/town/patrol.ts (~789 lines) — Keep: createTriageRequest, countPendingTriageRequests, listPendingTriageRequests, TRIAGE_LABEL_LIKE, TRIAGE_REQUEST_LABEL, TRIAGE_BATCH_LABEL, GUPP/GC constants. Delete: detectStaleHooks, feedStrandedConvoys, rehookOrphanedBeads, detectCrashLoops, detectOrphanedWork, agentGC, checkTimerGates, detectGUPPViolations.
  • src/dos/town/scheduling.ts (~374 lines) — Keep: hasActiveWork, dispatchAgent, dispatchUnblockedBeads, constants. Delete: schedulePendingWork and sub-functions.
  • src/dos/town/review-queue.ts (~1191 lines) — Keep: submitToReviewQueue, setReviewPrUrl, markReviewInReview, completeReviewWithResult, agentDone, agentCompleted, listPendingPRReviews, molecule functions. Delete: recoverStuckReviews, closeOrphanedReviewBeads, recoverOrphanedSourceBeads, popReviewQueue.
  • src/dos/Town.do.ts — Delete: witnessPatrol(), deaconPatrol(), processReviewQueue(), processConvoyLandings(), failReviewWithRework(), pollPendingPRs().

Acceptance Criteria

  • All dead functions removed
  • No references to removed functions remain
  • Shared constants and triage functions extracted to a clean module if needed
  • All tests pass
  • TypeScript compiles clean

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Should fix before soft launchgt:coreReconciler, state machine, bead lifecycle, convoy flowkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions