Repository navigation
feat(tooling): maintained live-proxy deploy and rollback scripts (#80) - #81
Conversation
Add scripts/live-deploy with Deploy-LiveProxy.ps1 and Rollback-LiveProxy.ps1, which follow the documented cutover order: preflight, hold supervision, edit the launcher, let the supervisor start the new release, verify, write receipts. A failed deployment rolls back; a failed rollback puts the hold back, leaves the proxy as it is and exits 4. Nothing about a release is hardcoded: identity, port, task name and the expected config hash are parameters, and the rollback reads the deployment record written by the deploy. The scripts are exercised only against throw-away sandboxes (stand-in launcher, stand-in proxy, file-backed task driver behind a marker-gated seam that is refused inside the live installation area). The test is registered as a process-spawning suite and weighted for sharding. Docs: reference/cindy-project (en + zh-CN) describe the scripts, their step coverage and exit codes; reference/testing.md names the right registration file. Assisted-by: Cindy (https://cindy.app)
📦 Built Package ArtifactBranch: Download artifact
tar xzf billion-context-pr81.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…nt explains it (#80) The standalone rollback refused nothing about the task's enabled state. It now accepts a disabled task only when this deployment's own hold is in place or its record stopped inside the hold window; otherwise it refuses, since someone else may be doing maintenance. Covered by a new refusal in the sandbox test. Also give the "candidate never healthy" scenario a wait that is not tight: the same wait bounds the previous release coming back. Assisted-by: Cindy (https://cindy.app)
| Write-LpEvent 'STEP' 'launcher already is the pre-deployment launcher' | ||
| } else { | ||
| if (-not (Test-LpSameHash (Get-LpSha256OfBytes $RestoreLauncherBytes) $Ctx.Record.launcherSha256Before)) { throw 'the saved launcher does not match the deployment record' } | ||
| Write-LpBytesAtomic $Ctx.LauncherPath $RestoreLauncherBytes |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
CRITICAL: Rollback overwrites launcher edits made after the initial check
If someone edits the launcher while an unhealthy candidate is being checked, automatic rollback reaches this write and silently discards that edit. The branch at line 496 accepts every live hash other than launcherSha256Before; line 499 verifies only the backup, never that the current launcher still matches launcherSha256After. Standalone rollback has the same gap after its preflight check. Revalidate the live launcher under the rollback hold before destructive work, and preserve it with a failed-rollback result when its hash matches neither recorded version. Add a foreign-edit case during rollback, not only during the initial deploy hold.
| Stop-LpProcessVerified $listenerProcess | ||
| if (-not (Wait-LpUntil { @(Get-LpListenerPids $Port).Count -eq 0 } $StopWaitSeconds 'waiting for the port')) { throw 'the port was not released' } | ||
| Write-LpEvent 'STEP' 'current release stopped, port released' | ||
| Remove-LpHold $ctx |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Deployment ownership ends before receipt finalization
After this removes the inhibit, another deployment can pass preflight while the first is still checking health or writing receipts. For example, A can prepare P1 receipt bytes at lines 367-368, B can deploy P2, and A can then overwrite B's receipts at lines 369-373 with P1 metadata. B can also back up P1's launcher alongside the still-old P0 receipts. The supervisor lock serializes supervisors, not these scripts. Hold a separate per-runtime exclusive operation lock, shared by deploy and rollback, from snapshot/preparation through final receipt and record writes.
| } | ||
|
|
||
| try { | ||
| Invoke-LpRollback $ctx $backupLauncher $receipts $false |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: An interrupted standalone rollback cannot resume
Starting from healthy or receipts-written, terminate this rollback after Remove-LpHold removes the inhibit but before it enables the task (LiveProxy.Common.ps1:351-353). The candidate has been stopped, the task remains disabled, and the record still has the original completed-deploy stage because this script journals nothing until line 139. A retry is then refused by line 119 as unexplained foreign maintenance, leaving the service down. Persist a rollback-in-progress stage before mutation and recognize it during recovery; add the standalone equivalent of the existing deploy-killed-during-enable test.
| function Get-LpProcesses([string]$ImageName, [string]$QuotedPath) { | ||
| $token = '"' + $QuotedPath + '"' | ||
| return @(Get-CimInstance Win32_Process -Filter "Name='$ImageName'" -OperationTimeoutSec 15 -ErrorAction Stop | | ||
| Where-Object { $null -ne $_.CommandLine -and $_.CommandLine.IndexOf($token, [System.StringComparison]::OrdinalIgnoreCase) -ge 0 }) |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: A bundle path used as data identifies an unrelated process for termination
A process such as node.exe "C:\tools\watcher.mjs" "<candidate bundle path>" matches this predicate even though it is not running the candidate. Invoke-LpRollback force-stops every result of Get-LpProxies at line 489, so a watcher or inspector receiving the bundle as an argument is killed; the creation-time recheck cannot distinguish it. The supervisor matcher has the analogous problem with a launcher path passed as data. Match the actual Node entrypoint or PowerShell -File target, not a quoted token anywhere in the command line.
| $now = Get-CimInstance Win32_Process -Filter "ProcessId=$($Process.ProcessId)" -OperationTimeoutSec 15 -ErrorAction Stop | ||
| if ($null -eq $now) { return } | ||
| if ($now.CreationDate -ne $Process.CreationDate) { throw "pid $($Process.ProcessId) now belongs to a different process; not stopping it" } | ||
| Stop-Process -Id $Process.ProcessId -Force -ErrorAction Stop |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Termination reopens a PID after verifying its identity
If the target exits after the CIM creation-time comparison and Windows reuses its PID before Stop-Process -Id opens it, this kills the replacement process. The CIM snapshot does not retain a process handle, and neither the deploy nor rollback callers pin one. Acquire and retain the target's process handle, verify the identity/start time of that handle-backed process against the captured identity, and terminate that same object rather than looking up the PID again.
| } catch [LpStop] { | ||
| Complete-Lp $ctx $_.Exception 'rollback-result.json' | ||
| } catch { | ||
| Complete-Lp $ctx ([LpStop]::new(4, 'rollback-failed', "rollback stopped unexpectedly: $($_.Exception.Message). Check by hand that maintenance.inhibit is present, the task is disabled and no supervisor runs.", 'rollback-error', 'report to the owner; no release is confirmed live')) 'rollback-result.json' |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Record-write failure returns exit 4 without applying the failure hold
With a readable but read-only deploy-record.json, Invoke-LpRollback can successfully restore and supervise the previous release, then Set-LpStage at line 139 fails while persisting rolled-back. This catch reports exit 4 without invoking Stop-LpRollbackFailed: the inhibit is absent, the task is enabled, the supervisor is running, and no failure evidence is collected. Deploy-LiveProxy.ps1:325,332-333 has the same path. Route exceptions after rollback through the hold/evidence failure routine before emitting the documented exit-4 result.
| @@ -0,0 +1,381 @@ | |||
| #requires -Version 7.0 | |||
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Accepted PowerShell versions lack the receipt API
PowerShell 7.0 and 7.1 satisfy this requirement, but their .NET runtimes do not provide System.Text.Json.Nodes.JsonNode, introduced with .NET 6/PowerShell 7.2. The first executed use is at line 345, after preflight and cutover, so an accepted runtime deploys the candidate but necessarily fails to produce either pending receipt. Raise the minimum and keep the documented prerequisite consistent, or check the required API during preflight.
| #requires -Version 7.0 | |
| #requires -Version 7.2 |
| assert.match(r.out, / NEXT run the step 7 checks now\. If they fail, roll back with: pwsh .*Rollback-LiveProxy\.ps1/); | ||
|
|
||
| // Supervision: the supervisor, not the script, runs the new release. | ||
| const livePid = await waitSupervised(sb, CAND.version, CAND.commit); |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The supervision identity gate has no negative test
The success case observes valid supervision, but no scenario keeps candidate health valid while reporting an incorrect childPid or healthMatch=false. The launcher stand-in always writes the real child PID and measured health (Start-BillionContextProxy.ps1:68); existing unhealthy-candidate cases fail the earlier health gate. Consequently, deleting the individual status checks in LiveProxy.Common.ps1:378,380 would not be detected. Add a healthy candidate with independently invalid supervision status and assert deployment rejection plus the safe rollback/hold outcome, alongside the positive case required by AGENTS.md's gate-test rule.
| assert.equal(fs.existsSync(releaseDir(sb)), false, "no release directory may be created"); | ||
| assert.equal(backups(sb).length, 0, "no backup folder may be created"); | ||
| assert.equal(launcher(sb), launcherBefore, "the launcher must be unchanged"); | ||
| assert.equal(getTask(sb).enabled, true, "the task must stay enabled"); |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Refusal assertions do not prove that live services were untouched
This helper accepts a preflight/refusal that disables and re-enables the task, or restarts a service, provided the selected files and final enabled value match. The driver already records disable, enable and start calls, but none are checked here, nor are the original proxy/supervisor identities. The roughly 30 refusal cases therefore do not prove their stated no-live-mutation guarantee. Snapshot mutating task-call counters and process identities before each run and assert they remain unchanged, rather than checking only final enablement.
| describe("live-deploy scripts: deployment and rollback", { skip: SKIP, concurrency: 4 }, () => { | ||
| test("deploys, proves supervision, rewrites receipts; the standalone rollback restores everything", async () => { | ||
| // A second sandbox whose name is a prefix-sibling of the first proves the scripts never touch another installation. | ||
| const other = await makeSandbox("a10"); |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The prefix-sibling isolation test creates unrelated roots
makeSandbox("a10") and withSandbox(..., "a1") at line 688 each generate an independent random stem at line 108. Their directory names are therefore not prefix siblings, so the assertions at lines 682-687 do not exercise the boundary case claimed here and would pass a matcher that mistakes one prefix-sibling installation for another. Generate both roots from one shared random stem and assert the prefix relationship before running the isolation scenario.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Reviewed the incremental changes from Files Reviewed (2 files)
Static review only: no files modified and no code or tests executed. Windows execution and exact-head CI were not independently verified. Merge remains subject to required CI and human approval; owner approval for the declared disabled-task acceptance change is not established by the available discussion. Previous Review Summaries (3 snapshots, latest commit 3fb4a72)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 3fb4a72)(ai: kilo/openai/gpt-6-astra) Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Reviewed the incremental process-identity, hold-recovery and sandbox-test changes from Issue Details (click to expand)WARNING
The retained hold-lift finding is narrower than the new early-hold coverage: the first-disable injection at Files Reviewed (4 files)
Static review only: no code or tests executed and no files modified. Windows execution and exact-head CI were not independently verified. Owner approval for the declared disabled-task acceptance change remains unestablished in the available discussion. Previous review (commit 209793c)(ai: kilo/openai/gpt-6-astra) Code Review SummaryStatus: 6 Issues Found | Recommendation: Address before merge Overview
Reviewed the incremental deployment/rollback changes, sandbox regressions, executable stand-ins, and English documentation from Issue Details (click to expand)WARNING
The retained inhibit defect occurs when flushing buffered owner text fails and Files Reviewed (7 files)
Static review only: no code or tests executed and no files modified. The Chinese counterpart exists and was excluded under the translation skip rule. Owner approval for the declared disabled-task acceptance change remains unestablished in the available discussion. Previous review (commit b04db28)(ai: kilo/openai/gpt-6-astra) Code Review SummaryStatus: 15 Issues Found | Recommendation: Address before merge Overview
Reviewed deployment/rollback safety, sandbox tests and executable stand-ins, CI registration, and English documentation at Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (11 files)
Static review only: no code or tests executed and no files modified. The Chinese workflow counterpart exists and was excluded under the translation skip rule. Owner approval for the PR's declared disabled-task acceptance change was not established from the available discussion. Reviewed by gpt-6-astra · Input: 36 · Output: 4.3K · Cached: 828K Review guidance: REVIEW.md from base branch |
…#80) Scripts - Rollback never overwrites a launcher that is neither the saved nor the deployed one: it stops with the hold in place (foreign-launcher-edit). - One deploy or rollback per runtime root: an exclusive operation lock is held from before the checks until the process ends. - The standalone rollback journals stage rolling-back before it changes anything, so an interrupted run can be retried. - Processes are matched by how they were started (node entry point, PowerShell -File script), not by a path appearing anywhere in the command line. - A process is stopped through one handle whose start time was verified. - The task action must be powershell.exe with this launcher as -File; the task is compared with the validated one before the hold instead of re-read. - Lifting the hold removes only this run's inhibit; a half-written inhibit is removed again; a missing live receipt is restored from the backup. - A record that cannot be updated after a successful rollback no longer reads as exit 4; an unexpected error after rollback re-applies the hold first. - Minimum PowerShell is 7.2 (JsonNode). Tests: foreign edit during rollback, healthy candidate with supervision that does not match, second run refused, interrupted standalone rollback retried, task action look-alikes, refusals now assert no task operation and unchanged processes, and the prefix-sibling sandbox really shares a name prefix. Assisted-by: Cindy (https://cindy.app)
|
(ai: anthropic/claude-fable-5-2) Reply to the automated review on
The reviewer's closing note is correct: the change to acceptance criterion 13 (a disabled task accepted when the deployment's own hold or stage explains it) still needs the owner's decision. |
| Where-Object { $null -ne $_.CommandLine -and $_.CommandLine.IndexOf($Needle, [System.StringComparison]::OrdinalIgnoreCase) -ge 0 }) | ||
| } | ||
| # The supervisor is Windows PowerShell running the launcher as its -File script. | ||
| function Get-LpSupervisors($Ctx) { return @(Get-LpProcesses 'powershell.exe' ('-File "' + $Ctx.LauncherPath + '"')) } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Command-line substrings still select unrelated scripts
powershell.exe -File "C:\tools\Inspect.ps1" -File "<launcher>" executes Inspect.ps1, with the second -File passed to that script, but this matcher identifies it as the supervisor. Likewise, node.exe "C:\tools\inspect.mjs" "<candidate bundle>" start --port <port> passes lines 238-239: with an unquoted executable, the first quote-space-quote boundary separates the script from its data argument. Standalone rollback terminates these unrelated matches at lines 393 and 544 without requiring them to own the listener.
The same substring test in Get-LpTaskActionGap at line 315 also approves the PowerShell example as a scheduled-task action, allowing cutover to stop the working service before discovering that the task cannot restart it. Validate the actual host-level -File operand and Node entrypoint rather than later arguments, sharing that validation with the task check; add negative cases for paths passed as script data.
| if ($p.HasExited) { return } | ||
| throw | ||
| } | ||
| if ([Math]::Abs(($started - $Process.CreationDate.ToUniversalTime()).TotalSeconds) -ge 1) { throw "pid $($Process.ProcessId) now belongs to a different process; not stopping it" } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The one-second tolerance accepts a replacement process
If a matched process exits and its PID is reused before SafeHandle is acquired, a replacement created less than one second after the original passes this comparison and is killed at line 256. For example, creation times ending in 00.100 and 00.600 differ by only 0.5 seconds; neither enumeration nor the termination callers impose a minimum process age that excludes this state. Holding the handle fixes reuse after acquisition, but does not establish that the acquired handle belongs to the snapshot. Compare creation times at the actual CIM timestamp precision instead of accepting a full one-second window, while retaining same-handle termination.
| Write-LpEvent 'BACKUP' $backupRoot | ||
| $r = Invoke-LpLauncherDryRun $editedBytes $root | ||
| if ($r.ExitCode -ne 0 -or $r.Action -ne 'conflict') { throw "with the new release in place the edited launcher decided '$($r.Action)' (exit $($r.ExitCode)); expected 'conflict' while the current release is still serving" } | ||
| if (-not (Test-LpSameTask (Get-LiveProxyTaskInfo $TaskName) $ctx.TaskBaseline)) { throw 'the scheduled task was changed after preflight' } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The new task-drift gate has no negative regression
The task-action refusals in tests/live-deploy-scripts.test.ts:528-532 change the action before preflight, while the second-info-call injection at line 851 changes only the inhibit file. No scenario changes the task between the validated baseline and this comparison, so restoring the old baseline-overwrite assignment would not be caught by a task-drift assertion. AGENTS.md requires both directions of each gate. Inject an action change on the second task-info call and require error-before-hold with the task-changed diagnostic, zero disable/enable/start calls, and unchanged launcher and running process identities.
|
|
||
| function Remove-LpHold($Ctx) { | ||
| Assert-LpNoSupervisor $Ctx 'before the hold is lifted' | ||
| if (-not (Test-LpOwnInhibit $Ctx)) { throw 'maintenance.inhibit is no longer the one this run created; it was left as found' } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The new hold-ownership gate has no negative regression
All foreign-inhibit scenarios create the marker before preflight or before this deployment's New-LpInhibit; the second-info-call injection at tests/live-deploy-scripts.test.ts:851 is rejected by CreateNew, not by this new check. None replaces an already-owned marker during the hold, so removing this guard leaves the foreign-marker deletion regression undetected. To satisfy AGENTS.md's positive/negative gate rule, reuse writeForeignInhibit on the first disable call and assert ownership-loss failure, exact preservation of the foreign contents, a disabled task, and zero enable/start calls; the successful deployment supplies the owned-marker control.
| test("a second deploy is refused while one is running", async () => { | ||
| await withSandbox(async (sb) => { | ||
| const first = deploy(sb); | ||
| await waitFor("the first run to write its backup", () => backups(sb).length === 1); |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Backup existence does not guarantee concurrent deployments
The backup remains after the first deploy exits, so this wait can succeed after its operation lock has already been released; the second deploy can then legitimately succeed and fail the expected refusal. This is reachable when the Node runner is delayed, including by another scenario's synchronous teardown at line 236 under this suite's concurrency: 4, while the first PowerShell process continues independently. Use a ready/release handshake in the test driver to keep the first run paused while it owns the lock, assert the second refusal, then release and await the first run in finally.
- Supervisor, proxy and task action are recognised from parsed arguments: the host's own -File operand and node's entry point, not a path that appears later as data for another script. - Process identity is compared at millisecond precision before the same handle is used to stop it. - A half-written inhibit is removed also when closing the file is what failed. - The deploy re-checks that the inhibit is still its own before it changes anything; a foreign inhibit is kept and supervision is not restarted. Tests: task changed after preflight, inhibit replaced during the hold, a launcher passed as data to another script, and the lock scenario now pauses the first run while it owns the lock (deploy and rollback are both refused). Assisted-by: Cindy (https://cindy.app)
|
(ai: anthropic/claude-fable-5-2) Reply to the re-review on
|
| for ($i = 0; $i -lt $HostArgs.Count; $i++) { | ||
| $a = $HostArgs[$i] | ||
| if ($a -match '^-(c|command|e|ec|encodedcommand)$') { return $false } | ||
| if ($a -ieq '-File') { return ($i + 1 -lt $HostArgs.Count -and $HostArgs[$i + 1] -ieq $LauncherPath) } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: Abbreviated host options still select unrelated scripts
Windows PowerShell accepts -f as -File, so powershell.exe -NoProfile -f "C:\tools\Watch.ps1" -File "C:\runtime\Start-BillionContextProxy.ps1" runs Watch.ps1 with the launcher path as script data. This loop ignores -f and accepts the later -File; standalone rollback then kills that unrelated watcher through Get-LpSupervisors and Set-LpRollbackHold at line 420. The shared task-action check at line 338 also incorrectly approves this action.
Fail closed on unsupported host syntax before the launcher operand, or parse host options and execution boundaries including abbreviations. Add a negative case with an abbreviated first -File; the existing test covers only the unabbreviated form.
| throw | ||
| } | ||
| # Both values come from the same kernel timestamp; they differ only by rounding below a millisecond. | ||
| if ([Math]::Abs(($started - $Process.CreationDate.ToUniversalTime()).TotalMilliseconds) -ge 1) { throw "pid $($Process.ProcessId) now belongs to a different process; not stopping it" } |
There was a problem hiding this comment.
(ai: kilo/openai/gpt-6-astra)
WARNING: The tightened creation-time gate has no negative regression
No test supplies a process snapshot whose creation time differs from the process currently owning its PID, so reverting this comparison to the unsafe one-second window would still pass the suite. Successful deploy/rollback scenarios exercise only the matching-identity direction; AGENTS.md and reference/development-contract.md:131-133 require both directions of safety gates.
Add a deterministic case using a disposable process and a snapshot with its PID but a creation time 500 ms earlier. Assert the identity-mismatch diagnostic and that the process remains alive, then use its genuine snapshot as the positive control. This proves the changed threshold without depending on actual PID reuse.
- The supervisor and task-action check accepts only the host options this installation uses, spelled in full, before -File; abbreviated or unknown options do not match. - Tests: host-argument cases (including -f and the launcher passed as data), a stale process snapshot is refused and the process stays alive, and an inhibit replaced during the rollback is kept with no further lift. Assisted-by: Cindy (https://cindy.app)
|
(ai: anthropic/claude-fable-5-2) Reply to the re-review on
|
Scope
Closes #80. Adds maintained deploy and rollback scripts for the live proxy, a sandbox test for them, and the matching documentation. No change under
src/,kernel/orpi-subagents/; no config or env surface; nothing is shipped in the npm package.Nothing in this PR was run against the live proxy. No deployment took place, port 8787 was not contacted, and nothing was written under
%APPDATA%\CindyGlobal\billion-context-proxy. The scripts have only ever run against throw-away sandboxes.scripts/live-deploy/Deploy-LiveProxy.ps1,Rollback-LiveProxy.ps1,LiveProxy.Common.ps1tests/live-deploy-scripts.test.ts,tests/fixtures/live-deploy/(stand-in launcher, stand-in proxy, file-backed task driver)scripts/live-files.mjs(appended last),scripts/ci-shard-weights.jsonreference/cindy-project.md+.zh-CN.md, one sentence inreference/testing.mdWhat the scripts do
Deploy-LiveProxy.ps1follows the documented steps 3–9 in the sanctioned order (owner decision 2026-11-16, #78): preflight checks, backup and deployment record, hold (inhibit, task disabled, supervisor stopped), launcher edit, lift, the supervisor starts the new release, success test, receipts.Rollback-LiveProxy.ps1undoes one deployment from thedeploy-record.jsonthat the deploy wrote into its backup folder.-PreflightOnlyruns every check and changes nothing.Step 7's functional checks (a real request through the proxy) stay manual, as agreed in the spec.
How it is tested
One test file, 28 tests, Windows only (skipped elsewhere). Each scenario builds its own sandbox in the temp folder: a stand-in launcher run by Windows PowerShell as supervisor, a stand-in proxy answering the health endpoint, and a file-backed stand-in for the scheduled task.
The test-only seam (
-TestTaskDriver) works only when the runtime root containssandbox.marker, and is refused anywhere under the roamingCindyGlobalfolder. The real task driver is refused when the marker is present.Local evidence on the PR head, Windows 11, Node 24, with the files in the line endings a Windows checkout gives them (CRLF; the first two commits were also run with LF):
tests/live-deploy-scripts.test.ts: 28 pass, 0 fail, about 4.5 minutes, no sandbox folder or process left behind.npm run typecheck,check-unused-exports,check-test-import-graph,check-architecture-docs,tests/ci-shard-weights.test.ts,git diff --check: pass.Local verification is targeted; CI on the pushed head is the authority.
Departures from the spec in #80
ConvertTo-Json, so fields the script does not own keep their exact text.holding,held,cut,rolling-back,rollback-failed). A deploy killed between "inhibit removed" and "task enabled" leaves exactly that state, and the rollback must be usable there. A disabled task that the deployment does not explain is still refused. This changes an accepted acceptance criterion and needs the owner's yes.heldhas no test of its own. Kills at the stages before and after it are covered, and the rollback treatsheldlikeholding.failOn,onCall) instead of the names sketched in the spec.Automated review
The first review on
b04db286braised 15 findings. They are fixed in209793c6a; two re-reviews left six and then three, fixed in the two commits after it. See the three reply comments for each one. Additions beyond the spec as a result:live-deploy.lock, present only while a run is in progress);rolling-back, written by the standalone rollback before it changes anything;powershell.exe, only-NoProfile,-NonInteractive,-NoLogo,-ExecutionPolicy,-WindowStylebefore-File, spelled in full. Checked read-only against the real scheduled task and the running processes on the deployment machine: the task is accepted, one supervisor and one proxy are matched, and the neighbouring installation is not;Not in this PR
deployedConfigSha256is stale since the 2026-11-15 config change. The script takes the expected hash as a parameter and neither trusts nor rewrites that field.Deploy-Master.ps1/Rollback-MasterDeploy.ps1in the backup folder are untouched.Assisted-by: Cindy (https://cindy.app)