Skip to content

Reduce certificate setup time in Account composition tests - #3499

Merged
benhook1013 merged 2 commits into
developfrom
codex/account-mtls-test-setup
Nov 23, 2026
Merged

benhook1013 merged 2 commits into
developfrom
codex/account-mtls-test-setup

Conversation

@benhook1013

@benhook1013 benhook1013 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Reuse the signed leaf and its matching key directly in the Account composition fixture.
  • Keep fixture CA validation, certificate identity and purpose, and per-session isolation. Keep the existing store-based path for other callers.

Validation

  • Controlled historical comparison at 1c1a8b99 passed the same 36 cases on both paths. JUnit suite time decreased from 1,310.330 s to 1,186.427 s (9.46%). This measures the fixture workload only.
  • Current develop at d49d0e10: all three Account composition integration cases passed with no skips. Spotless passed after formatting.
  • Independent source review passed.

FireMUD LOC impact

Compared d49d0e10a3fa → 65d065bbdeae (PR merge-base → head).
PR scope: 5 changed files · 93 added textual lines / 37 deleted textual lines.

Section Base LOC Head LOC Δ LOC Change
Overall 1,652,956 1,653,006 +50 +<0.1%
 Source 1,552,797 1,552,840 +43 +<0.1%
  ↳ Code 681,592 681,592 0 0.0%
  ↳ Tests 871,205 871,248 +43 +<0.1%
 Markdown 65,288 65,288 0 0.0%
 Design 68,232 68,232 0 0.0%
  ↳ Architecture 46,461 46,461 0 0.0%
  ↳ Project management 6,131 6,131 0 0.0%
  ↳ Observability 2,147 2,147 0 0.0%
  ↳ Operator runbooks 579 579 0 0.0%
  ↳ gRPC API documentation 11,391 11,391 0 0.0%
  ↳ Product requirements and user journeys 926 926 0 0.0%
  ↳ Developer workflows 518 518 0 0.0%
  ↳ Other design 79 79 0 0.0%

Rows are hierarchical and overlapping views; do not add them together.
LOC means cloc code lines; blank and comment-only lines are excluded.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto reviews are disabled on this repository. 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

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

No actionable comments were generated in the recent review.

Summary

Test-only change. No production code, contracts, schemas, or deployment settings change. Diff: 2 files, +70/−33.

  • services/common-test-support (LoopbackMtlsTestPki, testFixtures): Adds createWithDirectSignedLeafRead. Both public methods call a private create overload with a flag. When the flag is true, issueIdentity skips the keystore imports of the CA and signed leaf, reads the leaf from its output file, and checks that the private key and stored certificate exist, that their public keys match, and that the leaf verifies against the CA. Failed checks throw GeneralSecurityException. The store-based path is unchanged.
  • services/account-service (AccountGameSessionOriginalNewFinalAdmissionCompositionIntegrationTest): Uses the new method (one-line change).

Validation: the PR reports 36 matching cases and a 9.46% suite-time reduction. Not verified here.

The test PKI fixture adds a creation method that reads the signed leaf certificate from its output file and validates it against the keystore and CA. An account-service integration test uses this method.

Changes: Test PKI creation

Layer / File(s) Summary
Direct-read PKI creation
services/common-test-support/src/testFixtures/java/net/firedevops/firemud/test/LoopbackMtlsTestPki.java
The fixture adds createWithDirectSignedLeafRead and a conditional issuance path. This path reads the leaf certificate from its output file, checks that its public key matches the keystore certificate, verifies it with the CA public key, and returns it with the private key.
Integration test selection
services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountGameSessionOriginalNewFinalAdmissionCompositionIntegrationTest.java
The integration test uses createWithDirectSignedLeafRead; its PKI directory, CA name, and identity specifications remain unchanged.

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

Change: Other

Merge Risk: Minimal · previous review 9a1b9

This test-only change speeds up certificate setup in the Account composition integration test by reading the signed leaf certificate directly, while keeping CA validation and key matching. Production code is not touched and other callers keep the existing path. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: reducing certificate setup time in the Account composition tests. The raw summary shows the change adds a direct signed-leaf read path to the LoopbackMtlsTestPki fixtu…
Description check Passed The description has a Summary and a Validation section, which covers the purpose and the checks run. It gives concrete evidence: a controlled historical comparison with timing figures, a passing run o…
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: Title check

Explanation

The title names the main change: reducing certificate setup time in the Account composition tests. The raw summary shows the change adds a direct signed-leaf read path to the LoopbackMtlsTestPki fixture and switches the Account composition integration test to it. The objectives confirm the aim is to speed up that fixture by reusing the signed leaf certificate and its matching key. The title is concise, specific, and free of noise.

Full details: Description check

Explanation

The description has a Summary and a Validation section, which covers the purpose and the checks run. It gives concrete evidence: a controlled historical comparison with timing figures, a passing run of the three Account composition integration cases on current develop, Spotless, and an independent source review. It does not have the What Changed or Notes sections from the template, and the Summary does not reference related issues or design docs. The LOC Impact section is generated by CI and is not expected from the author. The missing What Changed section is the main gap, since the summary names no changed files or the new createWithDirectSignedLeafRead method. The description is mostly complete, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d49d0e1 and 9a1b99c.

Files selected for processing: 2

  • services/account-service/src/test/java/integration/net/firedevops/firemud/accountservice/repository/AccountGameSessionOriginalNewFinalAdmissionCompositionIntegrationTest.java
  • services/common-test-support/src/testFixtures/java/net/firedevops/firemud/test/LoopbackMtlsTestPki.java

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

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Summary

⚠️ Known PLAY failed: ERROR ENTITLEMENT_UNAVAILABLE after LOGIN. Canonical PLAY transition exception accepted; no runtime qualification or publication.

  • ✅ Changes detection: success
  • ✅ Smoke Gate: success
  • ❌ PR Full-Stack Smoke: failure (known PLAY exception accepted; no runtime qualification or publication)

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Static Analysis Summary

✅ Static analysis checks passed

  • ✅ CodeQL gate: success
  • ✅ License gate: success

CodeQL breakdown

  • ✅ CodeQL analysis (java): success
  • ⏭️ CodeQL analysis (javascript-typescript): skipped

@github-actions

Copy link
Copy Markdown
Contributor

Security Summary

✅ Security checks passed or were intentionally skipped

  • ✅ Security gate: success
  • ✅ Trivy filesystem scan: success
  • ✅ Secret compliance validation: success

@benhook1013

Copy link
Copy Markdown
Owner Author

@coderabbitai rate limit

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. Reviews are available now.

@benhook1013

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@codecov

codecov Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 0 Found, 0/0/0 Accepted (Major/Minor/Trivial), 0 Routed
2 files · 1m 22s · 9a1b99c

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit CLI — 0 Found, 0/0/0 Accepted (Major/Minor/Trivial), 0 Routed
2 files · 1m 17s · 9a1b99c

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit Hosted — 0 Found, 0/0/0 Accepted (Major/Minor/Trivial), 0 Routed
2 files · 3m 26s · 9a1b99c

@benhook1013

Copy link
Copy Markdown
Owner Author

@coderabbitai rate limit

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. More reviews will be available in 55 minutes.

@benhook1013

Copy link
Copy Markdown
Owner Author

@coderabbitai rate limit

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Your plan includes PR reviews subject to rate limits. Reviews are available now.

@benhook1013

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@benhook1013

Copy link
Copy Markdown
Owner Author

CodeRabbit Hosted — 0 Found, 0/0/0 Accepted (Major/Minor/Trivial), 0 Routed
2 files · 3m 21s · 9a1b99c

@github-actions

Copy link
Copy Markdown
Contributor

Validation Summary

✅ All validation checks passed

  • ✅ Validation gate: success
  • ✅ Buf generation: success
  • ✅ Dockerfile lint: success
  • ✅ ShellCheck: success
  • ✅ Python script validation: success
  • ✅ Dev tool contract checks: success
  • ⏭️ Dev Tools README contract: skipped
  • ✅ YAML lint: success
  • ✅ Metrics cardinality policy check: success
  • ✅ Flyway migration sanity checks: success
  • ✅ gRPC transport configuration sanity checks: success
  • ✅ GitHub workflow lint: success
  • ✅ Helm chart lint: success
  • ✅ Helm render validation: success
  • ✅ Helm transaction proof: success
  • ✅ Validate Documentation: success
  • ✅ Frontend checks: success
  • ✅ Dev tool validation contracts: success
  • ✅ Service build/test matrix: success
  • ✅ Account coverage aggregation: success
  • ✅ Game Session coverage aggregation: success
  • ✅ World coverage aggregation: success

Coverage reports and failure logs are available in the workflow artifacts.

@benhook1013
benhook1013 merged commit e7d1306 into develop Nov 23, 2026
87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant