You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/09/16 09:58:24 UTC
(magpie) branch main updated: fix(skills): drop the invalid --state all from gh search calls (#1248)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/magpie.git
The following commit(s) were added to refs/heads/main by this push:
new 19251ab9 fix(skills): drop the invalid --state all from gh search calls (#1248)
19251ab9 is described below
commit 19251ab9061090efd1c5904f17d553f7f220f24a
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Wed Sep 16 11:58:18 2026 +0200
fix(skills): drop the invalid --state all from gh search calls (#1248)
`gh search issues` and `gh search prs` accept `--state open` or
`--state closed` only. Unlike `gh issue list`, they have no `all`, so
`--state all` fails the whole call:
invalid argument "all" for "--state" flag: valid values are {open|closed}
Two skills documented it in a code block an agent copies verbatim:
- setup-upstream-fix Step 3 (deduplicate against apache/magpie) -- both
the issue and the PR search. With both failing, the step finds no prior
art and every quirk looks novel, which is precisely the duplicate-PR
outcome the step exists to prevent. Hit while running that skill.
- security-issue-triage Step 2.6 (positive-precedent search).
Omitting `--state` searches open and closed alike, which is what both
steps want. Verified against gh: `gh search prs --repo apache/magpie
"purl"` returns an open and a merged PR in one result set.
`gh issue list --state all` elsewhere in the skills is correct and is
left alone -- that command does accept `all`.
The step-3-dedup eval fixtures quoted the same broken command in their
expected reports; updated to match so they keep describing a command
that runs.
Generated-by: Claude Opus 5
---
docs/mode-economics.md | 8 ++++----
plugins/magpie-security/skills/issue-triage/SKILL.md | 4 +++-
plugins/magpie-setup/skills/upstream-fix/SKILL.md | 10 ++++++++--
.../step-3-dedup/fixtures/case-1-none/report.md | 4 ++--
.../step-3-dedup/fixtures/case-2-open-pr/report.md | 2 +-
.../step-3-dedup/fixtures/case-3-merged-fix/report.md | 2 +-
.../step-3-dedup/fixtures/case-4-open-issue/report.md | 4 ++--
7 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/docs/mode-economics.md b/docs/mode-economics.md
index ebc0a0ba..a3a801b9 100644
--- a/docs/mode-economics.md
+++ b/docs/mode-economics.md
@@ -83,7 +83,7 @@ history separately provides its publication revision and date.
<!-- BEGIN GENERATED SKILL TOKEN COUNTS -->
-Measured on (UTC): 2026-09-15.
+Measured on (UTC): 2026-09-16.
Tokenizer: **tiktoken 0.14.0, `cl100k_base`**. Method: full UTF-8 file,
including frontmatter and comments; line endings normalized to LF;
@@ -91,7 +91,7 @@ special-token spellings counted as ordinary text.
Coverage: **75 of 75 local `skills/*/SKILL.md` files**.
External `source.md` redirects and harness symlinks are excluded.
-Measurement manifest SHA-256: `820180ee456ba87ce1a5d51a85bcd35030a83c6379f1d81fa464da273027f9cc`.
+Measurement manifest SHA-256: `1543f373434c0a259282026ebf5a597686fdb83c75a6bf0c0e1833302f04b885`.
| Skill file | Measured tokens | Source SHA-256 (first 16 characters) |
|---|---:|---|
@@ -152,7 +152,7 @@ Measurement manifest SHA-256: `820180ee456ba87ce1a5d51a85bcd35030a83c6379f1d81fa
| [security-issue-import-via-forwarder](../skills/security-issue-import-via-forwarder/SKILL.md) | 8,611 | `d7a8a0422ed7936c` |
| [security-issue-invalidate](../skills/security-issue-invalidate/SKILL.md) | 13,035 | `e4ab6b31ff8facea` |
| [security-issue-sync](../skills/security-issue-sync/SKILL.md) | 10,391 | `1c4b149b2eb701a5` |
-| [security-issue-triage](../skills/security-issue-triage/SKILL.md) | 13,786 | `eb52ab10890607e0` |
+| [security-issue-triage](../skills/security-issue-triage/SKILL.md) | 13,816 | `767d69a96c31c648` |
| [security-model-prepare](../skills/security-model-prepare/SKILL.md) | 4,312 | `ef1d88bf5ba6ced7` |
| [security-model-update](../skills/security-model-update/SKILL.md) | 5,503 | `2e9eace1ff380c52` |
| [security-model-verify](../skills/security-model-verify/SKILL.md) | 6,204 | `858952f16ee6208d` |
@@ -166,7 +166,7 @@ Measurement manifest SHA-256: `820180ee456ba87ce1a5d51a85bcd35030a83c6379f1d81fa
| [setup-privacy-llm](../skills/setup-privacy-llm/SKILL.md) | 2,145 | `0e27b542a1656846` |
| [setup-shared-config-sync](../skills/setup-shared-config-sync/SKILL.md) | 4,357 | `d1dfcd7cdeb5f5a6` |
| [setup-status](../skills/setup-status/SKILL.md) | 2,401 | `790c0a0e61b1e8a4` |
-| [setup-upstream-fix](../skills/setup-upstream-fix/SKILL.md) | 4,607 | `984f3deae625f19f` |
+| [setup-upstream-fix](../skills/setup-upstream-fix/SKILL.md) | 4,690 | `08468be536d6b54b` |
| [skill-reconciler](../skills/skill-reconciler/SKILL.md) | 5,095 | `acf9baf2b289e2cf` |
| [workflow-security-audit](../skills/workflow-security-audit/SKILL.md) | 3,835 | `276cd10be9e308a7` |
| [write-skill](../skills/write-skill/SKILL.md) | 6,173 | `c0b7c47d3c5c44e2` |
diff --git a/plugins/magpie-security/skills/issue-triage/SKILL.md b/plugins/magpie-security/skills/issue-triage/SKILL.md
index dd0147a1..bb54f586 100644
--- a/plugins/magpie-security/skills/issue-triage/SKILL.md
+++ b/plugins/magpie-security/skills/issue-triage/SKILL.md
@@ -665,7 +665,9 @@ with similar shape — via (substitute the literal label from
[`<project-config>/project.md`](../../../../<project-config>/project.md)):
```bash
-gh search issues "<key>" --repo <tracker> --state all \
+# `gh search` has no `--state all` (that is `gh issue list`); omitting
+# the flag searches open and closed alike.
+gh search issues "<key>" --repo <tracker> \
--label "cve allocated" --json number,title,labels --jq '.[]'
```
diff --git a/plugins/magpie-setup/skills/upstream-fix/SKILL.md b/plugins/magpie-setup/skills/upstream-fix/SKILL.md
index b46689ba..2f9a1b00 100644
--- a/plugins/magpie-setup/skills/upstream-fix/SKILL.md
+++ b/plugins/magpie-setup/skills/upstream-fix/SKILL.md
@@ -208,10 +208,16 @@ error string — and run both issue and PR searches, open and
recently-closed:
```bash
-gh search issues --repo apache/magpie --state all "<distinctive token>" --limit 20
-gh search prs --repo apache/magpie --state all "<distinctive token>" --limit 20
+gh search issues --repo apache/magpie "<distinctive token>" --limit 20
+gh search prs --repo apache/magpie "<distinctive token>" --limit 20
```
+`gh search` takes `--state open` or `--state closed` only — unlike
+`gh issue list`, it has no `all`. Passing `--state all` fails the call
+outright (*"invalid argument \"all\" for --state flag"*), so the dedup
+step returns nothing and every quirk looks novel. Omitting `--state`
+searches both, which is what this step wants.
+
Classify the best match and act:
| Match | Meaning | Action |
diff --git a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-1-none/report.md b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-1-none/report.md
index 3bd6775c..f1cb9cb7 100644
--- a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-1-none/report.md
+++ b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-1-none/report.md
@@ -3,6 +3,6 @@
Quirk: a helper in `tools/foo-adapter` mishandles empty input and raises.
Searches run:
-- `gh search issues --repo apache/magpie --state all "foo-adapter empty input"` → 0 results.
-- `gh search prs --repo apache/magpie --state all "foo-adapter empty"` → 0 results.
+- `gh search issues --repo apache/magpie "foo-adapter empty input"` → 0 results.
+- `gh search prs --repo apache/magpie "foo-adapter empty"` → 0 results.
No open or closed issue or PR mentions this defect.
diff --git a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-2-open-pr/report.md b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-2-open-pr/report.md
index 68da0378..f2ed4e7f 100644
--- a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-2-open-pr/report.md
+++ b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-2-open-pr/report.md
@@ -3,7 +3,7 @@
Quirk: `record-publish` reads CNA_private at the wrong nesting.
Searches run:
-- `gh search prs --repo apache/magpie --state all "CNA_private body envelope"` → 1 OPEN PR
+- `gh search prs --repo apache/magpie "CNA_private body envelope"` → 1 OPEN PR
#724 "fix(cve-tool-vulnogram): read/write CNA_private under the read API's body envelope",
which fixes exactly this, still under review.
The open PR matches the quirk one-to-one.
diff --git a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-3-merged-fix/report.md b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-3-merged-fix/report.md
index bf5e574c..10991d5a 100644
--- a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-3-merged-fix/report.md
+++ b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-3-merged-fix/report.md
@@ -3,6 +3,6 @@
Quirk: the config path was left stale after a tool rename.
Searches run:
-- `gh search prs --repo apache/magpie --state all "legacy config path rename"` → 1 MERGED PR
+- `gh search prs --repo apache/magpie "legacy config path rename"` → 1 MERGED PR
#725, merged last week, which added exactly this fallback.
The fix is already on `main`; the local snapshot simply predates it.
diff --git a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-4-open-issue/report.md b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-4-open-issue/report.md
index 6a944291..883f0a79 100644
--- a/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-4-open-issue/report.md
+++ b/tools/skill-evals/evals/setup-upstream-fix/step-3-dedup/fixtures/case-4-open-issue/report.md
@@ -3,7 +3,7 @@
Quirk: a skill's error message is confusing and misroutes the agent.
Searches run:
-- `gh search issues --repo apache/magpie --state all "confusing error message misroute"` → 1 OPEN issue
+- `gh search issues --repo apache/magpie "confusing error message misroute"` → 1 OPEN issue
reporting the same confusing message, with no linked PR and no fix yet.
-- `gh search prs --repo apache/magpie --state all "confusing error message"` → 0 results.
+- `gh search prs --repo apache/magpie "confusing error message"` → 0 results.
An open issue reports it but nobody has fixed it.