Skip to content

RFC: simplify runtime, smoke and lockfile boundaries #37

Description

@edbfi

Current status — completed with accepted runtime scope exclusions (2026-09-19)

The shared implementation and immutable v3.0.1 are shipped. The original design below is retained as historical context; privileged repair expansion remains deferred until a real consumer requires it.

  • Frozen Bun root/nested/workspace text/binary installation, runtime-neutral smoke lifecycle and exact isolated Biome repair, including negative fixtures: implementation #38.
  • Earlier application coverage: Portaler artifact production, Website/repo-patches assets/pages, Obzorarr setup semantics, Zondarr Chromium hydration, EasyHDR Windows launch and web-presentations browser CI: evidence.
  • Wings #40: real Linux service plus local panel and disposable Docker network; authenticated API, rejected unauthenticated access, SFTP, panel reset, malformed-panel startup rejection and teardown. Original platform/quality/CodeQL jobs retained; service is directly aggregated and source-pinned required. This covers rootless initialization, not live VPN/game containers.
  • Mover-status #48: real entry point with isolated Unraid-compatible command/filesystem fixtures; idle/running/progress/completion, missing/malformed input, fallback sizing and delivery-error behavior. runtime is directly aggregated and source-pinned required. This is a simulated platform contract, not proof on real Unraid hardware.
  • Maintained container channels identified independently: all three use nightly, with real native amd64/arm64 startup/migration/persistence/shutdown fixtures. Cleanup/artifact fixes: Obzorarr Docker #12, Zondarr Docker #5, Otpravkarr Docker #5. Both architectures passed final-PR CI and verified cleanup; uploaded evidence excludes raw logs/databases/keys. Strict Actions-source-pinned protection now requires both image jobs, hygiene and aggregate on each maintained branch. Historical release channels and manual publication controls remain unchanged. Live media/VPN integration is not claimed.
  • Accepted scope exclusion: the owner explicitly excluded Guide-capture from this rollout on 2026-09-19. Its pinned encrypted Android image requires a separately prepared synthetic fixture and suitable runner; the personal enrolled image is not a CI fixture. Research and optional future work. No Android capture/encryption round-trip coverage is claimed.
  • Accepted scope exclusion: the owner explicitly excluded Replex completely from this rollout on 2026-09-19. The inactive upstream-owned fork is not a remaining runtime acceptance item; decision #49. No runtime coverage is claimed and no fork settings or retained branches were changed.

This RFC is complete within the owner-approved scope. The Guide-capture and Replex exclusions are explicit decisions, not claims of implemented runtime coverage. Generic lock-resolver expansion is not an additional closure condition. TypeScript compiler/native-checker compatibility is separately tracked in #48.


Original problem (historical)

Bun validation assumes its install directory is also the validation command directory, and hashes every lockfile in the repository. Biome repair additionally conflates manifest, lock root, install directory and node_modules lookup, rejects workspaces, and installs the whole application before installing its official formatter separately.

Five repositories have a mandatory smoke.yml; several other apps already have stronger embedded browser/native/container checks. Copied smoke shell loops lack early child-exit detection and process-tree cleanup. A common workflow must not assume every app is Bun-based, has a root lockfile, or is an HTTP application.

Parallel interface alternatives

Approach Interface Benefit Cost or risk
Minimalist App start command + readiness URL; repository owns everything else Tiny lifecycle interface HTTP readiness alone can falsely imply that an app renders
Flexible Explicit package directory, lockfile path, runtime/install/probe options, manager registry Broad potential compatibility Too many knobs; privileged repair adapters need independent evidence contracts
Caller-optimized Separate Bun install-directory and working-directory; smoke start-command/url/required test-command Supports real layouts and caller-owned assertions with little discovery magic Consumers still own builds, databases and browser setup
Ports and adapters Pure lock resolver; concrete GitHub evidence and local-process adapters Immutable fixtures and side effects test independently A full framework would add navigation overhead to small actions

Recommendation and initial implementation

Use the caller-optimized interface with small concrete modules:

  • Bun install-directory defaults to working-directory; support root/nested/workspace execution with exactly one selected text or binary lock. Scope cache identity to that root and retain frozen installs and tracked-file checks.
  • A runtime-neutral smoke action accepts start-command, loopback url, mandatory test-command, directory, startup and assertion deadlines. It owns readiness polling, premature-exit detection, logs, cancellation and whole-process-group cleanup. Callers own frozen installation, build, database and browser assertions. Existing Playwright webServer callers need no wrapper.
  • Biome compute uses already-verified immutable lock evidence to install only the exact official formatter in isolation, validates its identity, and never installs the PR dependency tree. Keep publication and token-isolation checks intact.

The smoke action does not merge or change CI policy. Consumers must include smoke directly in their always-running required aggregate before enabling Renovate automerge.

Deferred lock resolver

When actual consumers require privileged repair beyond standalone text Bun, introduce one pure function such as:

resolve_biome(manifest, lockfile_path, lockfile_content, package_directory) -> resolution

The result records version, selected package, lockfile and resolution identity. An explicit lockfile path distinguishes package and lock roots. Publication independently recomputes identical evidence. Add Bun workspaces/npm v2-v3 only with representative fixtures; defer pnpm/Yarn/binary parsing until equivalent evidence is established. Reject ambiguous selection and nonregistry sources rather than executing a package manager to infer trust. No generic plugin registry is currently justified.

Testability and acceptance

  • Real frozen Bun installs: root text/binary, nested independent locks, root workspaces with leaf commands; reject missing/conflicting locks and manifest drift.
  • Smoke subprocess fixtures: delayed readiness, occupied port, early app exit, HTTP errors/redirects, assertion failure/deadline, cancellation and lingering descendants; include a repository with no package manager.
  • Real Biome migration/idempotence with no PR node_modules, sanitized install/formatter environment and wrong isolated package identity rejection.
  • Resolver expansion requires immutable base/head fixtures for each format, selected workspace/version ambiguity, manifest agreement and changed evidence rejected before publication.

Consumer rollout

Start with the five copied static probes. Portaler's independent smoke dispatch needs its own artifact producer or must be removed. Obzorarr needs a semantic assertion beyond readiness. Add startup tests for website/repo-patches, EasyHDR and wings-vpn, and establish CI for web-presentations. Keep native and container runtimes in their consuming repositories. Shared action release/adoption and full application reruns remain separate from local fixture validation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions