Repository navigation
Deduplicate workflow parsing and CLI argument handling - #1868
Conversation
Architecture-Review: unchanged; local and trusted workflow inputs retain their validation rules and errors, and review evidence checks keep the same order. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 2b3e62d52dc2c1c0f21712957a4beba8070a9842, 24.4s: approve (0 critical, 0 important, 2 suggestion)
Settings per native call (launch configuration and CLI claims, not backend attestation):
- Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)
Native Claude output is retained in the restricted local review receipt.
| @@ -18,7 +18,6 @@ | |||
| # Host locations that must never be exposed to the sandbox, even read-only, because they | |||
There was a problem hiding this comment.
suggestion: Sandbox comment now sits above the wrong constant
The diff removed FORBIDDEN_RO, but its three-line comment ("Host locations that must never be exposed to the sandbox… Subpaths of /home are allowed…") stayed in place. It now sits directly above _ENV_NAME, the env-name regex, so a reader would think the comment describes that regex. The rule it explains is now the inline ("/", "/home") check in _host_paths (line ~293) together with FORBIDDEN_RO_TREES. Smallest fix: move _ENV_NAME above the comment so the comment sits on FORBIDDEN_RO_TREES, and optionally note in the comment that / and /home are rejected only as exact matches in _host_paths. This adds no lines.
| except (tomllib.TOMLDecodeError, ConfigError) as exc: | ||
| invalid_toml = isinstance(exc, tomllib.TOMLDecodeError) | ||
| message = f"invalid TOML: {exc}" if invalid_toml else str(exc) | ||
| raise ConfigError(f"{source}: {message}{hint}") from (exc if invalid_toml and not hint else None) |
There was a problem hiding this comment.
suggestion: Whether the original exception is chained now depends on whether a hint is passed
from (exc if invalid_toml and not hint else None) reproduces the base behavior exactly. Local TOML errors chain the original exception. Trusted TOML errors and all validation errors suppress it. Decoding errors always chain through the separate except branch. The catch is that the rule rests on an unrelated fact: an empty hint stands for "local file". If a future caller passes a hint for a local source, or calls this without one for a trusted blob, the cause behavior silently flips. This is non-blocking, but an explicit keyword (for example chain_toml: bool), or a short comment saying an empty hint means a local file, would keep the cause rules from drifting apart.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Deduplicate workflow parsing and CLI argument handling
Refs #575.
Context and goal
Acceptance
Notes
Base f227668. Changes touch config validation and review evidence. Keep the same trusted inputs, validation boundaries, and fail-closed outcome checks. Compare malformed workflow diagnostics against base separately from the existing tests.
Per-removal behavior
Validation
Recorded for
2b3e62d52dc2(unverified, runloopzero check)uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0The size gate measured 8,090 to 8,075 source lines (minus 15), with tests unchanged at 13,704 and no complexity regressions. Nineteen base/candidate comparisons verified local and real-Git trusted workflow values, errors and causes. Ten CLI comparisons verified parsed results, help, version and errors.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review