Skip to content

train b33 integration gate (do not merge) - #411

Closed
roodboi wants to merge 6 commits into
nextfrom
train/b33
Closed

roodboi wants to merge 6 commits into
nextfrom
train/b33

Conversation

@roodboi

@roodboi roodboi commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Integration gate for merge batch b33: origin/next + #371 (HACK-1277) + #378 (HACK-1305) + #369 (HACK-1315). Tree 0fbf1591. Closed after the batch squashes.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

roodboi and others added 6 commits October 21, 2026 16:24
…l untracked

Stable `hack global up` (v4.2.0) restarts a stopped hackd because
daemon.autoStart defaults to on, so a Compose candidate run on the same
~/.hack needs the order `hack global up`, `hack daemon stop`, then
`pgrep -fl "hack daemon start"` printing nothing, with no stable hack
commands until the run ends.

Also tell users not to commit the generated, machine-local
`.hack/.internal/` directory: newer generators rewrite files such as
compose.override.yml, so a tracked copy dirties the tree on every run.
Point at the existing `hack doctor` generated-files check and
`hack doctor --fix` to untrack it.

Refs HACK-1315

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A one-shot Compose service that exits quickly had no Loki entries, so
`hack logs --no-follow <service>` printed nothing while
`docker compose logs` showed its output (HACK-1277).

Root cause: the global Alloy config used discovery.docker defaults, which
list only running containers once a minute. A container that started and
exited between two polls was never tailed. The 15 minute default Loki
snapshot window also hid a service that finished earlier.

- Alloy discovers running, restarting, paused and exited containers every
  5s. Docker lists all containers once a status filter is present, and
  loki.source.docker reads an exited container's retained logs once.
- Network and port metadata are dropped and __address__ is the container
  id, so a target keeps its label set when the container stops and its
  log is not re-read.
- A Loki snapshot without --since looks back 24h instead of 15m.
- An implicit Loki snapshot with no entries writes nothing and answers
  from docker compose logs with a one-line stderr notice. An explicit
  Loki request keeps its result and hints at `hack logs --compose`.
- Document the remaining limit: a container removed between two polls
  never reaches Loki.

Refs HACK-1277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd strict-default bounds

Add tests/native-compose-readiness-bounds.test.ts for the readiness bounds
that #362 (HACK-1279) added to waitNativeComposeStartupOwned:

- A readiness timeout never becomes success, even when the post-deadline
  settled check finds the member rejoined and ready.
- Each disjunct of the transient flag (first-scan running member, recheck
  running member, recheck placeholder) alone runs the settled check, which
  refuses the unchanged shape; restarting-only shapes, including a
  first-scan placeholder, do not; the flag follows the last observation.
- Reads that do not opt into transient membership stay strict: strict and
  saved refuse every restart-race shape, and settled refuses the running
  shapes while keeping the restarting admission from before #362.

A virtual readiness clock (Bun.sleep advances Date.now past the deadline)
fixes the number of in-loop observations, and the fake Docker serves one
scripted scan per inspect, so each bound is deterministic.

Refs HACK-1305

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roodboi roodboi closed this Oct 22, 2026
@roodboi
roodboi deleted the train/b33 branch October 22, 2026 12:01
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