Developers History & revert

Developers

History & revert

Inspect Frontpage site history, staging vs production tips, and safely revert when allowed.

History

frontpage history
frontpage history --json
frontpage history --limit 20

Human output marks tips with S (current staging) and P (current production). They can diverge when staging is ahead of the last publish.

Reading JSON

frontpage history --json
# inspect commits[], stagingSha / productionSha fields when present

Use history before revert so you target the correct commit sha.

Revert

frontpage revert <40-char-sha> --yes
frontpage revert <40-char-sha> --yes --json

Revert creates a new commit whose tree matches the target (linear restore). The SHA must be a full 40-character commit from this site's history.

Guards:

  • Admin-capable roles only (same as editor revert policy).
  • Refuses while an agent run is active (exit 3).
  • Non-interactive shells typically need --yes.

Revert changes the site branch tip and updates staging after build. It is not the same as unpublish. Agents should not revert unless the user explicitly asked.

Publish / unpublish vs history

Action Effect
publish Promote current staging tip to production (custom domain)
unpublish Take production offline (admin; requires --yes when non-TTY)
revert Move the site branch tip to an earlier commit (staging rebuilds)

Safe agent pattern

  1. frontpage history --json
  2. Confirm sha and user intent
  3. Only then frontpage revert <sha> --yes if asked
  4. Review subdomain staging; leave publish to the human