Skip to content

fix(lh-134510): match shell expansions in harness arguments - #44

Merged
huides00 merged 3 commits into
mainfrom
LH-134510-harness-shell-parameters
Oct 20, 2026
Merged

huides00 merged 3 commits into
mainfrom
LH-134510-harness-shell-parameters

Conversation

@huides00

@huides00 huides00 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

https://cisco-sbg.atlassian.net/browse/LH-134510

Description

Further Claude Sonnet 5.5 harness runs failed samples where the model behaved correctly. Playbook paths built from the shell's process ID, or read back from a file through command substitution, were compared as literal text against the paths the shell actually produced, so routine playbook commands were reported as escaping the test environment. The harness now recognises these shell expansions when it matches commands, including substitutions that expand to several words or to none, while every literal argument and the tool itself must still match.

The invalid-profile scenario also accepts replies that tell the user to set up the profile again. Replaying the recorded results of the last four runs no longer reports any of their failures. The Ansible changelog records these fixes for the 0.43.3 patch release.

Another Sonnet 5.5 harness run failed two samples where the model behaved correctly. A playbook
path built with the shell's process ID was compared as the literal text $$ against the path the
command double received, so the syntax check was reported as having escaped the test environment.
Argument matching now treats special parameters such as $$, $? and $1 as expansions. The
invalid-profile scenario also rejected guidance to set up the profile again, so it now accepts
that wording.
The fix commit on this branch makes the next release a patch, and release preparation requires
the target version to be recorded in source. Add the 0.43.3 entry covering the special shell
parameter matching and the invalid-profile wording changes.
The next Sonnet 5.5 harness run passed every valid sample but reported one as having escaped the
test environment. The model read a playbook path back with $(cat path.txt), which the lexer split
at its inner space into two words, and which the shell can expand into any number of words,
including none once the path file is gone. The tokenizer now keeps a command substitution whole,
and a bare expansion matches any run of received words while every literal argument and the tool
must still match. The pending 0.43.3 changelog entry now mentions command substitutions.
@huides00 huides00 changed the title fix(lh-134510): match special shell parameters in harness fix(lh-134510): match shell expansions in harness arguments Oct 20, 2026
@huides00
huides00 merged commit 9878f74 into main Oct 20, 2026
4 checks 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.

2 participants