Skip to content

fix(driver): the onboarding gate checked the wrong path — a worktree inherits its clone (#558) - #674

Merged
sunholo-voight-kampff merged 1 commit into
devfrom
fix/pin-onboarding-predicate
Aug 12, 2026
Merged

fix(driver): the onboarding gate checked the wrong path — a worktree inherits its clone (#558)#674
sunholo-voight-kampff merged 1 commit into
devfrom
fix/pin-onboarding-predicate

Conversation

@sunholo-voight-kampff

Copy link
Copy Markdown
Collaborator

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:

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. 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:

Case Own entry Probes
ailang-motoko — fresh clone, source absent absent hang (cost iteration 1)
~/.ailang-driver-pin/v1worktree of onboarded clone absent work (measured)

$wt is still checked first, since AILANG_DRIVER_PIN_DIR can 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> && claude step 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

…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>
@sonarqubecloud

Copy link
Copy Markdown

@sunholo-voight-kampff
sunholo-voight-kampff merged commit 9c72ec7 into dev Aug 12, 2026
21 checks passed
@sunholo-voight-kampff
sunholo-voight-kampff deleted the fix/pin-onboarding-predicate branch August 12, 2026 11:23
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