Skip to content

chore: flatten runtime config#4326

Open
MasterPtato wants to merge 1 commit into02-26-chore_deploy_patchfrom
02-27-chore_flatten_runtime_config
Open

chore: flatten runtime config#4326
MasterPtato wants to merge 1 commit into02-26-chore_deploy_patchfrom
02-27-chore_flatten_runtime_config

Conversation

@MasterPtato
Copy link
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

railway-app bot commented Feb 27, 2026

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

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Feb 28, 2026 at 8:56 pm
website 😴 Sleeping (View Logs) Web Feb 28, 2026 at 8:44 pm
frontend-inspector 😴 Sleeping (View Logs) Web Feb 27, 2026 at 11:55 pm
mcp-hub ✅ Success (View Logs) Web Feb 27, 2026 at 11:48 pm
ladle ❌ Build Failed (View Logs) Web Feb 27, 2026 at 11:47 pm

Copy link
Contributor Author

MasterPtato commented Feb 27, 2026

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


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

@claude
Copy link

claude bot commented Feb 27, 2026

Code Review

This PR flattens the nested Worker and Gasoline sub-structs within Runtime into a flat structure with prefixed field names. The refactoring is clean and all logic is correctly preserved. A few things worth flagging:

Breaking Change (needs documentation)

This is a breaking configuration change for anyone using the runtime.worker.* or runtime.gasoline.* config keys. The migration required is:

# Before
runtime:
  worker:
    cpu_max: 2000
    shutdown_duration: 60
  gasoline:
    prune_eligibility_duration: 604800

# After
runtime:
  worker_cpu_max: 2000
  worker_shutdown_duration: 60
  gasoline_prune_eligibility_duration: 604800

The PR description checklist item for "Breaking change" is unchecked, and there's no migration note. Since serde(deny_unknown_fields) is present on the struct, old configs will fail to deserialize silently rather than giving a helpful error message.

Docs Not Updated

Per CLAUDE.md, config changes should update website/src/content/docs/self-hosting/configuration.mdx. If the runtime config structure is documented there, it should reflect the new flat field names. (Grep shows no current references to worker/gasoline in that file, so this may be a non-issue if those fields aren't documented yet, but worth verifying.)

Minor: Field Visibility Consistency

worker_cpu_max is pub while worker_load_shedding_curve and worker_shutdown_duration are private — this mirrors the original Worker struct where cpu_max was the only pub field. The access pattern in gasoline/src/db/kv/mod.rs uses self.config.runtime.worker_cpu_max directly. This is consistent with prior behavior, but it's slightly odd to have only one public field when the others follow the accessor method pattern. Not a blocker, just a note.

PR Description

The PR description is empty — no summary of motivation or testing notes. Would help reviewers understand why flattening is preferred here over the nested approach.


Overall the implementation is correct and the refactoring is complete (no stale references to the old paths remain). Main ask is to document the breaking change for existing self-hosters.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4326

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4326

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4326

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4326

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4326

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4326

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4326

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4326

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4326

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4326

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4326

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4326

commit: 044fcdb

@MasterPtato
Copy link
Contributor Author

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