Skip to content

feat(os): grant optical drives to service containers - #1

Draft
sovsender wants to merge 39 commits into
masterfrom
feat/optical-drives
Draft

sovsender wants to merge 39 commits into
masterfrom
feat/optical-drives

Conversation

@sovsender

Copy link
Copy Markdown
Owner

Adds a manifest flag, opticalDrives, that gives a service the server's optical drives: the block node /dev/srN and its SCSI generic node /dev/sgN.

  • Nodes are resolved from sysfs by SCSI type, so other disks, even on the same controller, are never exposed. There is no /dev glob.
  • A poller attaches and detaches nodes as drives are connected and removed while the service runs. Removal unmounts lazily so an open handle does not block it.
  • mknod is split into an associated function so the poller can create nodes without borrowing the container.

Checked by hand on a StartOS 0.4.3 VM with a fake SCSI CD-ROM (scsi_debug): block reads and SG_IO from an unprivileged service container, and node add and remove propagating into a daemon-style mount namespace. The Rust in this branch is not yet compiled or run.

🤖 Generated with Claude Code

helix-red and others added 30 commits November 18, 2026 10:14
…art9Labs#4754)

* feat(registry): pre-localize index subscriptions for a requested language

db.subscribe accepts an optional language. Each distinct reader, OS
compatibility and language combination is served by a lazily created,
shared in-memory PatchDB mirror, as OS-version compatibility views
already were; every LocaleString in that view resolves to the locale.

Package version localization moves from for_device into
Model<PackageVersionInfo>::localize_for so package.get and the mirror
share one implementation.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(registry): bound language views to bundled locales

