DRAFT: feat(cutover): add F3 backup dry-run prep #289

Closed
codex wants to merge 1 commit from codex/f3/stateful-prep-dry-run into main
Collaborator

Canary status: missing — fire canary 3+3 manually before merge

DRAFT — prep only. Do not use this as approval to run F3 stateful smoke.

Canary Context Pack

Product story

F3 should not start with improvising backup commands under pressure. The operator needs a safe dry-run step that proves module/container/backup-class resolution before any stateful smoke is considered.

What changed

  • Adds --dry-run to scripts/cutover/backup-before-apply.sh.
  • Documents dry-run-first F3 prep in scripts/cutover/README.md.
  • Adds a dedicated F3 prep dispatch prompt for dry-run evidence and candidate recommendation.
  • Adds tests that lock in dry-run behavior.

Why it changed

F3 touches stateful services. The existing backup helper could only perform real backup work; this adds a safe rehearsal path so tomorrow's operator/agent session can collect readiness evidence without writing backup files or starting smoke.

Files touched

  • scripts/cutover/backup-before-apply.sh
  • scripts/cutover/README.md
  • prompts/codex-f3-stateful-prep-2026-05-16.md
  • tests/test_backup_before_apply.py

Relevant context

  • F3 stateful smoke is hard-gated.
  • scripts/cutover/README.md already contains the stateful module audit and class mapping.
  • ADR-0018 favors clean state and explicit evidence over carrying ambiguous operator memory.

Runtime evidence

No runtime command was executed on RS2000 for this PR. Local script help and syntax passed.

Known constraints

  • --dry-run still resolves live containers, so it is intended for RS2000, not arbitrary local machines.
  • This PR does not prove any specific stateful service is ready; it only makes the proof step safe.

Explicit out-of-scope

  • No F3 smoke.
  • No real backup execution.
  • No restore test.
  • No production apply.

Requested decision

Keep as draft until after #260/F2 morning checks. Merge before the first F3 prep session so dry-runs are available from the trusted release root.

Merge blockers

  • --dry-run writes backup files or creates backup directories.
  • The prompt permits stateful smoke without explicit candidate-specific operator approval.
  • The script loses mode-0600 behavior for real backups.

Spec sources read

  • scripts/cutover/backup-before-apply.sh — backup helper.
  • scripts/cutover/README.md — F3 stateful audit and class mapping.
  • prompts/codex-f1.5-hardening-f2-2026-05-13.md — F3 prep hard-gate context.
  • decisions/0018-agentic-first-fix-root-causes.md — explicit evidence and clean-signal framing.

Test plan

bash -n scripts/cutover/backup-before-apply.sh
scripts/cutover/backup-before-apply.sh --help
pytest tests/test_backup_before_apply.py -q
# 3 passed
Canary status: missing — fire canary 3+3 manually before merge DRAFT — prep only. Do not use this as approval to run F3 stateful smoke. ## Canary Context Pack ### Product story F3 should not start with improvising backup commands under pressure. The operator needs a safe dry-run step that proves module/container/backup-class resolution before any stateful smoke is considered. ### What changed - Adds `--dry-run` to `scripts/cutover/backup-before-apply.sh`. - Documents dry-run-first F3 prep in `scripts/cutover/README.md`. - Adds a dedicated F3 prep dispatch prompt for dry-run evidence and candidate recommendation. - Adds tests that lock in dry-run behavior. ### Why it changed F3 touches stateful services. The existing backup helper could only perform real backup work; this adds a safe rehearsal path so tomorrow's operator/agent session can collect readiness evidence without writing backup files or starting smoke. ### Files touched - `scripts/cutover/backup-before-apply.sh` - `scripts/cutover/README.md` - `prompts/codex-f3-stateful-prep-2026-05-16.md` - `tests/test_backup_before_apply.py` ### Relevant context - F3 stateful smoke is hard-gated. - `scripts/cutover/README.md` already contains the stateful module audit and class mapping. - ADR-0018 favors clean state and explicit evidence over carrying ambiguous operator memory. ### Runtime evidence No runtime command was executed on RS2000 for this PR. Local script help and syntax passed. ### Known constraints - `--dry-run` still resolves live containers, so it is intended for RS2000, not arbitrary local machines. - This PR does not prove any specific stateful service is ready; it only makes the proof step safe. ### Explicit out-of-scope - No F3 smoke. - No real backup execution. - No restore test. - No production apply. ### Requested decision Keep as draft until after #260/F2 morning checks. Merge before the first F3 prep session so dry-runs are available from the trusted release root. ### Merge blockers - `--dry-run` writes backup files or creates backup directories. - The prompt permits stateful smoke without explicit candidate-specific operator approval. - The script loses mode-0600 behavior for real backups. ## Spec sources read - `scripts/cutover/backup-before-apply.sh` — backup helper. - `scripts/cutover/README.md` — F3 stateful audit and class mapping. - `prompts/codex-f1.5-hardening-f2-2026-05-13.md` — F3 prep hard-gate context. - `decisions/0018-agentic-first-fix-root-causes.md` — explicit evidence and clean-signal framing. ## Test plan ```bash bash -n scripts/cutover/backup-before-apply.sh scripts/cutover/backup-before-apply.sh --help pytest tests/test_backup_before_apply.py -q # 3 passed ```
feat(cutover): add F3 backup dry-run prep
All checks were successful
canary-required / collect-diff (pull_request) Successful in 4s
python-ci / Python 3.11 (pull_request) Successful in 36s
python-ci / Python 3.12 (pull_request) Successful in 37s
python-ci / Python 3.13 (pull_request) Successful in 37s
base-is-main / guard (pull_request) Successful in 1s
canary-required / canary (pull_request) Successful in 13s
3226819d95
Author
Collaborator

Fork D triage — closing superseded

Role: executor
Decision: close, no rewrite.

This was F3 backup dry-run prep from before the actual stateful migration. Current main already has the production backup-before path used during F3, including metadata output and later hardening. The branch is stale/non-mergeable and its diff would remove current safeguards such as backup metadata, deployment-control backup exclusions, Redis auth handling, and Forgejo composite backup handling while adding an old dry-run shape.

If dry-run mode is still desired later, it should be designed as a fresh post-cutoff helper PR against current main, not by merging this historical F3 prep branch.

No production mutation performed. Closing as superseded.

## Fork D triage — closing superseded **Role:** executor **Decision:** close, no rewrite. This was F3 backup dry-run prep from before the actual stateful migration. Current `main` already has the production backup-before path used during F3, including metadata output and later hardening. The branch is stale/non-mergeable and its diff would remove current safeguards such as backup metadata, deployment-control backup exclusions, Redis auth handling, and Forgejo composite backup handling while adding an old dry-run shape. If dry-run mode is still desired later, it should be designed as a fresh post-cutoff helper PR against current `main`, not by merging this historical F3 prep branch. No production mutation performed. Closing as superseded.
codex closed this pull request 2026-05-24 08:00:00 +02:00
Some checks are pending
canary-required / collect-diff (pull_request) Successful in 4s
python-ci / Python 3.11 (pull_request) Successful in 36s
python-ci / Python 3.12 (pull_request) Successful in 37s
python-ci / Python 3.13 (pull_request) Successful in 37s
base-is-main / guard (pull_request) Successful in 1s
Required
Details
canary-required / canary (pull_request) Successful in 13s
patchwarden-pr-sanity / sanity (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
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
pdurlej/platform!289
No description provided.