Skip to content

Handle unwritable Base cache roots without tracebacks#903

Merged
codeforester merged 1 commit into
masterfrom
bug/895-20260620-unwritable-cache-root
Jun 20, 2026
Merged

Handle unwritable Base cache roots without tracebacks#903
codeforester merged 1 commit into
masterfrom
bug/895-20260620-unwritable-cache-root

Conversation

@codeforester

@codeforester codeforester commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Convert Base runtime directory creation failures into concise Click-style errors that name the failing path.
  • Include BASE_CACHE_DIR recovery guidance when cache/log/temp directories cannot be created.
  • Add regression coverage for unwritable cache roots during base_cli context creation.

Issue

Fixes #895

Validation

  • RED: PYTHONPATH=lib/python:cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest lib/python/base_cli/tests/test_base_cli.py -q -k unwritable_cache_root failed with PermissionError escaping from context creation.
  • PYTHONPATH=lib/python:cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest lib/python/base_cli/tests/test_app_runtime_errors.py lib/python/base_cli/tests/test_base_cli.py -q
  • PYTHONPATH=lib/python:cli/python /Users/rameshhp/.base.d/base/.venv/bin/python -m pytest lib/python/base_cli/tests -q
  • /usr/local/bin/bash -lc "git ls-files -z '*.py' | PYTHONPATH=lib/python:cli/python xargs -0 /Users/rameshhp/.base.d/base/.venv/bin/python -m pylint --rcfile=.pylintrc"\n- BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash BASE_CACHE_DIR=/private/tmp/base-unwritable-cache-895.hSKuta bin/basectl workspace status --workspace /tmp --format json exits 1 with a concise error and no traceback.\n- git diff --check origin/master\n- env -u BASE_HOME BASE_BASH_LIBS_DIR=/Users/rameshhp/work/base-bash-libs/lib/bash ./bin/base-test\n\n## Demo Impact\nNone. Runtime error handling only.\n\n## Notes\n- .ai-context/ unchanged; this aligns an internal runtime failure path with existing error-reporting expectations without changing the command surface.

@codeforester codeforester force-pushed the bug/895-20260620-unwritable-cache-root branch from 439e8ab to 3a3f8e7 Compare June 20, 2026 17:48
@codeforester codeforester marked this pull request as ready for review June 20, 2026 17:50
@codeforester codeforester requested a review from a team as a code owner June 20, 2026 17:50
@codeforester codeforester merged commit 1bf6f64 into master Jun 20, 2026
18 checks passed
@codeforester codeforester deleted the bug/895-20260620-unwritable-cache-root branch June 20, 2026 17:50
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.

Handle unwritable Base cache roots without Python tracebacks

1 participant