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

Activity

  1. David-Noble-at-work commented on Nov 9, 2026

    @David-Noble-at-work
    ContributorAuthor

    star github triage sweep added this issue to Triage: devlore, for the rule it breaks:

    • no-evidence: no Evidence of completion section
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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions