Repository navigation
fix/Runner-pipe-code-option · L-261117-ca9158 - #112
Conversation
…runner PipelexRunner.execute handed the caller's pipe code to `pipelex run pipe` as a bare positional, so a code starting with `-` was read as an option of the CLI. The code is now checked against the standard's pipe-reference grammar (bare, domain-qualified or package-qualified, every part matching [a-z][a-z0-9_]*) before anything is written or the CLI runs, on both the `run pipe` and the `run bundle --pipe` paths, and `run pipe` now receives the code last, behind `--`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TF9N3aUmciysxinm72XqX
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01d9004fe4
ℹ️ 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".
The standard's package-qualified form is `alias->domain.pipe_code`, and pipelex keys a dependency's pipes that way, so `alias->pipe_code` is refused with the other codes outside the grammar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019TF9N3aUmciysxinm72XqX
|
Review pass: profile 1, round 1 (bar
Verdict: converged — the round-1 pass at profile 1 was clean with full coverage, at or above the required depth of 1; nothing further is warranted |
TL;DR
pipelex run pipelast, behind--.-reached thepipelexcommand line as a bare positional and was read as one of its options (-L <dir>,--output-dir …), which matters to any application that forwards an end user's pipe code.Behaviour changes
PipelexRunner.execute(pipe_code="-L"), or any code outside the grammar → raisesPipelexRunnerErrorbefore the CLI is looked up, anything is written or the CLI runs, on both therun pipepath and therun bundle --pipepath (it used to runpipelex … run pipe -L …).pipelex run pipe <code> [options]→pipelex run pipe [options] -- <code>.Changes
Runner
mthds/runners/pipelex/runner.py: a pipe-reference pattern built from the standard's "Pipe Reference Syntax" (a bare code, a domain-qualified one, or a package alias followed by a domain and the code, every part[a-z][a-z0-9_]*), checked by_ensure_pipe_refat the top ofexecute; therun pipepositional now goes last, behind--, which pipelex's Typer and Click versions accept (checked with a Typer app of the same shape under pipelex's own environment).bundle <dir>andvalidate bundle <dir>take the absolute path of the run's temporary directory, and-L,-i,-oand--working-memory-pathare option values, which Click consumes whatever their first character.Tests
tests/unit/test_pipelex_runner.py: each form of pipe reference reaches the CLI as the last argument behind--; codes outside the grammar, those starting with a dash first, are refused with and withoutfiles, with nothing written and the CLI never run. Cases live inPipeCodeCasesintests/unit/test_data.py.How it was verified
make agent-check: ruff, pyright (0 errors), mypy (Success: no issues found in 134 source files) and the error-registry check all passed.DO_NOT_TRACK=1 make agent-test:All tests passed.pytest tests/unit/test_pipelex_runner.py:31 passed.Documentation
docs/runners.md: thePipelexRunnerentry states the pipe-code rule and the--, and now saysexecuteusespipelex run pipewhen given nofilesand thatversionraises until the CLI reports its protocol version, which it already did.CHANGELOG.md: a### Securityentry under[Unreleased].Not done
is_snake_caseis stricter than the standard's[a-z][a-z0-9_]*(it refuses doubled and trailing underscores); the runner follows the standard, and aligning the package is tracked in L-261117-990baf.Closes L-261117-ca9158
🤖 Generated with Claude Code
https://claude.ai/code/session_019TF9N3aUmciysxinm72XqX
Summary by cubic
Fixes the local
PipelexRunnerso a pipe code starting with-can no longer be read as apipelexCLI option.executenow validatespipe_codeagainst the standard's pipe-reference grammar before anything is written or the CLI runs, andpipelex run pipereceives the code last, behind--.answer), domain-qualified (legal.contracts.answer), or package-qualified with its domain (docproc->extraction.extract_text); every part matches[a-z][a-z0-9_]*, and a package alias is always followed by a domain, sodocproc->extract_textis refused.PipelexRunnerErroron both therun pipeandrun bundle --pipepaths, before the CLI is looked up or anything is written.docs/runners.mdand adds aCHANGELOG.mdsecurity entry.Written for commit cb5d081. Summary will update on new commits.