test: /idd-edit SKILL-helper integration contract layer — static check (shape c)#270
Merged
Merged
Conversation
…c) static check The 23 idd-edit fixtures all invoke the helper directly, so 'SKILL references a variable the helper never emits' bugs shipped with green tests three times (R1 B1 APPEND_BODY, R1 B2 GITHUB_REPO, independently flagged by 3 reviewers). New suite idd-edit-contract embeds a python3 checker: EMITTED derives mechanically from the helper source (emit_assignment calls + TARGETS array — single source, no third variable list), CONSUMED/DEFINED parse the SKILL's fenced bash blocks, and the invariant CONSUMED - DEFINED - EMITTED - ALLOWLIST = empty catches the unsourced-reference class. Allowlist is env only (CLAUDE_PLUGIN_ROOT, IDD_CALLER per the #161 cross-skill contract, ...; GITHUB_REPO deliberately excluded — that WAS bug B2). Checker efficacy is self-tested against a seeded three-violation fixture (detection failing = suite fails), and the 11-name emit surface is frozen (deleting an emit goes red here before it breaks consumers). First live run caught IDD_CALLER and forced its provenance classification — working as intended. SKILL gains a Contract section documenting mechanism + scan boundary (H7 structural class stays with fixture 14). Shape (a) escalation stays trigger-based per the approved plan. GREEN 17/0; sweep 39 suites 0 fail. Refs #163
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.
Refs #163
/idd-edit SKILL↔helper contract 層 — 形狀 (c) 靜態檢查(Plan 已核准)
機制
新 suite
idd-edit-contract(內嵌 python3 checker):emit_assignment×10 +TARGETSarray)— helper 即 source of truth,無第三份清單CONSUMED − DEFINED − EMITTED − ALLOWLIST = ∅— 精準封殺 R1 B1($APPEND_BODY)/ B2($GITHUB_REPO)的「fixtures 全綠、production 壞掉」class;allowlist 僅環境變數(GITHUB_REPO刻意排除 — 那正是 B2)IDD_CALLER並逼出其出處歸類([docs] IDD_CALLER env var registry — codify allowed values + semantics (sister from #154) #161 跨 skill env 契約 → allowlist 附理由)— 機制當場運作邊界(照 plan)
只掃 fenced bash(heredoc 在內);H7 loop 結構 class 留給既有 fixture 14;形狀 (a) orchestrate.sh 抽取為觸發式升級(trigger 記錄見 issue comment)。
Verification
suite 17/17;全 sweep 39 suites 0 fail。issue 結案不由本 PR 觸發。