generated from coulomb/repo-seed
STATE-WP-0064 cutover (state-hub only): - Retire local custodian-sync.timer; archive units under infra/systemd/archived/ - Mark workplan finished; update infra/README, cron-migration, runbook, AGENTS.md - Point activity-core-delegation at the consistency-sweep runbook Consistency engine — automation error vs assessment failure: - C-00 is an automation error; C-01..C-23 assessment failures are recorded for follow-up but no longer fail --remote --all scheduled sweeps (exit 0) - Skip workplans/README.md in the workplan glob (human index, not a workplan) - Progress events and compare script expose automation_error and assessment_failures separately from exit_code
49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
from __future__ import annotations
|
|
|
|
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class ConsistencySweepIssueSummary(BaseModel):
|
|
fail: int = 0
|
|
automation_error: int = 0
|
|
warn: int = 0
|
|
info: int = 0
|
|
|
|
|
|
class ConsistencySweepRepoResult(BaseModel):
|
|
repo_slug: str
|
|
repo_path: str
|
|
result: str
|
|
summary: ConsistencySweepIssueSummary
|
|
fixes_applied: list[str] = Field(default_factory=list)
|
|
|
|
|
|
class ConsistencySweepRemoteAllGenerate(BaseModel):
|
|
max_seconds: int = Field(
|
|
default=300,
|
|
ge=0,
|
|
le=3600,
|
|
description="Wall-clock budget for the remote-all sweep (0 disables)",
|
|
)
|
|
source: str = Field(
|
|
default="api",
|
|
description="Runner label stored on progress events (local-timer, activity-core, api)",
|
|
)
|
|
|
|
|
|
class ConsistencySweepRemoteAllRun(BaseModel):
|
|
started_at: datetime
|
|
completed_at: datetime
|
|
max_seconds: int
|
|
source: str
|
|
exit_code: int
|
|
automation_error: bool = False
|
|
lock_skipped: bool
|
|
repos_processed: list[ConsistencySweepRepoResult] = Field(default_factory=list)
|
|
skipped_clean: list[str] = Field(default_factory=list)
|
|
skipped_missing: list[str] = Field(default_factory=list)
|
|
skipped_budget: list[str] = Field(default_factory=list)
|
|
progress_event_id: uuid.UUID | None = None |