@rizom/ops 0.2.0-alpha.371 → 0.2.0-alpha.373

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.
@@ -1,3 +1,4 @@
1
1
  export { readJsonResponse, parseEnvFile, parseEnvSchema, parseEnvSchemaFile, requireEnv, writeGitHubOutput, writeGitHubEnv, } from "@brains/deploy-support";
2
+ export { verifyRuntimeImage } from "../image-inventory";
2
3
  export type { EnvSchemaEntry } from "@brains/deploy-support";
3
4
  export { runtimeImageTag, sitePackagesFor, requiredImages, resolveImageBuilds, runResolveMissingImages, type ImageRequirementSource, type RequiredImage, type ResolveImageBuildsOptions, type RunResolveMissingImagesOptions, } from "../images";
@@ -0,0 +1,4 @@
1
+ import type { RequiredImage } from "./image-types";
2
+ import { type RunCommand } from "./run-subprocess";
3
+ /** Verify a published image without starting an app or touching a fleet host. */
4
+ export declare function verifyRuntimeImage(imageRepository: string, image: RequiredImage, run?: RunCommand): Promise<void>;
@@ -0,0 +1,7 @@
1
+ /** Exact runtime requirements shared by image planning and verification. */
2
+ export interface RequiredImage {
3
+ tag: string;
4
+ brainVersion: string;
5
+ /** Sorted, deduped package specs installed into this runtime image. */
6
+ sitePackages: string[];
7
+ }
package/dist/images.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { RequiredImage } from "./image-types";
2
+ export type { RequiredImage } from "./image-types";
1
3
  import { type ResolvedSiteOverride } from "./load-registry";
2
4
  import { type RunCommand } from "./run-subprocess";
3
5
  /**
@@ -7,7 +9,7 @@ import { type RunCommand } from "./run-subprocess";
7
9
  */
8
10
  export declare function runtimeImageTag(brainVersion: string): string;
9
11
  /**
10
- * The npm packages a site override contributes to its version's shared image.
12
+ * The npm packages a site override contributes to every new fleet image.
11
13
  * A @rizom-scoped theme is independently published and installs at its own
12
14
  * explicit version; @brains/* themes are bundled inside @rizom/brain and must
13
15
  * not be npm-installed.
@@ -18,23 +20,17 @@ export interface ImageRequirementSource {
18
20
  brainVersion: string;
19
21
  siteOverride?: ResolvedSiteOverride | undefined;
20
22
  }
21
- export interface RequiredImage {
22
- tag: string;
23
- brainVersion: string;
24
- /** Sorted, deduped package specs installed into this runtime image. */
25
- sitePackages: string[];
26
- }
27
23
  /**
28
24
  * Derive one immutable image per effective Brain version. Each image contains
29
- * the union of exact site/theme package pins required by every instance on
30
- * that version.
25
+ * the union of exact site/theme package pins across the entire fleet, including
26
+ * instances still on older Brain versions. Promotion must not change an image.
31
27
  */
32
28
  export declare function requiredImages(users: ImageRequirementSource[]): RequiredImage[];
33
29
  export interface ResolveImageBuildsOptions {
34
30
  users: ImageRequirementSource[];
35
31
  /**
36
32
  * Explicit dispatch override — the manual/backfill path. When set, exactly
37
- * this one image is built, skipping the registry-derived resolve. Published
33
+ * this one version is built with the fleet union plus explicit extra pins. Published
38
34
  * tags stay immutable: a same-tag rebuild from a newer Dockerfile can
39
35
  * strand the tag boot-broken, so rebuilding needs allowTagOverwrite.
40
36
  */
@@ -42,6 +38,8 @@ export interface ResolveImageBuildsOptions {
42
38
  sitePackagesInput?: string | undefined;
43
39
  allowTagOverwrite?: boolean | undefined;
44
40
  imageExists: (tag: string) => Promise<boolean>;
41
+ /** Fail closed if a published image cannot serve its assigned instances. */
42
+ verifyImage: (image: RequiredImage) => Promise<void>;
45
43
  }
46
44
  /**
47
45
  * Decide which images a Build run must produce: the declared required set