Skip to content

fix: improve epoxy propose errors, add gcp logging fmt#4698

Open
MasterPtato wants to merge 1 commit into04-22-fix_autogenerate_bare_protocol_namesfrom
04-22-fix_improve_epoxy_propose_errors_add_gcp_logging_fmt
Open

fix: improve epoxy propose errors, add gcp logging fmt#4698
MasterPtato wants to merge 1 commit into04-22-fix_autogenerate_bare_protocol_namesfrom
04-22-fix_improve_epoxy_propose_errors_add_gcp_logging_fmt

Conversation

@MasterPtato
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app Bot commented Apr 22, 2026

🚅 Deployed to the rivet-pr-4698 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Apr 23, 2026 at 2:55 pm
website 😴 Sleeping (View Logs) Web Apr 23, 2026 at 2:54 pm
frontend-inspector ❌ Build Failed (View Logs) Web Apr 22, 2026 at 9:59 pm
kitchen-sink ❌ Build Failed (View Logs) Web Apr 22, 2026 at 9:58 pm
mcp-hub ✅ Success (View Logs) Web Apr 22, 2026 at 9:58 pm
ladle ❌ Build Failed (View Logs) Web Apr 22, 2026 at 9:58 pm

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MasterPtato MasterPtato force-pushed the 04-22-fix_improve_epoxy_propose_errors_add_gcp_logging_fmt branch from f7f556c to ca359e4 Compare April 22, 2026 21:58
@MasterPtato MasterPtato force-pushed the 04-22-fix_autogenerate_bare_protocol_names branch from 9c42c67 to a1d6d8b Compare April 22, 2026 21:58
@claude
Copy link
Copy Markdown

claude Bot commented Apr 22, 2026

PR #4698 Review: fix: improve epoxy propose errors, add gcp logging fmt

Summary: This PR does two things: (1) restructures ProposalResult in the epoxy consensus subsystem to replace the opaque ConsensusFailed/CommandError variants with a unified ConsensusFailed type that carries structured failure context; and (2) adds a GCP Cloud Logging (Stackdriver) output format selectable via RUST_LOG_FORMAT=gcp.


Must Fix

Test compilation failures. Three test files still import CommandError which no longer exists in epoxy::ops::propose:

  • engine/packages/epoxy/tests/kv.rs:3
  • engine/packages/epoxy/tests/migration.rs:10
  • engine/packages/epoxy/tests/backfill_snapshot.rs:8

All three files also match against ProposalResult::CommandError(CommandError::ExpectedValueDoesNotMatch) (e.g., kv.rs lines 42-44, 70-72, 107-109; backfill_snapshot.rs lines 100, 226; migration.rs line 36). These will not compile. They need to be updated to match the new ConsensusFailedReason::ExpectedValueDoesNotMatch pattern.


Should Address

Gasoline activity output serialization break. ProposalResult is used as the return type of the propose activity in engine/packages/pegboard/src/workflows/actor/keys.rs and actor2/keys.rs. Gasoline serializes activity outputs to JSON for workflow replay. The serialized JSON shapes have changed with this refactor. Any in-flight workflows with a persisted Propose activity output using the old JSON shape will fail deserialization on replay after deploy. Consider serde(alias) attributes to bridge the gap if forward-compatibility is needed.


Should Fix

Em dash in doc comment (engine/packages/runtime/src/traces.rs:17): CLAUDE.md explicitly prohibits em dashes. Change the doc comment to use a period instead.


Minor

Redundant branch in result_for_committed_value (engine/packages/epoxy/src/ops/propose.rs lines 137-153): The mutable and non-mutable branches now produce identical code after the unification. The branch can be collapsed to a simple conditional on current_value == self.value.


Good Changes

  • ConsensusFailedReason enum: Clear improvement. The new PreparePhaseConsensusFailed, AcceptPhaseConsensusFailed, StaleBallot, and ExpectedValueDoesNotMatch variants are much more expressive than the old opaque ConsensusFailed unit variant and the misleading CommandError name.

  • ProposalResult::resolve() helper: Clean ergonomic addition. The await?.resolve()? pattern is a nice improvement over the old ensure!(matches!(...)) boilerplate.

  • Catchall error arm in keys.rs: Replaces the old bail!("consensus failed") which gave no context. Unhandled failure reasons now surface with full debug output.

  • GCP logging format: The LogFormat enum and RUST_LOG_FORMAT=gcp env-var approach is clean. The tracing-stackdriver layer is correctly placed and default-features = false is appropriate. The RUST_LOG_LOCATION env var consistently controls source location for both backends.


Summary

Priority Issue
Must fix Update 3 test files that import the removed CommandError type - these will not compile
Should address Serialization break for in-flight Gasoline propose activities
Should fix Em dash in traces.rs doc comment (CLAUDE.md style violation)
Minor Redundant mutable branch in result_for_committed_value

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