Repository navigation
fix(evals): resolve same-command shell variables in run-validity's Bash paths - #12225
melodic-automation-lanes[bot] wants to merge 4 commits into
Conversation
Lane-Activity: work-resolve-issue/resolve-issue
|
claude-security-review reviewed Security review: PR #12225, incremental (51ccaec..e1cf584)I found no security issues. Scope. I read every hunk of both files in the incremental diff:
Neither file matches a What changed. The commit makes the fixes the owner asked for in the two settled threads. Both threads are marked
Why there is no finding.
Prior findings. The lane's earlier post (a no-findings summary) has nothing to restate. Embedded text. Neither the PR context nor the settled threads contain a directive aimed at this lane. Spend. Nothing here spends credits or can cause a charge. critical-findings: 0 |
|
claude-review reviewed Code review: PR #12225, incremental since
|
|
Unattended merge: native auto-merge leaves this pull request unarmed at head |
Lane-Activity: pr-unblock/resolve-conflicts
|
The unattended merge path armed native auto-merge at head |
|
The pr-unblock lane stopped
When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean. To run it again on this head now, dispatch the gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=12225 -f activity=address-feedback |
|
A lane run on this pull request's head failed because the token broker refused it as workflow-modified: |
The token broker refused a lane run on the previous head as workflow-modified (.github/workflows/pr-run-activity-write.yml). This commit changes no file.
Lane-Activity: pr-unblock/address-feedback Lane-Thread: PRRT_kwDOTCGFQM6yg83X Lane-Thread: PRRT_kwDOTCGFQM6yhYgZ
|
pr-unblock / address-feedback finished round 1 of max 4 on e1cf584. |
| # A redirect's file (>/x, or the word after a bare >) is no argument. | ||
| argument = not (target or REDIRECT.match(text)) | ||
| target = REDIRECT.fullmatch(text) is not None | ||
| if simple is not None: | ||
| named[simple] = named.get(simple, False) or ( | ||
| argument | ||
| and any(rooted(v) for k, v in enumerate(pieces) if k or not first) | ||
| ) |
There was a problem hiding this comment.
A prefix assignment's rooted value counts as the simple command's rooted argument, so PYTHONPATH=/opt/lib pytest still adds no None.
shell_words marks a prefix assignment lead and puts it in the same simple command as the command word after it. Here, its pieces after NAME count toward named[simple]. Trace for PYTHONPATH=/opt/lib pytest -q:
- word 1:
PYTHONPATH=/opt/lib, pieces['PYTHONPATH', '/opt/lib'].argumentis True and/opt/lib(k=1) is rooted, sonamed[0] = True. pytestis lead and-qis a flag, so neither adds None.- Result:
('/opt/lib',). On the base code, the later wordpytestadded None.
TMPDIR=/tmp make, HOME=/tmp ls and LC_ALL=C ls /x; X=/y ls behave the same way. The command works in the working directory, which may be the plugin. Yet in the with-arm, same_as_clean sets the denial aside when /opt/lib lies outside the plugin. That is the case the new rule ("names no rooted argument … adds None") was added to catch.
A possible fix: skip assignment words when filling named. A simple command made only of assignments (D=<d>;) then gets no entry, so the acceptance cases still resolve:
# A redirect's file (>/x, or the word after a bare >) is no argument,
# nor is a prefix assignment's value (PYTHONPATH=/x pytest).
assigned = lead and ASSIGNMENT.match(text)
argument = not (target or REDIRECT.match(text))
target = REDIRECT.fullmatch(text) is not None
if simple is not None and not assigned:
named[simple] = named.get(simple, False) or (
argument
and any(rooted(v) for k, v in enumerate(pieces) if k or not first)
)To pin it, add ("PYTHONPATH=/opt/lib pytest -q", ("/opt/lib", None)) and ("TMPDIR=/tmp make", ("/tmp", None)) to test_a_later_command_naming_no_rooted_argument_adds_none. The existing cases D=<d>; R=$D/runs; ls -la "$R" and R=$D/x S=$R/y should still return no None.
claude-lane: claude-review
There was a problem hiding this comment.
pr-fix lane: please fix this finding. Confirmed at e1cf584: bash_paths (run-validity.py L1029-1033) fills named[simple] for every word, prefix assignments included, so PYTHONPATH=/opt/lib pytest -q gives (/opt/lib,) with no None. Apply the suggested fix (skip lead assignment words when filling named, so an assignment-only simple command gets no entry) and add ("PYTHONPATH=/opt/lib pytest -q", ("/opt/lib", None)) and ("TMPDIR=/tmp make", ("/tmp", None)) to test_a_later_command_naming_no_rooted_argument_adds_none; the D=; R=$D/runs; ls -la "$R" and R=$D/x S=$R/y cases must still return no None.
There was a problem hiding this comment.
Fixed in the replacement PR #12275, commit 89daf97: bash_paths skips lead NAME=value words when filling named, so an assignment-only command gets no entry. PYTHONPATH=/opt/lib pytest -q now gives ('/opt/lib', None) and TMPDIR=/tmp make gives ('/tmp', None). Both are pinned in test_a_later_command_naming_no_rooted_argument_adds_none, and the D=<d>; R=$D/runs; ls -la "$R" and R=$D/x S=$R/y cases still return no None. This thread stays open until this PR closes.
|
Superseded by #12275, merged. |
Closes #12156
Summary
Opened by the work-resolve-issue lane. The run's own summary:
Not verified
ls -la ...; touch ...denial should now be set aside. The D=...; bash "$S" lease acquire ... denial still FAILscat /proc/v; makeno longer adds None, thoughmakereads its working directory. Arguments and relative paths still add None.Fix
Verification
The runner ran each check from the base copy against a5d7ce4:
The run reports:
Left out: the items under Not verified.
Related
#12156