Skip to content

fix: clean up modernize and nilaway reports#2862

Merged
wolf31o2 merged 1 commit into
mainfrom
codex/quality-modernize-nilaway
Jul 17, 2026
Merged

fix: clean up modernize and nilaway reports#2862
wolf31o2 merged 1 commit into
mainfrom
codex/quality-modernize-nilaway

Conversation

@wolf31o2

@wolf31o2 wolf31o2 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary by cubic

Cleans up nil-safety issues flagged by NilAway and modernizes loops/concurrency for Go 1.22. Improves robustness in ledger, Mithril healing, and Ouroboros tests, and simplifies retry/backoff logic.

  • Bug Fixes

    • Add nil checks in protocol parameter size retrieval and opcert handling to prevent panics.
    • Guard Mithril gap healing when the anchor iterator is missing; return a clear error.
    • Ensure epoch loading uses a transaction; refresh current epoch after healing.
    • Guarantee fallback point is returned when trust-boundary intersection yields none.
    • Preallocate and index-assign slices in Leios apply; dedupe using new slices sized to kept indexes.
    • Fix out-of-bounds risks in tx fetch tests; collect backfill hashes safely.
    • Use addressable guards in Leios backfill tests; avoid calling methods on map literals.
    • Tighten CBOR decode tests with non-empty assertions; replace map[string]interface{} with map[string]any.
  • Refactors

    • Replace manual WaitGroup Add/Done with wg.Go in tests and recycler worker.
    • Adopt range-over-int loops (Go 1.22) in tests for simpler iteration.
    • Simplify retry/backoff math using min for delay and shift clamping.

Written for commit ab68b06. Summary will update on new commits.

Review in cubic

Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
@wolf31o2
wolf31o2 requested a review from a team as a code owner July 16, 2026 20:17
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 58 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82afb692-673b-4d33-b434-139636f80203

📥 Commits

Reviewing files that changed from the base of the PR and between 0c5d729 and ab68b06.

📒 Files selected for processing (22)
  • api/blockfrost/blockfrost_compat_test.go
  • database/models/leios_block_test.go
  • database/plugin/metadata/sqlite/account_created_slot_test.go
  • database/types/types_test.go
  • internal/architecture/import_boundary_test.go
  • ledger/chainsync_state_race_test.go
  • ledger/delta_test.go
  • ledger/envelope_validation.go
  • ledger/governance/epoch.go
  • ledger/heal_empty_lab_nonce_test.go
  • ledger/heal_mithril_gap_nonce.go
  • ledger/leios_apply.go
  • ledger/leios_apply_test.go
  • ledger/state.go
  • mithril/download.go
  • node_chainsync_recycler.go
  • ouroboros/leios_backfill_failover_test.go
  • ouroboros/leios_merged_test.go
  • ouroboros/leios_txfetch_test.go
  • ouroboros/leiosnotify.go
  • peergov/connections_test.go
  • peergov/emergency_ledger_discovery_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/quality-modernize-nilaway

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.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 22 files

Re-trigger cubic

@wolf31o2
wolf31o2 merged commit e5b0506 into main Jul 17, 2026
14 of 15 checks passed
@wolf31o2
wolf31o2 deleted the codex/quality-modernize-nilaway branch July 17, 2026 14:10
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.

2 participants