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
17 changes: 17 additions & 0 deletions inc/Tasks/WorkspaceDiskEmergencyCleanupTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ public function getTaskType(): string {
return 'workspace_disk_emergency_cleanup';
}

/**
* Pure workspace/disk maintenance — runs without agent ownership context.
*
* This task cleans disk under pressure via the Workspace service (disk/file/
* git ops gated by PluginSettings). It never acts as an agent or invokes an
* agent-scoped ability; the only agent_id it touches is read from task params
* (defaulting to 0) to forward into child cleanup chunk jobs. It is registered
* as an agent-less hourly recurring schedule, so it must opt out of the
* SystemTask agent-context gate or TaskScheduler::schedule() rejects it before
* it runs.
*
* @return bool
*/
public function requiresAgentContext(): bool {
return false;
}

/**
* Task metadata for Data Machine system-task surfaces.
*
Expand Down
15 changes: 15 additions & 0 deletions inc/Tasks/WorkspaceHygieneReportTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ public function getTaskType(): string {
return 'workspace_hygiene_report';
}

/**
* Pure workspace/disk maintenance — runs without agent ownership context.
*
* This task produces a non-destructive disk/worktree hygiene report via the
* Workspace service. It never acts as an agent or invokes an agent-scoped
* ability. It is registered as an agent-less weekly recurring schedule, so it
* must opt out of the SystemTask agent-context gate or
* TaskScheduler::schedule() rejects it before it runs.
*
* @return bool
*/
public function requiresAgentContext(): bool {
return false;
}

/**
* Task metadata for Data Machine system-task surfaces.
*
Expand Down
17 changes: 17 additions & 0 deletions inc/Tasks/WorkspaceRetentionCleanupTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ public function getTaskType(): string {
return 'workspace_retention_cleanup';
}

/**
* Pure workspace/disk maintenance — runs without agent ownership context.
*
* This task applies age-gated worktree and reconstructable-artifact cleanup
* via the Workspace service (disk/file/git ops gated by PluginSettings). It
* never acts as an agent or invokes an agent-scoped ability; the only agent_id
* it touches is read from task params (defaulting to 0) to forward into child
* cleanup chunk jobs. It is registered as an agent-less daily recurring
* schedule, so it must opt out of the SystemTask agent-context gate or
* TaskScheduler::schedule() rejects it before it runs.
*
* @return bool
*/
public function requiresAgentContext(): bool {
return false;
}

/**
* Task metadata for Data Machine system-task surfaces.
*
Expand Down
17 changes: 17 additions & 0 deletions inc/Tasks/WorktreeCleanupChunkTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ public function getTaskType(): string {
return 'worktree_cleanup_chunk';
}

/**
* Pure workspace/disk maintenance — runs without agent ownership context.
*
* This task applies one reviewed cleanup chunk (artifact deletion or worktree
* removal) via the Workspace service. It is fanned out by the recurring
* workspace-maintenance parent tasks, which forward agent_id from their own
* params (0 under an agent-less recurring schedule). Without opting out, every
* child chunk scheduled by an agent-less parent would be rejected by the
* SystemTask agent-context gate in TaskScheduler::schedule(), so the actual
* destructive cleanup would never run even after the parents are fixed.
*
* @return bool
*/
public function requiresAgentContext(): bool {
return false;
}

/**
* Task metadata for Data Machine job surfaces.
*
Expand Down
15 changes: 15 additions & 0 deletions inc/Tasks/WorktreeCleanupTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ public function getTaskType(): string {
return 'worktree_cleanup';
}

/**
* Pure workspace/git maintenance — runs without agent ownership context.
*
* This task removes merged worktrees via the Workspace service (git/disk ops
* gated by PluginSettings). It never acts as an agent or invokes an
* agent-scoped ability. It is registered as an agent-less recurring schedule,
* so it must opt out of the SystemTask agent-context gate or
* TaskScheduler::schedule() rejects it before it runs.
*
* @return bool
*/
public function requiresAgentContext(): bool {
return false;
}

/**
* Task metadata for the Data Machine system surface.
*
Expand Down
Loading