Skip to content

test(harness-ops): pin the parser reader's read of an exported TaskStop alias array - #12317

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6888-41396914728-1
Nov 2, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-6888-41396914728-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6888

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Failing hop: none. For the multi-module TaskStop fixture, no hop of the parser's flow check fails. _parsed_written_elsewhere finds one write (the initializer) and one escape mutation (the export{Ud,bjn} specifier). It then calls _flow_holds. In the exporter, Flow.value turns the specifier into an \["export","bjn"\] exit. Every hop after that holds: keys_used (no module reads .bjn), _imports_of (the two importers), _namespace_holds (no module loads /a.js whole), and both importer flows, each a spread into an array literal, which trusts only iterator and next. Last, _sink_hit finds no module that can write either name. The unrelated function bjn(e){} sits in its own module, and the importers' binding never reaches it, so it is no write. So the parser reader already counts an exported array that its importers only spread as unmodified. That matches the existing pinned assert_across_modules(False, self.SPREAD, ...) cases. No production code changes. On a real bundle the same flow can still fail at its last step, _sink_hit. Any module the sink rule counts against every trusted name (a direct eval, code built from a string) fails every spread. TestInstalledBuilds documents such modules on 2.1.284 to 2.1.288, and the extraction reference names the same cause for Explore's and Plan's partial lists. That is my reading of why 2.1.302 still differs; I did not check it against the 2.1.302 binary. The change makes TestToolAliasesAcrossModules assert aliases == \["KillShell","KillBash"\] and aliases_source == "literal" under the parser reader, with the partial branch removed. A new test pins that a truly unresolvable spread still reads aliases: \[\], aliases_source: partial. The two cases are an importer that calls bjn.push(...) and a module with a direct eval. A bump: none harness-ops fragment records the test-only change.

