Skip to content

Registration: store absolute prefix, interpreter and pythonpath paths - #102

Merged
guijacquemet merged 2 commits into
mainfrom
claude/fix-issue-49
Oct 12, 2026
Merged

guijacquemet merged 2 commits into
mainfrom
claude/fix-issue-49

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Summary

registry.register() now converts --prefix, the interpreter path, every --pythonpath entry and --dir to absolute paths (os.path.abspath, deliberately not resolve(), because a venv's python is a symlink and the trust check compares paths without following links) before probing the interpreter, generating the schema and writing the entry. The registry JSON no longer depends on the caller's working directory. Absolute registrations and shared/system registries are unchanged; unregister --prefix already compares abspath of both sides, so equivalent paths still match.

How verified

  • New tests/test_roundtrip_registration_paths.py: registers through the real command line from folder A with a relative --prefix and relative --pythonpath, asserts the stored JSON paths are absolute, then from an unrelated folder B runs list, doctor and run (the tool in A/src really runs), and finally unregister --prefix with the relative spelling.
  • Sabotage check: with the registry.py change reverted the test fails (stored '../../usr' depends on the working directory).
  • black, ruff, mypy, vulture all clean; full unit suite under coverage: all pass except test_hardening...test_foreign_owned_or_group_writable_shared_entry_is_skipped, which fails identically on unmodified origin/main in my root sandbox (the test is root-only and skips on CI); coverage 86.44% (floor 85).
  • Ledger entry added in docs/REGRESSION_LEDGER.md (PR number follows in a second commit).

Fixes #49

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
@guijacquemet
guijacquemet merged commit 38ea90c into main Oct 12, 2026
14 checks passed
@guijacquemet
guijacquemet deleted the claude/fix-issue-49 branch October 14, 2026 16:08
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.

Registration: resolve interpreter and Python paths before persisting an app

2 participants