refactor: type workflow slice references #61

Merged
jwilger merged 1 commit from refactor/type-workflow-slice-references into main 2026-06-08 04:07:44 -07:00
Owner

Summary

  • Emit workflowSlices as typed WorkflowSlice records in Lean and Quint workflow artifacts.
  • Derive workflowSliceSlugs for string-based transition, outcome, and lifecycle resolution checks.
  • Update layout drift markers and generated-artifact tests for the typed workflow slice list.

Rationale

  • Workflow composition should model steps as named domain records, not as a bare string list.
  • Keeping a derived slug projection preserves existing invariants while moving the formal model toward semantic data structures.

Verification

  • cargo fmt --check
  • git diff --check
  • cargo test --lib core::emit::lean::external_tests::tests::lean_workflow_module_represents_business_workflow_fields
  • cargo test --lib core::emit::quint::external_tests::tests::quint_workflow_module_represents_business_workflow_fields
  • cargo test --test add_slice
  • cargo test --test update_slice
  • cargo test --test mcp_add_slice
  • cargo test --test mcp_update_slice
  • cargo test --test check_project
  • cargo test --test event_log_export
  • cargo test --test verify_project
  • cargo test --test mcp_connect_workflow
  • cargo test --test connect_workflow
  • cargo test --lib
  • just clippy
Summary - Emit workflowSlices as typed WorkflowSlice records in Lean and Quint workflow artifacts. - Derive workflowSliceSlugs for string-based transition, outcome, and lifecycle resolution checks. - Update layout drift markers and generated-artifact tests for the typed workflow slice list. Rationale - Workflow composition should model steps as named domain records, not as a bare string list. - Keeping a derived slug projection preserves existing invariants while moving the formal model toward semantic data structures. Verification - cargo fmt --check - git diff --check - cargo test --lib core::emit::lean::external_tests::tests::lean_workflow_module_represents_business_workflow_fields - cargo test --lib core::emit::quint::external_tests::tests::quint_workflow_module_represents_business_workflow_fields - cargo test --test add_slice - cargo test --test update_slice - cargo test --test mcp_add_slice - cargo test --test mcp_update_slice - cargo test --test check_project - cargo test --test event_log_export - cargo test --test verify_project - cargo test --test mcp_connect_workflow - cargo test --test connect_workflow - cargo test --lib - just clippy
refactor: type workflow slice references
All checks were successful
CI / Nix flake check (pull_request) Successful in 2m30s
CI / Request auto_review semantic review (pull_request) Successful in 2s
auto_review auto_review: no findings
CI / Rust CI (pull_request) Successful in 7m19s
7e0bcf63fa
auto-review left a comment

The refactor introduces typed WorkflowSlice records to improve workflow composition modeling. The changes appear safe to merge, with tests updated to reflect the new structure.

Walkthrough

  • src/core/emit/lean.rs:
    • Introduced WorkflowSlice structure to replace the previous string list for workflow slices.
    • Added workflowSliceSlugs to map slugs from WorkflowSlice records.
    • Updated functions to use workflowSliceSlugs instead of directly using workflowSlices.
  • src/core/emit/quint.rs:
    • Similar changes as in lean.rs to introduce WorkflowSlice and workflowSliceSlugs.
  • Tests:
    • Updated tests in lean_tests.rs and quint_tests.rs to reflect the new WorkflowSlice structure.
    • Ensured that all tests check for the presence of WorkflowSlice and workflowSliceSlugs where applicable.

LLM usage and cost

The refactor introduces typed `WorkflowSlice` records to improve workflow composition modeling. The changes appear safe to merge, with tests updated to reflect the new structure. ## Walkthrough - **src/core/emit/lean.rs**: - Introduced `WorkflowSlice` structure to replace the previous string list for workflow slices. - Added `workflowSliceSlugs` to map slugs from `WorkflowSlice` records. - Updated functions to use `workflowSliceSlugs` instead of directly using `workflowSlices`. - **src/core/emit/quint.rs**: - Similar changes as in `lean.rs` to introduce `WorkflowSlice` and `workflowSliceSlugs`. - **Tests**: - Updated tests in `lean_tests.rs` and `quint_tests.rs` to reflect the new `WorkflowSlice` structure. - Ensured that all tests check for the presence of `WorkflowSlice` and `workflowSliceSlugs` where applicable. ## LLM usage and cost - Reasoning (gpt-4o) in=9025 out=367 cost=$0.050630 - Cheap (gpt-4o-mini) in=522 out=49 cost=$0.000108 Estimated total USD: $0.050738 via https://api.openai.com and https://api.openai.com
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/emc!61
No description provided.