Skip to content

feat(agama): add transpiler variable naming and access conformance tests#14425

Open
imran-ishaq wants to merge 1 commit into
mainfrom
agama-transpiler-variable-access-tests
Open

feat(agama): add transpiler variable naming and access conformance tests#14425
imran-ishaq wants to merge 1 commit into
mainfrom
agama-transpiler-variable-access-tests

Conversation

@imran-ishaq

Copy link
Copy Markdown
Contributor

Prepare


Description

Adds VariableAccessTest to the Agama transpiler module, pinning the transpiler to the language reference's variable
naming and data-access rules: valid names and access forms (dot, numeric index, .length, quoted and $-prefixed property
access) transpile, while an invalid name (leading underscore) and expression-based indexing (x[person.age], x[y[0]]) are
rejected. Registered in the module's TestNG suite. No production change — confirms current behavior conforms to the
spec.

Target issue

The Agama language reference defines the variable-name pattern a-zA-Z* and the rules for accessing
data (dot notation, zero-based indexing, .length, quoted/$-prefixed property access), and explicitly disallows
expression-based indexing (x[person.age], x[y[0]]). There is no test pinning the transpiler to these rules.

closes #14424

Implementation Details

  • New test agama/transpiler/src/test/java/io/jans/agama/test/VariableAccessTest.java (positive valid names/access via
    Transpiler.transpile; negative invalid name +expression indexing via Transpiler.runSyntaxCheck).
  • Registered the class in agama/transpiler/src/test/resources/testng.xml.
  • Full transpiler suite passes (4 tests, 0 failures).

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.

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

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@imran-ishaq, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 4 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7d8c02b1-585c-4d06-b04e-b2fba9b045ee

📥 Commits

Reviewing files that changed from the base of the PR and between da7f934 and 6168520.

📒 Files selected for processing (2)
  • agama/transpiler/src/test/java/io/jans/agama/test/VariableAccessTest.java
  • agama/transpiler/src/test/resources/testng.xml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agama-transpiler-variable-access-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 Jun 24, 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 comp-agama Touching folder /agama kind-feature Issue or PR is a new feature request labels Jun 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@imran-ishaq imran-ishaq marked this pull request as ready for review July 6, 2026 13:00
@imran-ishaq imran-ishaq requested a review from jgomer2001 as a code owner July 6, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-agama Touching folder /agama kind-feature Issue or PR is a new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(agama): add variable naming and data-access conformance tests for the transpiler

2 participants