Skip to content

docs: standalone-script note for the project_board import bootstrap#66

Merged
protoquinn[bot] merged 1 commit into
mainfrom
docs/standalone-scripts-note
Jul 3, 2026
Merged

docs: standalone-script note for the project_board import bootstrap#66
protoquinn[bot] merged 1 commit into
mainfrom
docs/standalone-scripts-note

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Why

Hit twice this session writing quick live smoke tests outside pytest (e.g. exercising coder_seam.test_rung() against a real repo + a real delegate, without standing up a whole plugin host) — reached for a manual symlink workaround (ln -sfn projectBoard-plugin project_board) before realizing tests/conftest.py already solves this properly:

_spec = importlib.util.spec_from_file_location("project_board", ROOT / "__init__.py", submodule_search_locations=[str(ROOT)])
sys.modules["project_board"] = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(sys.modules["project_board"])

No symlink, no rename needed — this registers the repo root's __init__.py under sys.modules["project_board"] directly. It only fires inside conftest.py, so a bare python script.py (not pytest) never sees it.

What

Documents the actual mechanism in a new "Standalone scripts" README section — the snippet is copy-paste-ready and verified to actually run standalone (not just copied from conftest.py and assumed correct).

Docs-only. Gate: ruff check . && ruff format --check . && pytest -q — 269 passed (unaffected).

🤖 Generated with Claude Code

Hit twice this session while writing quick live smoke tests outside pytest
(exercising coder_seam.test_rung() against a real repo + a real delegate,
bypassing the need for a full plugin host) -- reached for a manual symlink
workaround before realizing tests/conftest.py already solves this properly
(registers the repo root under sys.modules["project_board"] via
importlib.util.spec_from_file_location, no symlink/rename needed).

Document the actual mechanism in the README so the next standalone script
doesn't rediscover the workaround. Snippet verified to actually run
standalone (not just copied from conftest.py).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #66 | docs: standalone-script note for the project_board import bootstrap

VERDICT: WARN (non-blocking; CI still queued — will re-review when terminal)


CI Status

  • test: ⏳ queued

Diff Review

  • README.md only — adds a "Standalone scripts (outside pytest)" section (+26 lines).
  • Documents the importlib.util bootstrap that tests/conftest.py already uses, with a copy-paste-ready snippet for one-off smoke tests.
  • Clear, accurate, and the author verified the snippet runs standalone.

Observations

  • No findings. Docs-only, well-scoped, no unresolved threads. A clean docs improvement.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jul 3, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #66.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI terminal-green, no blockers on prior review — auto-approving on green (#748).

@protoquinn protoquinn Bot merged commit a50038c into main Jul 3, 2026
1 check passed
@protoquinn protoquinn Bot deleted the docs/standalone-scripts-note branch July 3, 2026 21:34
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