Skip to content

The process census covers one of about twenty-five spawn sites #717

Description

@rainmanjam

From the poka-yoke audit of 2026-09-04. Lens: fixed-value. Today: rung 3, scoped narrower than it reads. Device reaches: rung 2 (Warning). Silent.

The mistake available

Read an empty surviving-children report as "the teardown was clean", or spawn a
long-running child anywhere outside internal/supervisor.

internal/supervisor/census.goenrol/discharge are unexported, and
their only writers are supervisor.go:862 and :979. The consumer is
cmd/polyemesis/main.go:492reportSurvivingChildren.

exec.CommandContext also appears in internal/media,
internal/transcribe (x4), internal/clipper, internal/playlistmedia,
internal/api/expert.go, internal/api/playout.go, internal/ffmpeg,
internal/recording
. None enrol, and none can.

What happens

census.go:11-19 frames the device as "WHAT HAVE WE ACTUALLY SPAWNED?" and
main.go:1011-1022 says it "would have said it on the first occurrence" of
#631. Both are true only for supervisor children.

A transcode or a whisper child surviving shutdown produces exactly the silence
#631 produced — and now the shutdown log actively reports that nothing is wrong.
A detection device that under-reports is worse than none, because its green is
read as an all-clear.

(Filed by the same author who added the census this morning. The scope was not
stated when it was added, and it reads wider than it is.)

Related: media.Exec does not call setProcessGroup, so its grandchildren are
outside even the systemd KillMode=mixed reasoning in proc_unix.go:29-32.
Probably worth its own look.

Device → rung 2, Warning

Two parts:

  1. Export supervisor.Enrol/Discharge, or extract a childproc.Spawn that
    every site uses; and make the report name its scope so a clean report
    cannot be read as more than it is.
  2. A forbidigo rule in .golangci.yml banning exec.Command* outside an
    allowlisted package, so the next omission fails CI.

Control is not available: nothing in Go prevents a package calling
exec.Command directly.

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