Skip to content

Commit 5aa92d0

Browse files
committed
Add Windows backup schedule automation
1 parent d3646d1 commit 5aa92d0

16 files changed

Lines changed: 961 additions & 24 deletions

docs/OPERATIONS/FLOWCHAIN_OWNER_OPERATED_PUBLIC_RPC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The repository now provides:
2020
- `npm run flowchain:backup:restore:verify` for restore rehearsal from the latest snapshot without mutating live state.
2121
- `npm run flowchain:backup:restore:validate` for a local self-test that proves snapshot/restore round-trip integrity and detects corrupted snapshots.
2222
- `npm run flowchain:backup:check` for owner backup path readiness, including snapshot and restore proof.
23+
- `npm run flowchain:backup:install:windows` and `npm run flowchain:backup:install:validate` for a no-secret Windows Scheduled Task install/status/uninstall path for recurring state snapshots.
2324
- `npm run flowchain:bridge:infra:check` for Base 8453 deployment input checks.
2425
- `npm run flowchain:bridge:diagnose:tx` for read-only diagnosis of an owner-supplied Base 8453 transaction hash.
2526
- `npm run flowchain:live-infra:check` as the aggregate gate, including owner input contract, public RPC, service status, backup, bridge, and no-secret checks.

docs/agent-runs/live-product-infra-rpc/ARCHITECTURE_AUDIT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FlowChain Architecture Audit
22

3-
Generated: 2026-05-17T10:12:58.4828271Z
3+
Generated: 2026-05-17T10:20:17.2181046Z
44
Status: blocked
55
Blocked only on known external owner inputs: True
66

@@ -22,7 +22,7 @@ Blocked only on known external owner inputs: True
2222

2323
| Layer | Requirement | Status | Evidence |
2424
| --- | --- | --- | --- |
25-
| L1 runtime | The block-producing node and service lifecycle are separated from RPC, run in live profile, and expose fresh state evidence. | passed | serviceStatus=passed, liveProfile=True, maxBlocks=0, nodeRunning=True, controlPlaneRunning=True, latestHeight=52358, finalizedHeight=52358 |
25+
| L1 runtime | The block-producing node and service lifecycle are separated from RPC, run in live profile, and expose fresh state evidence. | passed | serviceStatus=passed, liveProfile=True, maxBlocks=0, nodeRunning=True, controlPlaneRunning=True, latestHeight=52644, finalizedHeight=52644 |
2626
| Operations | Operations has explicit status, monitor, ops snapshot, alert rules, incident drills, and emergency controls that classify incidents separately from owner-input blockers. | passed | monitorStatus=passed, samples=2, heightAdvanced=True, supervisorValidation=passed, supervisorRestartAttempts=1, opsSnapshot=blocked, criticalCount=0, alertRules=passed, criticalRules=5, blockedRules=5, unmappedAlerts=0, incidentDrill=passed, incidentCases=8, incidentFailed=0 |
2727
| Operations | Owner-host service lifecycle includes a no-secret Windows Scheduled Task install, status, and uninstall path for reboot-persistent live supervisor autorecovery. | passed | installValidation=passed, failedChecks=0, planDidNotMutate=True, liveProfileDefault=True, schedulerCmdlets=True |
2828
| RPC/API | The control-plane API has explicit health/discovery/readiness/CORS/rate-limit validation and abuse rejection before it can be exposed publicly. | passed | validationStatus=passed, corsAllowed=True, corsRejected=True, endpointChecks=True, rateLimitProbe=True, rateLimitRejected=True, rateLimitRetryAfter=True, responseHygiene=True, abuseStatus=passed, abusePassed=True, abuseMissingChecks=0 |
@@ -31,7 +31,7 @@ Blocked only on known external owner inputs: True
3131
| Wallets | Wallet creation and wallet-to-wallet transfer are routed through the RPC/control-plane boundary into runtime blocks without returning secret material. | passed | walletStatus=passed, testerStatus=passed, testerWalletCreates=4, testerSecretLeak=False |
3232
| Bridge | The bridge architecture has a deterministic local proof for exact value, replay protection, wrong-chain rejection, unapproved-lockbox rejection, and no broadcast. | passed | broadcast=False, allAmountsEqual=True, wrongChainRejected=True, unapprovedContractRejected=True |
3333
| Bridge | Live Base 8453 bridge observation is isolated behind owner guardrails, read-only diagnostics, confirmation/cap settings, and no-broadcast checks. | blocked | bridgeLive=blocked, bridgeInfra=blocked, baseTxDiagnostic=blocked, baseTxSafe=True |
34-
| Storage/recovery | Live state backup and restore are separate configured storage boundaries with manifest hash proof, latest-pointer proof, live-state protection, and adversarial tamper/missing-artifact/wrong-chain rejection before public operation. | blocked | backupStatus=blocked, validationStatus=passed, snapshotProof=not-run, restoreProof=not-run, requiredChecks=15, missingChecks=0 |
34+
| Storage/recovery | Live state backup and restore are separate configured storage boundaries with manifest hash proof, latest-pointer proof, scheduled backup install proof, live-state protection, and adversarial tamper/missing-artifact/wrong-chain rejection before public operation. | blocked | backupStatus=blocked, validationStatus=passed, installValidation=passed, installFailedChecks=0, snapshotProof=not-run, restoreProof=not-run, requiredChecks=15, missingChecks=0 |
3535
| Deployment | The owner-operated public deployment contract is machine-checkable, includes rollback commands, and blocks sharing until public RPC, backup, bridge, and tester gates pass. | blocked | deploymentStatus=blocked, deploymentReady=False, packetShareable=False, packetSmoke=True, blockedOnlyKnown=True, blockedItems=5, failedItems=0 |
3636
| Governance/safety | Live-only inputs are externally owned, listed by name only, self-tested for missing/invalid/valid direct env plus local owner env-file loading, and fail closed on missing or malformed owner env files without printing values. | passed | ownerInputsStatus=blocked, validationStatus=passed, ownerEnvFilePasses=True, missingOwnerEnvFileFails=True, malformedOwnerEnvFileFails=True, knownMissingInputs=17, unknownInputs=0 |
3737
| Governance/safety | The ignored owner env file is a first-class setup boundary that can drive owner-input, live-infra, and public deployment gates through one redacted command. | blocked | readinessStatus=blocked, validationStatus=passed, missingFails=True, unignoredFails=True, gitIgnored=True, blockedOnlyKnown=True |
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# FlowChain Backup Install Validation
2+
3+
Generated: 2026-05-17T10:20:20.2021105Z
4+
Status: passed
5+
6+
This validation proves the scheduled backup install path is planned, no-secret, non-mutating in plan mode, and fails closed unless the owner backup path env is configured for actual backup runs.
7+
8+
## Checks
9+
10+
- installScriptExists: True
11+
- backupScriptExists: True
12+
- packageScriptsPresent: True
13+
- planCommandPassed: True
14+
- planDidNotMutate: True
15+
- schedulerCmdletsAvailable: True
16+
- scheduledTaskActionSupportsWorkingDirectory: True
17+
- actionUsesBackupScript: True
18+
- actionUsesRepoWorkingDirectory: True
19+
- hasStatePath: True
20+
- hasReportPath: True
21+
- ownerBackupEnvRequired: True
22+
- commandsPresent: True
23+
- commandOmitsAllowBlocked: True
24+
- envValuesPrintedFalse: True
25+
- noSecrets: True
26+
- broadcastsFalse: True
27+
28+
## Commands
29+
30+
- plan: npm run flowchain:backup:install:windows -- -Action Plan
31+
- install: npm run flowchain:backup:install:windows -- -Action Install
32+
- status: npm run flowchain:backup:install:windows -- -Action Status
33+
- uninstall: npm run flowchain:backup:install:windows -- -Action Uninstall
34+
- validate: npm run flowchain:backup:install:validate

docs/agent-runs/live-product-infra-rpc/PUBLIC_DEPLOYMENT_CONTRACT.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FlowChain Public Deployment Contract
22

