@pleri/olam-cli 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/auth-status.test.js +8 -7
- package/dist/__tests__/auth-status.test.js.map +1 -1
- package/dist/__tests__/help-output.test.d.ts +2 -0
- package/dist/__tests__/help-output.test.d.ts.map +1 -0
- package/dist/__tests__/help-output.test.js +74 -0
- package/dist/__tests__/help-output.test.js.map +1 -0
- package/dist/__tests__/image-presence.test.d.ts +2 -0
- package/dist/__tests__/image-presence.test.d.ts.map +1 -0
- package/dist/__tests__/image-presence.test.js +44 -0
- package/dist/__tests__/image-presence.test.js.map +1 -0
- package/dist/__tests__/protocol-version.test.d.ts +2 -0
- package/dist/__tests__/protocol-version.test.d.ts.map +1 -0
- package/dist/__tests__/protocol-version.test.js +170 -0
- package/dist/__tests__/protocol-version.test.js.map +1 -0
- package/dist/__tests__/registry-allowlist.test.d.ts +2 -0
- package/dist/__tests__/registry-allowlist.test.d.ts.map +1 -0
- package/dist/__tests__/registry-allowlist.test.js +129 -0
- package/dist/__tests__/registry-allowlist.test.js.map +1 -0
- package/dist/commands/__tests__/crystallize.test.d.ts +2 -0
- package/dist/commands/__tests__/crystallize.test.d.ts.map +1 -0
- package/dist/commands/__tests__/crystallize.test.js +133 -0
- package/dist/commands/__tests__/crystallize.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.all-three.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.all-three.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.all-three.test.js +92 -0
- package/dist/commands/__tests__/upgrade.all-three.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.history.test.d.ts +15 -0
- package/dist/commands/__tests__/upgrade.history.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.history.test.js +199 -0
- package/dist/commands/__tests__/upgrade.history.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.lock.test.d.ts +15 -0
- package/dist/commands/__tests__/upgrade.lock.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.lock.test.js +253 -0
- package/dist/commands/__tests__/upgrade.lock.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.d.ts +21 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.js +127 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.poll.test.d.ts +14 -0
- package/dist/commands/__tests__/upgrade.poll.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.poll.test.js +136 -0
- package/dist/commands/__tests__/upgrade.poll.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.recreate.test.d.ts +17 -0
- package/dist/commands/__tests__/upgrade.recreate.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.recreate.test.js +95 -0
- package/dist/commands/__tests__/upgrade.recreate.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.rollback.test.d.ts +12 -0
- package/dist/commands/__tests__/upgrade.rollback.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.rollback.test.js +275 -0
- package/dist/commands/__tests__/upgrade.rollback.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.d.ts +12 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.js +63 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.smoke.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.smoke.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.smoke.test.js +101 -0
- package/dist/commands/__tests__/upgrade.smoke.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.swap.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.swap.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.swap.test.js +333 -0
- package/dist/commands/__tests__/upgrade.swap.test.js.map +1 -0
- package/dist/commands/auth-status.d.ts +8 -1
- package/dist/commands/auth-status.d.ts.map +1 -1
- package/dist/commands/auth-status.js +2 -1
- package/dist/commands/auth-status.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +31 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/crystallize.d.ts +11 -1
- package/dist/commands/crystallize.d.ts.map +1 -1
- package/dist/commands/crystallize.js +32 -8
- package/dist/commands/crystallize.js.map +1 -1
- package/dist/commands/upgrade-history.d.ts +17 -0
- package/dist/commands/upgrade-history.d.ts.map +1 -0
- package/dist/commands/upgrade-history.js +40 -0
- package/dist/commands/upgrade-history.js.map +1 -0
- package/dist/commands/upgrade-lock.d.ts +102 -0
- package/dist/commands/upgrade-lock.d.ts.map +1 -0
- package/dist/commands/upgrade-lock.js +225 -0
- package/dist/commands/upgrade-lock.js.map +1 -0
- package/dist/commands/upgrade-log.d.ts +86 -0
- package/dist/commands/upgrade-log.d.ts.map +1 -0
- package/dist/commands/upgrade-log.js +146 -0
- package/dist/commands/upgrade-log.js.map +1 -0
- package/dist/commands/upgrade.d.ts +265 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +840 -10
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/exit-codes.d.ts +35 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +35 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/image-presence.d.ts +40 -0
- package/dist/image-presence.d.ts.map +1 -0
- package/dist/image-presence.js +39 -0
- package/dist/image-presence.js.map +1 -0
- package/dist/index.js +1058 -168
- package/dist/index.js.map +1 -1
- package/dist/pleri-config.d.ts +22 -0
- package/dist/pleri-config.d.ts.map +1 -0
- package/dist/pleri-config.js +42 -0
- package/dist/pleri-config.js.map +1 -0
- package/dist/protocol-version.d.ts +79 -0
- package/dist/protocol-version.d.ts.map +1 -0
- package/dist/protocol-version.js +133 -0
- package/dist/protocol-version.js.map +1 -0
- package/dist/registry-allowlist.d.ts +47 -0
- package/dist/registry-allowlist.d.ts.map +1 -0
- package/dist/registry-allowlist.js +67 -0
- package/dist/registry-allowlist.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `~/.olam/upgrade.log` — JSONL append-only audit log for `olam upgrade`.
|
|
3
|
+
*
|
|
4
|
+
* Phase 2c — C1.
|
|
5
|
+
*
|
|
6
|
+
* Schema:
|
|
7
|
+
* {
|
|
8
|
+
* ts: ISO 8601,
|
|
9
|
+
* started_at: epoch ms,
|
|
10
|
+
* ended_at: epoch ms,
|
|
11
|
+
* sha_target: string (40-char SHA, captured-after-pull),
|
|
12
|
+
* sha_before: { hostCp, authService, devbox },
|
|
13
|
+
* sha_after: { hostCp, authService, devbox },
|
|
14
|
+
* status: "success" | "failed" | "rolled_back",
|
|
15
|
+
* failed_step: string | null,
|
|
16
|
+
* durations_ms: { [step_label]: number }
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* Open-per-write semantics — open() + write() + close() per row so
|
|
20
|
+
* external log-rotators can rename the file mid-run without us writing
|
|
21
|
+
* to a now-unlinked fd. Best-effort; errors logged to stderr and
|
|
22
|
+
* swallowed so the audit log never blocks an upgrade from completing.
|
|
23
|
+
*
|
|
24
|
+
* `failed_step` MUST hold a step LABEL only (e.g. "bash build-auth.sh"),
|
|
25
|
+
* NEVER raw stdout/stderr — paths and credentials may leak. (Per audit
|
|
26
|
+
* security finding A6-007.) The CLI's terminal already shows the full
|
|
27
|
+
* stderr; the log row records the step name for queryability.
|
|
28
|
+
*/
|
|
29
|
+
import * as fs from 'node:fs';
|
|
30
|
+
import * as os from 'node:os';
|
|
31
|
+
import * as path from 'node:path';
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the upgrade-log path lazily so tests can override HOME via
|
|
34
|
+
* process.env. Lazy resolution is also forward-compatible with operators
|
|
35
|
+
* who set XDG_DATA_HOME or similar overrides at session start.
|
|
36
|
+
*/
|
|
37
|
+
export function getUpgradeLogPath() {
|
|
38
|
+
const home = process.env['HOME'] ?? os.homedir();
|
|
39
|
+
return path.join(home, '.olam', 'upgrade.log');
|
|
40
|
+
}
|
|
41
|
+
/** Convenience constant for callers who want the production path string. */
|
|
42
|
+
export const UPGRADE_LOG_PATH = getUpgradeLogPath();
|
|
43
|
+
/**
|
|
44
|
+
* Append a single row to ~/.olam/upgrade.log.
|
|
45
|
+
*
|
|
46
|
+
* Open-per-write to survive log rotation. Errors swallowed to stderr —
|
|
47
|
+
* audit log failure must never block an upgrade.
|
|
48
|
+
*
|
|
49
|
+
* `logPath` parameter is a test seam; production callers omit it.
|
|
50
|
+
*/
|
|
51
|
+
export function appendUpgradeLog(row, logPath = getUpgradeLogPath()) {
|
|
52
|
+
try {
|
|
53
|
+
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
54
|
+
const line = JSON.stringify(row) + '\n';
|
|
55
|
+
fs.appendFileSync(logPath, line, { mode: 0o644 });
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
process.stderr.write(`[upgrade-log] failed to append: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Read up to N most-recent rows from ~/.olam/upgrade.log.
|
|
63
|
+
*
|
|
64
|
+
* Returns an empty array on missing file (first-run UX).
|
|
65
|
+
*
|
|
66
|
+
* Per audit invariant: corrupt JSON lines (partial mid-write, manual
|
|
67
|
+
* tampering) are SKIPPED with a stderr warning rather than crashing
|
|
68
|
+
* `--history`.
|
|
69
|
+
*/
|
|
70
|
+
export function readUpgradeLog(limit = 10, logPath = getUpgradeLogPath()) {
|
|
71
|
+
if (!fs.existsSync(logPath))
|
|
72
|
+
return [];
|
|
73
|
+
let raw;
|
|
74
|
+
try {
|
|
75
|
+
raw = fs.readFileSync(logPath, 'utf-8');
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
process.stderr.write(`[upgrade-log] failed to read: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
const lines = raw.split('\n').filter((l) => l.length > 0);
|
|
82
|
+
const rows = [];
|
|
83
|
+
for (let i = 0; i < lines.length; i++) {
|
|
84
|
+
const line = lines[i];
|
|
85
|
+
try {
|
|
86
|
+
const parsed = JSON.parse(line);
|
|
87
|
+
// Defensive shape check — silently skip rows that don't look right.
|
|
88
|
+
if (typeof parsed.ts === 'string' &&
|
|
89
|
+
typeof parsed.started_at === 'number' &&
|
|
90
|
+
typeof parsed.status === 'string') {
|
|
91
|
+
rows.push(parsed);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
process.stderr.write(`[upgrade-log] skipped malformed row at line ${i + 1}\n`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
process.stderr.write(`[upgrade-log] skipped corrupt JSON at line ${i + 1}\n`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Most recent last (file is chronological); return last N.
|
|
102
|
+
return rows.slice(-Math.max(0, limit));
|
|
103
|
+
}
|
|
104
|
+
/** Format duration ms → "1.4s" / "12m04s" / "1h23m" for table display. */
|
|
105
|
+
export function formatDuration(ms) {
|
|
106
|
+
if (ms < 1000)
|
|
107
|
+
return `${ms}ms`;
|
|
108
|
+
const totalSec = Math.round(ms / 1000);
|
|
109
|
+
if (totalSec < 60)
|
|
110
|
+
return `${totalSec}s`;
|
|
111
|
+
const min = Math.floor(totalSec / 60);
|
|
112
|
+
const sec = totalSec % 60;
|
|
113
|
+
if (min < 60)
|
|
114
|
+
return `${min}m${String(sec).padStart(2, '0')}s`;
|
|
115
|
+
const hr = Math.floor(min / 60);
|
|
116
|
+
const remMin = min % 60;
|
|
117
|
+
return `${hr}h${String(remMin).padStart(2, '0')}m`;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Format an array of upgrade-log rows as a 5-column ASCII table:
|
|
121
|
+
* timestamp | sha (8-char) | status | duration | failed_step
|
|
122
|
+
*
|
|
123
|
+
* Status column uses ✓/✗/↩ icons + plain text for grep-friendliness.
|
|
124
|
+
*/
|
|
125
|
+
export function formatHistoryTable(rows) {
|
|
126
|
+
if (rows.length === 0) {
|
|
127
|
+
return 'No upgrade history yet. Run `olam upgrade` to create your first record.';
|
|
128
|
+
}
|
|
129
|
+
const lines = [];
|
|
130
|
+
lines.push('TIMESTAMP SHA STATUS DURATION FAILED-STEP');
|
|
131
|
+
lines.push('────────────────────────────────────────────────────────────────────────────────');
|
|
132
|
+
for (const r of rows) {
|
|
133
|
+
const ts = r.ts.slice(0, 19).replace('T', ' ');
|
|
134
|
+
const sha = r.sha_target.slice(0, 8);
|
|
135
|
+
const statusIcon = r.status === 'success' ? '✓ success' : r.status === 'rolled_back' ? '↩ rolled_back' : '✗ failed';
|
|
136
|
+
const dur = formatDuration(r.ended_at - r.started_at);
|
|
137
|
+
const failed = r.failed_step ?? '';
|
|
138
|
+
lines.push(`${ts.padEnd(28)}${sha.padEnd(10)}${statusIcon.padEnd(15)}${dur.padEnd(11)}${failed}`);
|
|
139
|
+
}
|
|
140
|
+
return lines.join('\n');
|
|
141
|
+
}
|
|
142
|
+
/** Format rows as one JSON object per line (JSONL passthrough — same as on-disk format). */
|
|
143
|
+
export function formatHistoryJson(rows) {
|
|
144
|
+
return rows.map((r) => JSON.stringify(r)).join('\n');
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=upgrade-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-log.js","sourceRoot":"","sources":["../../src/commands/upgrade-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EA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C,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC/C,MAAM,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrC,MAAM,UAAU,GACd,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC;QACnG,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC;QACnC,KAAK,CAAC,IAAI,CACR,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,iBAAiB,CAAC,IAAkC;IAClE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -16,6 +16,17 @@ export interface UpgradeOpts {
|
|
|
16
16
|
readonly skipImage: boolean;
|
|
17
17
|
readonly skipInstall: boolean;
|
|
18
18
|
readonly branch: string | null;
|
|
19
|
+
/** Phase 2b — B1: roll back to :olam-rollback set instead of upgrading. */
|
|
20
|
+
readonly rollback: boolean;
|
|
21
|
+
/** Phase 2b — B2: bypass HEAD-drift refusal at swap boundary. */
|
|
22
|
+
readonly force: boolean;
|
|
23
|
+
/** Phase 2b — B3: pass --no-cache through to all three build scripts. */
|
|
24
|
+
readonly noCache: boolean;
|
|
25
|
+
/** Phase 2c — C2: read upgrade history instead of running an upgrade. */
|
|
26
|
+
readonly history: boolean;
|
|
27
|
+
/** Phase 2c — C2: --history -n <N>; --history --json. */
|
|
28
|
+
readonly historyN: number;
|
|
29
|
+
readonly historyJson: boolean;
|
|
19
30
|
}
|
|
20
31
|
/**
|
|
21
32
|
* Check whether node_modules is in sync with package-lock.json.
|
|
@@ -57,11 +68,265 @@ export declare function parseUpgradeOpts(raw: {
|
|
|
57
68
|
skipImage?: boolean;
|
|
58
69
|
skipInstall?: boolean;
|
|
59
70
|
branch?: string;
|
|
71
|
+
rollback?: boolean;
|
|
72
|
+
force?: boolean;
|
|
73
|
+
noCache?: boolean;
|
|
74
|
+
history?: boolean;
|
|
75
|
+
n?: string | number;
|
|
76
|
+
json?: boolean;
|
|
60
77
|
}): UpgradeOpts;
|
|
61
78
|
/**
|
|
62
79
|
* Extract the JS bundle hash from index.html.
|
|
63
80
|
* Looks for the canonical Vite output pattern: `/assets/index-<hash>.js`.
|
|
64
81
|
*/
|
|
65
82
|
export declare function extractBundleHash(indexHtml: string): string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Capture HEAD SHA via `git rev-parse HEAD`. Returns null on failure.
|
|
85
|
+
*
|
|
86
|
+
* Phase 2a — A2: must be invoked AFTER `git pull --ff-only` so the captured
|
|
87
|
+
* SHA reflects the state we're upgrading TO (not the pre-pull state). The
|
|
88
|
+
* pull's whole purpose is to advance HEAD; capturing before would refuse the
|
|
89
|
+
* CLI's own pull as drift at A6's swap-boundary check.
|
|
90
|
+
*
|
|
91
|
+
* The returned SHA is sticky for the rest of the run (no per-step re-reads);
|
|
92
|
+
* A6 / B4 re-read once at the swap boundary to detect operator-driven mid-flight
|
|
93
|
+
* `git checkout` / `git reset` that happen DURING the build window.
|
|
94
|
+
*/
|
|
95
|
+
export declare function captureHeadSha(cwd: string): string | null;
|
|
96
|
+
/** Abbreviate a 40-char SHA to 8 chars for human-readable output. */
|
|
97
|
+
export declare function abbreviateSha(sha: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* Check whether a docker image tag exists locally (Phase 2b — B1).
|
|
100
|
+
*
|
|
101
|
+
* Uses `docker image inspect` which exits 0 only when ALL specified
|
|
102
|
+
* images exist locally. Single-image variant for the rollback pre-flight.
|
|
103
|
+
*/
|
|
104
|
+
export declare function imageExists(tag: string): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Pre-flight check for `olam upgrade --rollback` (Phase 2b — B1).
|
|
107
|
+
*
|
|
108
|
+
* Verifies that all three `:olam-rollback` tags exist. Returns an error
|
|
109
|
+
* message naming the missing image(s) when any are absent — typically
|
|
110
|
+
* the first-upgrade case where no prior canonical existed for one or
|
|
111
|
+
* more components, leaving the rollback set incoherent (see audit A6-001).
|
|
112
|
+
*
|
|
113
|
+
* Returns null when all three are present (rollback is safe to proceed).
|
|
114
|
+
*/
|
|
115
|
+
export declare function checkRollbackSetExists(plan: ReadonlyArray<SwapPlan>): string | null;
|
|
116
|
+
/**
|
|
117
|
+
* Per-image smoke result (Phase 2a — A5).
|
|
118
|
+
*
|
|
119
|
+
* `docker create + docker inspect` validates the freshly-built `:olam-next`
|
|
120
|
+
* image is well-formed AND its baked OLAM_BUILD_SHA label matches the
|
|
121
|
+
* captured target SHA. Catches build-corrupt cases (compile errors hidden,
|
|
122
|
+
* missing files, etc.) before A6's atomic swap touches canonical tags.
|
|
123
|
+
*
|
|
124
|
+
* Does NOT bind ports (docker create only allocates the container's
|
|
125
|
+
* filesystem; doesn't start the entrypoint), so it's safe to run while
|
|
126
|
+
* the existing host-cp/auth containers are running on their canonical ports.
|
|
127
|
+
*
|
|
128
|
+
* Runtime startup bugs are caught later by /api/version/status post-recreate
|
|
129
|
+
* (A8), per the local-dev/dogfood priority axis (logic correctness > security
|
|
130
|
+
* hardening).
|
|
131
|
+
*/
|
|
132
|
+
export interface SmokeResult {
|
|
133
|
+
readonly image: string;
|
|
134
|
+
readonly ok: boolean;
|
|
135
|
+
readonly bakedSha: string | null;
|
|
136
|
+
readonly error?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Run docker create + docker inspect for a single image.
|
|
140
|
+
*
|
|
141
|
+
* Returns ok=true when:
|
|
142
|
+
* - `docker create <image>` exits 0 (image manifest valid, layers downloadable).
|
|
143
|
+
* - `docker inspect <image> --format '{{.Config.Labels.olam_build_sha}}'`
|
|
144
|
+
* returns the expected `targetSha`.
|
|
145
|
+
*
|
|
146
|
+
* The container created by `docker create` is removed via `docker rm` even on
|
|
147
|
+
* failure paths (best-effort cleanup; orphans are harmless and pruned by the
|
|
148
|
+
* daemon's GC eventually).
|
|
149
|
+
*/
|
|
150
|
+
export declare function smokeImage(image: string, targetSha: string): SmokeResult;
|
|
151
|
+
/**
|
|
152
|
+
* Per-image swap mapping (Phase 2a — A6).
|
|
153
|
+
*
|
|
154
|
+
* Auth uses `:local` (NOT `:latest`) per AuthContainerController.DEFAULT_IMAGE.
|
|
155
|
+
* Host-cp + devbox use `:latest`. The transient `:olam-next` and rollback
|
|
156
|
+
* `:olam-rollback` namespaces are uniform across all three.
|
|
157
|
+
*/
|
|
158
|
+
export interface SwapPlan {
|
|
159
|
+
readonly transient: string;
|
|
160
|
+
readonly canonical: string;
|
|
161
|
+
readonly rollback: string;
|
|
162
|
+
}
|
|
163
|
+
export declare const PRODUCTION_SWAP_PLAN: ReadonlyArray<SwapPlan>;
|
|
164
|
+
/** Result of a single `docker tag` op. */
|
|
165
|
+
interface DockerTagResult {
|
|
166
|
+
readonly ok: boolean;
|
|
167
|
+
readonly error?: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Run `docker tag <source> <dest>`. Returns ok=false with stderr trimmed
|
|
171
|
+
* on failure (e.g. source image absent). No retry — caller decides.
|
|
172
|
+
*
|
|
173
|
+
* Per audit A6-003: spawnSync may throw synchronously under fork pressure
|
|
174
|
+
* (libuv clone(2) failures). The try/catch ensures performAtomicSwap can
|
|
175
|
+
* always proceed to its summary phase — a thrown exception escaping
|
|
176
|
+
* dockerTag would leak the upgrade lock and produce no SwapResult, which
|
|
177
|
+
* confuses both the operator AND Phase 2b's --rollback recovery path.
|
|
178
|
+
*/
|
|
179
|
+
export declare function dockerTag(source: string, dest: string): DockerTagResult;
|
|
180
|
+
/**
|
|
181
|
+
* Per-image swap result. The two phases (rollback-save + canonical-advance)
|
|
182
|
+
* are tracked separately so SIGKILL-recovery paths can diagnose partial state.
|
|
183
|
+
*/
|
|
184
|
+
export interface SwapStepResult {
|
|
185
|
+
readonly image: string;
|
|
186
|
+
/** Did rollback-save (canonical → :olam-rollback) succeed? false on first-upgrade — non-fatal. */
|
|
187
|
+
readonly rollbackSaved: boolean;
|
|
188
|
+
/** Did canonical-advance (:olam-next → canonical) succeed? Fatal if false. */
|
|
189
|
+
readonly canonicalAdvanced: boolean;
|
|
190
|
+
readonly rollbackError?: string;
|
|
191
|
+
readonly canonicalError?: string;
|
|
192
|
+
}
|
|
193
|
+
export interface SwapResult {
|
|
194
|
+
readonly ok: boolean;
|
|
195
|
+
readonly steps: ReadonlyArray<SwapStepResult>;
|
|
196
|
+
readonly partialAdvance: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* True when ALL three :olam-rollback tags were successfully written before
|
|
199
|
+
* any canonical-advance was attempted. False when at least one Phase-1
|
|
200
|
+
* rollback-save failed (typically first-upgrade where the canonical didn't
|
|
201
|
+
* exist; Phase 2b's --rollback pre-flight detects empty-or-partial
|
|
202
|
+
* rollback set and refuses).
|
|
203
|
+
*
|
|
204
|
+
* Per audit A6-001: the partial-Phase-1 + Phase-2-fail combination would
|
|
205
|
+
* otherwise emit a misleading "run --rollback" hint when the rollback set
|
|
206
|
+
* is INCOHERENT and `--rollback` would either partially restore or refuse.
|
|
207
|
+
* The summary string branches on this flag.
|
|
208
|
+
*/
|
|
209
|
+
readonly rollbackCoherent: boolean;
|
|
210
|
+
readonly summary: string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Atomic-ish 3-image set swap.
|
|
214
|
+
*
|
|
215
|
+
* Six sequential `docker tag` ops in two phases:
|
|
216
|
+
*
|
|
217
|
+
* Phase 1 (rollback-save):
|
|
218
|
+
* 1. canonical → :olam-rollback (image 1)
|
|
219
|
+
* 2. canonical → :olam-rollback (image 2)
|
|
220
|
+
* 3. canonical → :olam-rollback (image 3)
|
|
221
|
+
*
|
|
222
|
+
* Phase 2 (canonical-advance):
|
|
223
|
+
* 4. :olam-next → canonical (image 1)
|
|
224
|
+
* 5. :olam-next → canonical (image 2)
|
|
225
|
+
* 6. :olam-next → canonical (image 3)
|
|
226
|
+
*
|
|
227
|
+
* Invariants:
|
|
228
|
+
*
|
|
229
|
+
* - **First-upgrade tolerance**: any of steps 1-3 may fail with "no such
|
|
230
|
+
* image" if the operator has never had a canonical-tagged image. Those
|
|
231
|
+
* failures are NON-FATAL (recorded in rollbackError but not aborted) —
|
|
232
|
+
* `:olam-rollback` simply doesn't exist for that image; Phase 2b's
|
|
233
|
+
* `--rollback` pre-flight detects this and refuses.
|
|
234
|
+
*
|
|
235
|
+
* - **Canonical-advance fatality**: any failure in steps 4-6 is fatal.
|
|
236
|
+
* The swap is partially advanced; canonical tags are now mixed (some
|
|
237
|
+
* at SHA-Y, some at SHA-X). Operator runs `olam upgrade --rollback`
|
|
238
|
+
* (Phase 2b) which uses the FULL `:olam-rollback` set written in Phase 1
|
|
239
|
+
* to restore coherent prior state.
|
|
240
|
+
*
|
|
241
|
+
* - **SIGKILL recovery**: if killed during Phase 1, partial `:olam-rollback`
|
|
242
|
+
* exists but canonical is intact — operator's next `olam upgrade` succeeds
|
|
243
|
+
* normally (the partial `:olam-rollback` is overwritten by the next
|
|
244
|
+
* successful run). If killed during Phase 2, canonical is mixed —
|
|
245
|
+
* operator must `olam upgrade --rollback` to recover.
|
|
246
|
+
*
|
|
247
|
+
* The "atomic-ish" qualifier: `docker tag` is per-image atomic (POSIX rename
|
|
248
|
+
* of a symbolic name), but the SET of 3 canonical tags is updated sequentially
|
|
249
|
+
* across ~1s wall-clock. Sub-second window is acceptable for solo-dev/dogfood
|
|
250
|
+
* per the plan's local-dev/dogfood priority axis.
|
|
251
|
+
*/
|
|
252
|
+
export declare function performAtomicSwap(plan: ReadonlyArray<SwapPlan>): SwapResult;
|
|
253
|
+
/**
|
|
254
|
+
* Inverse of performAtomicSwap — restore canonical from :olam-rollback
|
|
255
|
+
* (Phase 2b — B1). Three sequential `docker tag` ops:
|
|
256
|
+
*
|
|
257
|
+
* docker tag olam-auth:olam-rollback olam-auth:local
|
|
258
|
+
* docker tag olam-devbox:olam-rollback olam-devbox:latest
|
|
259
|
+
* docker tag olam-host-cp:olam-rollback olam-host-cp:latest
|
|
260
|
+
*
|
|
261
|
+
* No two-phase ceremony — the source `:olam-rollback` set is already a
|
|
262
|
+
* coherent prior-good captured by a previous successful `olam upgrade`,
|
|
263
|
+
* so we don't need to preserve current canonical (it's known-broken,
|
|
264
|
+
* which is why we're rolling back).
|
|
265
|
+
*
|
|
266
|
+
* Caller MUST pre-flight via `checkRollbackSetExists()` before invoking.
|
|
267
|
+
* Behavior on missing source is per-image fatal (returns ok=false +
|
|
268
|
+
* error naming the missing image).
|
|
269
|
+
*/
|
|
270
|
+
export declare function performRollbackSwap(plan: ReadonlyArray<SwapPlan>): {
|
|
271
|
+
ok: boolean;
|
|
272
|
+
results: ReadonlyArray<{
|
|
273
|
+
image: string;
|
|
274
|
+
ok: boolean;
|
|
275
|
+
error?: string;
|
|
276
|
+
}>;
|
|
277
|
+
summary: string;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Snapshot of /api/version/status response (Phase 1 contract).
|
|
281
|
+
*
|
|
282
|
+
* Mirrors the VersionSnapshot type from packages/host-cp/src/version-status.mjs.
|
|
283
|
+
* Kept inline (no shared module import) to avoid CLI ↔ host-cp import cycles.
|
|
284
|
+
*/
|
|
285
|
+
export interface VersionSnapshot {
|
|
286
|
+
readonly hostCp: {
|
|
287
|
+
readonly running: string;
|
|
288
|
+
readonly latest: string;
|
|
289
|
+
readonly upgradeAvailable: boolean;
|
|
290
|
+
};
|
|
291
|
+
readonly authService: {
|
|
292
|
+
readonly running: string;
|
|
293
|
+
readonly latest: string;
|
|
294
|
+
readonly upgradeAvailable: boolean;
|
|
295
|
+
};
|
|
296
|
+
readonly devbox: {
|
|
297
|
+
readonly running: string;
|
|
298
|
+
readonly latest: string;
|
|
299
|
+
readonly upgradeAvailable: boolean;
|
|
300
|
+
};
|
|
301
|
+
readonly operatorHead: string;
|
|
302
|
+
readonly checkedAt: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Poll /api/version/status until all three component `.running` SHAs match
|
|
306
|
+
* `targetSha`, or until `timeoutMs` elapses. Returns the final snapshot.
|
|
307
|
+
*
|
|
308
|
+
* Phase 2a — A8: this is the success criterion for the entire upgrade.
|
|
309
|
+
* After A6's atomic swap + A7's recreate, the new images should report
|
|
310
|
+
* the new SHA via OLAM_BUILD_SHA baked at build time. Round-trip through
|
|
311
|
+
* Phase 1's detection path closes the loop.
|
|
312
|
+
*
|
|
313
|
+
* Returns:
|
|
314
|
+
* - { matched: true, snapshot } when all three SHAs equal targetSha within timeout.
|
|
315
|
+
* - { matched: false, snapshot } when timeout expires; caller decides
|
|
316
|
+
* whether to warn (recreate succeeded but propagation slow) or error.
|
|
317
|
+
* - { matched: false, snapshot: null } when /api/version/status is
|
|
318
|
+
* unreachable for the entire timeout (host-cp didn't come back up).
|
|
319
|
+
*/
|
|
320
|
+
export declare function waitForVersionMatch(targetSha: string, timeoutMs?: number, pollIntervalMs?: number): Promise<{
|
|
321
|
+
matched: boolean;
|
|
322
|
+
snapshot: VersionSnapshot | null;
|
|
323
|
+
}>;
|
|
324
|
+
/**
|
|
325
|
+
* Format a version-snapshot mismatch into a readable per-component diff
|
|
326
|
+
* (Phase 2a — A8). Used in the timeout-warn path so the operator sees
|
|
327
|
+
* which component is lagging.
|
|
328
|
+
*/
|
|
329
|
+
export declare function formatVersionMismatch(targetSha: string, snapshot: VersionSnapshot | null): string;
|
|
66
330
|
export declare function registerUpgrade(program: Command): void;
|
|
331
|
+
export {};
|
|
67
332
|
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/commands/upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAA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