Skip to content

Use runtime Bash for Jev profiles and custody operations - #141

Open
blast-hardcheese wants to merge 5 commits into
mainfrom
fix/portable-harness-bash
Open

blast-hardcheese wants to merge 5 commits into
mainfrom
fix/portable-harness-bash

Conversation

@blast-hardcheese

@blast-hardcheese blast-hardcheese commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Jev and lane custody select Bash from absolute directories on their existing runtime tool paths. The tmux launch and message/resume helpers use the Bash running the helper when no nonempty operator SHELL was exported. Bash can synthesize an unexported SHELL from the account, so the helpers distinguish that default from a caller-supplied setting. The tmux command arguments and existing permission wrappers stay as they were. Metered watcher delivery records the selected shell so unattended wrap-up uses the same value. Callers that discover a Claude launcher through a login-shell function can export that shell explicitly when starting the lane.

Packaging

The Chiron source at this head has no hardcoded system Bash executable under the harness or runtime. The native aarch64-darwin package built from this exact source using the downstream recipe with the blanket Bash substitution removed. Direct installed launch and resume selected Nix Bash with unset or empty SHELL and preserved a nonempty operator shell. The installed Jev and custody helpers selected Nix Bash, and the installed scrubbed lane helper retained pinned tools.

Pair the compatible Chiron source pin and removal of the Bash substitution in one downstream change. Shane confirmed the paired repin, direct-helper regression check, and macOS/Linux validation. Tooling-devshell #162 The separate lane PATH default, Python wrapper, build revision, and retention hooks still need their own migration.

Verification

  • 216 focused tests passed, including launch, resume, shell preservation, watcher delivery, and real private tmux windows. Shell syntax, ShellCheck on the shared helper, and Ruff also passed.
  • Native Nix core and runtime built without the Bash substitution. Packaged shell bodies and both Python helpers matched upstream source. The normal Nix shebang fixup points direct helper execution at store Bash.
  • Local make ship passed the static gates. Its tests reported 3,204 passed, 56 skipped, and eight failures, all reproduced on the unchanged PR base.
  • The PR applies cleanly to current Chiron main. Fresh GitHub Actions and Adapt checks were requested for the updated head.

@adaptcom adaptcom Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confidence Score: 4/5

Summary

Jev, custody and tmux lane helpers now resolve Bash from absolute runtime paths, with an exported nonempty SHELL as the only operator override; delivery.env now records the selected shell. Focused tests, shellcheck, ruff and devshell patch-source all pass; low risk.

Important Files Changed

File Overview
harness/run_context.sh factory_select_lane_shell writes $BASH or exported SHELL into a named variable
harness/tmux_lane.sh Uses the selector; delivery.env records SAFE_SHELL instead of raw SHELL
harness/tmux_lane_message.sh Uses the selector for resumes; /bin/bash default removed
harness/jev_screen.py Absolute-PATH bash lookup; provider-unavailable when missing (unchanged since prior review)
harness/lane_custody.py Plan._operation, late bash lookup, interpreter in started receipt (unchanged since prior review)
tests/test_lane_controls.py Parametrizes operator shell None/empty/path for launch, resume and delivery.env
tests/test_lane_custody.py Runtime bash on spaced path, replay, relative-PATH refusal
tests/test_system_one_profile.py SHELL/BASH_ENV/ENV absent; relative PATH yields provider-unavailable

Findings

  • Launches without an exported SHELL now hand lanes $BASH instead of the account login shell, so Claude launchers defined only as login-shell functions there stop resolving; intentional, worth a CHANGELOG line.

Reviewed 2488390...414162c · ↻ Re-run review · View in Adapt

Comment thread harness/jev_screen.py Resolved
Comment thread harness/lane_custody.py Resolved
Comment thread tests/test_system_one_profile.py Resolved
@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

@adaptcom review

1 similar comment
@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

@adaptcom review

@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

@adaptcom review

@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

The Adapt review’s packaging finding applies to the older tooling-devshell #114 branch, which is still open. Current tooling-devshell dev and the #152 candidate use a blanket Bash substitution. That substitution tolerates the absence of these two literals. I built the native package from the tree at 69201b5 with the #152 activation-anchor update. The installed Jev and custody files matched the upstream source byte for byte, and both launched the bundled Bash.

The two tmux fallback literals and the separate lane PATH, pinned Python, revision, and retention adaptations remain downstream work. The PR description records those dependencies for the repin.

@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

@adaptcom review

@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

@adaptcom review

@blast-hardcheese

Copy link
Copy Markdown
Collaborator Author

For the review of 7975c75, commit 414162c records the selected SHELL in the metered launch’s delivery environment. The unset and empty cases failed against the previous head, and the regression now covers both along with a nonempty operator setting. The shared selector writes to its caller’s named variable, and ShellCheck passes on run_context.sh. The PR’s packaging section now reflects that all four hardcoded Bash paths are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant