Repository navigation
docs: stop stable hackd before candidate runs and keep .hack/.internal untracked - #369
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
Two gaps in the candidate guides (HACK-1315):
hackandhack-nextagainst the same home at once, but it did not cover the stablehackddaemon. Stablehack global up(v4.2.0) runshack daemon startwheneverdaemon.autoStartis on, which is the default (src/commands/global.ts,src/control-plane/sdk/config.ts). Other stable commands that talk tohackdalso auto-start it (src/daemon/client.ts). So a user who stoppedhackdand then ranhack global upto bring up routing had a stable daemon running on the same~/.hackduring the Compose candidate run..hack/.internal/. A project that tracks it gets a dirty working tree every time a newer generator rewrites files such ascompose.override.yml.Fix (docs only, no product behavior change)
docs/guides/candidate-install.md: new subsection "Stop stable hackd before a Compose run" with the orderhack global up, thenhack daemon stop, then check thatpgrep -fl "hack daemon start"prints nothing, and no stablehackcommands while the candidate run uses the same~/.hack. New subsection "Keep.hack/.internal/out of Git" pointing at the existinghack doctorgenerated-files check andhack doctor --fix. The shared-state bullet list links to both.docs/guides/native-candidate.md(copied into the bundle asREADME.md): thehack-v5Compose paragraph now gives the same order and the.hack/.internal/rule.docs/guides/v5-dogfooding.mdstep 2: links to the new hackd subsection and repeats the order.docs/architecture.md:.hack/.internalis machine-local; do not hand-edit or commit it.Doctor warning follow-up
No new code was needed. A doctor warning for tracked
.hack/.internal/files already exists:src/lib/doctor-generated-files.ts("generated files" check, pathspec.hack/.internal), and it also ships in stable 4.2.1. The new guide text points users to it.src/commands/doctor.tswas not touched (in-flight PR #365).Tests and evidence
mise x bun@1.4.2).tests/cli-reference-docs.test.ts,tests/prerelease-plan.test.ts(checksnative-candidate.mdanchors),tests/doctor-generated-files.test.ts: 66 pass, 0 fail.bun run --cwd packages/cli typecheckexit 0;bun run --cwd packages/cli checkexit 0 (warnings only, none new).origin/next..HEAD: no leaks.ea9b4ac8(Bun 1.4.2): 7554 pass, 126 skip, 1 fail, across 540 files. The failure wastests/native-authored-project-recovery.test.ts"new no-host death uses real read-only quiescence facts and retires only its exact bound record" (Native process live-session observation refused (changed)). Serial reruns with--timeout 60000failed twice on the M3 and once locally, and each also failed "new no-host recovery retains original bindings on last-await". The same 2 tests fail at barenextec223cdbon the M3, so the failure already exists onnextand is unrelated to this change. This test does not read any doc changed here. It is reported as a separate finding.docs:cli-referenceandgenerate:agent-pluginsdo not apply. No unit tests were added, because this is a docs-only change.Gaps
global upauto-start,daemon stop, and thedaemon start --foregroundargv that thepgreppattern matches.hackdnormally exits 0 on SIGTERM, so launchd (KeepAlive.SuccessfulExit=false) should not restart it. The guide still tells users to re-check withpgrepbefore starting the candidate.Refs HACK-1315
🤖 Generated with Claude Code