Skip to content

Make VotingPlugin JAR size an advisory build warning - #1687

Merged
BenCodez merged 1 commit into
masterfrom
codex/restore-jar-size-budget
Oct 2, 2026
Merged

BenCodez merged 1 commit into
masterfrom
codex/restore-jar-size-budget

Conversation

@BenCodez

@BenCodez BenCodez commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

Current master (376c2a9c3) fails both Jenkins build 2409 and GitHub Actions run 36951471825 solely because the downloadable JAR slightly exceeds 10 MiB. Reproduced locally: 10,503,573 bytes.

Change

Per maintainer direction, treat 10 MiB as an advisory size target. Print a prominent [WARNING] with the actual byte size in standard Maven/CI package output, without rejecting the build for size alone.

Required resources, native runtime/linkage tests, duplicate-library exclusions and other packaging safety checks remain enforced. No runtime source, dependency filtering or executable behavior changed. Update the packaging contract and AGENTS.md to match.

Validation

  • Unchanged current master reproduced the size failure.
  • Focused actual packaged-artifact checks: 5 passed, including threshold-boundary/oversized warning regression.
  • mvn -B -nsu -f VotingPlugin/pom.xml clean package: 1,809 unit tests + 5 artifact tests passed (1m18s).
  • Actual 10,503,573-byte JAR passed and printed the warning in the captured standard build console.
  • git diff --check passed; manual complete diff inspected; fresh independent source-read-only review: No findings.

Merge this before rerunning size-related failures on other PRs, including #1686. Does not claim to fix unrelated build failures.

Summary by CodeRabbit

  • Documentation
    • Clarified that the 10 MiB downloadable JAR size is an advisory target, not a build limit.
    • Documented that required-resource, linkage, duplicate-library, and packaging-safety checks still fail the build when they detect issues.
  • Tests
    • Updated packaging checks to warn when the artifact exceeds 10 MiB without failing the build; verified behavior at and below the target.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-02T02:02:31.214610Z ff152f8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 23799ee7-abfa-4ad3-b7af-4cd66f0a8e3d

📥 Commits

Reviewing files that changed from the base of the PR and between 376c2a9 and ff152f8.

📒 Files selected for processing (3)
  • AGENTS.md
  • VotingPlugin/src/test/java/com/bencodez/votingplugin/packaging/PackagedArtifactTest.java
  • docs/jar-packaging.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: build
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: Analyze (actions)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: BenCodez/VotingPlugin

Timestamp: 2026-10-02T02:01:39.575Z
Learning: Source excerpt:
# Maintainer and AI-agent guide

## Build and verification

Keep the downloadable VotingPlugin JAR as small as practical. The 10 MiB size target is advisory:
report a prominent package/build warning when exceeded, never fail a build solely for artifact size.
Keep required-resource, linkage, and packaging-safety checks enforced. Inspect the shaded
artifact when dependencies change, avoid duplicate embedded packages, and update
the package-phase size and runtime checks when a necessary dependency increases
the artifact budget.

📝 Walkthrough

Walkthrough

The 10 MiB artifact-size threshold is now advisory. Oversized artifacts produce a warning, while required-resource, linkage, and packaging-safety checks remain enforced.

Changes

JAR size target

Layer / File(s) Summary
Report oversized artifacts
AGENTS.md, VotingPlugin/src/test/java/com/bencodez/votingplugin/packaging/PackagedArtifactTest.java, docs/jar-packaging.md
The packaging test warns when an artifact exceeds 10 MiB instead of failing on size alone. Tests cover the target and a size one byte over it. Guidance and documentation describe the advisory target and retained packaging checks.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to ff152

Oversized JARs remain buildable while producing a Maven-console warning, and the required packaging checks remain enforced. No actionable merge risk is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing the blocking VotingPlugin JAR size limit with an advisory build warning.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@BenCodez
BenCodez merged commit 93df541 into master Oct 2, 2026
6 checks passed
@BenCodez
BenCodez deleted the codex/restore-jar-size-budget branch October 2, 2026 02:08
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.

1 participant