Skip to content

refactor(graceful): use slices.Backward - #4643

Open
colinaumaty wants to merge 1 commit into
zeta-chain:mainfrom
colinaumaty:refactor/graceful-backward-iterator
Open

colinaumaty wants to merge 1 commit into
zeta-chain:mainfrom
colinaumaty:refactor/graceful-backward-iterator

Conversation

@colinaumaty

@colinaumaty colinaumaty commented Sep 24, 2026 •

Copy link
Copy Markdown

Description

Use slices.Backward when invoking the graceful process stop stack. This expresses the required LIFO order directly and preserves panic recovery and timeout behavior.

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Note

Low Risk
Behavior-preserving refactor in shutdown ordering only; no change to timeout, panic handling, or stop registration.

Overview
Shutdown stop-stack iteration now uses slices.Backward instead of a manual index loop, so LIFO teardown is expressed directly while keeping the same panic recovery, timeout, and logging around ShutdownNow.

Reviewed by Cursor Bugbot for commit e264263. Configure here.

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR replaces the index-based reverse shutdown loop with slices.Backward.

  • Shutdown callback order remains LIFO.
  • Panic recovery and timeout handling remain unchanged.

Reviews (1) · Last reviewed commit: "refactor(graceful): use slices.Backward"

Signed-off-by: colinaumaty <colinaumaty@outlook.com>
@colinaumaty
colinaumaty requested a review from a team as a code owner September 24, 2026 10:22

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@colinaumaty

Copy link
Copy Markdown
Author

@julianrubino @morde08 Could you please take a look when you have a chance? Thanks!

This branch has not been deployed

No deployments
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