Skip to content

tests(docs): Harden codeblock env and FIRE sort - #223

Merged
tony merged 1 commit into
masterfrom
fix/222-docs-harness
Dec 6, 2026
Merged

tony merged 1 commit into
masterfrom
fix/222-docs-harness

Conversation

@tony

@tony tony commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Closes #222.

Summary

  • Update the README.md and conftest.py entries in AGENTS.md to reflect plain python and runnable console code-block execution via tests/_docs_codeblocks.py alongside doctests.
  • Clear PYTEST_ADDOPTS in _make_sandbox_env (tests/_docs_codeblocks.py) and in the end-to-end mini-project helper (tests/test_docs_codeblocks.py) so exported outer pytest options (-m, -k, --junitxml) cannot alter inner pytest runs.
  • Sort normalized POSIX paths in both the rg branch and the rglob fallback of _run_fire_evidence_command so hyphenated and nested paths order identically across POSIX and Windows.

Verification

  • uv run ruff check ., uv run ruff format --check .
  • uv run ty check on Python 3.12–3.15 and --python-version 3.12 --python-platform win32
  • uv run pytest -m "" and PYTEST_ADDOPTS="-m documentation" uv run pytest README.md docs/topics/testing.md
  • Disposable-worktree test-bite proof restoring tests/_docs_codeblocks.py to origin/master and breaking each fix independently; real rg execution stays unverified locally where rg is not installed.

why: AGENTS.md still described README.md as >>>-only doctests, outer
PYTEST_ADDOPTS leaked into sandboxed inner pytest runs, and
_run_fire_evidence_command left rg stdout unsorted while its fallback
sorted Path tuples instead of POSIX strings.

what:
- Update README.md and conftest.py rows in AGENTS.md
- Pop PYTEST_ADDOPTS in _make_sandbox_env and the end-to-end test helper
- Sort normalized POSIX paths in both branches of _run_fire_evidence_command
- Add regressions for PYTEST_ADDOPTS isolation and rg/rglob sort parity
@tony
tony merged commit f0cfadf into master Dec 6, 2026
10 checks passed
@tony
tony deleted the fix/222-docs-harness branch December 6, 2026 10:04

This branch was successfully deployed

1 active deployment
docs — 7ffad9a0 Deployed Dec 6, 2026 by tony via build (3.14) #557
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.

Update AGENTS.md and harden tests/_docs_codeblocks.py

1 participant