fix: resolve /a0 display paths outside docker and tolerate a missing display root #115

Merged
nsaspy merged 1 commit from fix/dev-path-display-mapping into main 2026-09-06 17:23:39 +00:00
Owner

What changed

  • helpers/files.fix_dev_path converts /a0/... display paths to base-dir-relative paths whenever the runtime is not dockerized (previously only in development mode).
  • The workdir extras extension falls back to the in-base usr/workdir when the resolved workdir lies outside the runtime base dir (display root unavailable).

Why

CI environments run the framework without the docker /a0 mount and are neither dockerized nor in development mode. workdir_path defaults to the /a0/usr/workdir display path, so prompt-rendering tests crashed with PermissionError: /a0 (observed on the host nix runner in #51's focused job).

Real docker behavior is unchanged: inside docker is_dockerized() is true and /a0 is the base dir.

Verification

nix develop --command python -m pytest -q tests/test_default_prompt_budget.py passes on a host without /a0 (12 passed); it failed on all 5 parametrizations before.

Related: #51

## What changed - `helpers/files.fix_dev_path` converts `/a0/...` display paths to base-dir-relative paths whenever the runtime is not dockerized (previously only in development mode). - The workdir extras extension falls back to the in-base `usr/workdir` when the resolved workdir lies outside the runtime base dir (display root unavailable). ## Why CI environments run the framework without the docker `/a0` mount and are neither dockerized nor in development mode. `workdir_path` defaults to the `/a0/usr/workdir` display path, so prompt-rendering tests crashed with `PermissionError: /a0` (observed on the host nix runner in #51's focused job). Real docker behavior is unchanged: inside docker `is_dockerized()` is true and `/a0` is the base dir. ## Verification `nix develop --command python -m pytest -q tests/test_default_prompt_budget.py` passes on a host without `/a0` (12 passed); it failed on all 5 parametrizations before. Related: #51
Two related issues hit CI environments that run the framework without
the docker /a0 mount:

- helpers/files.fix_dev_path only converted /a0/... display paths in
  development mode, so CI (neither dockerized nor development) passed
  the literal display path through and failed with PermissionError on
  /a0. Convert display paths whenever the runtime is not dockerized,
  matching the real_path_for_display semantics used by the plugins.
- The workdir extras extension created the scan dir even when the
  display root is unavailable. When the resolved path lies outside the
  runtime base dir, scan the in-base workdir instead. Real docker
  behavior is unchanged.

Verified: tests/test_default_prompt_budget.py passes under nix develop
on a host without /a0.
nsaspy merged commit bba5dcba91 into main 2026-09-06 17:23:39 +00:00
Sign in to join this conversation.
No description provided.