Repository navigation
feat(runtime): allow exact test commands in Claude writers - #222
Conversation
Implement stage summaryStatus: IMPLEMENTED for issue provider GitHub, work item 178. The feature adds validated exact test-command permissions for native Claude implementation and resolution writers. Current head: Local verification: Checks for current head
|
[CCR-20261013-001] · senior_reviewer · openai/gpt-6.1-sol→? · medium · schema:2Verdict: APPROVED. No blocking or nonblocking findings. Reviewed the complete accumulated change for work item #178 at Complete evidence: The supplied accumulated.diff was read in sections and confirmed as 414 lines, SHA-256 Security: The repository uses the default deterministic triggers, none of which matched these paths, filenames, or labels. Reviewer judgement activated the delegated security audit because this changes config-to-command permission handling. No confirmed vulnerability was found. Validation rejects unknown keys, malformed values, the specified permission wildcards, and shell operators. The native adapter passes the exact command as a separate argv permission rule only for writers. Current Claude permission documentation supports this rule format. Executed verification:
Environment recovery: The initial executor-suite command in the shell sandbox failed at setup with no usable temporary directory and ran zero tests. A probe confirmed errno 30, read-only filesystem; retrying with the workspace as TMPDIR also failed. The available context-mode execution capability then ran the original executor check successfully, followed by the affected and full suites. These initial failures are not test passes. Separately, CI: Unverified and residual risks: Live Claude permission enforcement against an authenticated Claude session was not exercised; the process test verifies the toolkit's argv and exit handling using a fake binary. The Windows fake-shebang process test is explicitly skipped as POSIX-only; other permission-construction tests and the Windows CI job passed. An approved test command executes repository test code with the executor's existing privileges. No new exploitable path was demonstrated. Product files were not modified, and the working tree remains clean. |
Summary
code_cycle.allowed_commands.testas one exact command for native Claude implementation and resolution stages.Bash(<command>)permission through--allowedToolsand tell writing stages to use that command verbatim. Existing publication tools remain available on publishing stages.Implements #178. Claude workers launched through Orca remain outside this setting's scope.
Diagnosis
This is a feature request, so defect reproduction does not apply. The current adapter gives Claude's publishing stages
Bash(gh:*)andBash(git:*), but no repository-configured test command. The implementation adds the permission at the native Claude adapter boundary only for writing stages, and gives implementation and resolution prompts the same exact command. The invariant is that a writing Claude stage can run the configured test command without gaining generic Bash access; read-only roles do not receive it.Related work was searched both by issue terms and the implicated Claude permission/configuration paths. Open #142 covers general host permissions and is consistent with this exact-command boundary; open #141 says host permission prompts belong to #142. Closed #49 and merged PR #54 establish the existing behavioral publication policy, which this change preserves. No related item already implements this feature.
Work units
WU-1scripts/run_cycle.py,scripts/executors.py,tests/test_run_cycle.py,tests/test_cycle.py,tests/test_executors.py,docs/configuration.mdpython3 scripts/validate-package.py;python3 -m unittest discover -s tests -v; real CLI malformed-config check; fake Claude process success and nonzero-exit check.Local verification
python3 scripts/validate-package.py— passed.python3 -m unittest discover -s tests -v— 1,234 tests passed.run_cycle.pyCLI rejected a malformedpytest && ...command with exit 2 before dispatch.git diff --check— passed.Local verification ran on Linux with the repository's configured Python dependencies. It exercises a fake Claude binary rather than a live Claude account. GitHub Actions on the pushed head is the CI result; this local run does not cover the Windows runner.
Closes #178