Skip to content

test(agama): add transpiler subflow and web-interaction codegen conformance tests#14486

Open
imran-ishaq wants to merge 2 commits into
mainfrom
agama-transpiler-web-interaction-tests
Open

test(agama): add transpiler subflow and web-interaction codegen conformance tests#14486
imran-ishaq wants to merge 2 commits into
mainfrom
agama-transpiler-web-interaction-tests

Conversation

@imran-ishaq

@imran-ishaq imran-ishaq commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Prepare


Description

Adds WebInteractionTest to the Agama transpiler module. It transpiles a flow using Trigger (subflow), RRF and RFAC, and asserts the generated JavaScript contains the corresponding runtime calls (subflow call with result propagation, render-reply-fetch, redirect-fetch-at-callback). Registered in the module's TestNG suite. No production change - confirms current code generation conforms to the language reference.

Target issue

The transpiler's Trigger (subflow), RRF and RFAC constructs are covered only by syntax-pass tests; nothing asserts they generate the expected runtime calls (subflow invocation with result propagation, render-reply-fetch, redirect-fetch-at-callback), so a code-generation regression could go unnoticed.

closes #14485

Implementation Details

  • New test agama/transpiler/src/test/java/io/jans/agama/test/WebInteractionTest.java using Transpiler.transpile and
    asserting on the generated code.
  • Registered the class in agama/transpiler/src/test/resources/testng.xml.
  • Full transpiler suite passes (3 tests, 0 failures on this branch's base).

Test and Document the changes

  • Static code analysis has been run locally and issues have been fixed
  • Relevant unit and integration tests have been added/updated
  • Relevant documentation has been updated if any (i.e. user guides, installation and configuration guides, technical design docs etc)

Please check the below before submitting your PR. The PR will not be merged if there are no commits that start with docs: to indicate documentation changes or if the below checklist is not selected.

  • I confirm that there is no impact on the docs due to the code changes in this PR.

Summary by CodeRabbit

  • Tests
    • Added automated coverage for subflow invocation and web-interaction code generation.
    • Added validation for generated render, fetch, redirect, and callback behavior.
    • Included the new web-interaction tests in the test suite.

…rmance tests

Signed-off-by: imran <imranishaq7071@gmail.com>
@imran-ishaq imran-ishaq added this to the 2.3.0 milestone Jul 3, 2026
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ca7d3e14-4f66-489b-b039-bbfc6422d03d

📥 Commits

Reviewing files that changed from the base of the PR and between 102dcce and abeb532.

📒 Files selected for processing (2)
  • agama/transpiler/src/test/java/io/jans/agama/test/WebInteractionTest.java
  • agama/transpiler/src/test/resources/testng.xml

📝 Walkthrough

Walkthrough

Changes

Transpiler conformance tests

Layer / File(s) Summary
Code-generation assertions and test registration
agama/transpiler/src/test/java/io/jans/agama/test/WebInteractionTest.java, agama/transpiler/src/test/resources/testng.xml
Adds tests that verify generated subflow, result bubble-up, render-reply-fetch, and redirect-fetch-at-callback calls, and registers them in TestNG.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the new transpiler conformance tests for subflow and web-interaction codegen.
Description check ✅ Passed The description follows the template and includes target issue, implementation details, tests, and docs impact confirmation.
Linked Issues check ✅ Passed The PR adds the requested conformance test coverage for Trigger, RRF, and RFAC and verifies the generated runtime calls.
Out of Scope Changes check ✅ Passed The changes stay within test code and TestNG registration, with no unrelated scope visible.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agama-transpiler-web-interaction-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mo-auto

mo-auto commented Jul 3, 2026

Copy link
Copy Markdown
Member

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mo-auto mo-auto added area-CI Issue or changes required in automatic builds or CI infrastructure comp-agama Touching folder /agama labels Jul 3, 2026
@imran-ishaq
imran-ishaq marked this pull request as ready for review July 6, 2026 13:44
@imran-ishaq
imran-ishaq requested a review from jgomer2001 as a code owner July 6, 2026 13:44
…sting pass files instead of inline Java

Signed-off-by: imran <imranishaq7071@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CI Issue or changes required in automatic builds or CI infrastructure comp-agama Touching folder /agama

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(agama): add subflow and web-interaction code-generation conformance tests for the transpiler

3 participants