Documentation Rollback Readiness
Status: Documentation safety workflow note
Scope: Pull request review, documentation quality checks and rollback readiness reporting
Runtime impact: none
Sensitive data involved: none
Change type: documentation / GitHub Actions safety reporting
Purpose
This note defines how documentation changes are made easier to review, validate and reverse through GitHub pull requests and GitHub Actions.
The related workflow is:
.github/workflows/documentation-safety-snapshot.yml
The workflow is designed to make rollback readiness visible. It does not perform rollback automatically.
Scope
This workflow applies to documentation-oriented changes in this repository.
It covers:
- pull request documentation review support
- documentation quality gate execution
- changed-file reporting
- base and head SHA recording
- branch and event recording
- safety snapshot artifact creation
- human-readable rollback guidance
It does not change repository contents, push commits, close pull requests, merge pull requests, revert commits or delete branches.
Operating model
The operating model is intentionally conservative:
PR diff
-> documentation quality gate
-> safety snapshot
-> human review
-> merge or corrective commit
-> revert PR if needed later
Git remains the rollback mechanism.
GitHub Actions provides evidence and review support.
What the workflow records
The safety snapshot records:
- repository name
- event type
- base ref
- head ref
- base SHA
- head SHA
- workflow SHA
- documentation quality gate outcome
- changed file list when comparison data is available
- manual rollback options
The snapshot is uploaded as a workflow artifact with a short retention period.
Rollback model
Rollback should remain human-controlled.
Recommended options:
| Situation | Preferred action |
|---|---|
| Before merge | close the pull request or add a corrective commit |
| After merge | use GitHub's Revert button or create a dedicated revert PR |
| Local recovery | create a branch from main and run git revert <merge-commit-sha> |
| Unclear impact | open a review issue before changing main |
This keeps the repository auditable and prevents unattended automation from making corrective changes without review.
What this is not
This workflow is not:
- an automatic rollback system
- an automatic merge system
- a branch cleanup bot
- a release manager
- a substitute for pull request review
- a substitute for documentation quality rules
- a write-enabled repository maintenance tool
The workflow may report and preserve context. It must not decide or execute rollback by itself.
Why this matters
Documentation can drift in the same way as code.
A rollback-ready documentation workflow reduces risk by making these questions easy to answer:
What changed?
Which branch changed it?
Which SHA was reviewed?
Did the documentation quality gate pass?
What is the safe way back if this needs to be reversed?
The point is not to make rollback automatic.
The point is to make rollback understandable before it is needed.
One-sentence summary
The documentation safety snapshot workflow makes documentation changes more reviewable and reversible by recording changed files, Git references, quality-gate outcome and human-controlled rollback options without granting the workflow write authority.