3-
Generated: 2026-05-17T10:12:58.1906179Z
3+
Generated: 2026-05-17T10:20:17.1551020Z
44
Status: blocked
55
Deployment ready: False
66
Packet shareable: False
@@ -25,7 +25,7 @@ This file records deployment gates, commands, and env names only. It must not co
2525
| Owner signup checklist maps every public RPC, tester write gateway, backup, and Base 8453 bridge value to the exact thing the owner must get without requesting secrets in chat. | passed | signupStatus=passed, itemCount=9, externalSignupCount=3, missingCoverage=0, repoOwned=True, localEnvFileSupported=True |
2626
| Owner env-file setup has a command-generated local scaffold whose target path is git-ignored before owner values are added. | passed | templateStatus=passed, pathIsGitIgnored=True, requiredEnvNameCount=17, optionalEnvNameCount=2, includesAllRequired=True |
2727
| Public RPC exposure has a no-values owner edge template and deployment bundle for HTTPS reverse proxying, rate limiting, verification, and rollback. | passed | edgeTemplateStatus=passed, bundleStatus=passed, repoOwned=True, requiresTls=True, requiresRateLimit=True, forwardsOrigin=True |
28-
| The public deployment origin service is running privately in live profile before any owner TLS edge is considered shareable. | passed | serviceStatus=passed, privateBind=True, latestHeight=52358, finalizedHeight=52358 |
28+
| The public deployment origin service is running privately in live profile before any owner TLS edge is considered shareable. | passed | serviceStatus=passed, privateBind=True, latestHeight=52644, finalizedHeight=52644 |
2929
| The deployment has recent service-monitor evidence that block height advances over multiple samples. | passed | monitorStatus=passed, samples=2, heightAdvanced=True |
3030
| The owner service has an autorecovery supervisor and an isolated recovery drill proving control-plane restart without touching live state. | passed | supervisorValidation=passed, restartAttempts=1 |
3131
| The owner host has a no-secret Windows install, status, and uninstall path for registering the live supervisor as a reboot-persistent scheduled task. | passed | serviceInstallValidation=passed, planDidNotMutate=True, liveProfileDefault=True, commandsPresent=True |
@@ -35,6 +35,7 @@ This file records deployment gates, commands, and env names only. It must not co
3535
| The local public RPC abuse harness proves CORS rejection, media-type rejection, malformed JSON handling, batch/body caps, notification handling, rate limiting, and no-secret response summaries. | passed | abuseStatus=passed, abuseReady=True, missingChecks=0 |
3636
| The owner TLS edge must pass endpoint, CORS, rate-limit, readiness, and response-hygiene checks before sharing. | blocked | publicRpcStatus=blocked, publicRpcReady=False, validationStatus=passed, validationPassed=True, abuseStatus=passed, abusePassed=True |
3737
| Backup tooling must create manifest-backed state snapshots, restore the latest snapshot safely, reject tampered/missing/stale/wrong-chain backup evidence, and avoid owner secrets. | passed | validationStatus=passed, requiredChecks=15, missingChecks=0 |
38+
| The owner host has a no-secret Windows install, status, and uninstall path for recurring manifest-backed state backups that fail closed without the owner backup path. | passed | backupInstallValidation=passed, planDidNotMutate=True, ownerBackupEnvRequired=True, commandOmitsAllowBlocked=True |
3839
| The public deployment must prove the configured state backup directory can create a manifest-backed snapshot and restore it in rehearsal. | blocked | backupStatus=blocked, snapshotProof=not-run, restoreProof=not-run |
3940
| The public deployment must not invite bridge-funded testing until Base 8453 live and infra checks pass with owner guardrails. | blocked | bridgeLive=blocked, bridgeInfra=blocked |
4041
| External tester packet must remain not-shareable until owner public RPC, backup, and bridge gates pass, and it must rely on fresh tester-wallet evidence plus executable packet-route smoke. | blocked | externalTester=blocked, localTesterRehearsalReady=True, testerNetworkFresh=True, packetSmoke=True, externalSharingReady=False, packet=blocked, packetShareable=False |
@@ -60,6 +61,8 @@ This file records deployment gates, commands, and env names only. It must not co
6061
- npm run flowchain:tester:gateway:e2e
6162
- npm run flowchain:public-rpc:check
6263
- npm run flowchain:backup:restore:validate
64+
- npm run flowchain:backup:install:validate
65+
- npm run flowchain:backup:install:windows -- -Action Plan
6366
- npm run flowchain:backup:create
6467
- npm run flowchain:backup:restore:verify
6568
- npm run flowchain:backup:check
@@ -74,6 +77,8 @@ This file records deployment gates, commands, and env names only. It must not co
7477
- npm run flowchain:service:status
7578
- npm run flowchain:service:install:windows -- -Action Status
7679
- npm run flowchain:service:install:windows -- -Action Uninstall
80+
- npm run flowchain:backup:install:windows -- -Action Status
81+
- npm run flowchain:backup:install:windows -- -Action Uninstall
7782
- npm run flowchain:service:stop
7883
- npm run flowchain:service:restart -- -LiveProfile
7984
- npm run flowchain:emergency:stop-local
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# FlowChain Windows Backup Install
2+
3+
Generated: 2026-05-17T10:20:19.7166633Z
4+
Status: passed
5+
Action: Plan
6+
Task: \FlowChainStateBackup
7+
8+
This runbook registers a Windows Scheduled Task that runs the manifest-backed state backup command every day. The task requires FLOWCHAIN_RPC_STATE_BACKUP_PATH from the owner process environment or from FLOWCHAIN_OWNER_ENV_FILE.
9+
10+
## Commands
11+
12+
- Plan: npm run flowchain:backup:install:windows -- -Action Plan
13+
- Validate: npm run flowchain:backup:install:validate
14+
- Install: npm run flowchain:backup:install:windows -- -Action Install
15+
- Status: npm run flowchain:backup:install:windows -- -Action Status
16+
- Uninstall: npm run flowchain:backup:install:windows -- -Action Uninstall
17+
- Backup check: npm run flowchain:backup:check -- -AllowBlocked
18+
19+
## Scheduled Task Action
20+
21+
- Execute: `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe`
22+
- Working directory: `E:/FlowMemory/flowmemory-live-infra-rpc`
23+
- Backup script: `E:\FlowMemory\flowmemory-live-infra-rpc\infra\scripts\flowchain-state-backup.ps1`
24+
- Daily time: 03:00
25+
- Owner env file injected: False
26+
27+
## Status
28+
29+
- Task existed before: False
30+
- Task exists after: False
31+
- Scheduler cmdlets available: True
32+
- WorkingDirectory supported: True
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"schema": "flowchain.backup_install_validation_report.v0",
3+
"generatedAt": "2026-05-17T10:20:20.2021105Z",
4+
"status": "passed",
5+
"taskName": "FlowChainStateBackup",
6+
"checks": {
7+
"installScriptExists": true,
8+
"backupScriptExists": true,
9+
"packageScriptsPresent": true,
10+
"planCommandPassed": true,
11+
"planDidNotMutate": true,
12+
"schedulerCmdletsAvailable": true,
13+
"scheduledTaskActionSupportsWorkingDirectory": true,
14+
"actionUsesBackupScript": true,
15+
"actionUsesRepoWorkingDirectory": true,
16+
"hasStatePath": true,
17+
"hasReportPath": true,
18+
"ownerBackupEnvRequired": true,
19+
"commandsPresent": true,
20+
"commandOmitsAllowBlocked": true,
21+
"envValuesPrintedFalse": true,
22+
"noSecrets": true,
23+
"broadcastsFalse": true
24+
},
25+
"failedChecks": [
26+
27+
],
28+
"missingPackageScripts": [
29+
30+
],
31+
"planReportPath": "E:\\FlowMemory\\flowmemory-live-infra-rpc\\docs\\agent-runs\\live-product-infra-rpc\\backup-install-windows-report.json",
32+
"planMarkdownPath": "E:\\FlowMemory\\flowmemory-live-infra-rpc\\docs\\agent-runs\\live-product-infra-rpc\\WINDOWS_BACKUP_INSTALL.md",
33+
"childProcessResults": [
34+
{
35+
"name": "backup-install-plan",
36+
"exitCode": 0,
37+
"timedOut": false,
38+
"stdoutPath": "E:\\FlowMemory\\flowmemory-live-infra-rpc\\devnet\\local\\tmp\\backup-install-validation\\20260517052015882-53328-14a6f493.stdout.log",
39+
"stderrPath": "E:\\FlowMemory\\flowmemory-live-infra-rpc\\devnet\\local\\tmp\\backup-install-validation\\20260517052015882-53328-14a6f493.stderr.log"
40+
}
41+
],
42+
"commands": {
43+
"plan": "npm run flowchain:backup:install:windows -- -Action Plan",
44+
"install": "npm run flowchain:backup:install:windows -- -Action Install",
45+
"status": "npm run flowchain:backup:install:windows -- -Action Status",
46+
"uninstall": "npm run flowchain:backup:install:windows -- -Action Uninstall",
47+
"validate": "npm run flowchain:backup:install:validate"
48+
},
49+
"envValuesPrinted": false,
50+
"noSecrets": true,
51+
"broadcasts": false
52+
}

0 commit comments

Comments
 (0)