Skip to content

feat: javax/jakarta annotation coverage, JAX-RS rule, Route category#80

Merged
boorad merged 6 commits into
mainfrom
feat/58-javax-jakarta-annotation-coverage
May 7, 2026
Merged

feat: javax/jakarta annotation coverage, JAX-RS rule, Route category#80
boorad merged 6 commits into
mainfrom
feat/58-javax-jakarta-annotation-coverage

Conversation

@boorad
Copy link
Copy Markdown
Contributor

@boorad boorad commented May 7, 2026

Summary

Closes the javax/jakarta migration coverage gap in Java annotation rules, adds a JAX-RS endpoint rule, introduces a Route auth category for endpoint surface declarations, and lands the Phase B PolicyGenerator refactor that collapses parallel Rego/Cedar fields. Also closes a CI gap that let broken policy templates land on main unflagged.

Changes

  • Annotation coverage (Java: javax/jakarta migration coverage gaps in annotation and servlet rules #58): every Java annotation rule (Spring Security, JSR-250, Shiro, JAX-RS) now matches both bare-identifier and scoped_identifier forms — @RolesAllowed and @jakarta.annotation.security.RolesAllowed both fire. New java-jaxrs-endpoint rule covers @GET/@POST/@PUT/@DELETE/@PATCH/@HEAD/@OPTIONS/@Path from javax.ws.rs.* and jakarta.ws.rs.*.
  • Provenance field (Java: javax/jakarta migration coverage gaps in annotation and servlet rules #58): rules can declare provenance_capture = "anno_scope" so the package prefix (jakarta.annotation.security) flows onto Finding.provenance. Consumers split on the head segment for javax-vs-jakarta migration reports without grepping snippets. Compile-time validates the capture name resolves.
  • AuthCategory::Route: new bucket for HTTP route declarations (JAX-RS @GET, future Spring @RequestMapping, etc.). Reclassifies java-jaxrs-endpoint from middleware to route since these annotations only assert "endpoint exists" — the absence of a paired auth annotation is the signal. Wired through MCP tools/resources, deep-scan prompt, and output schema.
  • PolicyGenerator trait (refactor: extract PolicyGenerator trait and collapse parallel engine fields #79): collapses the parallel Rego/Cedar codepaths in extract/MCP/grouping behind one engine-keyed dispatch surface. Finding now carries a Vec<PolicyOutput> instead of rego_stub/cedar_stub; serde shim folds legacy JSON into the new shape so persisted findings keep loading.
  • CI gap fix: cargo run -- rules validate and rules test now run in CI. Three cedar templates (java-roles-allowed-array, java-shiro-requires-roles-array, csharp-aspnet-authorize-roles) had been failing template validation on main. Root cause was in validate_template: bare {{var}} placeholders were substituted with the literal identifier placeholder_value, invalid inside Cedar set literals. Detect the [{{var}}] shape and substitute ["placeholder"] instead.

Test plan

  • cargo fmt --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features — 417 unit + 18 + 6 + 6 + 8 integration passed
  • cargo run -- rules validate — All 80 rules validated successfully
  • cargo run -- rules test — 393 fixtures passed, 0 failed
  • Verified provenance round-trips through serde for both javax.* and jakarta.* qualified annotations
  • Verified legacy rego_stub / cedar_stub JSON deserializes into policy_outputs

Fixes #58

Summary by CodeRabbit

  • New Features

    • New Java rule to detect JAX‑RS/Jakarta REST endpoints
    • New "Route" authorization category and corresponding examples/templates
    • Findings now may include provenance metadata (captures package/annotation scope)
  • Improvements

    • Broadened annotation detection to support fully-qualified names across multiple rules
    • CI now validates rule queries and policy templates
  • Bug Fixes

    • Cedar template validation correctly handles set-context placeholders
  • Chores

    • Updated contributor commit guidance for branch handling and remote sync

boorad added 5 commits May 7, 2026 09:50
Java annotation rules previously matched only bare-identifier names, so
fully-qualified usages like `@jakarta.annotation.security.RolesAllowed`
and the `javax.*` siblings were silently missed across the Jakarta EE 9
package migration boundary. Extend each annotation rule's `name:` field
to accept `scoped_identifier` alongside `identifier`, mirroring the
alternation already in `access-decision-voter.toml` and
`security-interface-impl.toml`. Predicate matching stays on the trailing
identifier so `eq`/`match` rules apply uniformly.

Add a new `jaxrs-endpoint.toml` rule covering `@GET`/`@POST`/`@PUT`/
`@DELETE`/`@PATCH`/`@HEAD`/`@OPTIONS`/`@Path` from both `javax.ws.rs.*`
and `jakarta.ws.rs.*` so unprotected REST endpoints are visible to the
structural pass. Inline `[[rule.tests]]` cover bare and fully-qualified
forms (jakarta, javax, framework-qualified) on every touched rule.
Surface the package-prefix of fully-qualified Java annotations as a
structured `Finding.provenance` field so downstream tooling can split
`javax.*` (legacy) vs `jakarta.*` (modern) call sites without grepping
the snippet text. Rule TOML grows a new opt-in `provenance_capture`
field naming the capture whose matched text should flow onto the
finding; `compile_rule` validates the name resolves to a real query
capture. Bare-identifier annotation matches leave provenance unset
because the package isn't resolvable from the call site alone.

All ten Java annotation rules updated by the prior commit plus the
new `jaxrs-endpoint.toml` rule now expose an `@anno_scope` capture on
the scoped-identifier branch and declare `provenance_capture =
"anno_scope"`. The Finding shim folds the new field through serde with
`#[serde(default)]` so legacy persisted findings keep loading.
The /commit flow used to only check whether HEAD was `main`. That
missed the common case where someone is parked on a feature branch
named for a different issue/PR than the work being committed (e.g.
the #71 branch when implementing #58). Tighten the branch-check step
to also cover that case and the already-merged-upstream case, and add
the cherry-pick-and-stash-pop recipe so the new branch picks up any
prior commits that belong to the new work.
JAX-RS / Jakarta REST `@GET`, `@POST`, `@Path` etc. were landing as
`middleware`, conflating route declarations with route-level auth guards.
The annotations only assert "this is an endpoint" — the absence of a
paired auth annotation is what matters — so they belong in their own
bucket. Add `AuthCategory::Route`, wire it through the slug, Display,
MCP tool / resource enums, deep-scan system prompt, and output schema.
Both engines get TODO-style default templates since route declarations
don't generate concrete policies on their own.

Reclassify `java-jaxrs-endpoint` from `middleware` to `route` and swap
the awkward inner-class fixture for a class-level `@Path` placement.
CI ran only fmt/clippy/test, never `cargo run -- rules validate` or
`rules test` — so broken policy templates and rule fixtures could
land on main unflagged. Three cedar templates (java-roles-allowed-array,
java-shiro-requires-roles-array, csharp-aspnet-authorize-roles) had
been failing template validation on main without anyone noticing.

Root cause was in `validate_template`: bare `{{var}}` placeholders were
substituted with the literal identifier `placeholder_value`, which is
fine in identifier position (`principal.{{attribute}}`) but invalid
inside a set literal — `[{{cedar_roles_set}}]` became
`[placeholder_value]`, which Cedar rejects. Detect the set-context
shape `[{{var}}]` and substitute `["placeholder"]` so the rendered
template parses cleanly.

Add the two missing CI steps so this class of regression can't repeat.
@boorad boorad self-assigned this May 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc08091d-17b1-4b57-9c1f-77e62fecf925

📥 Commits

Reviewing files that changed from the base of the PR and between 314b414 and 279ece3.

📒 Files selected for processing (3)
  • rules/java/shiro-requires-authentication.toml
  • src/cedar/templates.rs
  • src/deep/context.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • rules/java/shiro-requires-authentication.toml

📝 Walkthrough

Walkthrough

This PR adds optional package-namespace provenance to findings, introduces an AuthCategory::Route and a JAX-RS endpoint rule, broadens Java annotation rules to accept fully-qualified/scoped identifiers and capture provenance, updates scanner compilation/execution, adds route templates and Cedar placeholder handling, extends deep prompt/schema/tooling, updates tests, CI, and commit guidance.

Changes

Authorization Provenance and Route Detection

Layer / File(s) Summary
Type System
src/types.rs, src/rules/mod.rs
Finding gains provenance: Option<String>; AuthCategory includes Route; PatternRule/RuleToml accept provenance_capture.
Java Rule Definitions
rules/java/*.toml
Multiple Java annotation rules extended to match both bare and scoped identifiers and capture anno_scope; new rules/java/jaxrs-endpoint.toml added to detect JAX-RS/Jakarta REST resource methods.
Rule Registration
src/rules/embedded.rs
Registers java-jaxrs-endpoint in EMBEDDED_RULES.
Scanner Execution
src/scanner/matcher.rs
compile_rule validates provenance_capture names; execute_query extracts configured capture into Finding.provenance; Java tests updated for provenance behavior.
Template Generation
src/cedar/templates.rs, src/rego/templates.rs
default_template adds AuthCategory::Route stub (commented TODO).
Placeholder Handling
src/cedar/validator.rs
validate_template rewrites set-context placeholders like [{{var}}] into Cedar-parsable set literals before bare-placeholder substitution.
Deep Scan Contracts
src/deep/prompt.rs, src/mcp/resources.rs, src/mcp/tools.rs
System prompt and output schema category enums extended to include route; MCP resources list category://route; tool schemas expand category enums to include route.
Finding Processing
src/deep/finding.rs, src/deep/candidate.rs, src/deep/merge.rs, src/deep/context.rs
into_finding sets provenance: None for semantic findings; context truncation budget refactor; test helpers updated to include provenance field.
Output Formatting
src/cedar/grouping.rs, src/rego/grouping.rs, src/output/json.rs, src/output/text.rs
Test fixtures updated to set provenance: None; no functional grouping/output logic changes.
Integration Tests
tests/deep_http_integration.rs
Adds end-to-end tests covering semantic finding generation, structural false-positive filtering, deterministic ordering, cost-cap mid-run handling, and empty-candidate preservation.
Subprocess Tests
tests/deep_subprocess_integration.rs
structural_finding helper updated to set provenance: None.
CI Workflow
.github/workflows/ci.yml
Added steps to validate rule queries/templates and run rule fixtures after tests.
Branch Handling
.agents/commands/commit.md
Branch-prep and remote-sync instructions rewritten to enforce dedicated feature branches and provide explicit stash/checkout/cherry-pick flow.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • EnforceAuth/zift#32: Related embedded rule registry changes; also edits src/rules/embedded.rs.
  • EnforceAuth/zift#17: Related deep semantic-scan and prompt/schema updates touching src/deep/* and tool schemas.
  • EnforceAuth/zift#50: Directly related to Java authorization rule tests and authorized-annotation evolution.

Poem

🐰 I hopped through qualifiers with cheer,

javax and jakarta both appear.
Routes now flagged and provenance kept,
Findings tidy, no more gaps slept.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: javax/jakarta annotation coverage, JAX-RS rule, Route category' accurately captures the main changes: extending Java annotation rules to support javax/jakarta variants, adding a new JAX-RS endpoint rule, and introducing the Route authorization category.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from issue #58: extends annotation rules to match both scoped and bare identifiers [spring-roles-allowed, spring-permit-all, spring-secured, spring-preauthorize, shiro-requires-authentication/permissions/roles/roles-array, authorized-annotation], adds provenance_capture for package metadata, introduces java-jaxrs-endpoint rule covering both javax.ws.rs and jakarta.ws.rs, includes comprehensive test fixtures for both variants, maintains negative test coverage, and adds Route category across all systems.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #58: Java annotation rule updates, provenance infrastructure, JAX-RS rule addition, Route category integration, and supporting CI/validation enhancements. The deep context truncation fix and Cedar template validation are necessary supporting changes for the core objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/58-javax-jakarta-annotation-coverage

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Copy link
Copy Markdown

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

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

This PR delivers substantial improvements to Java annotation coverage and policy validation while maintaining backward compatibility. The implementation is well-tested with 417 unit tests passing and all 80 rules validated successfully.

Key Additions:

  • Comprehensive javax/jakarta annotation coverage for JSR-250, Spring Security, Shiro, and JAX-RS
  • New Route category for HTTP endpoint declarations (JAX-RS annotations)
  • Provenance field to track package prefixes for migration reporting
  • Cedar template validation fix for set placeholders
  • CI validation steps for rules and policy templates

Code Quality:

  • Extensive test coverage with unit tests and integration tests
  • Proper backward compatibility through FindingShim deserialization
  • Clear documentation and well-structured code
  • All validation steps passing in CI

The changes are production-ready and ready to merge.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.


⚠️ This PR contains more than 30 files. Amazon Q is better at reviewing smaller PRs, and may miss issues in larger changesets.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/deep/context.rs (1)

176-183: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard marker append when max_chars is smaller than marker + imports budget

At Line 176–183, if max_chars is very small, snippet_budget saturates to 0 but the code still appends TRUNCATION_MARKER, so snippet.len() + imports_len can exceed max_chars. This breaks the stated combined-budget guarantee.

Proposed fix
-    let snippet_budget = max_chars
-        .saturating_sub(TRUNCATION_MARKER.len())
-        .saturating_sub(imports_len);
-    if snippet.len() > snippet_budget {
-        let cut = snippet.floor_char_boundary(snippet_budget);
-        snippet.truncate(cut);
-        snippet.push_str(TRUNCATION_MARKER);
-    }
+    let marker_fits = max_chars.saturating_sub(imports_len) >= TRUNCATION_MARKER.len();
+    let snippet_budget = if marker_fits {
+        max_chars
+            .saturating_sub(TRUNCATION_MARKER.len())
+            .saturating_sub(imports_len)
+    } else {
+        max_chars.saturating_sub(imports_len)
+    };
+
+    if snippet.len() > snippet_budget {
+        let cut = snippet.floor_char_boundary(snippet_budget);
+        snippet.truncate(cut);
+        if marker_fits {
+            snippet.push_str(TRUNCATION_MARKER);
+        }
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/deep/context.rs` around lines 176 - 183, The current truncation logic can
append TRUNCATION_MARKER even when snippet_budget is smaller than the marker
length, violating the combined max_chars + imports_len guarantee; change the
block that computes snippet_budget and truncates to only append
TRUNCATION_MARKER when snippet_budget >= TRUNCATION_MARKER.len(), otherwise
truncate the snippet to at most snippet_budget (possibly empty) without
appending the marker. Update the code around snippet_budget,
snippet.floor_char_boundary, snippet.truncate and snippet.push_str to check
snippet_budget >= TRUNCATION_MARKER.len() before calling push_str and use the
proper cut computed from snippet_budget (not 0) so final snippet.len() +
imports_len <= max_chars.
🧹 Nitpick comments (2)
rules/java/shiro-requires-authentication.toml (1)

50-57: 💤 Low value

Consider adding FQ fixtures for RequiresGuest and RequiresUser to match coverage of RequiresAuthentication.

The predicate covers all three names equally, but only RequiresAuthentication has a qualified-form test. Two extra [[rule.tests]] blocks would give symmetrical coverage for the full annotation family the rule declares.

🧪 Suggested fixtures
+[[rule.tests]]
+input = """
+public class SecureController {
+    `@org.apache.shiro.authz.annotation.RequiresGuest`
+    public void guestAction() { }
+}
+"""
+expect_match = true
+
+[[rule.tests]]
+input = """
+public class SecureController {
+    `@org.apache.shiro.authz.annotation.RequiresUser`
+    public void userAction() { }
+}
+"""
+expect_match = true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rules/java/shiro-requires-authentication.toml` around lines 50 - 57, Add
fully-qualified annotation fixtures for RequiresGuest and RequiresUser to match
the existing qualified-form test for RequiresAuthentication: duplicate the
existing [[rule.tests]] block that uses the FQ form (e.g.,
`@org.apache.shiro.authz.annotation.RequiresAuthentication`) and replace the
annotation name with org.apache.shiro.authz.annotation.RequiresGuest and
org.apache.shiro.authz.annotation.RequiresUser respectively so the predicate is
exercised for all three annotation names (RequiresAuthentication, RequiresGuest,
RequiresUser).
src/cedar/templates.rs (1)

135-145: 💤 Low value

Consider adding a unit test for the new AuthCategory::Route arm.

default_template(AuthCategory::Middleware), AuthCategory::Ownership, etc. all have direct test coverage in this module. The new Route arm is the only addition without one. The BusinessRule/Custom pattern is already a precedent without tests, but for a brand-new arm a one-liner assertion prevents silent regressions if the stub text is accidentally clobbered.

🧪 Suggested test addition
+    #[test]
+    fn default_stub_route_returns_commented_todo() {
+        let stub = generate_default_stub(AuthCategory::Route, "");
+        assert!(stub.contains("TODO: route declaration"));
+        assert!(!stub.contains("permit ("));  // must be commented out
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cedar/templates.rs` around lines 135 - 145, Add a unit test that
exercises default_template(AuthCategory::Route) and asserts its returned string
contains the expected stub comment (the TODO route declaration stub) to prevent
regressions; locate the enum AuthCategory and the default_template function in
templates.rs, create a test in the existing tests module (or add a new
#[cfg(test)] mod) that calls default_template(AuthCategory::Route) and compares
or contains-matches the exact template text used for the Route arm.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/deep/context.rs`:
- Around line 176-183: The current truncation logic can append TRUNCATION_MARKER
even when snippet_budget is smaller than the marker length, violating the
combined max_chars + imports_len guarantee; change the block that computes
snippet_budget and truncates to only append TRUNCATION_MARKER when
snippet_budget >= TRUNCATION_MARKER.len(), otherwise truncate the snippet to at
most snippet_budget (possibly empty) without appending the marker. Update the
code around snippet_budget, snippet.floor_char_boundary, snippet.truncate and
snippet.push_str to check snippet_budget >= TRUNCATION_MARKER.len() before
calling push_str and use the proper cut computed from snippet_budget (not 0) so
final snippet.len() + imports_len <= max_chars.

---

Nitpick comments:
In `@rules/java/shiro-requires-authentication.toml`:
- Around line 50-57: Add fully-qualified annotation fixtures for RequiresGuest
and RequiresUser to match the existing qualified-form test for
RequiresAuthentication: duplicate the existing [[rule.tests]] block that uses
the FQ form (e.g., `@org.apache.shiro.authz.annotation.RequiresAuthentication`)
and replace the annotation name with
org.apache.shiro.authz.annotation.RequiresGuest and
org.apache.shiro.authz.annotation.RequiresUser respectively so the predicate is
exercised for all three annotation names (RequiresAuthentication, RequiresGuest,
RequiresUser).

In `@src/cedar/templates.rs`:
- Around line 135-145: Add a unit test that exercises
default_template(AuthCategory::Route) and asserts its returned string contains
the expected stub comment (the TODO route declaration stub) to prevent
regressions; locate the enum AuthCategory and the default_template function in
templates.rs, create a test in the existing tests module (or add a new
#[cfg(test)] mod) that calls default_template(AuthCategory::Route) and compares
or contains-matches the exact template text used for the Route arm.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ea7f7c9-5fe8-4f44-8c30-3374088e4285

📥 Commits

Reviewing files that changed from the base of the PR and between ab1cef7 and 314b414.

📒 Files selected for processing (33)
  • .agents/commands/commit.md
  • .github/workflows/ci.yml
  • rules/java/authorized-annotation.toml
  • rules/java/jaxrs-endpoint.toml
  • rules/java/shiro-requires-authentication.toml
  • rules/java/shiro-requires-permissions.toml
  • rules/java/shiro-requires-roles-array.toml
  • rules/java/shiro-requires-roles.toml
  • rules/java/spring-permit-all.toml
  • rules/java/spring-preauthorize.toml
  • rules/java/spring-roles-allowed-array.toml
  • rules/java/spring-roles-allowed.toml
  • rules/java/spring-secured.toml
  • src/cedar/grouping.rs
  • src/cedar/templates.rs
  • src/cedar/validator.rs
  • src/deep/candidate.rs
  • src/deep/context.rs
  • src/deep/finding.rs
  • src/deep/merge.rs
  • src/deep/prompt.rs
  • src/mcp/resources.rs
  • src/mcp/tools.rs
  • src/output/json.rs
  • src/output/text.rs
  • src/rego/grouping.rs
  • src/rego/templates.rs
  • src/rules/embedded.rs
  • src/rules/mod.rs
  • src/scanner/matcher.rs
  • src/types.rs
  • tests/deep_http_integration.rs
  • tests/deep_subprocess_integration.rs

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 7, 2026
- Guard truncation marker append in deep context when budget is too small
- Add FQ-form Shiro fixtures for RequiresGuest and RequiresUser
- Add unit test for Cedar Route default template
@boorad
Copy link
Copy Markdown
Contributor Author

boorad commented May 7, 2026

@coderabbitai Addressed in 279ece3:

  • Fixed: src/deep/context.rs 176-183 — guard TRUNCATION_MARKER append when remaining budget is smaller than the marker, so snippet + imports + marker cannot exceed max_chars.
  • Fixed: rules/java/shiro-requires-authentication.toml — added FQ-form fixtures for RequiresGuest and RequiresUser to mirror RequiresAuthentication.
  • Fixed: src/cedar/templates.rs — added default_stub_route_returns_commented_todo unit test for the new AuthCategory::Route arm.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Tip

For best results, initiate chat on the files or code changes.

@boorad Thanks for the update! All three fixes look good:

  • src/deep/context.rs — The budget guard for TRUNCATION_MARKER ensures snippet + imports + marker stays within max_chars, preventing potential overruns.
  • rules/java/shiro-requires-authentication.toml — Adding FQ-form fixtures for RequiresGuest and RequiresUser mirrors the RequiresAuthentication coverage and keeps the test suite consistent.
  • src/cedar/templates.rs — The new default_stub_route_returns_commented_todo unit test properly validates the AuthCategory::Route arm.

@boorad boorad merged commit bd06fdb into main May 7, 2026
2 checks passed
@boorad boorad deleted the feat/58-javax-jakarta-annotation-coverage branch May 7, 2026 18:31
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.

Java: javax/jakarta migration coverage gaps in annotation and servlet rules

1 participant