Skip to content

docs(start-sdk): hardwareRequirements.ram is bytes, not megabytes - #3621

Open
MattDHill wants to merge 1 commit into
masterfrom
docs/hardware-requirements-ram-units
Open

docs(start-sdk): hardwareRequirements.ram is bytes, not megabytes#3621
MattDHill wants to merge 1 commit into
masterfrom
docs/hardware-requirements-ram-units

Conversation

@MattDHill

Copy link
Copy Markdown
Member

Summary

The TSDoc on SDKManifest.hardwareRequirements declared ram as Minimum RAM requirement (in megabytes MB), and its @example showed ram: 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.

  • Corrected the TSDoc and its example (ram: 8 * 1024 ** 3)
  • Added a Minimum RAM subsection to the packaging guide's manifest page, covering the unit and the fact that raising a floor on a published package cuts smaller hosts off from updates
  • Fixed the same example's device filter, which still showed the devices / pattern / patternDescription shape replaced by device and DeviceFilter in 2.0.0
  • Changelog entry under the unreleased 2.0.10

Evidence

  • shared-libs/crates/start-core/src/init.rs:393get_mem_info().total.0 as u64 * 1024 * 1024
  • shared-libs/crates/start-core/src/registry/device_info.rs:195 + system/mod.rs:352HardwareInfo.ram is rendered by fn format_ram(bytes: u64)
  • shared-libs/crates/start-core/src/s9pk/v2/manifest.rs:168 — raw < comparison against the declared value
  • projects/start-sdk/lib/manifest/setupManifest.ts:78ram: manifest.hardwareRequirements?.ram || null, straight passthrough

Fleet impact

Every package that set the field had it wrong, which is what surfaced this:

Validation

Prettier clean; the repo's pre-commit tsc --noEmit --skipLibCheck passed. Comment- and prose-only — no behavior change, so nothing to run beyond that.

🤖 Generated with Claude Code

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>
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