fix(driver): the onboarding gate checked the wrong path — a worktree inherits its clone (#558) - #674
Merged
Conversation
…inherits its clone (#558) MEASURED WRONG, same day, on the first real target. The gate added hours earlier checked the pin worktree's OWN entry in ~/.claude.json. Against the live rig: claude -p from ~/.ailang-driver-pin/v1 -> WORKS ~/.claude.json entry for that path -> ABSENT (no entry at all, any spelling) A git worktree has no separate identity to onboard; it inherits its source clone's trust. So the predicate would have refused a demonstrably working target on EVERY fire and left the pin permanently off. Safe direction, but permanently-off is not the goal — and worse, it would have been read as "the gate is protecting us" rather than "the gate is broken". THE PREDICATE IS THE SOURCE CLONE. Accept when EITHER path is onboarded. The two measured cases discriminate it, and 8b/8c pin both so it cannot drift back: ailang-motoko fresh CLONE, source entry ABSENT -> probes HANG (iter 1 lost) ~/.ailang-driver-pin/v1 WORKTREE of onboarded clone, own ABSENT -> probes WORK (measured) $wt is still checked first, because AILANG_DRIVER_PIN_DIR can name a path that is NOT a worktree of $src. Neither-onboarded still refuses — 8c exists so a future edit cannot quietly widen this into a no-op and stay green. HOW THE ERROR WAS FOUND, since it matters more than the fix. A bounded headless probe from the pin worktree returned "Not logged in", which looked like proof the target was broken. The CONTROL — the same probe from the known-good main clone — returned the identical string, so the result was a property of the measuring session's environment and said nothing about the worktree. Without that control this would have shipped as a confirmed gate. CONSEQUENCE: on a rig whose main clone is already onboarded, pinning now needs NO human action. The `cd ~/.ailang-driver-pin/<mission> && claude` step in the previous changelog entry was an artefact of the wrong predicate and is withdrawn. TESTED: 52 assertions (35 + 17), make test-launchd-drivers, bash 3.2.57. Co-Authored-By: Claude Opus 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.



Corrects the gate added in #667, measured wrong the same day on the first real target.
The error
The gate checked the pin worktree's own entry in
~/.claude.json. Against the live rig:A git worktree has no separate identity to onboard — it inherits its source clone's trust. The predicate would have refused a demonstrably working target on every fire, leaving the pin permanently off. Safe direction, but permanently-off is not the goal, and it would have read as "the gate is protecting us" rather than "the gate is broken".
The fix
Predicate is now the source clone; accept when either path is onboarded. The two measured cases discriminate it cleanly:
ailang-motoko— fresh clone, source absent~/.ailang-driver-pin/v1— worktree of onboarded clone$wtis still checked first, sinceAILANG_DRIVER_PIN_DIRcan name a path that is not a worktree of$src. Neither-onboarded still refuses — test 8c exists specifically so a future edit cannot quietly widen this into a no-op and stay green.How it was found — this matters more than the fix
A bounded headless probe from the pin worktree returned
Not logged in, which looked like proof the target was broken. The control — same probe from the known-good main clone — returned the identical string. So the result was a property of the measuring session's environment and said nothing about the worktree. Without that control, this would have shipped as a confirmed gate.Consequence
On a rig whose main clone is already onboarded, pinning needs no human action at all. The
cd ~/.ailang-driver-pin/<mission> && claudestep from #667's changelog entry was an artefact of the wrong predicate and is withdrawn.52 assertions (35 + 17),
make test-launchd-drivers, bash 3.2.57.🤖 Generated with Claude Code