fix: optimize e2e actor path#4551
fix: optimize e2e actor path#4551MasterPtato wants to merge 1 commit into04-02-feat_pb_actor_v1_to_v2_migrationfrom
Conversation
|
🚅 Deployed to the rivet-pr-4551 environment in rivet-frontend
|
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Code Review: fix: optimize e2e actor pathOverall this is a solid set of targeted improvements: adding caching to the namespace ops, better tracing instrumentation across the e2e path, and two new workflow signals ( Issues
The file contains a dead test endpoint (
// /api/rivet/start (lines 184-200)
const stopped = Promise.withResolvers<void>();
const envoy = startEnvoySync({ ... });
// no initial ping here - correct
// /foo (lines 210-232)
setTimeout(() => {
const envoy = startEnvoySync({ ... });
}, 0);
await stream.writeSSE({ event: "ping", data: "" }); // ping before envoy attaches
await stopped.promise;The
Transition::Allocating { .. }
| Transition::Starting { .. }
| Transition::GoingAway { .. } => {
// TODO: Set to sleep after allocation is complete
}The TODO is fine as an acknowledged deferral, but
Lines 1024 and 1032 add raw
getLogger().info({
msg: `Received SSE request`, // line 178
});The backtick here is harmless but inconsistent with the adjacent structured log at line 205 which also passes Observations (non-blocking)
let req = client
.post(endpoint_url.clone())
.body(payload)
.headers(headers);The clone is needed because
The comment "Initialize here to avoid cold starts elsewhere" is accurate and helpful. The behavior change is intentional and correct per the CLAUDE.md guidance to reuse the shared client.
The double-reference matches the existing pattern in
Moving
The SummaryTwo things to fix before merge:
The rest of the changes (caching namespace ops, tracing spans, signal handling, logfmt extraction, Bun server support) look correct. |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: