Skip to content

train b47 integration gate (do not merge) - #444

Closed
roodboi wants to merge 9 commits into
nextfrom
train/b47
Closed

roodboi wants to merge 9 commits into
nextfrom
train/b47

Conversation

@roodboi

@roodboi roodboi commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Integration gate for merge batch b47: origin/next + #416 (HACK-1368). Tree 4f1d43ee. 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 9 commits October 22, 2026 09:06
A candidate command (`hack-next`, or the bundled `hack-v5` entrypoint) that
asked hackd for data in an interactive TTY autostarted hackd. Autostart starts
what the host resolves: the per-user launchd plist (the stable binary) or the
first `hack` on PATH (the stable CLI). On the Compose backend that put a stable
hackd beside the candidate on the same ~/.hack.

- requestDaemonJson autostart now refuses first, before reading config or
  touching launchd or PATH, when HACK_CANDIDATE_ENTRYPOINT is set or the new
  documented opt-out HACK_DAEMON_AUTOSTART_DISABLE=1 is set.
- scripts/hack-v5.sh exports HACK_DAEMON_AUTOSTART_DISABLE=1.
- Candidate guide: run stable `hack doctor`/`--fix` before `hack daemon stop`,
  and give the launchd remedy when `pgrep` still lists a hackd.
- Comment fixes: name reachable pre-reservation refusals, and describe both
  shapes that trigger the settled startup check.

Refs HACK-1368

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`hack global up` ran `hack daemon start` through the first `hack` on PATH
whenever `daemon.autoStart` was on, even under HACK_CANDIDATE_ENTRYPOINT or
HACK_DAEMON_AUTOSTART_DISABLE=1. For a candidate run that `hack` is the stable
CLI, so `hack-next global up`, `global install` and the `hack-next up` prompt
started the stable hackd on the shared ~/.hack (HACK-1368).

The step now checks resolveDaemonAutostartAccess() first, logs the skip, and
reads no config when denied. Tests cover both variables; removing the guard
fails both.

Refs HACK-1368

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e runs

On macOS, `hack global install` offers to run `hack daemon install` and
non-interactive runs accept it. That runs through the first `hack` on PATH,
which for a candidate run is the stable CLI, so `hack-next global install`
installed the stable hackd launchd service and started the stable hackd on
the shared ~/.hack, even under HACK_DAEMON_AUTOSTART_DISABLE=1 (HACK-1368).

The offer now checks resolveDaemonAutostartAccess() first and logs the skip
before it reads launchd state or prompts. Tests cover both variables and a
positive control; removing the guard fails both denial cases, and always
skipping fails the control.

The docs no longer say the candidate never starts the stable hackd: the
interactive `hack doctor --fix` start and restart prompts still run the stable
CLI, so the guides say to answer no to them.

Refs HACK-1368

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A candidate `hack doctor --fix --no-interactive` (hack-next, or hack-v5 with
HACK_DAEMON_AUTOSTART_DISABLE=1) with a stale daemon pid still ran
`hack daemon clear` and `hack daemon start` through the first `hack` on PATH,
the stable CLI, without asking. The docs said it would ask.

- maybeRepairHackd now checks resolveDaemonAutostartAccess() before it
  prompts or runs anything, in interactive and non-interactive mode alike.
  A denied run skips the restart, clear and start steps and notes the reason
  and the command to run (for example `hack daemon clear && hack daemon start`).
- The launchd isolation driver records Bun.file, Bun.which and Bun.spawn
  calls during a denied daemon request. The test asserts no config read, no
  PATH lookup and no spawn, so the autostart guard must stay first in
  ensureDaemonReady.
- architecture.md, candidate-install.md and native-candidate.md now describe
  the skip, and that stable `doctor --fix` starts hackd without asking when
  non-interactive.

Refs HACK-1368

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve tests/doctor-fix-noninteractive.test.ts: both sides appended tests
at the file end. Keep this branch's HACK-1368 hackd-repair cases and next's
HACK-1316 symlinked-.hack test (#432) in order; 15/15 pass together.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@roodboi roodboi closed this Oct 23, 2026
@roodboi
roodboi deleted the train/b47 branch October 23, 2026 05:00
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