feat: discussion-type issue metadata helper (idd-issue Step 3.5)#248
Open
kiki830621 wants to merge 2 commits into
Open
feat: discussion-type issue metadata helper (idd-issue Step 3.5)#248kiki830621 wants to merge 2 commits into
kiki830621 wants to merge 2 commits into
Conversation
Add Step 3.5 (Discussion Metadata Helper) to idd-issue: after an issue is
created and before attachment upload, advisory-surface GitHub right-sidebar
metadata for discussion-type issues (advisor briefing / review-feedback /
awaiting-decision).
Lean-v1 scope (per feedback_lead_minimal — the essence, not the full
7-component v1):
- Detection: --discussion flag is the sole primary trigger; body-heuristic
detection is opt-in behind config discussion_metadata_heuristic (design Q1's
own recommended default) so standard bug/feature issues are never subjected
to the 4-prompt ceremony.
- Four advisory sub-steps, all surface-only (never auto-set outward-facing
metadata; unattended mode prints suggestions only, sets nothing):
(a) assignee from body's tagging-collaborators-verified @login set;
(b) label = config-overridable discussion_label (default `discussion`);
(c) milestone only on a time-bound signal, reusing Step 4.5 machinery;
(d) native GraphQL relationship DEFERRED (- [~], disclosed) — highest
complexity/risk, reuses a not-yet-generalized --blocked-by code path.
Fold in #142's three mandatory label safeguards:
- S1 verify-by-read after `gh label create` (silent-succeed is
indistinguishable from noop-on-exists — read-back is the only reliable
detection).
- S2 pre-add existence check for the --add-label path.
- S3 UI cache-sync hint at the Step 5 report on FRESH create only — names the
confusing "Invalid value ... for label" string + hard-refresh remedy.
TDD: new artifact-level drift-guard fixture
scripts/tests/discussion-metadata/test.sh (13 assertions, RED→GREEN); full
suite 22/22 GREEN. Fixture locks the contract prose (trigger + 4 sub-steps +
3 safeguards + disclosed deferral) against silent deletion; it does not
execute the AskUserQuestion helper (Claude-runtime contract, unrunnable in a
shell harness).
Refs #141
Refs #142
verify round-1(Codex 跨模型盲驗)抓到 #142 Safeguard 2 的控制流 bug: `gh issue edit --add-label` 在 label_exists 的 if 之後無條件執行, 註解寫「只在 verified-exist 後」但控制流沒 gate —— 對不存在的 label 做 --add-label 會 silently auto-create 白色 label,正是 S2 要防的 edge case。 - SKILL.md:把 --add-label gate 進 `if label_exists` 的 then 分支; else 分支導回 auto-create(S1 verify-by-read)或 skip,不落到 blind add - label_exists:改用 `.[].name | grep -qx` 精確比對,不把 name 裸插進 jq 表達式 —— 含引號的 custom label 名也安全(Codex finding 2) - drift-guard fixture:加一個 needle 鎖「不 blind add」gated 分支,把此次 修復轉成 regression guard(bash 不可 shell-run,只能鎖 prose;Codex finding 3) drift-guard: 22 suites / 0 fail(discussion-metadata 14 needles GREEN) Refs #141 Refs #142
Member
Author
🔍 idd-verify — PR #248 (discussion-metadata helper, #141 + #142)Verdict: ✅ PASS(round-1 修復後) Backend(lean tier,比例原則)此 PR 是 prose + 一個 drift-guard fixture、零可執行 runtime code(SKILL.md 內的 bash 是給 Claude runtime 遵循的指令,非測試 harness 執行)。依 #205 token-cost 裁決,全套 opus 5-agent ensemble 對此改動不成比例,故採精簡雙鏡:
保留了 ensemble 最高價值的兩個 lens(cross-model blind verify + adversarial),略過同構冗餘的其餘 3 lens。 Round 1 — Codex 抓到 real defect(已修)
修復 commit: Coordinator adversarial premise-attack
Re-verification
停在 verified — 依 IDD 契約不 auto-merge、不 auto-close。人工 review → merge → |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Step 3.5: Discussion Metadata Helper to
idd-issue— after an issue is created and before attachment upload, advisory-surface GitHub right-sidebar metadata (assignee / label / milestone) for discussion-type issues.Cluster PR: closes out both feature Refs #141 and prevention Refs #142 in one change (both land in
skills/idd-issue/SKILL.md).Lean-v1 scope (per
feedback_lead_minimal)Implements the essence of Refs #141, not the full 7-component v1:
--discussionflag is the sole primary trigger. Body-heuristic detection is opt-in behind configdiscussion_metadata_heuristic(design Q1's own recommended default) — standard bug/feature issues are never subjected to the 4-prompt ceremony.@loginsetdiscussion_label(defaultdiscussion)- [~], disclosed in prose)Why (d) is deferred — not dropped
Highest complexity/risk of the four; it would reuse the v2.52.0+
--blocked-byGraphQL path, which is not yet generalized into a reusable primitive. Design Q4 already keeps the body-text#Nreference regardless, so deferring loses no inline context. Light-up condition (extracting the mutation into a helper) is documented in the prose.Folds in Refs #142 — three mandatory label safeguards
gh label create(silent-succeed is indistinguishable from noop-on-exists — read-back is the only reliable detection)--add-labelpathInvalid value ... for labelstring + hard-refresh remedyTests
scripts/tests/discussion-metadata/test.sh(13 assertions, TDD RED→GREEN)AskUserQuestionhelper — that is a Claude-runtime contract, unrunnable in a shell harness (same artifact-level pattern assession-start-commit-rule).Merge-order note
Only references
rules/tagging-collaborators.md(sub-step (a) reuses its verified-@loginset) — does not modify it, so no file conflict with the #85/#86 tagging-family PRs. Independent of PR #247.Refs #141
Refs #142