Add imperative feature bundles, intrinsic component sizing, and authoring timing logs
Generate state-backed atoms, interfaces, relationships and React/CSS packages in a resumable command that prints the full source diff. Keep scaffold output ordinary editable code. Shorten installed authoring guides while preserving contracts and clarify historical design context. Test generated bundles through immutable Nix verification and cover browser isolation, nested sizing, interruption recovery, and command help.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import fs from "node:fs/promises";
|
||||
import {appendFileSync} from "node:fs";
|
||||
import path from "node:path";
|
||||
import { createHash, randomUUID } from "node:crypto";
|
||||
import { authoringContext } from "./authoring-context.js";
|
||||
@@ -21,13 +22,22 @@ export async function checkAuthoring(start: string, output: string, options: { b
|
||||
const report: { directory: string; checker: string; candidateOnly: true; activationEvidence: false; commit?: string; artifactPath?: string; blockers: string[]; phase: string; output: string; compilation?: "passed"; activationReadiness?: "preserve" | "migration-required" | "blocked"; migrationRequired?: string[] } = {
|
||||
directory, checker: checkerIdentity(), candidateOnly: true, activationEvidence: false, blockers: [], phase: "convergence", output,
|
||||
};
|
||||
const progress = async (running = true) => {
|
||||
const file = path.join(output, "report.json"), temp = `${file}.tmp`;
|
||||
await fs.writeFile(temp, JSON.stringify({...report, timings, running}, null, 2));
|
||||
await fs.rename(temp, file);
|
||||
};
|
||||
await progress();
|
||||
try {
|
||||
console.error(`[${new Date().toISOString()}] Check: capture source and converge dependencies`);
|
||||
// Serialize only source capture, not the potentially slow Nix build.
|
||||
// Repository-scoped agents can check separate immutable candidates in parallel.
|
||||
const captured = await promisify(callback)("quixos-qx", ["converge", context.workbench, directory], {
|
||||
maxBuffer: 4 * 1024 * 1024, env: {...process.env, QUIXOS_JJ_NO_CHECKPOINT: "1"},
|
||||
}).catch(error => {
|
||||
const capture = promisify(callback)("quixos-qx", ["converge", context.workbench, directory], {
|
||||
maxBuffer: 4 * 1024 * 1024, env: {...process.env, QUIXOS_JJ_NO_CHECKPOINT: "1", QUIXOS_TRACE_CAPTURE: "1"},
|
||||
});
|
||||
console.error(`Capture details: ${path.join(output, "capture.log")}`);
|
||||
capture.child.stderr?.on("data", chunk => appendFileSync(path.join(output, "capture.log"), chunk));
|
||||
const captured = await capture.catch(error => {
|
||||
if (typeof error.stdout === "string" && error.stdout.trim().startsWith("{")) return {stdout: error.stdout};
|
||||
throw error;
|
||||
});
|
||||
@@ -40,6 +50,7 @@ export async function checkAuthoring(start: string, output: string, options: { b
|
||||
}
|
||||
report.commit = converged.candidate.commit;
|
||||
report.phase = "verification";
|
||||
await progress();
|
||||
const buildStarted = performance.now();
|
||||
console.error(`[${new Date().toISOString()}] Check: immutable Nix ${options.contractOnly ? "contract" : "verification"}; build output: ${path.join(output, "nix.log")}`);
|
||||
try {
|
||||
@@ -53,6 +64,7 @@ export async function checkAuthoring(start: string, output: string, options: { b
|
||||
report.compilation = "passed";
|
||||
if (resource.kind === "workspace" && !options.contractOnly) {
|
||||
report.phase = "evolution";
|
||||
await progress();
|
||||
let baseline = options.baseline;
|
||||
if (!baseline) {
|
||||
try {
|
||||
@@ -73,7 +85,7 @@ export async function checkAuthoring(start: string, output: string, options: { b
|
||||
} catch (error) { report.blockers.push(String(error instanceof Error ? error.message : error)); }
|
||||
timings.totalMs = Math.round(performance.now() - started);
|
||||
Object.assign(report, {timings});
|
||||
await fs.writeFile(path.join(output, "report.json"), JSON.stringify(report, null, 2));
|
||||
await progress(false);
|
||||
if (options.contractOnly) return report;
|
||||
const records = path.join(context.workbench, ".quixos/checks");
|
||||
await fs.mkdir(records, { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user