Skip to content

Add Python semantic-language search CLI#5

Merged
GTrunSec merged 18 commits into
mainfrom
codex/python-semantic-language-cli-protocol
Jun 5, 2026
Merged

Add Python semantic-language search CLI#5
GTrunSec merged 18 commits into
mainfrom
codex/python-semantic-language-cli-protocol

Conversation

@GTrunSec

Copy link
Copy Markdown
Contributor

Summary

  • add the py-harness semantic-language provider registration and CLI protocol surface
  • add Python-local semantic capability/search schemas and search packet rendering
  • add workspace/prime/text/ingest/dependency search slices with tests and docs

Validation

  • uv run --group test ruff format --check src tests
  • uv run --group test ruff check src tests
  • uv run --group test pytest tests -q
  • uv run --group test py-harness .
  • uv run --group test py-harness --agent-snapshot .
  • uv build
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b8288a904

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +113 to +114
normalized = path.removeprefix("./")
if normalized in owner_paths:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Relativize absolute ingest paths before owner matching

When stdin contains absolute paths (for example rg -n pattern /repo/src or editor/vimgrep output with full filenames), this normalization only strips ./, while owner_paths are project-relative display paths. Those records therefore miss the parser-visible owner, so the ingest packet omits the |owner section and emits unusable follow-up targets like /repo/src/foo.py instead of src/foo.py, despite the ingest view promising owner grouping.

Useful? React with 👍 / 👎.

Comment thread src/python_lang_project_harness/_cli.py Outdated
"""Run the CLI using process environment arguments."""

return run_cli(sys.argv[1:])
stdin = "" if sys.stdin.isatty() else sys.stdin.read()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid draining stdin for non-ingest commands

The console entrypoint now reads all non-tty stdin before it even parses the command, but only search ingest needs stdin. In a pipeline or wrapper where stdin is a pipe/FIFO/large stream, commands such as py-harness --help, py-harness check, or py-harness search workspace can block until EOF or consume unbounded input that they ignore; the read should be gated on the parsed ingest command instead.

Useful? React with 👍 / 👎.

@GTrunSec GTrunSec merged commit 111f824 into main Jun 5, 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