Skip to content

chore: merge main into develop - #673

Open
SoulPancake wants to merge 12 commits into
developfrom
chore/sync-develop-from-main
Open

chore: merge main into develop#673
SoulPancake wants to merge 12 commits into
developfrom
chore/sync-develop-from-main

Conversation

@SoulPancake

Copy link
Copy Markdown
Member

Description

Merges latest main into develop.

Includes a one-commit fix on top of the merge:

fix(pkg/go): exempt $expression from the undefined-condition check

$expression is the reserved inline-expression condition name added in #664.
It never appears in the model's conditions block, so the semantic validation
from #616 would incorrectly report it as undefined. The fix mirrors the
exemption already present in the Java ModelValidator.

Supersedes #672.

References

dependabot Bot and others added 12 commits July 31, 2026 06:18
…dates (#650)

Bumps the dependencies group with 3 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [actions/setup-java](https://github.com/actions/setup-java) and [ossf/scorecard-action](https://github.com/ossf/scorecard-action).


Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@9c091bb...3d3c42e)

Updates `actions/setup-java` from 5.5.0 to 5.6.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@0f481fc...03ad4de)

Updates `ossf/scorecard-action` from 2.4.3 to 2.4.4
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@4eaacf0...2d11466)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/setup-java
  dependency-version: 5.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anurag Bandyopadhyay <angbpy@gmail.com>
Bumps the dependencies group with 3 updates: [actions/setup-java](https://github.com/actions/setup-java), [gradle/actions/wrapper-validation](https://github.com/gradle/actions) and [gradle/actions/setup-gradle](https://github.com/gradle/actions).


Updates `actions/setup-java` from 5.6.0 to 5.7.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@03ad4de...b6effb0)

Updates `gradle/actions/wrapper-validation` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/gradle/actions/releases)
- [Commits](gradle/actions@3f131e8...9c97196)

Updates `gradle/actions/setup-gradle` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/gradle/actions/releases)
- [Commits](gradle/actions@3f131e8...9c97196)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: gradle/actions/wrapper-validation
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: gradle/actions/setup-gradle
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump fast-uri from 3.1.4 to 3.1.5 in /pkg/js

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(deps): resolve JavaScript audit vulnerabilities (#659)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siddhant Khare <siddhant.khare@okta.com>
#664)

* feat: support  reserved condition name on type restrictions

* fix build failure
…he dependencies group (#666)

chore(deps): bump docker/setup-buildx-action in the dependencies group

Bumps the dependencies group with 1 update: [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action).


Updates `docker/setup-buildx-action` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@bb05f3f...37fe631)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(graph): prevent nil-pointer panic and corruption in parseThis

Fix production panic when parseThis encounters degenerate RelationReference
with oneof set but empty (relation:"" or wildcard:nil). Such references
survive proto validation but fell through all branch conditions, leaving
curNode nil. Boxed into graph.Node interface, typed-nil defeated guards
and panicked on promoted ID() call.

Changes:
- Replace non-exclusive ifs with exhaustive switch in parseThis
- Move curNode inside loop to prevent stale value leakage across iterations
- Add isNilNode() helper to detect typed-nil *AuthorizationModelNode
- Check type assertions in upsertEdge/hasEdge (were discarding ok value)
- Validate GetType() for special chars that break node label format
- Align weighted_graph_builder.go parseThis with same switch structure

Tests added covering panic scenarios, stale curNode corruption, and
typed-nil guards. Default case degrades empty relation to concrete type,
matching transformer/jsontodsl.go parseTypeRestriction behavior.

Fixes panic reported in production (trace: graph_builder.go:261 ->
<autogenerated>:1). Also prevents silent graph corruption where degenerate
entry in non-first position inherits previous iteration's node, merging
conditions onto wrong edge.

* test(graph): fix expectPanic flags and address review feedback

Critical fix: Changed expectPanic from true to false in first two test
cases. The flag being true meant graph topology assertions were never
running - tests would pass even with completely wrong graphs. Now
properly validates nodes, edges, and conditions.

Additional improvements:
- findEdge: Filter by edgeType and tuplesetRelation for multigraph correctness
- DRY: Extract classifyRelationReference() helper to eliminate duplication
  across graph_builder.go and weighted_graph_builder.go parseThis
- Comment brevity: Shorten 15-line comment to 3 lines
- Test coverage: Add cases for special chars and nil wildcard

All tests pass (14 new malformed-relation tests + 302 existing tests).
* ci: pin the Go version used by the lint job

The lint job asked for >=1.25.0 with check-latest, so it moved to Go 1.27
as soon as that showed up in the manifest. golangci-lint v1.64.8 cannot
read Go 1.27 export data and reports every antlr symbol in pkg/go/gen as
undefined. The build matrix pins 1.25 and 1.26, which is why only lint
went red.

golangci-lint v2 does not help yet either, it fails parsing 1.27's own
stdlib. So pin the toolchain to 1.26 and pin the linter version next to
it so the two are raised together.

* ci: keep check-latest on the pinned lint toolchain

Bounded to 1.26 it cannot pull in 1.27, and it picks up patch releases
instead of whatever the runner image happens to have cached.
)

Bumps the dependencies group in /pkg/go with 2 updates: [github.com/stretchr/testify](https://github.com/stretchr/testify) and google.golang.org/protobuf.


Updates `github.com/stretchr/testify` from 1.11.1 to 1.12.0
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.11.1...v1.12.0)

Updates `google.golang.org/protobuf` from 1.36.11 to 1.36.12

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: google.golang.org/protobuf
  dependency-version: 1.36.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Siddhant Khare <siddhant.khare@okta.com>
Co-authored-by: Adrian Tam <adrian.tam@okta.com>
…n /pkg/go in the dependencies group (#670)

chore(deps): bump github.com/stretchr/testify

Bumps the dependencies group in /pkg/go with 1 update: [github.com/stretchr/testify](https://github.com/stretchr/testify).


Updates `github.com/stretchr/testify` from 1.12.0 to 1.12.1
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dencies group (#671)

chore(deps): bump actions/setup-java in the dependencies group

Bumps the dependencies group with 1 update: [actions/setup-java](https://github.com/actions/setup-java).


Updates `actions/setup-java` from 5.7.0 to 6.0.0
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@b6effb0...dd06d9c)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
$expression is a reserved inline-expression condition name introduced in
#664. It never appears in the model's conditions block so the semantic
validation added in #616 would incorrectly report it as undefined.
Skip the check when the condition name equals $expression, mirroring the
exemption already present in the Java validator (ModelValidator.java).
Copilot AI lite review requested due to automatic review settings August 31, 2026 20:02
@SoulPancake
SoulPancake requested review from a team as code owners August 31, 2026 20:02
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: cb7b22b2-9b29-42dd-a1af-8f89bc8d779b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 31, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@socket-security

socket-security Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​google.golang.org/​protobuf@​v1.36.11 ⏵ v1.36.1275 +1100100100100
Updatedgolang/​github.com/​stretchr/​testify@​v1.11.1 ⏵ v1.12.189 -6100100100100

View full report

Copilot AI left a comment

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.

Pull request overview

This PR merges the latest main branch into develop and layers in follow-up fixes related to the reserved inline-expression condition name $expression, ensuring it round-trips through DSL↔JSON and is not incorrectly flagged as an undefined condition during validation.

Changes:

  • Extend the grammar and generated parsers to recognize $expression as a reserved condition name within type restrictions, and propagate it through DSL→JSON transformers (Go/JS/Java).
  • Exempt $expression from “condition must be defined” validation (Go/JS/Java) and add shared semantic-validation corpus coverage.
  • Harden Go graph builders against malformed RelationReference shapes, add regression tests, and update various dependency/workflow pins from the merge.

Reviewed changes

Copilot reviewed 42 out of 44 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/data/dsl-semantic-validation-cases.yaml Adds shared semantic-validation cases asserting $expression is valid in restrictions.
pkg/js/validator/validate-dsl.ts Exempts $expression from “must be defined” condition validation in JS.
pkg/js/transformer/dsltojson.ts Emits $expression into RelationReference.condition during DSL→JSON transform.
pkg/js/package-lock.json Updates lockfile dependency versions (merge update).
pkg/js/gen/OpenFGAParser.tokens Regenerated JS parser token mapping for DOLLAR_EXPRESSION.
pkg/js/gen/OpenFGAParser.interp Regenerated JS parser interpreter data for DOLLAR_EXPRESSION.
pkg/js/gen/OpenFGALexer.tokens Regenerated JS lexer token mapping for DOLLAR_EXPRESSION.
pkg/java/src/main/java/dev/openfga/language/validation/ModelValidator.java Exempts $expression from undefined-condition validation in Java.
pkg/java/src/main/java/dev/openfga/language/OpenFgaDslListener.java Emits $expression into RelationReference.condition in Java DSL→JSON listener.
pkg/java/src/main/gen/dev/openfga/language/antlr/OpenFGAParser.tokens Regenerated Java parser token mapping for DOLLAR_EXPRESSION.
pkg/java/src/main/gen/dev/openfga/language/antlr/OpenFGAParser.interp Regenerated Java parser interpreter data for DOLLAR_EXPRESSION.
pkg/java/src/main/gen/dev/openfga/language/antlr/OpenFGALexer.tokens Regenerated Java lexer token mapping for DOLLAR_EXPRESSION.
pkg/go/validation/condition_validation.go Skips $expression in the Go undefined-condition reference check.
pkg/go/transformer/dsltojson.go Emits $expression into RelationRef.Condition in Go DSL→JSON listener.
pkg/go/Makefile Pins golangci-lint install to a specific version variable.
pkg/go/graph/weighted_graph_builder.go Uses shared relation-reference classification and avoids node leakage across iterations.
pkg/go/graph/weighted_graph_builder_test.go Adds regression tests for malformed relation references in weighted builder.
pkg/go/graph/graph.go Documents edge-drop behavior when endpoints are nil/typed-nil.
pkg/go/graph/graph_builder.go Adds classifyRelationReference and isNilNode, and hardens edge upsert/lookup casting.
pkg/go/graph/graph_builder_test.go Adds regression tests for malformed references and typed-nil node handling.
pkg/go/go.sum Updates Go module sums (merge/dependency updates).
pkg/go/go.mod Updates Go dependency versions (e.g., testify/protobuf) and indirect requirements.
pkg/go/gen/OpenFGAParser.tokens Regenerated Go parser token mapping for DOLLAR_EXPRESSION.
pkg/go/gen/OpenFGAParser.interp Regenerated Go parser interpreter data for DOLLAR_EXPRESSION.
pkg/go/gen/OpenFGALexer.tokens Regenerated Go lexer token mapping for DOLLAR_EXPRESSION.
OpenFGAParser.g4 Allows `(conditionName
OpenFGALexer.g4 Adds DOLLAR_EXPRESSION token before IDENTIFIER.
.github/workflows/test-release-scripts.yml Bumps pinned actions/checkout SHA (merge update).
.github/workflows/scorecard.yml Bumps pinned actions/checkout and ossf/scorecard-action SHAs.
.github/workflows/reusable-release-please.yaml Bumps pinned actions/checkout SHA.
.github/workflows/pkg-js-release.yaml Bumps pinned actions/checkout SHA.
.github/workflows/pkg-js-build.yaml Bumps pinned actions/checkout and docker/setup-buildx-action SHAs.
.github/workflows/pkg-java-release.yaml Bumps pinned actions (checkout/setup-java/gradle actions).
.github/workflows/pkg-java-build.yaml Bumps pinned actions (checkout/setup-java/docker buildx).
.github/workflows/pkg-go-build.yaml Bumps pinned actions and pins lint job Go version to match golangci-lint constraints.
Files not reviewed (1)
  • pkg/js/package-lock.json: Generated file

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

Comment thread pkg/go/graph/graph_builder_test.go
@SoulPancake

SoulPancake commented Aug 31, 2026

Copy link
Copy Markdown
Member Author

𝚁̶𝚎̶𝚙̶𝚕̶𝚊̶𝚌̶𝚒̶𝚗̶𝚐̶ ̶𝚠̶𝚒̶𝚝̶𝚑̶ ̶𝚊̶ ̶𝚜̶𝚚̶𝚞̶𝚊̶𝚜̶𝚑̶-̶𝚖̶𝚎̶𝚛̶𝚐̶𝚎̶ ̶𝚝̶𝚘̶ ̶𝚊̶𝚟̶𝚘̶𝚒̶𝚍̶ ̶𝙴̶𝚊̶𝚜̶𝚢̶𝙲̶𝙻̶𝙰̶ ̶𝚛̶𝚎̶-̶𝚌̶𝚑̶𝚎̶𝚌̶𝚔̶𝚒̶𝚗̶𝚐̶ ̶𝚞̶𝚙̶𝚜̶𝚝̶𝚛̶𝚎̶𝚊̶𝚖̶ ̶𝚌̶𝚘̶𝚖̶𝚖̶𝚒̶𝚝̶ ̶𝚊̶𝚞̶𝚝̶𝚑̶𝚘̶𝚛̶𝚜̶.̶
edit: squash merge would diverge the branches

@SoulPancake

This comment was marked as resolved.

@Siddhant-K-code

Copy link
Copy Markdown
Member

/easycla

@SoulPancake
SoulPancake enabled auto-merge (squash) September 3, 2026 04:06
@SoulPancake
SoulPancake disabled auto-merge September 3, 2026 04:06
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.

5 participants