docs(forgejo): design guarded Actions history repair #15

Open
john wants to merge 1 commit from docs/forgejo-actions-historical-repair into main
Owner

Outcome

Provides a reviewed, evidence-ranked historical repair design and guarded SQL package. No repair was executed.

Read-only dry-run

  • raw parent/job aggregate disagreements: 12,599
  • skipped tasks with failed step 2: 2,935
  • current jobs implied failed by those tasks: 2,935
  • projected parent aggregate changes after those repairs: 12,989
  • orphaned steps left by historical task deletion: 7,831
  • jobs with no retained task: 3,572

Candidate fingerprints:

  • tasks: 2,935 / e5d0e2be14fa68ef73e5e4c0fc7989c9
  • jobs: 2,935 / 23b1b7c61cda7afaca0d6d83b8ffeea5
  • runs: 12,989 / 7b2b8ab11ce59a155fabe0fe83310d74

Package

  • exact read-only inventory, candidate, projection, ambiguity, corroboration, and integrity queries
  • evidence decision table and explicit no-repair ambiguity classes
  • guarded serializable repair SQL with cutoff/count/checksum assertions and row-level shadow copies
  • guarded column rollback SQL
  • full dump, SHA, offsite copy, isolated PostgreSQL 16 restore verification, maintenance, integrity, and full-restore runbook

The prepared repair changes status columns only. It intentionally leaves timestamps, logs, task steps, artifacts, runner records, and historical commit statuses unchanged. Forgejo would be stopped for the one-time repair and restarted to clear caches; replaying thousands of stale completion notifications is explicitly avoided.

Known controls

  • Superclean #1633 and #1653 retain failed step 2 and non-empty logs and enter the high-confidence failure set.
  • #1675 has no task/start/stop evidence and remains skipped/unrepaired.

Production boundary

The write/rollback SQL has not been run or syntax-tested on production; even rolled-back DDL was outside the session's read-only authority. Execution requires a fresh approval immediately beforehand covering exact target, commit hashes, new counts/checksums, verified full backup/restore, outage, 2,935 task + 2,935 job + 12,989 run blast radius, and rollback.

Spec Drift Callouts

  • The raw 12,599 mismatch count is structural, not itself a truth set. Repairing only the 2,935 high-confidence failed tasks/jobs changes the projected parent scope to 12,989.
  • The old reaper deleted task rows without deleting their steps. The 7,831 orphaned steps and 1,144 dangling job task pointers make broad historical reconstruction impossible and are excluded.
## Outcome Provides a reviewed, evidence-ranked historical repair design and guarded SQL package. No repair was executed. ## Read-only dry-run - raw parent/job aggregate disagreements: 12,599 - skipped tasks with failed step `2`: 2,935 - current jobs implied failed by those tasks: 2,935 - projected parent aggregate changes after those repairs: 12,989 - orphaned steps left by historical task deletion: 7,831 - jobs with no retained task: 3,572 Candidate fingerprints: - tasks: 2,935 / `e5d0e2be14fa68ef73e5e4c0fc7989c9` - jobs: 2,935 / `23b1b7c61cda7afaca0d6d83b8ffeea5` - runs: 12,989 / `7b2b8ab11ce59a155fabe0fe83310d74` ## Package - exact read-only inventory, candidate, projection, ambiguity, corroboration, and integrity queries - evidence decision table and explicit no-repair ambiguity classes - guarded serializable repair SQL with cutoff/count/checksum assertions and row-level shadow copies - guarded column rollback SQL - full dump, SHA, offsite copy, isolated PostgreSQL 16 restore verification, maintenance, integrity, and full-restore runbook The prepared repair changes status columns only. It intentionally leaves timestamps, logs, task steps, artifacts, runner records, and historical commit statuses unchanged. Forgejo would be stopped for the one-time repair and restarted to clear caches; replaying thousands of stale completion notifications is explicitly avoided. ## Known controls - Superclean #1633 and #1653 retain failed step `2` and non-empty logs and enter the high-confidence failure set. - #1675 has no task/start/stop evidence and remains skipped/unrepaired. ## Production boundary The write/rollback SQL has not been run or syntax-tested on production; even rolled-back DDL was outside the session's read-only authority. Execution requires a fresh approval immediately beforehand covering exact target, commit hashes, new counts/checksums, verified full backup/restore, outage, 2,935 task + 2,935 job + 12,989 run blast radius, and rollback. ## Spec Drift Callouts - The raw 12,599 mismatch count is structural, not itself a truth set. Repairing only the 2,935 high-confidence failed tasks/jobs changes the projected parent scope to 12,989. - The old reaper deleted task rows without deleting their steps. The 7,831 orphaned steps and 1,144 dangling job task pointers make broad historical reconstruction impossible and are excluded.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin docs/forgejo-actions-historical-repair:docs/forgejo-actions-historical-repair
git switch docs/forgejo-actions-historical-repair
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
haskytech/haskytech-ops!15
No description provided.