Skip to content

trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce - #1056

Closed
trunk-io[bot] wants to merge 3 commits into
mainfrom
trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce
Closed

trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce#1056
trunk-io[bot] wants to merge 3 commits into
mainfrom
trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Sep 10, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA 2db7e4e69fed26c3e0fad033d0c3942fd755da37.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 1034, stacked on pull request 1033.

rigel-mintaka and others added 3 commits September 8, 2026 17:31
…G-3548)

compass-stack up records a start-time identity token for every child it
spawns, to close the pid-recycling window. The only reader was
/proc/<pid>/stat, so up refused on macOS: pgidfile.go is //go:build unix,
which darwin satisfies, meaning darwin compiled the Linux reader and failed
at runtime rather than at build time.

Add a darwin reader at BOTH identity sites, split behind the existing seams
into _linux.go/_darwin.go files. The token is read at spawn by the core and
independently at teardown by the group-signal adapter, and
GroupSignaller.Alive compares the two for uint64 equality — so both darwin
readers share one packing rule (sec*1e6 + usec over the KinfoProc start
timeval, via sysctl kern.proc.pid), pinned by mirrored tests in both
packages. A drift between them would report every live child as not-alive
and silently skip it at teardown, which is why the duplication is pinned
rather than trusted.

Both readers fail closed on a dead pid, so a failed read can never yield a
0 token that would spuriously match a record carrying 0.

The darwin CI lane gains a step running the stack suite natively, because
cross-compiling type-checks these readers but never executes them, and the
sysctl has no Linux stand-in. The readers have NOT run on a real macOS
host yet; that step is what will prove them.

Promotes golang.org/x/sys to a direct dependency (already in the module
graph); go.sum unchanged.

Refs RIG-3548, RIG-1662.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
…-aware (RIG-3202)

Embedded preflight guarded the podman-machine check with
`GOOS == "darwin" && MachineReady != nil`, and realPreflight never
assigned MachineReady. So on a Mac the check did not fail — it VANISHED
from the results, and a caller classifying by result read that as a pass.
A user got an all-green preflight followed by an undiagnosed failure
further down.

Wire a real darwin adapter and close the hole that let it be skipped:

- The darwin branch keys on GOOS alone. A nil adapter is now reported as a
  failed check naming itself a wiring defect, so a wiring regression can
  no longer turn a broken host into a green preflight. Linux behaviour is
  unchanged (no machine there, check correctly absent).
- The adapter probes `machine ls` then `machine inspect`, and CONNECTS to
  the forwarded API socket rather than stat-ing it, since a stale forward
  from a half-stopped machine satisfies a stat. Three failing states are
  distinguished in the copy — no machine, stopped, running with an
  unreachable socket — each naming the command to run.
- Provisioning is an ensure step (init/start, then RE-PROBE), mirroring how
  up ensures the image and database rather than gating on them. Readiness
  comes from the re-probe, never from init's exit status. An unclassifiable
  CLI answer provisions nothing and is reported from the first probe: init
  over a machine whose state cannot be read is destructive, and re-probing
  would report the second answer over the first.
- Unparseable output classifies as unknown, which is never ready.
  machineStatus's zero value is unknown so a failed classification cannot
  read as ready.
- The bring-up window now budgets for a cold provision on darwin. A cold
  machine init downloads a VM image before any container image is pulled,
  so the previous 180s ceiling would have deadlined every first launch on
  a fresh Mac and blamed the timeout rather than the download.

The darwin CI lane now runs these tests. They sit behind
`(linux && gtk4) || darwin`, so the untagged moon lane excluded them and
the gtk4 lane's `-run E2E` filter never matched them — the wiring
assertion that catches this exact silent-skip regression ran nowhere. Each
required test is asserted by its own PASS line, since `-run` exits 0 when
it matches nothing.

The OS is a parameter rather than a build tag, so the regression this
closes is testable from a linux host.

The macOS spike has NOT run. Every podman-CLI output shape here is
designed-against-assumption per the record's own convention: the parse
accepts both the Running bool and the State string, and degrades rather
than trusting either. macOS provisioning is not claimed to work.

Refs RIG-3202, RIG-1662.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://trunk-merge-pr-1034-1c74d3c4.compass-eng-docs.pages.dev

Deployed from trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce at 912ebae.

@trunk-io trunk-io Bot closed this Sep 10, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-1034/1c74d3c4-472d-470c-97a7-73ada46cb3ce branch September 10, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant