chore: add Codex harness scaffolding and cli __main__ guard#14
Merged
Conversation
- AGENTS.md: add comm-contract block, Codex App Usage section, and portfolio-context block (machine-generated harness scaffolding from Codex sessions) - src/gpt_rag/cli.py: add __main__ guard so the CLI can be invoked directly with `python src/gpt_rag/cli.py` in addition to the installed entry point Both changes are operational ergonomics, not feature logic. pytest (192 passed) and ruff are clean on this tree. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
test_reindex_vectors_status_rejects_mutating_flags asserted "--status cannot be combined" against raw result.output, which contains rich-rendered ANSI color codes that split "--status" across escape sequences (e.g. -\x1b[1;36m-\x1b[0mstatus). The assertion passed locally where TERM/COLUMNS produced different rendering but failed in CI's narrower terminal. Fix: strip ANSI escape codes before the substring check. Verifies the flag is mentioned in the error message regardless of rendering width or color state. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTS.md— comm-contract block, Codex App Usage section, and portfolio-context block. These are operational metadata blocks used by Codex sessions to anchor context.__main__guard tosrc/gpt_rag/cli.pyso the CLI can be invoked directly withpython src/gpt_rag/cli.pyin addition to the installed entry point.Both are operational ergonomics, not feature logic.
Test plan
python -m pytest tests/ -q— 192 passed on the dirty tree before commitruff check src/ tests/— clean on the dirty tree before commitContext
Surfaced during a 2026-05-10 Codex → Claude Code handoff. The GPT_RAG packet in the Notion Local Portfolio Command Center was blocked specifically on owner disposition of these two dirty files.
🤖 Generated with Claude Code