Skip to content

idd-issue --blocked-by:改用 addBlockedBy 並原樣印出 GitHub 錯誤 (#353) - #358

Open
kiki830621 wants to merge 5 commits into
mainfrom
idd/353-graphql-blocked-by
Open

kiki830621 wants to merge 5 commits into
mainfrom
idd/353-graphql-blocked-by

Conversation

@kiki830621

@kiki830621 kiki830621 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Refs #353

Summary

idd-issue --blocked-by 的 Layer 1(GitHub 原生依賴)自 2.52.0 起呼叫 addBlockedByDependency(blockedByIssueId),這個名稱不在 GitHub 現行 schema 裡;正確的是 addBlockedBy(issueId, blockingIssueId)。錯誤被 2>/dev/null 吞掉、警告寫死三個猜測原因,據此判斷原生依賴應從未建立過。

  • Layer 1 改用 addBlockedBy,捕捉 GraphQL 輸出,失敗時原樣印出,不再猜原因
  • 依賴已存在:只比對整句 Target issue has already been taken(2026-10-02 實測),視為成功,並把那一句印出來當依據;其他 has already been taken 照常警告
  • Layer 1 的訊息全走 stderr(bundle-mode 用 CHILD_NUM=$(…) 擷取 stdout);node ID 用 -f 傳
  • 更正規格 openspec/specs/idd-issue-bundle/spec.md、references/bundle-flags.md、docs/commands.md
  • 新測試套件 blocked-by-mutation:用假的 gh 實際執行 SKILL.md 的 Layer 1 片段(四種回應、兩個目標),檢查送出的 request 與 stdout 是否乾淨,每項檢查都有陽性對照;IDD_LIVE_GH=1 時另做真 schema introspection
  • 新 workflow .github/workflows/live-schema.yml:每週一 09:00(臺北時間)與手動觸發時跑 live 檢查
  • 版本 3.0.1

Checklist

After merge

Related


Generated by /idd-implement on PR path. Do NOT add a GitHub close trailer — IDD discipline requires manual /idd-close after merge to enforce checklist gate + closing summary.

#353)

Layer 1 called addBlockedByDependency(blockedByIssueId), which is not in
GitHub's schema; the real mutation is addBlockedBy(issueId, blockingIssueId).
The error was sent to /dev/null and the warning guessed three causes, none
of them real, so no native dependency was ever created.

- capture the GraphQL output and print it verbatim on failure
- treat 'has already been taken' as success (re-runs; verified 2026-10-02)
- correct the normative spec, bundle-flags reference and docs
- new suite blocked-by-mutation runs the Layer 1 snippet against a stub gh,
  with positive controls; IDD_LIVE_GH=1 also introspects the real schema
- Layer 1 messages go to stderr (bundle mode captures stdout into CHILD_NUM)
- node IDs bound with -f instead of -F (no @file reads)
- only the exact "Target issue has already been taken" counts as already linked
- inference wording for "never created" claims
- test: runs the snippet in four stub modes, checks the outgoing request,
  stdout silence, NUL-safe file listing, extraction bounds; a positive
  control for every check
- weekly live-schema workflow (IDD_LIVE_GH=1), Mondays 09:00 Taipei
- spec example table and already-exists scenario corrected

Refs #353
- bundle-flags.md Layer 1 example captures output into GQL_OUT and points
  to SKILL.md for the branches; the suite checks the example's shape
- already-exists branch prints GitHub's sentence as evidence
- failure warning no longer claims Layer 2 succeeded
- stderr rationale scoped to Layer 1; rest of the handler tracked in #359
- Idempotency Contract row matches the measured GitHub behaviour
- test: two-target continuation with a break control, evidence control,
  reference-shape control; signals exit instead of continuing
- CHANGELOG / workflow comment use inference wording; 60-day schedule
  note, manual first run, backfill note; checkout without credentials

Refs #353
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.

1 participant