Unify workspace authoring, verification and scaffolding workflows

Use exact jj snapshots and one candidate-bound Nix builder for incremental checks, template validation and activation. Keep provenance internal and separate recovery checkpoint failures from local command success.

Provision workspace-scoped managed package/interface repositories with recoverable Central effects. Add TypeScript/React presets, function and dependency commands, and scaffold enrollment for all TODO packages. Install authoring guides and controlled Codex sandbox rules.

Invalidate module resolutions across cutover, including in-flight races, and content-address host platform entries. Strengthen domain-model and verification instructions.

Validated real jj/Nix authoring, React/Slate dependency installation, bottom-up local Git publication, packaged CLI tests, PostgreSQL recovery/auth tests, Web Studio tests and host configuration. Public protocol/helpers and the validated 19-resource TODO template are published. Retained the approved exact private baseline and updated the installation's default template pin to 68d54f0d52be433ebf60bdc1faf7646c57f90307. Master and live deployments remain unchanged. See docs/WORKSPACE_AUTHORING_PROGRESS.md.
This commit is contained in:
Timothy J. Aveni
2026-09-13 22:07:18 -07:00
parent 16b28f1bc4
commit fae4e48f72
11 changed files with 288 additions and 116 deletions
+13 -2
View File
@@ -10,6 +10,17 @@ import {planStructure, applyStructure} from "../src/capability-language/structur
import {contentDigest} from "../src/capability-model/evolution.js";
const execFile = promisify(callback);
test("React preset applies its browser build script and shared-platform imports", async (context) => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "qx-react-recipe-"));
context.after(() => fs.rm(root, {recursive: true, force: true}));
await execFile("git", ["-C", root, "init"]);
const source = {repository: "https://example.test/react.git", commit: "a".repeat(40)};
const request = await scaffoldRecipe(root, "package", {source, name: "React", id: "package:react", revision: "package:react@1", template: "typescript-react", tools: {quixos: source, protocol: source, helpers: source, sdk: source}});
await applyStructure(await planStructure(root, request));
assert.match(await fs.readFile(path.join(root, "scripts/build-component.mjs"), "utf8"), /__quixos\/platform\/react/);
assert.equal(JSON.parse(await fs.readFile(path.join(root, "tsconfig.json"), "utf8")).compilerOptions.jsx, "react-jsx");
});
test("package/function/migration scaffolds register implementations and refresh code digests without overwriting code", async (context) => {
const root = await fs.mkdtemp(path.join(os.tmpdir(), "qx-recipes-"));
context.after(() => fs.rm(root, {recursive: true, force: true}));
@@ -21,7 +32,7 @@ test("package/function/migration scaffolds register implementations and refresh
await apply("package", {...base, name: "Chess", id: "package:chess", revision: "package:chess@1", tools: {quixos: source, protocol: source, helpers: source, sdk: source}});
await apply("function", {...base, name: "play", id: "export:play"});
const filename = path.join(root, base.directory, "src/impl/play.ts");
const edited = 'import type {Implementation} from "../generated-bindings.js";\nexport const handler: Implementation["play"] = async () => null;\n';
const edited = 'import type {Implementation} from "../gen/qx.js";\nexport const handler: Implementation["play"] = async () => null;\n';
await fs.writeFile(filename, edited);
const old = {version: 1}, next = {version: 2}, from = contentDigest(old), to = contentDigest(next);
await apply("migration", {...base, name: "upgrade", id: "export:upgrade", migration: {id: "upgrade-v2", scopeId: "board", from, to, predecessors: [], ports: [], contracts: {[from]: old, [to]: next}}});
@@ -31,7 +42,7 @@ test("package/function/migration scaffolds register implementations and refresh
assert.equal(await fs.readFile(filename, "utf8"), edited);
const catalog = JSON.parse(await fs.readFile(path.join(root, base.directory, "quixos.migrations.json"), "utf8"));
assert.equal(catalog.migrations[0].implementation.digest, contentDigest(await fs.readFile(migrationFile, "utf8")));
const bindings = await fs.readFile(path.join(root, base.directory, "src/generated-bindings.ts"), "utf8");
const bindings = await fs.readFile(path.join(root, base.directory, "src/gen/qx.ts"), "utf8");
assert.match(bindings, /export:play/);
assert.match(await fs.readFile(path.join(root, base.directory, "src/migrate.ts"), "utf8"), /export:upgrade/);
if (process.env.QX_SCAFFOLD_TEST_SDK) {