Skip to content

writ deploy panics on a distribution pkg/platform does not know: the detection error is swallowed and ParseIdentifier calls a method on the nil platform #968

Open

Description

@David-Noble-at-work

On a Linux host whose os-release ID is outside pkg/platform's ten (pkg/platform/defaults.go:31-42), writ's deploy panics while merging packages manifests. Pop!_OS is an example: ID=pop, ID_LIKE="ubuntu debian".

  • platform.Detect refuses the ID (pkg/platform/detect_linux.go:47-50).
  • op.NewRuntimeEnvironment discards that error, leaving Platform nil (pkg/op/runtime_environment.go:223-227).
  • mergeManifests passes the nil platform to platform.ParseIdentifier for every non-registry entry (cmd/writ/writ/deploy/manifest.go:95, :163).
  • ParseIdentifier has no nil guard, and calls plat.DefaultPurlType() on the nil interface (pkg/platform/identifier.go:58), or plat.ResolvePurlType for a pkg: form (:44). Calling a method on a nil interface panics.

This is read from the code at 9cd1e95d on 2026-09-28 and confirmed line by line, but not run on such a host. lore's pkg provider guards the same case ("no platform available", pkg/op/provider/pkg/provider.go:418-425); writ's merge does not.

Resolution

A nil platform with native claims to merge is an error naming the host's ID, not a panic. The underlying refusal of derivatives is #944's: detection falls back along ID_LIKE.

Plan and design documents

Kind Document
Plan Not yet opened

Epic: #447 · Feature: #463

Activity

  1. added
    bugSomething isn't working
    Epic:WritDeploymentwrit deployment: layers, adoption, and drift
    Severity:HighA supported path is broken with no workaround
    on Sep 28, 2026
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

    Epic:WritDeploymentwrit deployment: layers, adoption, and driftSeverity:HighA supported path is broken with no workaroundbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions