Execution: reclaim the directories of Ended Tickets after a retention

This commit is contained in:
2026-11-02 01:46:33 +08:00
parent b348d69beb
commit 3bee231da6
18 changed files with 326 additions and 18 deletions
+6
View File
@@ -112,6 +112,8 @@ export interface PanelServer {
failing: Extract<Problem, { kind: 'outgoing' }>['outgoing'][]
/** Sources whose poll loop the fixture reports as stopped, with how long ago their last round was. */
stalled: { id: string; title: Localized; ageMs: number; intervalMs: number }[]
/** What the execution root holds for Ended Tickets; the panel renders it as a readout. */
workspace: NonNullable<ApiResponse<'GET overview'>['workspace']>
}
export let server: PanelServer
@@ -204,6 +206,7 @@ const overviewView = (): ApiResponse<'GET overview'> => {
// The fixture panel renders the readout, so a poll round a few seconds old stands for a running Source.
liveness: { startedAt: '2026-09-22T00:00:00Z', uptimeMs: 3_600_000, lastPollAt: new Date(Date.now() - 4_000).toISOString(),
pollAgeMs: 4_000, polling: true },
workspace: server.workspace,
person: server.person, executor: { running: 2, queued: 0, maxWorkers: server.settings.executor.maxWorkers, idle: 1 },
flow: { received: 12, filtered: 2, triggers: 10, judged: 5, accepted: 1, evaluating: 0,
dropped: server.dropped.filter(item => item.dropped.at >= dayAgo()).length },
@@ -257,6 +260,9 @@ function initial(): PanelServer {
const defaults = { revision: 0, previousRevision: null, savedAt: '', source: 'defaults' }
return {
health: {}, down: false, pending: 0, opened: [], requests: [], misuse: [], queued: new Set(), dropped: [], failing: [], stalled: [],
// One ended Ticket outlived the retention, so the readout has something to report.
workspace: { root: '/srv/dsh-superagent/work', afterDays: 14, directories: 5, candidates: 1, bytes: 58 * 1024 * 1024,
lastScanAt: new Date(Date.now() - 600_000).toISOString(), unreadable: 0 },
setup: { machine: MACHINE, problem: null, feishuProblem: null,
accounts: { repository: 'acme/widgets', agent: 'agent-bot', feishu: { appId: 'cli_bot', brand: 'feishu', botId: 'ou_bot',
name: 'Widgets Bot' } } },