Skip to content

fix(config): preserve numeric resource limits from provider reads - #1316

Open
epistemedeus wants to merge 3 commits into
railwayapp:masterfrom
epistemedeus:codex/root3242-resource-numeric-contract-20261022
Open

epistemedeus wants to merge 3 commits into
railwayapp:masterfrom
epistemedeus:codex/root3242-resource-numeric-contract-20261022

Conversation

@epistemedeus

Copy link
Copy Markdown

What

Fixes #1314. Preserve numeric memory/disk resource values returned by the provider instead of refusing an otherwise valid config when a byte field is fractional, such as 2147483648.0000005.

  • Keep byte values as serde_json::Number, preserving supported integers rather than converting every value to f64.
  • Preserve optional/null behavior and reject malformed types and non-map container structures.
  • Keep numeric patch inputs finite and representable. Invalid inputs refuse rather than becoming a null/clear operation.
  • No dependency, lockfile, live-resource normalization, configuration write or deployment change.

Verification

Exact source: 11b08a2604e7ab512e0683057f69a3f1d160f08d.

  • All 22 owning config tests pass, including real MockBackboard reads with decryptVariables: false, integer/fractional/large-integer/null cases, malformed-input refusal, recovery and no-write assertions.
  • The new fractional-read test fails against the unchanged original production implementation with expected i64, then passes with the candidate implementation.
  • cargo check --locked --bin railway and changed-file rustfmt --check pass.
  • Pinned Linux receiving run, official Rust 1.99.1, serial debug-disabled compilation.

Integer values use the supported JSON integer representation; non-integer values retain the existing finite f64 precision boundary. This does not claim arbitrary-precision decimals or change a provider resource value. The broader cross-platform suite and an installed live-account CLI canary are not claimed by this receiving run.

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.

Environment config API can return fractional memoryBytes incompatible with typed config reader

1 participant