Skip to content

Fixes to service infrastructure. - #799

Merged
renatomaia merged 5 commits into
next/2.0from
fix/ServiceImprovements
Sep 23, 2026
Merged

renatomaia merged 5 commits into
next/2.0from
fix/ServiceImprovements

Conversation

@renatomaia

@renatomaia renatomaia commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

This PR implements improvements as described here.

Commit relation to findings

ID Commit Change Component Description
H1 4d45f44 fix evmreader avoid that application failures degrade readiness
H2 2f74a33 fix services honor rescheduling of ticks even in case errors are returned
H3 55724c6 fix advancer avoid failure exit code on shutdown during database write
H5 3cb256a feat services preserve all service errors on supervisor shutdown
H5 057d3f1 fix services avoid supressing failure exit code on failures during shutdown

@renatomaia renatomaia self-assigned this Sep 23, 2026
@vfusco
vfusco requested a balanced review from Copilot September 23, 2026 17:25

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Joined cancellation errors can cause genuine service failures to be discarded during shutdown.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Improves service scheduling, shutdown error handling, EVM-reader readiness, and advancer shutdown behavior.

Changes:

  • Honors immediate rescheduling after partial progress.
  • Aggregates supervisor and subservice failures.
  • Separates application-local corruption from infrastructure failures and handles canceled persistence gracefully.
File Description
pkg/​service/​tick.go Clarifies and honors rescheduling semantics.
pkg/​service/​tick_test.go Tests rescheduling with partial failures.
pkg/​service/​supervisor.go Aggregates fatal and service errors.
pkg/​service/​supervisor_test.go Tests concurrent and shutdown error aggregation.
internal/​evmreader/​readiness_test.go Tests readiness failure classification.
internal/​evmreader/​input.go Treats persisted corruption as application-local.
internal/​evmreader/​evmreader.go Documents scanner health semantics.
internal/​evmreader/​error_paths_test.go Updates corruption-path expectations.
internal/​advancer/​advancer.go Distinguishes shutdown cancellation from fatal persistence failures.
internal/​advancer/​advancer_test.go Tests persistence and machine-close failure classification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/service/supervisor.go
- Known input corruption is excluded from readiness failures only after an integrity status is recorded.
- RPC, database, and status-persistence failures still affect readiness.
- Observation continues for terminal applications.
…turned

Ticks now honor immediate rescheduling after partial progress even when an error
occurs. Errors without progress still wait for the polling timer.
…shutdown

Ignore only error trees whose leaves are all cancellation errors. Mixed joined
errors retain all failures and their wrapping context.
@renatomaia
renatomaia force-pushed the fix/ServiceImprovements branch from e7b4b70 to 057d3f1 Compare September 23, 2026 17:54
@renatomaia
renatomaia marked this pull request as ready for review September 23, 2026 17:55
@renatomaia
renatomaia merged commit 057d3f1 into next/2.0 Sep 23, 2026
39 of 40 checks passed
@renatomaia
renatomaia deleted the fix/ServiceImprovements branch September 23, 2026 18:21
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.

3 participants