Skip to content

fix(pty): export resolved local root as AGENTSCOMMANDER_LOCAL_DIR (refs #1115) - #2105

Open
mblua wants to merge 3 commits into
mainfrom
fix/1115-export-resolved-local-root
Open

mblua wants to merge 3 commits into
mainfrom
fix/1115-export-resolved-local-root

Conversation

@mblua

@mblua mblua commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Closes #1115

Change

Host local PTY agent sessions now export AGENTSCOMMANDER_LOCAL_DIR from the already-resolved config::config_dir() (#1850) instead of re-deriving <exe dir>/.<stem>.

  • pty/credentials.rs: resolve_local_dir takes the resolved root; Some → exact path, lossless or actionable error; None → legacy adjacent fallback with an injected warning, lossless (OsStr stem/parent); verbatim prefixes via path_utils::normalize_windows_verbatim_path. Depends only on std + path_utils (AC6).
  • commands/session.rs: resolution runs for agent + LocalProcess sessions before the launch permit is reserved, so a failure leaves no residue; containers unchanged (AC5).

Plan & review

  • Frozen plan plans/1115-export-resolved-local-root.md, Plan-SHA256 803B56DB0236FD43EC5E9CB0928304C1AB5474FC259724396C32C1055CD3144F; architect/dev/grinch consensus after 4 rounds; user-approved.
  • Grinch PASS on 987c6625 with mutation controls (lossy conversion, missing warning, unwrap_or_default for ?, resolve after permit, dropped agent gate, None resolver, silenced warn sink — all caught).
  • Main merged (d57a4c4b), Grinch focused merge review PASS.
  • Gates: fmt, clippy -D warnings, credentials 14/14, T12; Windows rust-regression covers T5a/T8.

Follow-up (pre-existing permit leaks, out of scope): #2093.

Frozen plan, byte-unchanged, SHA-256 803b56db0236fd43ec5e9cb0928304c1ab5474fc259724396c32c1055cd3144f.
resolve_local_dir(crate::config::config_dir()) replaces the legacy adjacent-directory derivation; a non-Unicode root fails before permit reservation, pending row, or clock mutation. Container transport keeps an empty extra_env.

Gates: fmt, check --all-targets, clippy -D warnings, focused pty::credentials and T12 tests pass. Full lib suite: 135 pre-existing failures, identical to base 5203c4e. Windows-only T5a/T8 await Windows CI on the PR head.
@sonarqubecloud

Copy link
Copy Markdown

@mblua

mblua commented Oct 23, 2026

Copy link
Copy Markdown
Owner Author

Heads-up: the required checks on main changed (#3184, PR #3185).

The main ruleset now requires these checks instead of the old names:

  • rust-regression is now rust-regression-windows
  • windows-release-cli-smoke is now release-cli-smoke-windows
  • new: issue-1850-release-windows, issue-1850-release-linux, issue-1850-release-macos and rust-slow-test-windows

This branch still runs the old workflow, so those checks never report here and the PR cannot merge as it is.

What to do when this PR is ready to land: wait until PR #3185 is merged, then bring this branch up to date with main (the ruleset already requires that). The new workflow comes with it and reports the new check names. Resolve any conflict in .github/workflows/pr-regression-gates.yml in favour of main.

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.

PTY: export the authoritative resolved local root to host children

1 participant