mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
241f520037
* feat(release): publish versioned catalog and DSH snapshots Add tools-release catalog export/pack/publish and a canonical DSH bootstrap source so landing can later consume immutable R2 snapshots without globbing the monorepo tree. * fix(release): harden catalog snapshot publishing * fix(release): use portable tar ownership flags * fix(release): resolve catalog root from git checkout * fix(release): stabilize catalog preview assets * fix(release): close catalog publish determinism gaps * fix(release): remove mutable catalog runtime metadata * fix(release): prevent stale catalog pointer updates * fix(release): fail all-fallback catalog previews * fix(release): fail previews with blocked dependencies * fix(release): export localized design system bodies * fix(release): pin catalog preview environment * fix(release): close catalog and bootstrap rollback gaps * fix(release): fail partial catalog preview renders * fix(release): render remote catalog entries locally * fix(release): keep DSH bootstrap publishes fresh * fix(release): parallelize catalog snapshot uploads * fix(release): preserve hidden catalog assets * fix(release): trigger catalog publish on storage helpers Include common.ts and s3-upload.ts in catalog-publish and catalog-validate path filters so publisher CAS, signing, and retry changes republish. * fix(release): gate catalog provenance and DSH helper triggers Validate complete provenance against the packed bundle before any immutable upload. Include common.ts and s3-upload.ts in the standalone DSH publisher path filter. * fix(release): match provenance recordCounts to catalog Derive counts from catalog.records and require an exact match before any immutable upload so empty or stale provenance cannot become latest.
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import { createHash } from "node:crypto";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
import {
|
|
dshBootstrapChecksums,
|
|
materializeDshBootstrapInstallers,
|
|
type DshBootstrapObject,
|
|
} from "../src/storage/dsh-bootstrap-bundle.ts";
|
|
|
|
const LANDING_PS1_URL = "https://open-design.ai/install-dsh.ps1?version=1";
|
|
|
|
function sources(cmd = `download '${LANDING_PS1_URL}'`): DshBootstrapObject[] {
|
|
return [
|
|
{ body: Buffer.from(cmd), name: "install-dsh.cmd" },
|
|
{ body: Buffer.from("powershell installer"), name: "install-dsh.ps1" },
|
|
{ body: Buffer.from("shell installer"), name: "install-dsh.sh" },
|
|
];
|
|
}
|
|
|
|
describe("DeepSeek Harness bootstrap bundle", () => {
|
|
it("pins a versioned CMD to its colocated immutable PowerShell installer", () => {
|
|
const installers = materializeDshBootstrapInstallers(
|
|
sources(),
|
|
"v7",
|
|
"https://releases.example.test/",
|
|
);
|
|
const cmd = installers.find(({ name }) => name === "install-dsh.cmd");
|
|
|
|
expect(cmd?.body.toString("utf8")).toContain(
|
|
"https://releases.example.test/bootstrap/dsh/v7/install-dsh.ps1",
|
|
);
|
|
expect(cmd?.body.toString("utf8")).not.toContain(LANDING_PS1_URL);
|
|
|
|
const checksums = dshBootstrapChecksums(installers).toString("utf8");
|
|
expect(checksums).toContain(
|
|
`${createHash("sha256").update(cmd!.body).digest("hex")} install-dsh.cmd`,
|
|
);
|
|
});
|
|
|
|
it("fails closed if the canonical CMD no longer has one rewrite marker", () => {
|
|
expect(() =>
|
|
materializeDshBootstrapInstallers(sources("no remote PS1 marker"), "v7", "https://releases.example.test"),
|
|
).toThrow(/exactly one landing PS1 URL/);
|
|
});
|
|
});
|