Skip to content

Import current state of tool from old repo - #3

Open
skavgou wants to merge 2 commits into
mainfrom
dev-initial
Open

skavgou wants to merge 2 commits into
mainfrom
dev-initial

Conversation

@skavgou

@skavgou skavgou commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

This is a PR to import a version of the tool originally hosted at https://github.com/skavgou/spec-convert

Closes #2

Signed-off-by: Sean Kavanagh <kavans25@tcd.ie>
@@ -0,0 +1,21 @@
package com.specconvert.report;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move the packages to a base one: org.openworkflow.migrationtool

Signed-off-by: Sean Kavanagh <kavans25@tcd.ie>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate findings affect builds, conversion correctness, reporting, native execution, and release installation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 5 High severity · 6 Medium severity · 1 Low severity

Open (12)
What changed in this PR

Imports a Java-based Serverless Workflow 0.8→1.0 migration tool with transformation, validation, reporting, native packaging, and installer support.

Changes:

  • Adds state converters and expression transformations.
  • Adds output validation and JSON/Markdown reports.
  • Adds Maven/native builds, release automation, installers, and documentation.
File Reviewed changes and final findings
workflows/​release.yml Release workflow is outside .github/workflows, so tag pushes will not build binaries or publish releases (moderate, 3 votes; line 1).
src/​main/​resources/​META-INF/​native-image/​reflect-config.json Reflection metadata is incomplete for polymorphic 0.8 state/action models, risking native deserialization failures (moderate, 1 vote; line 21).
src/​main/​java/​org/​openworkflow/​migrationtool/​validator/​ValidationResult.java Validation finding model.
src/​main/​java/​org/​openworkflow/​migrationtool/​validator/​OutputValidator.java Non-array for.do values are reported as warnings instead of wrong_type errors (moderate, 1 vote; line 408).
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​util.java Shared transformation utilities.
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Switch.java Switch-state conversion.
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Sleep.java Duration parsing rejects valid fractional/week values and accepts malformed bare P or PT (moderate, 1 vote each; line 32).
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Parallel.java Parallel-to-fork conversion.
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Operation.java Operation conversion.
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Inject.java Inject-to-set conversion.
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​ForEach.java for.in retains the invalid 0.8 expression wrapper, including in its default value (critical, 1 vote; line 35).
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Event.java Flattening event actions loses event association and can execute unrelated actions (moderate, 3 votes; line 75).
src/​main/​java/​org/​openworkflow/​migrationtool/​transformer/​Callback.java Callback predicates retain an invalid ${...} wrapper instead of using bare jq expressions (critical, 3 votes; line 94).
src/​main/​java/​org/​openworkflow/​migrationtool/​SpecConvert.java Does not preserve 0.8 transition/end routing (critical, 3 votes; line 335); rejects documented md report format (moderate, 3 votes; line 121); mishandles extensionless output paths (moderate, 1 vote; line 205); does not create output or report parent directories (moderate, 1 vote each; lines 210 and 252); and treats .md reports as JSON without explicit-format tracking (moderate, 1 vote; line 171).
src/​main/​java/​org/​openworkflow/​migrationtool/​report/​ReportWriter.java Report writer contract.
src/​main/​java/​org/​openworkflow/​migrationtool/​report/​ReportCollector.java Error-only migrations can exit successfully with code 0 (critical, 2 votes; line 92).
src/​main/​java/​org/​openworkflow/​migrationtool/​report/​MigrationReport.java Report data model.
src/​main/​java/​org/​openworkflow/​migrationtool/​report/​MarkdownReportWriter.java Markdown report output.
src/​main/​java/​org/​openworkflow/​migrationtool/​report/​JsonReportWriter.java JSON report output.
run.sh Packaged JAR runner.
README.md Installation commands still fetch from the old repository (moderate, 3 votes; line 13).
pom.xml Uses an unresolved repository-local SDK coordinate for normal builds (critical, 3 votes; line 31).
install.sh Installer still targets the old repository (moderate, 3 votes; line 6).
install.ps1 PowerShell installer still targets the old repository (moderate, 3 votes; line 5).
dependency-reduced-pom.xml Generated Maven metadata.
CONVERSION_NOTES.md Two source links still reference the old package path (nit, 3 votes; line 3; nit, 1 vote; line 473).
build.sh Maven build wrapper.
.gitignore Build and generated-file exclusions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pom.xml
Comment on lines +31 to +35
<!-- 0.8 input SDK (shaded under v08 groupId to avoid package clash with 1.0 api) -->
<dependency>
<groupId>io.serverlessworkflow.v08</groupId>
<artifactId>serverlessworkflow-api</artifactId>
<version>4.1.0.Final</version>
Comment on lines +335 to +339
for (State state : src.getStates()) {
String stateName = state.getName() != null ? state.getName() : "unnamed";

if (state instanceof InjectState) {
items.add(Inject.handleInject(stateName, (InjectState) state));
report.summary.overallStatus = "success";
}

return strict && warnings > 0;

// Named case: when the expected callback event type is confirmed, go to the transition target
SwitchCase callbackCase = new SwitchCase()
.withWhen("${ .type == \"" + cloudEventType + "\" }")
}

protected static TaskItem handleForEachFunction(String name, ForEachState state) {
String in = state.getInputCollection() != null ? state.getInputCollection() : "${ .[] }";
Comment thread install.sh
# Usage: curl -fsSL https://raw.githubusercontent.com/skavgou/spec-convert/main/install.sh | bash
set -euo pipefail

REPO="skavgou/spec-convert"
Comment on lines +121 to +125
if ("json".equals(val) || "markdown".equals(val)) {
reportFormat = val;
} else {
throw new IllegalArgumentException("--report-format requires 'json' or 'markdown', got: '" + val + "'.");
}
filters.add(new EventFilter().withWith(props));
}
}
allActions.addAll(actions);
Comment thread workflows/release.yml
@@ -0,0 +1,80 @@
name: Release
Comment thread CONVERSION_NOTES.md
@@ -0,0 +1,517 @@
# SpecConvert — Conversion Logic Notes

CNCF Serverless Workflow **0.8 → 1.0** | `src/main/java/com/specconvert/SpecConvert.java`
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.

Population of initial version of the migration tool

3 participants