feat(#516): Complete domain extraction - codegen tests, studio imports, verification#526
Merged
Conversation
Add vitest@^2.1.9 devDependency, test scripts, and vitest.config.ts with node environment. Part of issue #522. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
96 tests: sanitizeIdentifier, sanitizeString, reprValue, formatSwitchCondition, getActivityKeyword (utils) + buildGraph, findReachableDistances, findCommonMergeNode (graph). Part of issue #522. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
50 tests: diagramToMermaid with all node shapes and edge types, getMermaidTheme, sanitizers. Part of issue #522. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Bugfix: library imports were generated before generateNode() populated the libraries Set. Moved import generation to after node traversal loop. 36 tests for generatePythonCode covering all control flow constructs (if/else, switch, try-catch, while, for-each, activity, assign, throw). Part of issues #522, #524. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
4 golden tests with simple-process and complex-process fixtures (start→if/else→activities→end). Ensures codegen output remains stable across changes. Part of issue #524. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
…domain-model Add workspace dependencies, update domain-model shim with React Flow compatibility, replace old codegen/mermaid files with re-export shims. Part of issue #523. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Record completion of issues #522 (tests), #523 (imports), #524 (verification). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
This was referenced Jun 7, 2026
…urity audit Ruff was flagging golden fixture .py files as invalid Python. Added exclude = ["packages/codegen/src/golden/"] to [tool.ruff]. Security audit found CVE in vitest <=4.1.0 (GHSA-5xrq-8626-4rwp). Upgraded from ^2.1.9 to ^4.1.8 to resolve the critical vulnerability. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…install Add pnpm prepare scripts to @rpaforge/codegen and @rpaforge/domain-model so tsc runs on pnpm install, ensuring dist/ exists for studio type resolution. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
…resolution Add @rpaforge/domain-model as dependency so pnpm runs prepare scripts in topological order (domain-model first, then codegen). Remove paths and references from codegen's tsconfig — npm dependency handles resolution. Exclude src/golden/ from tsc build (fixtures, not source). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
… .txt package-lock.json had stale @vitest/* 2.1.9 entries under packages/codegen/node_modules/ from before the vitest 4.x upgrade. Removed them so npm audit no longer flags GHSA-5xrq-8626-4rwp. Renamed golden/.py fixtures to .txt — they are reference files (not real Python), and CodeQL was flagging complex-process.py for invalid syntax (${status}). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
Issue #522 — Codegen tests (186 tests)
packages/codegenutils.test.ts(70): sanitizeIdentifier, sanitizeString, reprValue, formatSwitchCondition, getActivityKeywordgraph.test.ts(26): buildGraph, findReachableDistances, findCommonMergeNodemermaidGenerator.test.ts(50): diagramToMermaid, getMermaidThemegenerator.test.ts(36): generatePythonCode, all control flow constructsgolden.test.ts(4): regression tests with fixture filesIssue #523 — Studio imports migration
@rpaforge/domain-modeland@rpaforge/codegenas workspace dependenciestypes/domain-model.tsto re-export from@rpaforge/domain-modelwith React Flow compatibilitydomain/codegen/andutils/mermaidGenerator.ts→ re-export shims to@rpaforge/codegentsc --noEmitpasses cleanlyIssue #524 — Verification
Bug fix found during testing
generator.ts, library imports were generatedbeforethegenerateNodetraversal that populates the libraries Set. Moved import generation to after node processing. This meant library import statements were silently missing from generated Python code.