Skip to content

fix: render the serialisation violation verb as 'serialise objects' - #133

Merged
MarkusPaulsen merged 1 commit into
mainfrom
fix/architecture-serialise-verb
Jul 21, 2026
Merged

fix: render the serialisation violation verb as 'serialise objects'#133
MarkusPaulsen merged 1 commit into
mainfrom
fix/architecture-serialise-verb

Conversation

@MarkusPaulsen

Copy link
Copy Markdown
Collaborator

Problem

Architecture-violation messages render as:

... tried to illegally Serialises objects via ... but was blocked by Ares.

The capitalised, third-person Serialises objects is grammatically wrong in the tried to illegally <action> via ... sentence (every other verb reads as a lowercase base form, e.g. access the file system, terminate the JVM).

Cause

JavaArchitectureTestCase.mapRuleNameToAction lowercases each ArchUnit rule label and maps it to a sentence verb. The serialisation branch still matched the American label serializes objects:

case "serializes objects" -> "serialize objects";

The rule label is security.architecture.serialize=Serialises objects (British), which lowercases to serialises objects and therefore no longer matches. The mapping falls through to default -> ruleName, leaking the raw capitalised label into the sentence. Every sibling label is American/neutral and still matches its case, so serialisation is the only affected verb.

Fix

Match the British label and map it to the lowercase base-form verb, consistent with all siblings:

case "serialises objects" -> "serialise objects";

The message now reads ... tried to illegally serialise objects via ... but was blocked by Ares.

Verification

Rebuilt Ares and ran the SCORE reproducibility package BLOCKED_ALL serialisation metatests against it: all pass with the expected tried to illegally serialise objects via ..., and a falsification run (asserting the old Serialises objects) fails, confirming the emitted verb is now the corrected lowercase British form.

mapRuleNameToAction lowercases each ArchUnit rule label and maps it to a
sentence verb for the 'tried to illegally <action> via ...' violation
message. The serialisation case still matched the American label
'serializes objects', but the rule label is 'Serialises objects', which
lowercases to 'serialises objects' and no longer matched, so the mapping
fell through to default and leaked the capitalised label into the sentence
('tried to illegally Serialises objects via ...'). Match the British label
and map it to the lowercase base-form verb, consistent with every sibling
('serialise objects'), yielding 'tried to illegally serialise objects via ...'.
Copilot AI review requested due to automatic review settings July 21, 2026 02:44
@MarkusPaulsen
MarkusPaulsen requested review from a team and krusche as code owners July 21, 2026 02:44
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 7 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 07dd3b92-7507-45d4-a75f-50a1283bf6e9

📥 Commits

Reviewing files that changed from the base of the PR and between 11c143e and 943a0cc.

📒 Files selected for processing (1)
  • src/main/java/de/tum/cit/ase/ares/api/architecture/java/JavaArchitectureTestCase.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/architecture-serialise-verb

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.

@github-actions github-actions Bot added the architecture Automated area label: architecture label Jul 21, 2026

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

Fixes the ArchUnit architecture-violation message phrasing for the serialization rule so the sentence reads with a lowercase base-form verb (… tried to illegally serialise objects …) instead of leaking the rule label (Serialises objects) into the message.

Changes:

  • Update mapRuleNameToAction to match the British rule label (serialises objects) and map it to the intended verb phrase (serialise objects).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MarkusPaulsen
MarkusPaulsen merged commit e5debe4 into main Jul 21, 2026
12 of 13 checks passed
@MarkusPaulsen
MarkusPaulsen deleted the fix/architecture-serialise-verb branch July 21, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture Automated area label: architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants