Skip to content

feat(workflow): preserve critical approval details - #286

Open
zhouyuanxinand wants to merge 1 commit into
tt-a1i:mainfrom
zhouyuanxinand:codex/issue-84-approval-details
Open

feat(workflow): preserve critical approval details#286
zhouyuanxinand wants to merge 1 commit into
tt-a1i:mainfrom
zhouyuanxinand:codex/issue-84-approval-details

Conversation

@zhouyuanxinand

Copy link
Copy Markdown

Problem and value

Closes #84.

Business approval workflows need initiator, approver, required-deliverable, and rework facts, but representing those facts as cards made otherwise readable artifacts 2158–2254 px tall. This change keeps those facts in one typed source and reveals them progressively from the existing Semantic Passport without changing the overview geometry or first-screen primary path.

Scope

  • What changed:
    • Added an optional nodes[].approval contract with required initiator, approvers, deliverables, and reworkPath fields.
    • Added fail-closed compiler diagnostics for repeated facts and unknown, duplicate, or discontinuous rework edge references.
    • Added a collapsed Approval details section to the focused node's Semantic Passport, Finder indexing for the same facts, localized ARIA/native SVG fallbacks, and output escaping.
    • Marked visual exports as overview-only in the Export menu and layout receipt while retaining complete details in the self-contained HTML artifact.
    • Updated authoring guidance, schema documentation, changelog, regression coverage, generated examples, Gallery proof, README proof, and the canonical ZIP.
  • What deliberately did not change:
    • No second permanent panel, duplicated detail cards, inferred approval facts, or detailed static-export format.
    • Ordinary workflows emit no approval metadata or export notice and retain identical diagram geometry.
  • No unrelated changes: confirmed. Template-derived artifacts were regenerated because the shared viewer changed.

Stability impact

  • Compatibility and migration risk: additive and opt-in. Existing workflow v1/v2 documents remain valid and preserve their prior geometry and UI density.
  • Renderer, validator, package, or generated-artifact risk: the workflow schema and generated validator changed; the shared viewer template required deterministic regeneration of all tracked HTML artifacts and release evidence.
  • Failure behavior and rollback path: incomplete or ambiguous approval contracts fail before layout with typed source paths and supported repairs. Authors can remove the optional approval object to recover ordinary behavior; the implementation can be reverted as one commit.

Tests run

  • node archify/scripts/generate-brand-marks.mjs --check — passed.
  • node archify/scripts/generate-validators.mjs --check — passed under canonical Node 22.
  • node scripts/check-release-identity.mjs — passed.
  • node archify/test/golden.mjs — all golden renders, schema enforcement, template freshness, and version checks passed.
  • node --test archify/test/workflow-approval-details.test.mjs with real Chrome — 7/7 passed, including geometry equality, validation failures, escaping, Finder, collapsed/expanded Passport behavior, export scope, and first-screen containment.
  • Affected cross-suite regression (compiler contracts, v1 compatibility, Semantic Passport, Finder, i18n, XML, Gallery, README evidence, delivery, and render checks) — 234 passed, 1 skipped. Five Windows/toolchain cases did not pass: one Node 22 Windows test-runner process crash and four canonical-package tests that depend on POSIX path conversion or symlink permission. The validator test passed 2/2 under Node 20 and its direct Node 22 freshness check passed.
  • Full npm test was run in archify/ to discover stale generated outputs and coupled assertions; every failure related to this change was repaired and rerun in the targeted suites above. The Windows-only harness failures are disclosed rather than reported as green.
  • Node 22 canonical ZIP rebuild — 77 files, 1,334,256 bytes, byte-identical SHA-256 to archify.zip.
  • node scripts/package-smoke.mjs on the package extracted from that exact rebuilt ZIP — passed on win32.

Visual evidence

Visual review passed using a temporary approval-workflow artifact in real Chrome.

Viewport Result
1440×900 No horizontal or vertical document overflow; collapsed details preserve the overview.
1600×1000 No horizontal or vertical document overflow.
1920×1080 No horizontal or vertical document overflow.
2048×1320 No horizontal or vertical document overflow.

The Approval details group was also expanded at 1440×900: initiator, both approvers, both required deliverables, and the complete readable rework path remained visible inside the same artifact while document height stayed within the viewport. Light and dark endpoints were inspected. Temporary screenshots were not added to the release package.

Generated artifacts

Regenerated:

  • Root and packaged renderer example HTML files.
  • docs/gallery.html, all 11 Gallery artifacts, and docs/gallery/manifest.json (99 checks).
  • examples/checkout-platform-delta.html and its receipt.
  • docs/assets/archify-live-proof.gif and its receipt.
  • archify/renderers/shared/generated-validators.mjs.
  • archify.zip using the canonical Node 22 toolchain.

Checklist

  • I used a minimal focused change and preserved existing typed JSON behavior unless the issue requires a contract change.
  • I ran the relevant targeted tests and npm test in archify/.
  • I added or updated a regression test for behavioral changes.
  • I checked generated artifacts and package freshness when their sources changed.
  • I removed secrets, private repository content, and customer data from fixtures and screenshots.

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.

[Feature][Workflow] Preserve critical approval details within the first-screen constraint

1 participant