Skip to content

TestSporedUnit_NoPrivateTmp checks a hand-written file list and misses the two spored units in cmd/app.go #946

Closed

Description

@scttfrdmn

Found while working on #928.

cmd/spored_unit_test.go guards #66 (no PrivateTmp=true in the spored systemd unit). It scans a hard-coded list: pkg/launcher/bootstrap.go and scripts/spored.service. Two more emitters of /etc/systemd/system/spored.service exist, in cmd/app.go (around lines 689 and 861, the web-app and DCV paths). The gate never sees them. That breaks CLAUDE.md gate rule 4: discover the set, don't list it.

Today neither app.go unit sets PrivateTmp, so nothing is broken yet. The gate would still report clean if one did.

Fix: discover the emitters by finding every heredoc or file that writes /etc/systemd/system/spored.service, and fail when discovery finds none. The same discovery could also check that each unit orders After=network-online.target. spored's shutdown flush of spawn:compute-seconds relies on that ordering to still have network when it runs (#928).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions