Skip to content

feat(workflow): add constraint-driven compiler - #146

Merged
tt-a1i merged 5 commits into
tt-a1i:mainfrom
sunsunsun-java:codex/issue-126-workflow-compiler
Aug 30, 2026
Merged

tt-a1i merged 5 commits into
tt-a1i:mainfrom
sunsunsun-java:codex/issue-126-workflow-compiler

Conversation

@sunsunsun-java

@sunsunsun-java sunsunsun-java commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add readable-v2 constraint-driven workflow compilation and causal semantic diagnostics
  • preserve v1 compatibility while unifying layout, routing, labels, and bounds
  • add semantic contract tests and a verified Maka workflow proof artifact

Verification

  • npm test (855 passed, 18 skipped, 0 failed)
  • Maka workflow showcase validation: 9/9 checks passed
  • Chrome visual checks: 1440x900 and 2048x1320, light/dark themes passed

The generated Maka artifact is based on source revision f8be426ba81bc2f62e9cf0e08bac85f576cc9261.

Fixes #126

…kflow-compiler

# Conflicts:
#	archify.zip
#	docs/assets/archify-live-proof.gif
#	docs/assets/archify-live-proof.json
#	docs/gallery.html
#	docs/gallery/manifest.json
…kflow-compiler

# Conflicts:
#	CHANGELOG.md
#	archify.zip
#	archify/renderers/shared/generated-validators.mjs
#	archify/renderers/workflow/render-workflow.mjs
#	archify/schemas/workflow.schema.json

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 40dda49 against #126. The v1 byte-compatibility boundary, fail-closed v1-to-v2 migration, deterministic constraint compiler, semantic diagnostics, and committed proof receipt are all covered by the current green checks; the focused local compiler/migration/semantic suite also passed 133/133. I found no blocking correctness issue. The material tradeoff is the long-term maintenance surface of workflow schema v2, and the owner has explicitly accepted that product direction.

@tt-a1i
tt-a1i merged commit 8b2aed2 into tt-a1i:main Aug 30, 2026
11 checks passed
@sunsunsun-java
sunsunsun-java deleted the codex/issue-126-workflow-compiler branch August 30, 2026 05:41
Win-Hao added a commit to Win-Hao/archify that referenced this pull request Aug 30, 2026
validateWorkflow, validateDataflow, and validateLifecycle only checked that
node coordinates were finite; a non-positive width/height slipped past the
layout layer and emitted <rect height="-10"> when the schema layer was not
in front of the renderer. Add the same size guard validateArchitecture
already carries. After tt-a1i#146 validateWorkflow lives in workflow-compiler.mjs;
the guard goes there.

The three measure functions also defaulted with `||`, so an authored 0 was
silently replaced by the renderer default and never reached the new guard.
Fall back with `??` instead, matching validateArchitecture, where an
authored `size: [0, 60]` already reaches its guard.

Cover the guards behaviorally. Every supported entry point runs JSON Schema
validation first, so these layout checks are defense in depth and cannot be
reached from outside — asserting the schema diagnostic proves nothing about
them. test/helpers/schema-free-render.mjs renders from a throwaway copy of
the renderers whose generated ajv validators are replaced with
accept-everything stand-ins; the schema layer is the only thing removed, so
what the renderer reports afterwards is its own check. Ship code carries no
bypass.

Mutation probe on this tree: deleting the workflow, dataflow or lifecycle
guard fails 4 cases each; reverting a `??` back to `||` fails the matching
zero case; deleting the pre-existing architecture guard fails its case.
The schema-level cases stay in golden.mjs, where they belong, and the
mislabeled layout cases are gone from layout-rules.test.mjs.

Closes tt-a1i#171

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLT8sSBFcKSvnEggvWzj6u
maheshsingh20 added a commit to maheshsingh20/archify that referenced this pull request Aug 31, 2026
Addresses tt-a1i re-review after rebase onto upstream/main (feat tt-a1i#146):

- render-workflow.mjs is now a thin compiler shim; all rendering lives
  in workflow-compiler.mjs. Ported renderLaneOwnershipBars() and
  renderPhaseBand() into workflow-compiler.mjs using the compiler's
  laneTop()/laneHeight() helpers so variable-height lanes (schema v2)
  are handled correctly.

- Lane bars use laneHeight(index) rather than the fixed layout.laneH,
  matching the compiler's own lane rendering.

- render-workflow.mjs replaced with the upstream compiler-shim version;
  no more stale old-renderer body in the file.

- Golden examples re-rendered via the compiler path.
- Lane-only fixture golden refreshed.
- test/golden.mjs synced to upstream baseline + lane-only block retained.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflow: edge length between adjacent columns is non-uniform, so identical specs pass or fail depending on which column pair you picked

2 participants