Skip to content

tools: html_navigation.py fails under python -I, and the link checkers default to their own checkout #68

Closed

Description

@drevendev

Problem

Both issues block running BeautifulRepo's tools from an installed copy (a plugin cache, a vendored checkout) against another repository.

  1. python -I tools/html_navigation.py --root . fails with ModuleNotFoundError: No module named 'docs_links'. This was reproduced on 2026-10-22 on Windows with Python 3.14.7. -I removes the script's directory from sys.path, which breaks the sibling import. Isolated mode is the safe way to run tools next to untrusted repositories.
  2. docs_links.py and html_navigation.py default --root to the parent of tools/. Run from an installed copy without --root, they silently check BeautifulRepo itself and print OK. repo_audit.py defaults to . instead.

Acceptance

  • html_navigation.py loads docs_links through a path computed from __file__ (or importlib), so python -I works. A test runs it with -I.
  • Choose one safe default for every tool: the current directory, as repo_audit.py does, or a required --root. A run from another directory must never silently check the tool's own checkout.
  • The documented commands, run from the BeautifulRepo root, keep working. action.yml already passes --root.
  • Add a test that runs each tool from a foreign working directory, and update tools/README.md.

Activity

  1. added
    bug
    agent-skill
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-skillbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions