docs(start-sdk): hardwareRequirements.ram is bytes, not megabytes - #3621
Open
MattDHill wants to merge 1 commit into
Open
docs(start-sdk): hardwareRequirements.ram is bytes, not megabytes#3621MattDHill wants to merge 1 commit into
MattDHill wants to merge 1 commit into
Conversation
The TSDoc on SDKManifest.hardwareRequirements declared ram as megabytes and its @example showed `ram: 8192`. StartOS compares the value against the host's total RAM in bytes with no conversion (start-core init.rs stores MemTotal * 1024 * 1024; HardwareRequirements::is_compatible does a raw <), so packages following the doc declared an 8 KiB floor that gated nothing. Three packages in the fleet had it wrong this way. Also corrects that example's device filter, which still showed the devices/pattern/patternDescription shape replaced in 2.0.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The TSDoc on
SDKManifest.hardwareRequirementsdeclaredramasMinimum RAM requirement (in megabytes MB), and its@exampleshowedram: 8192. StartOS compares the value against the host's total RAM in bytes, with no conversion in the SDK or the OS — so a package following the doc declared an 8 KiB floor that every machine satisfies, and the requirement gated nothing.ram: 8 * 1024 ** 3)devices/pattern/patternDescriptionshape replaced bydeviceandDeviceFilterin 2.0.0Evidence
shared-libs/crates/start-core/src/init.rs:393—get_mem_info().total.0 as u64 * 1024 * 1024shared-libs/crates/start-core/src/registry/device_info.rs:195+system/mod.rs:352—HardwareInfo.ramis rendered byfn format_ram(bytes: u64)shared-libs/crates/start-core/src/s9pk/v2/manifest.rs:168— raw<comparison against the declared valueprojects/start-sdk/lib/manifest/setupManifest.ts:78—ram: manifest.hardwareRequirements?.ram || null, straight passthroughFleet impact
Every package that set the field had it wrong, which is what surfaced this:
bisq-startos—8192, caught in review on its open PRcal-diy-startos—2048, fixed in fix: declare hardwareRequirements.ram in bytes cal-diy-startos#7elements-startos—4096, fixed in its open PR (audit: sdk 2.0, disk guardrails, and dependency-contract fixes Start9-Community/elements-startos#1)Validation
Prettier clean; the repo's pre-commit
tsc --noEmit --skipLibCheckpassed. Comment- and prose-only — no behavior change, so nothing to run beyond that.🤖 Generated with Claude Code