Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

fix(dataflow): isolate quality tests after dev synchronization

tt-a1i3405320653c1
diff --git a/archify.zip b/archify.zip
index 33373304..07a64461 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/references/authoring-defaults.md b/archify/references/authoring-defaults.md
index 94dcd870..42390a73 100644
--- a/archify/references/authoring-defaults.md
+++ b/archify/references/authoring-defaults.md
@@ -36,6 +36,6 @@ Use one primary authored language from the user's choice or the request/conversa
Omit `meta.visual_preset` for classic, `meta.subtitle` for a title-only header, `meta.legend` for truthful auto, and `meta.engineering_profile` for an ordinary system overview. Explicit styles and a subtitle require a user request. Use legend or deployment ownership under the [legend](authoring-contract.md#legend-contract) or [engineering profile](authoring-contract.md#engineering-profile-default) contracts. Branding is optional and explicit when a node names a real product; [Brand marks](brand-marks.md) gives lookup and capture rules for that branch. Never let a badge replace semantic type, label, or relationship facts. Set required `meta.output` to a portable POSIX-relative `.html` path within the working directory; see [Output path contracts](delivery-contract.md#output-path-contracts) for native path exceptions.
-For new Workflow use schema v2, preserving v1 for a fixed legacy source; use its [layout contracts](../renderers/workflow/README.md#layout-contracts) when lane or group geometry needs detail. For Sequence omit `meta.column_fit` for spread columns on both automatic and authored canvases; preserve an authored `meta.viewBox`. Set `meta.column_fit: "fixed"` explicitly when historical fixed coordinates are required; use `spread` when a wide viewBox leaves unused horizontal space or meaningful labels need width. Describe a participant's internal action in a note on its surrounding real cross-participant message, preserving its meaning and order; Sequence self-message loops are not supported. For a fresh Dataflow start with the stage/row grid, automatic canvas and node widths; add dimensions or route controls for supplied geometry or a measured constraint. For Lifecycle use schema v3: list the happy path in `mainPath` and author every transition, including the main path; the renderer places all other states and routes. Give an exit shared by several consecutive phases the same label so it draws once, and keep transition labels short; a recoverable failure needs a real transition back. Read [Mode placement](authoring-contract.md#mode-placement) when a mode-specific placement or viewport problem needs more detail.
+For new Workflow use schema v2, preserving v1 for a fixed legacy source; use its [layout contracts](../renderers/workflow/README.md#layout-contracts) when lane or group geometry needs detail. For Sequence omit `meta.column_fit` for spread columns on both automatic and authored canvases; preserve an authored `meta.viewBox`. Set `meta.column_fit: "fixed"` explicitly when historical fixed coordinates are required; use `spread` when a wide viewBox leaves unused horizontal space or meaningful labels need width. Describe a participant's internal action in a note on its surrounding real cross-participant message, preserving its meaning and order; Sequence self-message loops are not supported. For a fresh Dataflow start with the stage/row grid and follow the canonical [Dataflow canvas and showcase defaults](authoring-contract.md#dataflow); add dimensions or route controls for supplied geometry or a measured constraint. For Lifecycle use schema v3: list the happy path in `mainPath` and author every transition, including the main path; the renderer places all other states and routes. Give an exit shared by several consecutive phases the same label so it draws once, and keep transition labels short; a recoverable failure needs a real transition back. Read [Mode placement](authoring-contract.md#mode-placement) when a mode-specific placement or viewport problem needs more detail.
`finalize` performs the browser gate. Keep the complete drawing comfortably readable on desktop, with zero horizontal overflow. Use meaningful vertical rows and intrinsic-height page scroll when necessary. The 6px projected-text check is a failure floor; at 1440px, aim for ordinary context text around 7.5px or larger. See [Automated browser evidence](delivery-contract.md#automated-browser-evidence) when viewport evidence fails.
diff --git a/test/dataflow-automatic-layout.test.mjs b/test/dataflow-automatic-layout.test.mjs
index 0417f136..2a43b0a0 100644
--- a/test/dataflow-automatic-layout.test.mjs
+++ b/test/dataflow-automatic-layout.test.mjs
@@ -52,11 +52,11 @@ function pipeline() {
test('five-stage unpinned pipeline passes first draft with complete text and projected typography', t => {
const diagram = pipeline();
- const { result, receipt, input, output } = inspect(t, diagram);
+ const { result, receipt, input, output, env } = inspect(t, diagram);
assert.equal(result.status, 0, result.stdout + result.stderr);
assert.equal(receipt.composition.metrics.desktopReadabilityIssues, 0);
assert.ok(receipt.composition.metrics.minProjectedNodeTextPx >= 6);
- const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8' });
+ const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8', env });
assert.equal(render.status, 0, render.stderr);
const html = fs.readFileSync(output, 'utf8');
assert.match(html, /viewBox="0 0 1068 512"/);
@@ -165,9 +165,9 @@ test('natural height includes explicit outer route and two-line label plate', t
];
diagram.flows = [{ from: 'a', to: 'b', label: 'archive', classification: 'restricted',
fromSide: 'bottom', toSide: 'bottom', via: [[100, 560], [315, 560]], labelAt: [210, 560] }];
- const { result, input, output } = inspect(t, diagram);
+ const { result, input, output, env } = inspect(t, diagram);
assert.equal(result.status, 0, result.stdout + result.stderr);
- const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8' });
+ const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8', env });
assert.equal(render.status, 0, render.stderr);
const html = fs.readFileSync(output, 'utf8');
assert.match(html, /viewBox="0 0 940 674"/);
@@ -255,11 +255,11 @@ for (const profile of ['standard', 'showcase']) {
test('an explicit insufficient canvas retains its width and bounds diagnostics', t => {
const diagram = fiveStageDiagram('showcase');
diagram.meta.viewBox = [940, 720];
- const { result, receipt, input, output } = inspect(t, diagram, { quality: 'showcase' });
+ const { result, receipt, input, output, env } = inspect(t, diagram, { quality: 'showcase' });
assert.equal(result.status, 1);
assert.ok(receipt.diagnostics.some(({ message }) => /Node "n4" exceeds the horizontal bounds/.test(message)));
assert.ok(receipt.diagnostics.some(({ message }) => /Stages exceed viewBox width/.test(message)));
- const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output, '--quality', 'showcase'], { encoding: 'utf8' });
+ const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output, '--quality', 'showcase'], { encoding: 'utf8', env });
assert.equal(render.status, 1);
assert.equal(fs.existsSync(output), false, 'a fixed insufficient canvas must remain rejected');
});
@@ -335,9 +335,9 @@ for (const [name, mutate, expectedSha256] of [
const diagram = smallFootprintDiagram({ id: 'f' });
diagram.nodes[0].sublabel = 'context text for processing';
mutate(diagram);
- const { result, input, output } = inspect(t, diagram);
+ const { result, input, output, env } = inspect(t, diagram);
assert.equal(result.status, name === 'explicit-viewbox' ? 1 : 0, result.stdout + result.stderr);
- const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8' });
+ const render = spawnSync(process.execPath, [cli, 'render', 'dataflow', input, output], { encoding: 'utf8', env });
assert.equal(render.status, 0, render.stderr);
const svg = fs.readFileSync(output, 'utf8').match(/<svg\b[^]*?<\/svg>/)[0];
assert.equal(crypto.createHash('sha256').update(svg).digest('hex'), expectedSha256);