Unsupported languages resolve to the en_US view, so subscribers cannot
create a mirror per arbitrary language string. set_locale and the
registry share one supported_locale matcher, which no longer panics on
an empty language; LocaleString::localize_for accepts an empty locale
too (from helix-white's proposal).

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(registry): resolve view languages against the index's own locales

A requested language now resolves to a locale that appears in the
reader's visible index, else the en_US view, instead of to the locales
StartOS bundles. Languages a package ships but StartOS lacks get their
own view; private-package languages are only offered to readers who can
see them.

Localization and language discovery share one LocaleString traversal;
the per-type DependencyMetadata/Description localizers it replaces are
removed. best_locale generalizes set_locale's matcher over any locale
set.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* perf(registry): track index locales instead of walking per subscribe

IndexLocaleTracker loads the index's locales, grouped by package, at
startup and recomputes them after each /index revision. Subscriptions
resolve their language against the reader-visible part of that set
without walking the index, keeping private-package languages hidden
from readers who cannot see the package.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(registry): synchronize locale snapshots before subscription

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(registry): wait for locale snapshots only for localized subscriptions

Canonical subscriptions read the live database as before, so a locale
tracker failure affects only subscriptions that request a language.
IndexView::localized replaces the optional-language resolve.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* chore(registry): regenerate MCP catalog for db.subscribe language

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat: declared default locales for package and registry text

LocaleString resolution is now, everywhere: the requested locale's exact
or same-language translation, then the owner's declared default locale,
then an arbitrary stored translation for data published before defaults
existed (PatchDB does not preserve key order, so no stored order is
meaningful).

- PackageMetadata (manifest and registry index) gains defaultLocale. The
  SDK fills it from setupI18n's default language unless the manifest sets
  it explicitly.
- The registry index gains defaultLocale for its own description,
  category names and OS release notes, set with info set-default-locale.
- Registry language views: a language matching none of the reader's
  visible locales, even by language code, shares one default view in
  which each string resolves to its owner's default.
- StartOS: dependency titles and the OS update cache use the owner's
  default; the UI and brochure marketplace pass the package's or
  registry's default to the shared localizeFor, which mirrors the
  backend rule.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* Proposed changes for Start9Labs#4754

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* chore: format sync and regenerate bindings for adopted review changes

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(sdk)!: buildManifest takes the package's i18n for its default locale

setupI18n's result carries its default language, and buildManifest
requires it as a fourth argument, recording it as defaultLocale. The
default comes from the package's own i18n rather than shared SDK state,
and packages that have not adopted it fail to typecheck until they pass
i18n. SDK 5.0.0 with an Important notice for upgrading packages.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(sdk)!: buildManifest takes named arguments

buildManifest({ versionGraph, manifest, dependencies, i18n }) replaces
the positional form, which grew to four arguments; the 5.0.0 notice,
fragment, template and guide use it.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* Proposed changes for Start9Labs#4754

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
Start9Labs#4768)

The release-notes card capped itself at 30rem and hid its own scrollbar,
so longer notes looked cut off inside a drawer that already scrolls. It
now grows to fit, like the Description card above it.

The notes render with the shared g-markdown styles, so a wide code block
scrolls on its own instead of being clipped by the card, and long URLs
wrap. They also gain safeLinks, as every other rendered-markdown surface
has, so an external link opens in a new tab instead of replacing the UI.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: helix-red <355572797+helix-red@users.noreply.github.com>
…lved (Start9Labs#4789)

fix(start-os): stop NetworkManager publishing per-link DNS to systemd-resolved

dns=none disables NetworkManager's resolv.conf management but not its
separate systemd-resolved integration, so VPN gateway DNS and a catch-all
routing domain reached resolved and bypassed the StartOS resolver.
StartOS still reads connection DNS from NetworkManager over D-Bus.

Closes Start9Labs#4785

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…Start9Labs#4764)

A vhost target's identity includes the addresses it accepts on, so any
change to that set (a gateway added or removed, an address switched off)
replaced the target, and replacing a target cancelled every stream
proxied through it. Deleting a WireGuard gateway therefore cut the admin
UI's own connection while the deletion RPC was still in flight. The
browser resent the signed POST on a fresh connection, the nonce cache
rejected the resend, and a delete that had succeeded reported "replay
attack detected".

A target that differs from its predecessor only in what it accepts now
takes over the predecessor's entry in place. Each stream records where
it arrived, and the takeover cancels only the streams the new target
rejects. Streams that register afterwards, such as a TLS handshake
already in flight, are checked against the new target as well, so
switching an address off still ends its streams immediately. The
plaintext proxy is retargeted the same way. A change to how streams are
relayed, or an entry another owner shares, still replaces the target
and cancels its streams.
…9Labs#4791)

* fix(gateway): honor WireGuard MTU on gateway import and update

WgConfig dropped `MTU =` from [Interface], so imported gateways ran at
NetworkManager's automatic MTU (the kernel's 1420). Parse and validate
it, and emit `wireguard.mtu` in the NM settings used by both add and
update.

NetworkManager 1.52 refuses a Device.Reapply that changes
`wireguard.mtu` (nm-device-wireguard.c can_reapply_change), so the
update path reapplies with the applied connection's MTU and sets the
new link MTU directly; Update2 still persists the new value for the
next activation.

Closes Start9Labs#4786

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(gateway): reactivate WireGuard gateways whose MTU changes

NetworkManager rejects a Reapply that changes wireguard.mtu, and its
deferred post-Reapply MTU commit restores the applied MTU, so a direct
link write could be reverted and an applied MTU that never changed made
later comparisons stale. An update that changes the MTU now reactivates
the connection: NM restores the original link MTU on deactivation and
applies the saved profile's MTU on activation. Other updates still
Reapply in place.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(gateway): wait for WireGuard reactivation to complete

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
Backports the following from live-docs:

- a5f53c5 docs(sdk): gate the dependent-admission examples with proxy.auth (Start9Labs#4797)
* fix(tunnel): validate subnet and device names

Device names are rendered into the first comment line of each generated
WireGuard client config, so a name containing a line break could add
arbitrary lines to that config. Reject blank names, names with any
control character, and names longer than 64 characters in add-subnet and
add-device (which also handles renames), matching StartWRT's peer-name
rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(tunnel): localize name-validation errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…es; add optional registry proxy (Start9Labs#4801)

* feat(ci): route package publishing registry requests through an optional proxy

Adds a REGISTRY_PROXY input to the reusable release and tagAndRelease
workflows. When set, the configure-registry-proxy action writes it as
start-cli's proxy, so registries can be .onion addresses; a loopback
proxy with nothing listening gets a Tor daemon started on the runner.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(ci): default REGISTRY_PROXY to the caller's variable

Reusable workflows evaluate vars against the caller's repository, so
package repos pick up an org or repo REGISTRY_PROXY variable without
passing it from their workflow files.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(ci): default every registry input to the caller's variable

REFERENCE_REGISTRY, RELEASE_REGISTRY and S3_S9PKS_BASE_URL now default to
the calling repository's variables like REGISTRY_PROXY, so package
callers pass only secrets. A missing reference registry fails with a
named error instead of an empty-registry query.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(ci): keep one proxy setting in a shared start-cli config

Forgejo's host backend runs Tag and Publish with the same HOME, so
appending a proxy line twice left a duplicate key that start-cli
rejects. Replace any existing proxy line instead, and clear it when no
proxy is configured so a persistent runner does not inherit a stale one.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(ci): start Tor only when the repository opts in with REGISTRY_TOR

A loopback REGISTRY_PROXY no longer starts a Tor daemon implicitly.
REGISTRY_TOR=true starts Tor on the publishing runners and proxies
through it; REGISTRY_PROXY uses an existing proxy as given. Setting both
is an error.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(ci): never start Tor on the runner; REGISTRY_PROXY must name a reachable proxy

The workflows only point start-cli at the configured proxy. Running a
Tor SOCKS proxy the runners can reach is the repository owner's job.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…Start9Labs#4800)

* feat(sdk): add deleteExcluded sync option for backups

rsync's --delete never removes paths matching --exclude on the receiver,
so excluding a path from an existing sync leaves its stale copy in every
backup taken before the change, and restores bring it back. The new
`deleteExcluded` option passes --delete-excluded so a package can drop a
regenerable cache from backups and reclaim its space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(sdk): clarify backup exclusion cleanup scope

Proposed changes for Start9Labs#4800. Scope cleanup to the next sync to the same target; other targets and retained read-only snapshots keep their contents.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* feat(sdk): always delete excluded paths and prune removed backup volumes

Per review: there is no case for keeping excluded data, so the
deleteExcluded flag is dropped and syncs with `delete` pass
--delete-excluded. A backup also removes entries of the backup's
volumes/ directory that no sync writes into, so a volume dropped from
the backup set no longer lingers in existing backups.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(sdk): keep volumes under ancestor backup paths and skip symlinked volumes root

A sync targeting the backup root (or any ancestor of volumes/) now keeps
every volume, dot-prefixed volume names are no longer mistaken for parent
traversal, and pruning never traverses a volumes root that is not a real
directory.

Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com>
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
Co-authored-by: helix-red <355572797+helix-red@users.noreply.github.com>
…Start9Labs#4783)

* fix(os): refresh vendor kernels and router certificate trust

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* style(build): omit whitespace-only patch context

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(start-wrt): backport upstream certificate distrust

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* docs(security): address release review and trust wording

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(start-os): backport Debian-signed forky kernel packages

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* refactor(build): confine temporary kernel backport bridge

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(build): resolve kernel bridge include from owning makefile

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
…output (Start9Labs#4802)

* perf(squashfs): compress data blocks in parallel with byte-identical output

Data blocks are compressed on the blocking pool, one in flight per
available CPU, and written in submission order. Block offsets and size
words resolve from that order after the data section is written, so the
image bytes do not depend on the worker count.

The serial writer compressed every block inline on one async worker;
large legacy-package conversions (0.3.6 migration) spent most of their
time there on a Raspberry Pi 4.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* chore: changelog fragments for faster squashfs compression

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* perf(squashfs): queue data blocks on the rayon pool and reuse compression contexts

A fixed rayon pool with four queued blocks per thread keeps every core
busy past a slow head-of-line block without oversubscribing threads.
Each thread reuses its Zstd context; ZSTD_compress2 resets the session
per call, so frames are unchanged. A panicking job becomes a writer
error instead of aborting the process.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…ion (Start9Labs#4793)

* fix(storage): apply the base idmap to local shared volumes

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* refactor(storage): share service filesystem ownership mapping

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(storage): migrate existing shared volume ownership at boot

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(sdk): retire completed health-check deadlines

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(storage): preserve clone ACL and capability metadata

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(storage): retire shared-volume access by runtime incarnation

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(storage): make shared-volume revocation best effort

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(service): preserve replacement after shutdown errors

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(storage): detach SDK-managed shared-volume binds

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* refactor(storage): simplify shared-volume mount requests

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* docs(storage): align shared-volume notes with single host request

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
…Start9Labs#4807)

sync-next chose plain `next` for the default branch whenever
`next/<base>` did not exist yet. In a repo already carrying `next/*`
lines, moving the default to a new line made it try to create `next`,
which git refuses beside `next/*` ("directory file conflict") — as
bitcoin-core-startos hit when 32.x became its default. Any existing
`next/*` branch now means every base pairs with its own `next/<base>`.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Backports the following from live-docs:

- 0301530 docs(start-sdk): release notes never state the minimum StartOS version (Start9Labs#4808)
…tart9Labs#4806)

* fix(storage): back up shared volumes with their stored container ids

Shared-volume backups copied the service view, which carries the global
LXC offset (+100000), and restores stripped it again through an unshifting
idmapped mount. Backups now copy the source as stored, so they hold
container ids like package backups, and restores copy them back directly.
Shared volumes are unreleased, so the offset format is not read.

`SourceDefinition::unmapped_filesystem` owns the raw policy: the local
subvolume, the disk without an idmap, and CIFS without the forced service
owner. Backup targets and shared-volume backups both use it;
`open_unmapped_source` and `open_source` share one preparation path. A
CIFS backup holds the owners the share reports, normally root.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(storage): map shared volumes only when attaching them to a container

Shared-volume sources are mounted on the host without an idmap: the local
subvolume and the disk as stored, with container ids. Attaching a source
into a container stages it through an idmapped detached clone with the base
LXC map. CIFS cannot be idmapped, so it keeps its forced service owner at
the source and attaches unmapped.

With one host view per source, the separate unmapped view goes away:
backups copy the host view directly, holding container ids, and restores
copy them back. A CIFS view carries only the forced owner, so its backup
copy is owned by root instead. Backup targets keep their own raw policy.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(storage): report shared-volume source mapping failures as unavailable

Mapping a shared volume when it is attached moved idmap and clone failures
past the handler that turns source failures into the optional
`unavailable` result, so an external filesystem rejecting
MOUNT_ATTR_IDMAP or a userns-helper timeout rejected the RPC instead.
mount_source now separates source cloning/idmapping failures from request
and target attachment failures; the effect maps the former through one
unavailable-result owner and keeps the latter as errors. The placeholder
stays installed.

Also shares one open_tree_attr idmap syscall between the path and pinned
descriptor forms, and corrects the architecture note that claimed source
filesystem types perform idmapping.

Adapted from the cross-review proposal.

Co-Authored-By: helix-white <267227783+helix-a@users.noreply.github.com>
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
…tifacts unzipped, ship the Pi image gzipped (Start9Labs#4795)

* ci(start-os): build the container-runtime rootfs in the native image job

compiled-<arch>.tar carried rootfs.<arch>.squashfs, whose build runs apt in a
target-architecture chroot. The riscv64 build job runs on an x86 runner, so
that step ran under QEMU. The tarball now carries the container-runtime dist
instead, and startos-image.yaml, which already runs on a native runner for
every platform, assembles the rootfs. The rootfs scripts and units join
OS_IMAGE_PATHS so pull requests touching them still build images.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci: upload already-compressed artifacts without zipping

Images (squashfs, iso, img, migration squashfs), product debs and s9pks
are uploaded with archive: false, so each artifact is the file itself and
is named after it. Downloads match those file names by pattern, and the
release tooling fetches them through a REST helper because gh run download
cannot fetch unarchived artifacts (cli/cli#13012).

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* Proposed changes for Start9Labs#4796

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): extract the container-runtime base instead of loop-mounting it

The riscv64 image runner's kernel cannot mount squashfs, so building the
rootfs there failed at the base mount. update-image.sh now unpacks the base
with unsquashfs and builds in the extracted tree, which also drops the
overlay. update-image-local.sh stops when its container fails rather than
letting make continue without a rootfs.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci(start-os): hand off compiled artifacts as an unzipped tar.gz

The build job's compiled-<arch>.tar exists only to keep the binaries'
execute bits, which a zipped artifact drops. It is now gzipped and uploaded
with archive: false, so the artifact is that file as-is rather than a zip
around a tar; the image job downloads it by its filename.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci(start-os): ship the Pi image as an unzipped img.gz

The raspberrypi image job gzips its .img and uploads the .img.gz with
archive: false. The deploy leg and manage-release.sh pull-gha gunzip it for
the raw image the registry indexes and signs; pull-gha keeps CI's .gz, which
the release publishes beside the bare image.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* Proposed changes for Start9Labs#4795

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(ci): bound artifact discovery by creation age, not expiry

Adopts @helix-white's proposal to skip expired matches rather than stop at
the first one, since expiry does not follow listing order. Both callers read
the whole output, so discovery instead stops at the first artifact created
over 15 days ago, past the 14-day retention of every artifact it searches.
The fixtures give rerun artifacts their own creation time.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci(start-wrt): upload the flashable images unzipped

The image job uploads each StartWRT .img.gz as its own artifact with
archive: false, through the repo's upload-each action. The deploy downloads
them by pattern and checks that both the sdcard and the sysupgrade image are
present, and manage-release.sh pull-gha fetches them with
gha-artifact-download.sh, since gh run download cannot.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(ci): share one artifact discovery across the deb products

Adopts @helix-white's proposal: apt-publish-alpha makes one
gha-artifact-run-ids.sh call with an extended glob over its product list
rather than one per product, so each publication reads the artifact
listing once.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci(start-os): build the container-runtime rootfs once per architecture

A rootfs job in build-products.yaml builds rootfs.<arch>.squashfs on a
native runner for each architecture and uploads it unzipped; the image jobs
and the publish run download it instead of each rebuilding it, so x86_64 and
aarch64 no longer build it three and four times.

The RISC-V action-runtime bootstrap and the compiled-tarball unpacking move
into local composite actions shared by the image and rootfs jobs. The
bootstrap now runs right after checkout, ahead of every other JavaScript
action, since checkout transfers no artifacts.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(ci): let the rootfs job download its compiled tarball

Adopts @helix-white's proposal: downloading an artifact by run id needs
actions: read, which the rootfs job's explicit permissions dropped. The
shared action records the requirement, and a test covers every
compiled-artifact consumer.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* ci(start-os): publish the Pi image gzipped only

The deploy uploads the raspberrypi .img.gz and indexes it in the registry's
img slot through a hardlink named for the slot, like StartWRT's images; no
raw .img is uploaded. manage-release.sh signs and checksums the .img.gz, the
release notes link the indexed URL, and push-gz, ensure_img_gz and the .gz
handling in pull and pull-gha are gone.

start-cli's 'registry os asset get' now names a download .gz when its URLs
serve a .gz file, so gzipped images (StartOS's and StartWRT's) are no longer
saved as .img.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(release): keep legacy raw Pi images signed and checksummed

Adopts @helix-white's proposal: a version indexed with a raw .img before the
gzip-only switch still releases with that image in its checksums and
signatures, and only a .gz link carries the gzip tooltip. Adds the StartOS
and start-cli changelog fragments and drops the gzip-copy wording from the
prerelease docs.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* revert(release): drop legacy raw Pi image handling

This merges before the next StartOS release is built, so no released
version carries a raw .img entry: release files and the gzip tooltip
cover the .img.gz only. Keeps the changelog fragments and the doc
wording from the previous commit.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
…t9Labs#4790)

NetworkManager publishes a device's `IpInterface` only once activation
reaches IP_CHECK (`update_prop_ip_iface` in NM 1.52). A WireGuard device
that is created or re-realized triggers `DeviceAdded` while it is still
unnamed, so the gateway watcher's scan skipped it and subscribed to
nothing on it. The later name change is announced only on the device, so
the gateway never gained `ipInfo` until an unrelated manager-level event
(a reboot, another device appearing) caused another scan.

The scan now watches every device's `IpInterface` and rescans when it
differs from what the scan observed, so activation and deactivation
reach the watcher and policy-routing reconciliation directly.

Closes Start9Labs#4784

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…o stop (Start9Labs#4736)

When one service failed to tear down, RpcContext::shutdown returned the
error before marking the context closed, and startd's inner_main returned
it before the power action it had already received. main then started
Diagnostic Mode instead of running Shutdown::execute, so the server never
rebooted, and a waiting `start-cli server restart` hung because
wait_closed never resolved.

RpcContext::shutdown now logs the teardown error, always closes the
context and returns nothing, so the requested restart or shutdown goes
ahead. The logged error names the package whose teardown failed.

Fixes Start9Labs#4638

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Backports the following from live-docs:

- d476b37 docs(sdk): state the merge method for package PRs in agent context (Start9Labs#4809)
Start9Labs#4810)

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
* feat(start-wrt): factory reset from the FDL button

The FDL button sits on QSPI_DATA3, a boot strap the BootROM samples only as
the chip leaves reset. Declare it to the kernel's built-in gpio-keys driver
and watch the input device from a procd service, `startwrt
startwrt-fdl-reset`, for the life of the system. A press held for 10 seconds
blinks sys-led, and the release wipes the overlay and reboots. Acting on
release keeps the strap low across the reboot, so a completed hold cannot
land in download mode.

The service asks the kernel for the key state on startup, so a hold started
before it runs counts. It runs as its own respawned process, so it works
when the daemon does not.

The device tree is a plain target dts that includes the vendor k1-x_deb1.dts,
rather than a kernel patch, and keeps its name for the boot firmware.

gpio-button-hotplug and rc.button are not used: they need broadcast_uevent, an
OpenWrt kernel hack absent from the K1's 6.18 kernel.

* fix(start-wrt): reject stale FDL hold histories

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
…ofile it left (Start9Labs#4692)

A device that moves to another Security Profile keeps its lease on the
profile it left until that lease expires, up to 12 hours. The refresher
counted every lease a profile's own instance held as that profile's
claim on the name, so it left the name out of that profile's hosts file
and the instance kept answering the old lease's address: after moving a
machine off Admin, `ssh <name>` from Admin went to an address nobody
held until the old lease ran out.

A profile now claims a name only from each device's newest lease, the
same lease the device's address is taken from. A moved device's name is
written into the old profile's hosts file at its new address, and
dnsmasq prefers the hosts file over the old lease's `<name>.lan`. A raw
query for the bare name still returns the old lease until it expires;
clients that append the `lan` search domain ask for `<name>.lan` first.
Two different devices sharing a name are unchanged: the profile's own
device keeps it.
…art9Labs#4780)

* fix(start-wrt): hide the PPPoE password from the WAN IPv4 summary

The WAN IPv4 summary listed every PPPoE field, so the stored password
rendered in clear text with a copy button above the masked form input.
Drop it from the summary fields; the form input keeps it editable.

* Proposed changes for Start9Labs#4780

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

---------

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
* docs(start-cli): show how to pass a key to ssh add

The help for `start-cli ssh add` said only "SSH public key", which left
users passing a file path or an unquoted key line. The help now shows
the key line passed as one quoted argument.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(start-cli): regenerate the ssh add man page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Backports the following from live-docs:

- 20466b2 docs(start-os): show how to pass a key to ssh add, and fix ssh remove's argument (Start9Labs#4760)
Backports the following from live-docs:

- 8fe8417 docs: describe the Let's Encrypt port 443 test as advisory (Start9Labs#4639)
Backports the following from live-docs:

- 24c9a8e docs(start-wrt): explain outages from a profile on the WAN subnet (Start9Labs#4744)
Backports the following from live-docs:

- 201de94 docs(start-sdk): registry setup uses Manage Registries and Manage Signers (Start9Labs#4719)
Backports the following from live-docs:

- ad1e6f4 docs(start-sdk): registry keeps only signatures from registered signers (Start9Labs#4815)
…9Labs#4812)

GitHub intermittently answers the repository artifacts listing with an
empty HTTP 500. Glob discovery reads about 110 pages of it per lookup, so
one such answer failed every alpha apt publication since Start9Labs#4795 with
'unexpected end of JSON input'. Each page now retries up to five times
with a growing delay before discovery fails.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Dominion5254 and others added 9 commits November 19, 2026 19:41
Since 2026-11-16 the riscv64 build has been SIGKILLed while compiling
start-core, on master and on unrelated PRs. Every kill ran on an
AWS-hosted ubuntu-latest runner: 15.33 GiB of RAM and no swap, since
the runner image only creates its 4 GiB swapfile through the Azure
agent. Azure runners (15.61 GiB + 4 GiB swap) have not failed.

The build peaks at about 13.2 GB of anonymous memory while start-core
is still generating code and startwrt-core has already started. On an
AWS runner that leaves little or no headroom.

setup-build gains a swap-size input. start-wrt.yaml passes 8G to both
jobs that compile the binary, including the OpenWrt image job, whose
start-wrt-image target rebuilds it.
* fix(sdk): drop undeclared keys from action input

An action's input was parsed with the built InputSpec validator, a
z.looseObject at every level, so any key a caller submitted outside the
form reached the handler. Packages that merge input into a file model
whose formToFile spreads it (bitcoin-core's `raw`, cln's INI) then wrote
those keys to disk. The web UI only submits declared fields, so only an
admin's own RPC/CLI call could do it, but the handler should never see
them.

The validators InputSpec.build() and Variants build return, which only
the action run path consumes, are now z.object, so unknown keys are
stripped at every level, lists of objects and union values included.
The static `validator` and `partialValidator` stay loose: file models
are built from them and must keep keys their schema doesn't name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sdk): strip undeclared keys from union-history drafts

A union's `other` carries the saved values of unselected variants, and
its recognized entries were z.any(), so a draft such as
`other.previous: { raw: { startupnotify: … } }` reached the handler
intact. Each draft now parses through a deep-partial of its variant's
built validator: undeclared keys go at every level, missing fields
stay allowed, and a draft that fails to parse is dropped rather than
failing the submission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sdk): carry only the selected variant in action input

A union's `other` is the form's memory of unselected variants. The web
UI keeps it in the union control and never submits it, and no handler
reads it, yet the action validator parsed it. Validating that history
meant running field transforms with side effects, such as resolving an
upload, on drafts nobody will use. The validator an action runs its
input through now keeps only `selection` and `value`. The static
validators still accept `other`, for prefill and file models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
A package that sets `opticalDrives: true` gets the server's optical drives
inside its container: the block node /dev/srN and the SCSI generic node
/dev/sgN. Both are found from sysfs by SCSI type, never by a /dev glob, so a
disk on the same controller is never exposed. Drives connected or removed
while the service runs are attached or detached within a couple of seconds.

mknod is split into a free-standing form so the poller can create nodes
without borrowing the container.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cross a renumber (Start9Labs#4666)

* fix(core): keep a public-IP opt-in across a gateway renumber or link drop

A public IP's opt-in is stored as the literal `ip:port` in `enabled` (and a
GUA's in `gua_wan`), and nothing moved it when the address changed. A rolled
DHCP lease, a moved IPv6 prefix, or a PPPoE reconnect therefore brought the
replacement up switched off, dropped its port forward, and said nothing.
master's plain-domain grouping (Start9Labs#4616) carries the setting only for a plain
port with a public domain on the same gateway; a bare public `ip:port` had no
such cover.

`migrate_renumbered_ips` runs in `derive_addresses` for single-port bindings
and ranges. Where a gateway offered exactly one public address on a port and
family before and after, an opt-in on the old address extends to the new one.
The old address keeps its opt-in while another row still offers it, so a
server dual-homed on one router keeps the address its other link holds.

A gateway NetworkManager drops has its `ip_info` cleared, and its rows used to
leave `available` with it, so a gateway that came back on a new lease had no
previous address to carry from. `carry_forward` keeps a downed gateway's
public IPv4 and GUA rows until it returns or is deleted. Port forwards still
need the live gateway and lapse while it is down.

Split from Start9Labs#3999, without its manual WAN IP override.

* Proposed changes for Start9Labs#4666

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

* fix(core): keep a GUA opt-in until the reconnected gateway reports a GUA

The first ip_info after a link drop can carry DHCPv4 before SLAAC: poll_ip_info
publishes on every address change. carry_forward now keeps a gateway's GUA rows
until it reports a GUA, mirroring the public IPv4 rule, so the renumber
migration still finds the old address when the new one arrives.

* revert(core): drop the renumber migration ahead of gateway-keyed public opt-ins

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(core): key public IP opt-ins by gateway so they survive a renumber

Store a public IPv4 opt-in as (gateway, port) and a GUA opt-in as
(gateway, port, interface identifier) instead of the literal WAN ip:port.
The opt-in resolves against whatever address the gateway currently
reports, so a new DHCP lease, a moved IPv6 prefix or a link drop no
longer switches the address and its port forward off.

- DerivedAddressInfo.enabled and gua_wan hold PublicIpKey.
- 0.4.3's migration (revision 1) rewrites stored socket-address opt-ins
  as the keys of the rows they select, dropping unmatched ones.
- forget_gateway drops every opt-in keyed to the removed gateway.
- start-core TS gains publicIpKey/samePublicIpKey; the legacy projection
  still accepts socket-address strings from servers without `effective`.
- Regenerated TS bindings and MCP catalog; UI mock data uses the keys.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* feat(start-os): mark IPv6 addresses whose opt-in switches together

A GUA opt-in keys on its interface identifier, so every GUA on the
gateway and port with that identifier (another prefix, or the old prefix
during a renumber) switches with it. The gateway table now marks such
rows with a link icon whose tooltip says so. The UI derives GUA-ness from
start-core's publicIpKey instead of its own parser.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* docs(start-os): explain that IPv6 settings follow the interface ID

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(core): keep legacy getHostInfo readers and every gateway's opt-in

- getHostInfo serves `enabled` as socket addresses, the form SDKs before
  `effective` match, for bindings and port ranges alike.
- The 0.4.3 upgrade keys an opt-in on every row it selects, so a WAN IP
  two gateways share stays on for both; one unreadable row no longer
  drops a binding's opt-ins.
- Forgetting an interface drops its selections through the same
  Model<Host>::forget_gateway the tunnel removal uses.
- The link icon, docs and changelog name only the Local/Public choice and
  the toggle while Public as shared.

Co-authored-by: helix-white <helix-white@users.noreply.github.com>
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(core): keep a range's public IP on with its plain public domain

Drop the gateway-keyed public opt-ins: a public IP opt-in stays the
literal ip:port, and an operator who needs a stable public address uses
a public domain with DDNS. On a plain port, an enabled public domain
already carries its gateway's public IPv4 and GUA across a renumber for
single-port bindings. update_addresses never re-resolved those groups
for port ranges, so a range's public IP stayed off after a link drop or
new lease. Resolve them for ranges too.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* docs(core): record that a public IP opt-in lapses on a renumber

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(core): keep a renumbered range's plain domain on through the upgrade

Released versions never resolved plain-domain groups for ranges, so a
range renumbered before the upgrade holds an enabled plain domain beside
an off WAN IP. Resolving its group from that state would switch the
domain off. 0.4.3 (migration revision 1) switches on the group of each
enabled plain public domain on a range first.

Co-authored-by: helix-white <helix-white@users.noreply.github.com>
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

---------

Co-authored-by: helix-a <267227783+helix-a@users.noreply.github.com>
Co-authored-by: helix-red <355572797+helix-red@users.noreply.github.com>
Co-authored-by: helix-white <helix-white@users.noreply.github.com>
…patch-db (Start9Labs#4757)

* fix(start-os): refuse to add an SSH key that is already authorized

StartOS stores SSH keys by MD5 fingerprint, so adding a key that was
already authorized silently replaced the stored entry. The UI then
listed the returned key a second time, and removing either row deleted
the single stored entry, so both rows disappeared.

ssh.add now refuses a key whose fingerprint is already stored with a
Duplicate error that carries the existing key's details as its info.
The SSH page catches that error and opens a dialog naming the existing
key by hostname, algorithm, fingerprint and creation date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(start-os): update re-added SSH keys in place and publish them to patch-db

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): valid SSH test key, 0.4.3 revision expectation, single authorized_keys writer

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* chore: regenerate TS bindings for public sshPubkeys

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* style: format SSH key changes

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* test: include public sshPubkeys in full database fixtures

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): bump updated_at when an SSH key is re-added

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): bump 0.4.3 migration revision to 2 for the SSH key move

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): rebind local apt archives when retrying lb chroot

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): render SSH keys straight from patch-db

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* fix(start-os): parse SSH key options and wait for the cached sshPubkeys collection

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

* style: format SSH key UI changes

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
Co-authored-by: helix-red <355572797+helix-red@users.noreply.github.com>
- sync nodes independently so one failure no longer blocks another drive, and never add over a stale node that could not be detached
- plan() is a pure function with tests, including a node whose numbers change
- the SDK requires StartOS 0.4.3 for opticalDrives and the pack wrapper fails when start-cli drops the flag, as for sharedVolumes
- docs: restore the KVM section text that the Optical Drives section split, and document renumbering and raw SCSI access

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Create Docker Image pushes to ghcr.io/start9labs and Migration Image downloads a release only Start9's repository has, so both failed on every fork build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sovsender
sovsender marked this pull request as draft November 20, 2026 16:46
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.

8 participants