Skip to content

chore: add Codex harness scaffolding and cli __main__ guard#14

Merged
saagpatel merged 2 commits into
mainfrom
chore/codex-scaffolding-and-main-guard
May 11, 2026
Merged

chore: add Codex harness scaffolding and cli __main__ guard#14
saagpatel merged 2 commits into
mainfrom
chore/codex-scaffolding-and-main-guard

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

Summary

  • Add Codex harness scaffolding to 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.
  • Add __main__ guard to src/gpt_rag/cli.py so the CLI can be invoked directly with python src/gpt_rag/cli.py in 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 commit
  • ruff check src/ tests/ — clean on the dirty tree before commit
  • No logic touched in either file; cli.py addition is the canonical Python idiom

Context

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

saagpatel and others added 2 commits May 10, 2026 20:09
- 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>
@saagpatel saagpatel merged commit 7a9c713 into main May 11, 2026
1 check passed
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