Skip to content

Export the lane's project as DEVLANES_LANE_PROJECT - #109

Merged
arthurfiorette merged 7 commits into
mainfrom
fix/second-checkout-lane
Nov 1, 2026
Merged

arthurfiorette merged 7 commits into
mainfrom
fix/second-checkout-lane

Conversation

@arthurfiorette

@arthurfiorette arthurfiorette commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Found through devlanes-run/action#6. The "Two projects in one job" test passes on 0.7.0 and fails on 0.10.0. In the second step, devlanes start in second/test/fixtures/infra fails with …/infra not found; options: fixture@0.

Cause

Lanes wrote DEVLANES_PROJECT into every process they start, and since 0.8.0 (#92) -p/--project reads that same variable. The action exports a lane's variables to later steps, so the second step inherited DEVLANES_PROJECT=fixture and every command in the other checkout was pinned to fixture. The same happens to eval $(devlanes env show) and devlanes with shells. The variable was both a user setting and lane context, and devlanes couldn't tell which one it was reading.

Fix

  • Lane variable renamed. Lanes export the project as DEVLANES_LANE_PROJECT.

  • DEVLANES_PROJECT is only a user setting. Precedence is config < env < -p, and a set DEVLANES_PROJECT wins over the current folder. --file still beats both.

  • The lane project is a fallback. The CLI sends DEVLANES_LANE_PROJECT as Context.lane_project, optional on the wire. The daemon uses it only when neither -p nor DEVLANES_PROJECT is set, and only in two cases:

    Otherwise the folder's own project wins.

  • debug thaw race. This fixes a flake on CI that is also a user-visible bug. Recording the command's activity queued a second wake. When that wake reached the lane first, devlanes debug thaw thawed the lane but printed "not throttled or frozen". The command now records its activity without queuing a wake. Under load in WSL, 16 of 200 runs failed before the fix and none of 200 after.

Tests

  • Daemon: lanes::a_lane_project_gives_way_to_the_cwds_own. It covers two clones, the devlanes.prod.yaml case, a cwd in no project, and -p / DEVLANES_PROJECT winning over both the folder and the lane project.
  • e2e: lanes::exported_lane_variables_leave_another_checkouts_project_alone. It replays the action job with CI variables, and checks that a hand-exported DEVLANES_PROJECT pins the project.
  • CLI: lane_project_is_sent_apart_from_the_project.
  • Local results:
    • fmt and workspace clippy pass.
    • nextest for cli, proto, resolve, config, daemon and devlanes: 861 passed.
    • e2e lanes::, with:: and lifecycle::: 18 passed.
    • idle:: stress runs under load pass.

Change files

  • lane-project-variable.md (minor). Scripts that read the lane's project from its environment now use DEVLANES_LANE_PROJECT.
  • debug-thaw-answers-thawed.md (patch).

devlanes-run/action#6 changes its README and e2e check to DEVLANES_LANE_PROJECT, and requires the release with this change.

Agent and model: OpenCode / Claude Opus 5.5.

Also: crashing PTY services on macOS

cli::agent_output_starts_with_stable_words timed out on macOS CI. A PTY service that printed and exited at once could hang launch: XNU keeps an exiting session leader waiting until its terminal output is read, libproc already refuses it, and the sysctl fallback only accepted zombies, so the daemon killed and waited for a leader that was waiting for the daemon. The fallback now accepts a process with P_WEXIT, and a failed lookup closes the master before waiting. Regression test spawn::tests::a_leader_that_exits_before_its_identity_is_read_is_identified. Change file pty-leader-exits-at-once.md (patch).

Also: proxy port after a restart

with::with_runs_the_command_and_stops_the_daemon_it_spawned failed on macOS CI because the lab's HTTPS port was still held by closing connections from the previous test, so the proxy fell back to 8443. The main listener now binds with SO_REUSEADDR on Linux; on macOS it retries with it only when nothing answers on the port, so another program's listener is still never hidden. Users saw this as daemon restart moving the proxy to 8443/8080 while a browser had connections open. Tests port_with_lingering_connections_binds_again and wildcard_listener_still_falls_back; the update e2e tests now append to the lab config instead of replacing its port slot. Change file proxy-port-after-restart.md (patch).

@sampo-s-bot

sampo-s-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🧭 Changeset detected

Merging this PR will release the following updates:

devlanes (Cargo) — minor version bump

Minor changes

  • Changed lanes to export their project as DEVLANES_LANE_PROJECT instead of DEVLANES_PROJECT, so a lane's variables no longer pin devlanes commands in another project's folder or checkout to that project.

    DEVLANES_PROJECT is now only a setting you export yourself, and it wins over the current folder like -p. Scripts that read the lane's project from its environment use DEVLANES_LANE_PROJECT.

Patch changes

  • Fixed devlanes debug thaw sometimes saying a frozen lane was not throttled or frozen after it had thawed it.
  • Fixed the proxy moving to its fallback port (8443 or 8080) on macOS and Linux when the daemon restarted shortly after the proxy had closed connections, such as a browser's after devlanes daemon restart.
  • Fixed devlanes start on macOS sometimes waiting until its timeout, and devlanes daemon stop stalling after it, when a service printed something and exited right after it started, instead of reporting it as failed with its exit code and output.

devlanes-cli (Cargo) — minor version bump

Minor changes

  • Changed lanes to export their project as DEVLANES_LANE_PROJECT instead of DEVLANES_PROJECT, so a lane's variables no longer pin devlanes commands in another project's folder or checkout to that project.

    DEVLANES_PROJECT is now only a setting you export yourself, and it wins over the current folder like -p. Scripts that read the lane's project from its environment use DEVLANES_LANE_PROJECT.

devlanes-daemon (Cargo) — minor version bump

Minor changes

  • Changed lanes to export their project as DEVLANES_LANE_PROJECT instead of DEVLANES_PROJECT, so a lane's variables no longer pin devlanes commands in another project's folder or checkout to that project.

    DEVLANES_PROJECT is now only a setting you export yourself, and it wins over the current folder like -p. Scripts that read the lane's project from its environment use DEVLANES_LANE_PROJECT.

Patch changes

  • Fixed devlanes debug thaw sometimes saying a frozen lane was not throttled or frozen after it had thawed it.

devlanes-proto (Cargo) — minor version bump

Minor changes

  • Changed lanes to export their project as DEVLANES_LANE_PROJECT instead of DEVLANES_PROJECT, so a lane's variables no longer pin devlanes commands in another project's folder or checkout to that project.

    DEVLANES_PROJECT is now only a setting you export yourself, and it wins over the current folder like -p. Scripts that read the lane's project from its environment use DEVLANES_LANE_PROJECT.

devlanes-proxy (Cargo) — patch version bump

Patch changes

  • Fixed the proxy moving to its fallback port (8443 or 8080) on macOS and Linux when the daemon restarted shortly after the proxy had closed connections, such as a browser's after devlanes daemon restart.

devlanes-resolve (Cargo) — minor version bump

Minor changes

  • Changed lanes to export their project as DEVLANES_LANE_PROJECT instead of DEVLANES_PROJECT, so a lane's variables no longer pin devlanes commands in another project's folder or checkout to that project.

    DEVLANES_PROJECT is now only a setting you export yourself, and it wins over the current folder like -p. Scripts that read the lane's project from its environment use DEVLANES_LANE_PROJECT.

devlanes-runner-pty (Cargo) — patch version bump

Patch changes

  • Fixed devlanes start on macOS sometimes waiting until its timeout, and devlanes daemon stop stalling after it, when a service printed something and exited right after it started, instead of reporting it as failed with its exit code and output.

devlanes-sys (Cargo) — patch version bump

Patch changes

  • Fixed devlanes start on macOS sometimes waiting until its timeout, and devlanes daemon stop stalling after it, when a service printed something and exited right after it started, instead of reporting it as failed with its exit code and output.

@mira-arthur

mira-arthur Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Mira PR Walkthrough

Fixes a regression where lanes exported DEVLANES_PROJECT, which -p/--project also reads, causing later steps in other checkouts to be pinned to the wrong project. Lanes now export DEVLANES_LANE_PROJECT, which the CLI sends as an optional Context.lane_project. The daemon uses it only as a fallback when the cwd is in one of that project's lane folders or in no project. The PR also fixes a debug thaw wake race, a macOS hang for PTY services that exit immediately, and the proxy port falling back to 8443 after a restart (SO_REUSEADDR binding).

Confidence: 4/5   ◉◉◉◉○   Safe with minor checks
  • The fix is well scoped and tested at the daemon, CLI and e2e levels. The variable rename is a breaking change for scripts, and the macOS/socket changes are platform-specific, so review those with care.

Blast Radius — 2 dependent repositories, 16 total references

devlanes-run/action — 4 references
devlanes-run/website — 12 references

31 files reviewed


Comment @mira-arthur help to get the list of available commands and usage tips.

Recording the command's activity queued a second wake that could thaw the lane first, so the command reported nothing to thaw.
DEVLANES_PROJECT is now only a setting a user exports, and it wins over the current folder like -p. The lane's own project is a fallback the cwd's project overrides, so a lane's variables in a later CI step no longer pin another checkout to that project. Replaces the previous commit's inherited-project rule.
@arthurfiorette
arthurfiorette enabled auto-merge (squash) November 1, 2026 22:32
@arthurfiorette arthurfiorette changed the title Let the cwd's project win over an inherited DEVLANES_PROJECT Export the lane's project as DEVLANES_LANE_PROJECT Nov 1, 2026
A service that printed and exited at once could leave launch waiting on a leader stuck draining its terminal, so start hung until its timeout. libproc refuses an exiting process; the sysctl fallback now accepts P_WEXIT, and a failed lookup closes the master before waiting.
A daemon restart while connections were closing moved the proxy to its fallback port on macOS and Linux. Found as an e2e failure on macOS CI. The update e2e tests now keep the lab's port slot.
@arthurfiorette
arthurfiorette merged commit 9d7557c into main Nov 1, 2026
14 checks passed
@arthurfiorette
arthurfiorette deleted the fix/second-checkout-lane branch November 1, 2026 23:26
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