Repair workspace authoring: typed RPC inputs, automatic preservation, and template releases

Use checked input contracts and protobuf JSON for CLI roundtrips; generate Web Studio platform inputs; reject invalid constructors before allocation and filter Createable eligibility.

Preserve compatible storage without no-op migrations, report activation readiness, and validate migration coverage before maintenance. Follow authored package declarations during scaffold refresh and queue source capture.

Add a real local TODO check/activate/create/place/edit acceptance, publish updated protocol and SDK dependencies, and make verified template default selection explicit.
This commit is contained in:
Timothy J. Aveni
2026-09-14 15:24:37 -07:00
parent 01ca965c7f
commit 14b0ef25c3
13 changed files with 231 additions and 27 deletions
+7 -6
View File
@@ -11,9 +11,14 @@ test("authoring lock excludes concurrent mutations and survives owner death", as
const root = await mkdtemp(path.join(os.tmpdir(), "qx-lock-test-"));
context.after(() => rm(root, {recursive: true, force: true}));
const filename = path.join(root, "lock");
const events: string[] = [];
let queued: Promise<void>;
await withFileLock(filename, async () => {
await assert.rejects(withFileLock(filename, async () => assert.fail("concurrent mutation")), /Another authoring command/);
queued = withFileLock(filename, async () => {events.push("second");});
events.push("first");
});
await queued!;
assert.deepEqual(events, ["first", "second"]);
const module = new URL("../src/capability-language/file-lock.js", import.meta.url).href;
const owner = spawn(process.execPath, ["--input-type=module", "-e",
`import {withFileLock} from ${JSON.stringify(module)}; await withFileLock(${JSON.stringify(filename)}, async () => {process.stdout.write('ready'); await new Promise(() => {});});`],
@@ -23,11 +28,7 @@ test("authoring lock excludes concurrent mutations and survives owner death", as
const exited = once(owner, "exit");
owner.kill("SIGKILL");
await exited;
// EOF release happens in the helper; wait a bounded amount for scheduling.
let acquired = false;
for (let attempt = 0; attempt < 30 && !acquired; attempt++) {
try { await withFileLock(filename, async () => {acquired = true;}); }
catch (error) { if (!/Another authoring command/.test(String(error))) throw error; }
}
await withFileLock(filename, async () => {acquired = true;});
assert.equal(acquired, true);
});