Not verified

  • The inventory test files (scripts/run-test-file.sh on test_reader_findings.py, test_inventory.py and test_inventory_under_parser.py) did not run here: this lane has no node, acorn or eslint-scope, and allows no test runner. They are left to the PR's CI, including the parser-reader run with INVENTO
  • This run did not run the real Claude Code 2.1.296/2.1.302 binary through --reader compare, so it does not confirm that the bundle-wide sink rule is what fails TaskStop there. On a real bundle, TaskStop aliases will likely keep reading partial under the parser (compare reports this as an informatio
  • Finding, not changed: plugins/harness-ops/skills/inventory/reference/extraction.md:609-610 states 'the sink rule does not watch Symbol.iterator or the array iterator's next for a spread'. Yet parser_helper.cjs Flow.value trusts iterator and next for every spread, and existing tests pin a yallist S
  • The ai-slop detector (detect.sh) and the write-for-humans pass did not run in tidy: the lane allows only its named wrappers in Bash. The one-line fragment was read against the rubric by hand, with no findings.
  • No review-venue.txt existed, so the review ran locally in one fresh-context subagent.
  • git status lists untracked files at the repository root that this run did not create (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc). They look like sandbox artifacts and should not ship in the patch.

Fix

  • plugins/harness-ops/skills/inventory/scripts/test_reader_findings.py: TestToolAliasesAcrossModules now asserts the literal names under the parser reader (no partial branch). Adds test_a_spread_the_parser_cannot_clear_stays_partial (a mutating importer and a direct-eval module each give aliases []
  • .changes/harness-ops/work-resolve-issue-issue-6888-41396914728-1-bdcee39f.md: new bump: none fragment with a one-line reason (test-only change).

Verification

The runner ran each check from the base copy against 8cba5bd:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //github.com/melodic-software/claude-code-plugins/pull /8223: #8223 made no parser-reader change and did not confirm the failing hop. Its parser test accepted either literal or partial, and it was skipped there (no parser packages).
  • read https: //github.com/melodic-software/claude-code-plugins/pull /10625: --reader compare on 2.1.296 still differs on TaskStop aliases and Explore/Plan disallowed_tools. It names no failing hop and lands no reader fix.
  • static trace of inventory.py (_spread_array, _parsed_candidates, _parsed_written_elsewhere, _flow_holds, _namespace_holds, _named_loaders, _sink_hit), parser_reader.py and js/parser_helper.cjs (writes, flow, keys_used, loads, imports, sinks) over the fixture: every hop holds, so the parser reads the
  • fresh-context review subagent: re-traced the same path on its own and expects all three parser assertions to pass in CI. Its two minor findings (one 90-character line, loose docstring wording) are fixed.
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: all 5 fragments valid
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changed-skills: inventory PASS, 0 errors, 2 existing size warnings
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: 12 passed, 6 skipped (none failed)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41396914728

Left out: the items under Not verified.

Related

#6888

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 8cba5bdbb33743917ef404f321294def1fb4effd: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12317

I found no security issues in this pull request.

I read the whole diff for both changed files:

  • plugins/harness-ops/skills/inventory/scripts/test_reader_findings.py is a test-only change. It adds a _parsed helper and lets _bundle take extra modules. The parser test for TaskStop across modules now asserts aliases == ["KillShell","KillBash"] with aliases_source == "literal". A new test checks that an importer calling bjn.push(...), or a module with a direct eval, still reads as partial. The JS strings in these tests, the eval("") text included, are fixtures handed to the inventory's static parser and regex readers. Nothing in the diff runs them. All the data is hard-coded, so no untrusted input reaches the change, and it touches no credentials, tokens, workflows or trust controls.
  • .changes/harness-ops/work-resolve-issue-issue-6888-41396914728-1-bdcee39f.md is a bump: none changelog fragment with a one-line description. No behavior changes.

Neither file matches a trusted-path glob. The diff changes no plugin manifest and deletes or softens no standing instruction, so it was eligible for skip 2. I still read both changes in full before using it.

The PR context file holds no embedded instructions aimed at this lane.

Prior findings: none (0 rounds, not past the cap).

critical-findings: 0

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 8cba5bdbb33743917ef404f321294def1fb4effd: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12317 (test-only, harness-ops inventory)

I found nothing to block or flag. I read every hunk of both changed files: the test change in test_reader_findings.py and the new .changes/harness-ops/... fragment. Neither file is on a trusted path.

What I checked

  • The new parser test (test_the_parser_reader_follows_the_export_into_its_spreads) asserts the literal names and aliases_source == "literal", and the partial branch is gone. This agrees with the assert_across_modules(False, self.SPREAD, ...) cases already pinned, where an exported array that importers only spread holds as unmodified.
  • test_a_spread_the_parser_cannot_clear_stays_partial expects aliases == [] and partial. That is right for a fixture whose only element is the spread: _tool_aliases returns only the elements that resolved, with partial when not all of them did (inventory.py:4216-4236). The two cases fit existing pins:
    • The mutating importer bjn.push(...) matches the case at test_reader_findings.py:433.
    • The module with a direct eval matches the cases at :830 and :1287, and the pinned ([], "partial") at :1502-1507.
  • Module paths come from _chunk_starts order, which makes the exporter /a.js. That matches the importers' from"/a.js".
  • The class docstring's reference to TestInstalledBuilds (2.1.284 to 2.1.288 eval/Function modules) exists at :1598-1611.
  • The fragment uses bump: none, which fits a change with no shipped behavior. The diff touches no manifest.

Closing issue #6888, judged against the owner's latest "Done when" list

  • PR body names the failing hop: met. The body says no hop fails for this fixture and traces each step, through to _sink_hit.
  • An exported array that importers only spread counts as unmodified, and a same-named function in an unrelated module is not a write: met by the pinned test. The fixture includes both the new Set([...]) spread and function bjn(e){}, so the literal assertion would fail if either regressed.
  • TestToolAliasesAcrossModules asserts literal names with the partial branch removed: met in code.
  • A truly unresolvable spread still yields partial: met by the new subtests.
  • All-literal tools keep byte-identical output, and a fragment is added: met. No production code changed, and the fragment is present.
  • Passes in CI's parser-reader run, and scripts/run-test-file.sh passes: unverified. The author says the lane had no node, acorn or eslint-scope and could not run these. I ran nothing either, so this rests on the PR's CI.

For the owner (not counted as a finding)

  • This PR closes harness-ops/inventory: regex and parser readers disagree on Claude Code 2.1.296 #6888, but its own body says the real 2.1.296/2.1.302 --reader compare divergence at /builtin_tools/TaskStop/aliases will probably remain. The likely cause is a bundle-wide sink module (a direct eval or code built from a string) failing _sink_hit, and that was not checked against the binary. The owner's narrowed criteria don't require the real-binary result, so this is not a blocker. It does mean the next changelog apply could file the drift key native-drift:reader-divergence:inventory:2.1.296 again.
  • The PR body's "Not verified" section names a possible doc mismatch at plugins/harness-ops/skills/inventory/reference/extraction.md:609-610. That file is not in this diff.

No embedded instructions were found in the PR context, and there were no prior findings or settled threads to apply. No paved-path or path-scoped rule criteria came into play.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 8cba5bdbb33743917ef404f321294def1fb4effd.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 37fc8df Nov 2, 2026
44 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-6888-41396914728-1 branch November 2, 2026 07:27
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 37fc8df659dc442169ca81a140e0d3cdd27f41f4; later checks count it verified from this comment.

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.

harness-ops/inventory: regex and parser readers disagree on Claude Code 2.1.296

0 participants