DoneState docs / Maintenance
Maintain selected repositories without turning discovery into authority
Maintenance is the repository-oriented workflow for recurring inspection and explicitly eligible PR-only repair. Discovery can record evidence; it does not automatically authorise code changes.
1. Select a repository
- observe
- DoneState can register the repository and discover bounded findings but cannot use that selection as PR-only repair authority.
- pr_only
- The selected GitHub App installation may be used for bounded branch and pull-request work. It still does not grant merge authority.
select_maintenance_repository({
repository: "owner/repository",
defaultBranch: "main",
mode: "observe",
scheduleEnabled: false,
autoRepair: false,
requiredCheckNames: []
})2. Discover maintenance work
discover_maintenance_work reads two evidence sources: explicitly labeled donestate:repair issues and recent failing GitHub Actions runs.
They are intentionally not equivalent. A labeled issue can be repair-eligible. A failed workflow is recorded as evidence only; DoneState does not infer repair authority from a red CI badge.
- 01
Discover
Calldiscover_maintenance_workfor one selected repository. - 02
Inspect
Uselist_maintenance_findingsand inspect the source, repair eligibility, state, and repository before taking action. - 03
Start only an eligible finding
Pass the exact finding digest tostart_maintenance_repair.
3. PR-only repair lifecycle
- 01
Claim one finding
The finding is durably associated with one run so duplicate repair attempts do not silently race each other. - 02
Pin the repository subject
DoneState resolves the selected default branch to an exact base commit before execution. - 03
Execute within the maintenance policy
The repair uses bounded local work, validation, commit, push, pull-request, and secret-access authority required by the maintenance path. - 04
Require exact CI evidence
Configured required checks are part of the verification requirement for automatic maintenance. - 05
Stop for independent verification
The resulting maintenance run remains separate from the owner's merge decision and requires OpsTruth verification.
Scheduled maintenance
Scheduling is repository-specific and bounded. Enabling a schedule does not turn every failure into an autonomous change. The repository's selected mode, installation, automatic-repair flag, required checks, and finding eligibility still apply on every sweep.