Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions services/gastown/container/src/completion-reporter.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* Reports agent completion/failure back to the Rig DO via the Gastown
* worker API. This closes the bead and unhooks the agent, preventing
* the infinite retry loop where witnessPatrol resets the agent to idle
* and schedulePendingWork re-dispatches it.
* Reports agent completion/failure back to the Gastown worker API.
* This closes the bead and unhooks the agent so the reconciler does not
* re-dispatch it.
*/

import type { ManagedAgent } from './types';
Expand Down
8 changes: 4 additions & 4 deletions services/gastown/container/src/control-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,9 @@ app.post('/repos/setup', async c => {

// POST /git/merge
// Deterministic merge of a polecat branch into the target branch.
// Called by the Rig DO's processReviewQueue → startMergeInContainer.
// Runs the merge synchronously and reports the result back to the Rig DO
// via a callback to the completeReview endpoint.
// Called by the TownDO's startMergeInContainer.
// Runs the merge synchronously and reports the result back via a callback
// to the completeReview endpoint.
app.post('/git/merge', async c => {
const body: unknown = await c.req.json().catch(() => null);
const parsed = MergeRequest.safeParse(body);
Expand Down Expand Up @@ -539,7 +539,7 @@ app.post('/git/merge', async c => {
}
};

// Fire and forget — the Rig DO will time out stuck entries via recoverStuckReviews
// Fire and forget — the TownDO will time out stuck entries via its alarm loop
doMerge().catch(err => {
console.error(`Merge failed for entry ${req.entryId}:`, err);
});
Expand Down
2 changes: 0 additions & 2 deletions services/gastown/src/dos/town/patrol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const LOG = '[patrol]';

// ── Thresholds ──────────────────────────────────────────────────────

/** First GUPP warning (existing behavior) */
export const GUPP_WARN_MS = 30 * 60_000; // 30 min
/** Escalate to mayor after second threshold */
export const GUPP_ESCALATE_MS = 60 * 60_000; // 1h
/** Force-stop agent after third threshold */
Expand Down