From 0e093a92f0566f82a1f39f291e463286160ed963 Mon Sep 17 00:00:00 2001 From: rebuildup Date: Mon, 23 Nov 2026 21:14:02 +0900 Subject: [PATCH 1/2] 54: standardize release scope admission gate and discovery separation --- evals/release-batching/controls.mts | 3 ++ .../negative-unconfirmed-critical-path.json | 41 +++++++++++++++++++ .../positive-discovery-separated.json | 40 ++++++++++++++++++ evals/release-batching/grade.mts | 39 ++++++++++++++++++ .../references/adaptive-release-batching.md | 14 +++++++ 5 files changed, 137 insertions(+) create mode 100644 evals/release-batching/fixtures/negative-unconfirmed-critical-path.json create mode 100644 evals/release-batching/fixtures/positive-discovery-separated.json diff --git a/evals/release-batching/controls.mts b/evals/release-batching/controls.mts index e948d26..91c5624 100644 --- a/evals/release-batching/controls.mts +++ b/evals/release-batching/controls.mts @@ -13,12 +13,14 @@ const cases: ReadonlyArray = [ ['positive-frozen-candidate', 'PASS'], ['positive-authorized-release', 'PASS'], ['positive-blocked-unknown', 'PASS'], + ['positive-discovery-separated', 'PASS'], ['negative-weekly-auto-merge', 'FAIL'], ['negative-counts-only', 'FAIL'], ['negative-mutable-ref', 'FAIL'], ['negative-stale-validation', 'FAIL'], ['negative-freeze-ticket-landing', 'FAIL'], ['negative-unadmitted-candidate', 'FAIL'], + ['negative-unconfirmed-critical-path', 'FAIL'], ['negative-unapproved-release', 'FAIL'], ]; @@ -45,6 +47,7 @@ const required: ReadonlyArray = [ ['skills/github-delivery/SKILL.md', '## Weekly planning / adaptive release batching'], ['skills/github-delivery/SKILL.md', 'references/adaptive-release-batching.md'], ['skills/github-delivery/references/adaptive-release-batching.md', 'hold | candidate | blocked'], + ['skills/github-delivery/references/adaptive-release-batching.md', '## 1.5 Release scope admission gate'], ['skills/linear-release-control/SKILL.md', 'release cadenceは可変'], ['docs/adr/ADR-0032.md', 'user authorization'], ]; diff --git a/evals/release-batching/fixtures/negative-unconfirmed-critical-path.json b/evals/release-batching/fixtures/negative-unconfirmed-critical-path.json new file mode 100644 index 0000000..e0178b8 --- /dev/null +++ b/evals/release-batching/fixtures/negative-unconfirmed-critical-path.json @@ -0,0 +1,41 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "calendar target forced unconfirmed #203 and unreproduced bug #204 into critical path", + "value": "target date reached", + "waiting": "7 days", + "change_risk": "unknown", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": true, + "admission_items": [ + { + "id": "#203", + "track": "critical-path", + "requirement_determined": false, + "bug_reproduced_or_pinpointed": true, + "acceptance_executable": false, + "dependency_owner_identified": true, + "validation_path_defined": true + }, + { + "id": "#204", + "track": "critical-path", + "requirement_determined": true, + "bug_reproduced_or_pinpointed": false, + "acceptance_executable": true, + "dependency_owner_identified": false, + "validation_path_defined": false + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/positive-discovery-separated.json b/evals/release-batching/fixtures/positive-discovery-separated.json new file mode 100644 index 0000000..694d6d1 --- /dev/null +++ b/evals/release-batching/fixtures/positive-discovery-separated.json @@ -0,0 +1,40 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "admitted feature #201 while #202 stays in discovery", + "value": "admitted feature ready for users", + "waiting": "5 days", + "change_risk": "localized API addition", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "admission_items": [ + { + "id": "#201", + "track": "critical-path", + "requirement_determined": true, + "bug_reproduced_or_pinpointed": true, + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + }, + { + "id": "#202", + "track": "research-discovery", + "requirement_determined": false, + "bug_reproduced_or_pinpointed": false, + "acceptance_executable": false, + "dependency_owner_identified": true, + "validation_path_defined": false + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/grade.mts b/evals/release-batching/grade.mts index 19129c8..c48e164 100644 --- a/evals/release-batching/grade.mts +++ b/evals/release-batching/grade.mts @@ -8,6 +8,13 @@ const STAGES = new Set(['collecting', 'frozen', 'verified']); const NO_EVIDENCE = new Set(['', 'unknown', 'n/a', 'na', 'none', 'not measured', 'unavailable', '?']); const SHA = /^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/; const ONLY_COUNTS = /^\d+\s+(?:files?|prs?|commits?|changes?)(?:\s+changed)?(?:\s*(?:,|;|and|&)\s*\d+\s+(?:files?|prs?|commits?|changes?)(?:\s+changed)?)*$/; +const ADMISSION_CRITERIA = [ + 'requirement_determined', + 'bug_reproduced_or_pinpointed', + 'acceptance_executable', + 'dependency_owner_identified', + 'validation_path_defined', +] as const; function isRecord(value: unknown): value is Record { return value !== null && typeof value === 'object' && !Array.isArray(value); @@ -64,6 +71,38 @@ export function check(data: unknown): string[] { if (typeof value !== 'boolean') failures.push(name + ' must be a boolean'); } + if (Object.hasOwn(data, 'promoted_by_calendar_only') && data.promoted_by_calendar_only === true) { + failures.push('calendar target alone cannot admit unknowns to release critical path'); + } + + if (Object.hasOwn(data, 'admission_items')) { + const items = data.admission_items; + if (!Array.isArray(items)) { + failures.push('admission_items must be an array'); + } else { + for (const [idx, raw] of items.entries()) { + if (!isRecord(raw)) { + failures.push('admission_items[' + idx + '] must be an object'); + continue; + } + const id = typeof raw.id === 'string' && raw.id.trim() ? raw.id : '#' + idx; + const track = raw.track; + if (track !== 'critical-path' && track !== 'research-discovery') { + failures.push('admission item ' + id + ' has invalid track'); + continue; + } + // Research/discovery items may run with open unknowns; critical-path items must pass all 5 admission criteria. + if (track === 'critical-path') { + for (const key of ADMISSION_CRITERIA) { + if (raw[key] !== true) { + failures.push('critical-path item ' + id + ' failed admission criterion: ' + key); + } + } + } + } + } + } + if (outcome === 'hold' && stage !== 'collecting') { failures.push('hold cannot freeze/verify a candidate'); } diff --git a/skills/github-delivery/references/adaptive-release-batching.md b/skills/github-delivery/references/adaptive-release-batching.md index 28dabbd..5ad59e1 100644 --- a/skills/github-delivery/references/adaptive-release-batching.md +++ b/skills/github-delivery/references/adaptive-release-batching.md @@ -18,6 +18,20 @@ PR数・変更ファイル数は変更量の一部であり、それだけでrelease eligibility、安全性、費用を決定しない。quality gateを削って費用を最適化しない。`quality-gate` がCI resource evidenceを、`agent-delivery-estimation` が日程/待ち時間の根拠を提供する。 +## 1.5 Release scope admission gate(#54) + +**release scope admission**(critical path へ載せてよいか)と **release terminal gate**(freeze 済み候補を公開してよいか)は別の責務である。calendar target や期限の設定だけで未確定項目を release critical path へ昇格させない。 + +release critical path へ組み込む項目は、最低限次を満たすこと: + +- **requirement**: 実装判断可能な程度に要求が確定している +- **reproduction / targeting**: bug は再現済み、または独立した証拠により修正対象が特定できる(非 bug 項目は非該当) +- **acceptance**: acceptance criteria が実行可能である +- **ownership**: dependency / blocker owner が特定されている +- **validation**: validation path が定義されている + +いずれかを満たさない項目は **research / discovery / backlog** として実行自体は妨げずに分離し、`agent-delivery-estimation` の **Structural unknown**(未解消のまま critical path へ混ぜると Work Graph 不安定・`forecast_status: unavailable`)として扱う。明示的な判断なしに release critical path や release candidate へ昇格しない。 + ## 2. Outcomeは3種類 | Outcome | 意味 | From f6aace1ede5b0cedd33385f0639a8571e93cb377 Mon Sep 17 00:00:00 2001 From: rebuildup Date: Mon, 23 Nov 2026 21:56:00 +0900 Subject: [PATCH 2/2] 54: de-confound admission fixtures, fix non-bug criteria, and harden track schema --- evals/release-batching/controls.mts | 173 +++++++++++++++--- .../negative-bug-not-applicable-evasion.json | 34 ++++ .../negative-calendar-only-promotion.json | 34 ++++ .../negative-invalid-admission-schema.json | 34 ++++ .../negative-unconfirmed-requirement.json | 34 ++++ ...th.json => negative-unreproduced-bug.json} | 27 +-- .../negative-zero-critical-path-items.json | 43 +++++ .../positive-discovery-separated.json | 37 +++- evals/release-batching/grade.mts | 59 +++++- skills/agent-delivery-estimation/SKILL.md | 2 +- .../references/adaptive-release-batching.md | 16 +- 11 files changed, 428 insertions(+), 65 deletions(-) create mode 100644 evals/release-batching/fixtures/negative-bug-not-applicable-evasion.json create mode 100644 evals/release-batching/fixtures/negative-calendar-only-promotion.json create mode 100644 evals/release-batching/fixtures/negative-invalid-admission-schema.json create mode 100644 evals/release-batching/fixtures/negative-unconfirmed-requirement.json rename evals/release-batching/fixtures/{negative-unconfirmed-critical-path.json => negative-unreproduced-bug.json} (55%) create mode 100644 evals/release-batching/fixtures/negative-zero-critical-path-items.json diff --git a/evals/release-batching/controls.mts b/evals/release-batching/controls.mts index 91c5624..e424b76 100644 --- a/evals/release-batching/controls.mts +++ b/evals/release-batching/controls.mts @@ -1,41 +1,159 @@ #!/usr/bin/env -S bun import { spawnSync } from 'node:child_process'; import { readFileSync } from 'node:fs'; -import { dirname, join, resolve } from 'node:path'; +import { join, resolve } from 'node:path'; + +interface BatchingControlCase { + readonly label: string; + readonly expected: 'PASS' | 'FAIL'; + readonly expectedViolations?: readonly string[]; +} const root = resolve(import.meta.dirname, '../..'); const fixtureDir = join(root, 'evals/release-batching/fixtures'); const grader = join(import.meta.dirname, 'grade.mts'); let failed = false; -const cases: ReadonlyArray = [ - ['positive-weekly-hold', 'PASS'], - ['positive-frozen-candidate', 'PASS'], - ['positive-authorized-release', 'PASS'], - ['positive-blocked-unknown', 'PASS'], - ['positive-discovery-separated', 'PASS'], - ['negative-weekly-auto-merge', 'FAIL'], - ['negative-counts-only', 'FAIL'], - ['negative-mutable-ref', 'FAIL'], - ['negative-stale-validation', 'FAIL'], - ['negative-freeze-ticket-landing', 'FAIL'], - ['negative-unadmitted-candidate', 'FAIL'], - ['negative-unconfirmed-critical-path', 'FAIL'], - ['negative-unapproved-release', 'FAIL'], +const cases: readonly BatchingControlCase[] = [ + { label: 'positive-weekly-hold', expected: 'PASS' }, + { label: 'positive-frozen-candidate', expected: 'PASS' }, + { label: 'positive-authorized-release', expected: 'PASS' }, + { label: 'positive-blocked-unknown', expected: 'PASS' }, + { label: 'positive-discovery-separated', expected: 'PASS' }, + { + label: 'negative-weekly-auto-merge', + expected: 'FAIL', + expectedViolations: [ + 'VIOL release merge requires a verified candidate', + 'VIOL release merge requires explicit authorization for current candidate SHA', + ], + }, + { + label: 'negative-counts-only', + expected: 'FAIL', + expectedViolations: ['VIOL candidate requires substantive non-count evidence'], + }, + { + label: 'negative-mutable-ref', + expected: 'FAIL', + expectedViolations: ['VIOL freeze requires an immutable candidate SHA'], + }, + { + label: 'negative-stale-validation', + expected: 'FAIL', + expectedViolations: ['VIOL verified requires a passed gate for current candidate SHA'], + }, + { + label: 'negative-freeze-ticket-landing', + expected: 'FAIL', + expectedViolations: ['VIOL candidate freeze forbids unrelated ticket landing'], + }, + { + label: 'negative-unadmitted-candidate', + expected: 'FAIL', + expectedViolations: [ + 'VIOL candidate requires admitted scope', + 'VIOL candidate scope must be selected', + ], + }, + { + label: 'negative-unconfirmed-requirement', + expected: 'FAIL', + expectedViolations: [ + 'VIOL critical-path item #203 failed admission criterion: requirement_confirmed', + ], + }, + { + label: 'negative-unreproduced-bug', + expected: 'FAIL', + expectedViolations: [ + 'VIOL critical-path item #204 failed admission criterion: bug_reproduced_or_pinpointed', + ], + }, + { + label: 'negative-bug-not-applicable-evasion', + expected: 'FAIL', + expectedViolations: [ + 'VIOL critical-path bug item #207 cannot use not-applicable for bug_reproduced_or_pinpointed', + ], + }, + { + label: 'negative-calendar-only-promotion', + expected: 'FAIL', + expectedViolations: [ + 'VIOL calendar target alone cannot admit critical-path item #208', + ], + }, + { + label: 'negative-zero-critical-path-items', + expected: 'FAIL', + expectedViolations: [ + 'VIOL candidate with admission_items requires at least one critical-path item', + ], + }, + { + label: 'negative-invalid-admission-schema', + expected: 'FAIL', + expectedViolations: [ + 'VIOL promoted_by_calendar_only must be a boolean', + 'VIOL admission_items[0] requires a non-empty id', + 'VIOL admission item #0 promoted_by_calendar_only must be a boolean', + ], + }, + { + label: 'negative-unapproved-release', + expected: 'FAIL', + expectedViolations: [ + 'VIOL release merge requires explicit authorization for current candidate SHA', + ], + }, ]; -for (const [label, expected] of cases) { - const result = spawnSync(process.execPath, [grader, join(fixtureDir, label + '.json')], { encoding: 'utf8' }); +for (const testCase of cases) { + const result = spawnSync( + process.execPath, + [grader, join(fixtureDir, testCase.label + '.json')], + { encoding: 'utf8' }, + ); const output = (result.stdout || '') + (result.stderr || ''); - const verdict = output.trimEnd().split('\n').at(-1) ?? ''; - const valid = expected === 'PASS' - ? result.status === 0 && verdict === 'EVAL PASS' - : result.status !== 0 && verdict === 'EVAL FAIL' && /^VIOL /m.test(output); + const lines = output.trimEnd().split('\n'); + const verdict = lines.at(-1) ?? ''; + const violLines = lines.filter((line) => line.startsWith('VIOL ')); + + let valid = false; + let mismatchDetail = ''; + if (testCase.expected === 'PASS') { + valid = result.status === 0 && verdict === 'EVAL PASS' && violLines.length === 0; + } else { + const expectedViolations = testCase.expectedViolations ?? []; + const exactMatch = + violLines.length === expectedViolations.length && + expectedViolations.every((expectedLine) => violLines.includes(expectedLine)); + valid = result.status !== 0 && verdict === 'EVAL FAIL' && exactMatch; + if (!exactMatch) { + mismatchDetail = + 'expected VIOLs: ' + + JSON.stringify(expectedViolations) + + '; actual VIOLs: ' + + JSON.stringify(violLines); + } + } + if (valid) { - console.log(' ok ' + label.padEnd(34) + ' -> ' + verdict); + console.log(' ok ' + testCase.label.padEnd(36) + ' -> ' + verdict); } else { - console.error(' FAIL ' + label.padEnd(34) + ' -> ' + verdict + - ' (exit ' + String(result.status) + '; expected ' + expected + ')'); + console.error( + ' FAIL ' + + testCase.label.padEnd(36) + + ' -> ' + + verdict + + ' (exit ' + + String(result.status) + + '; expected ' + + testCase.expected + + ')', + ); + if (mismatchDetail) console.error(' ' + mismatchDetail); console.error(output); failed = true; } @@ -48,6 +166,13 @@ const required: ReadonlyArray = [ ['skills/github-delivery/SKILL.md', 'references/adaptive-release-batching.md'], ['skills/github-delivery/references/adaptive-release-batching.md', 'hold | candidate | blocked'], ['skills/github-delivery/references/adaptive-release-batching.md', '## 1.5 Release scope admission gate'], + ['skills/github-delivery/references/adaptive-release-batching.md', '`critical-path` / `research-discovery` / `backlog`'], + ['skills/github-delivery/references/adaptive-release-batching.md', '`requirement_confirmed`'], + ['skills/github-delivery/references/adaptive-release-batching.md', '`bug_reproduced_or_pinpointed`'], + ['skills/agent-delivery-estimation/SKILL.md', 'release scope admission gate'], + ['skills/agent-delivery-estimation/SKILL.md', '`critical-path`'], + ['skills/agent-delivery-estimation/SKILL.md', '`research-discovery`'], + ['skills/agent-delivery-estimation/SKILL.md', '`backlog`'], ['skills/linear-release-control/SKILL.md', 'release cadenceは可変'], ['docs/adr/ADR-0032.md', 'user authorization'], ]; diff --git a/evals/release-batching/fixtures/negative-bug-not-applicable-evasion.json b/evals/release-batching/fixtures/negative-bug-not-applicable-evasion.json new file mode 100644 index 0000000..1302354 --- /dev/null +++ b/evals/release-batching/fixtures/negative-bug-not-applicable-evasion.json @@ -0,0 +1,34 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "bug #207 attempts to bypass reproduction check via not-applicable", + "value": "bugfix for intermittent timeout", + "waiting": "3 days", + "change_risk": "low: single endpoint retry handler", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": false, + "admission_items": [ + { + "id": "#207", + "item_type": "bug", + "track": "critical-path", + "promoted_by_calendar_only": false, + "requirement_confirmed": true, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/negative-calendar-only-promotion.json b/evals/release-batching/fixtures/negative-calendar-only-promotion.json new file mode 100644 index 0000000..5d683a6 --- /dev/null +++ b/evals/release-batching/fixtures/negative-calendar-only-promotion.json @@ -0,0 +1,34 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "feature #208 promoted to critical path solely because target date arrived", + "value": "scheduled quarterly milestone item", + "waiting": "7 days", + "change_risk": "low: additive CLI option", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": false, + "admission_items": [ + { + "id": "#208", + "item_type": "feature", + "track": "critical-path", + "promoted_by_calendar_only": true, + "requirement_confirmed": true, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/negative-invalid-admission-schema.json b/evals/release-batching/fixtures/negative-invalid-admission-schema.json new file mode 100644 index 0000000..8732f02 --- /dev/null +++ b/evals/release-batching/fixtures/negative-invalid-admission-schema.json @@ -0,0 +1,34 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "invalid admission item schema with whitespace id and non-boolean promoted_by_calendar_only", + "value": "admitted feature ready for users", + "waiting": "4 days", + "change_risk": "low: localized change", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": "false", + "admission_items": [ + { + "id": " ", + "item_type": "feature", + "track": "critical-path", + "promoted_by_calendar_only": "no", + "requirement_confirmed": true, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/negative-unconfirmed-requirement.json b/evals/release-batching/fixtures/negative-unconfirmed-requirement.json new file mode 100644 index 0000000..9c14d7a --- /dev/null +++ b/evals/release-batching/fixtures/negative-unconfirmed-requirement.json @@ -0,0 +1,34 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "verified", + "basis": { + "scope": "candidate includes unconfirmed feature #203 on critical path", + "value": "user-requested workflow enhancement", + "waiting": "4 days", + "change_risk": "low: isolated UI handler", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": false, + "admission_items": [ + { + "id": "#203", + "item_type": "feature", + "track": "critical-path", + "promoted_by_calendar_only": false, + "requirement_confirmed": false, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "release_gate_passed": true, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/negative-unconfirmed-critical-path.json b/evals/release-batching/fixtures/negative-unreproduced-bug.json similarity index 55% rename from evals/release-batching/fixtures/negative-unconfirmed-critical-path.json rename to evals/release-batching/fixtures/negative-unreproduced-bug.json index e0178b8..c11080f 100644 --- a/evals/release-batching/fixtures/negative-unconfirmed-critical-path.json +++ b/evals/release-batching/fixtures/negative-unreproduced-bug.json @@ -3,32 +3,25 @@ "outcome": "candidate", "stage": "frozen", "basis": { - "scope": "calendar target forced unconfirmed #203 and unreproduced bug #204 into critical path", - "value": "target date reached", - "waiting": "7 days", - "change_risk": "unknown", + "scope": "candidate includes unreproduced bug #204 on critical path", + "value": "stability fix for crash report", + "waiting": "3 days", + "change_risk": "medium: runtime retry path", "release_cost": "measured release-only gate" }, "admission_passed": true, - "promoted_by_calendar_only": true, + "promoted_by_calendar_only": false, "admission_items": [ - { - "id": "#203", - "track": "critical-path", - "requirement_determined": false, - "bug_reproduced_or_pinpointed": true, - "acceptance_executable": false, - "dependency_owner_identified": true, - "validation_path_defined": true - }, { "id": "#204", + "item_type": "bug", "track": "critical-path", - "requirement_determined": true, + "promoted_by_calendar_only": false, + "requirement_confirmed": true, "bug_reproduced_or_pinpointed": false, "acceptance_executable": true, - "dependency_owner_identified": false, - "validation_path_defined": false + "dependency_owner_identified": true, + "validation_path_defined": true } ], "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", diff --git a/evals/release-batching/fixtures/negative-zero-critical-path-items.json b/evals/release-batching/fixtures/negative-zero-critical-path-items.json new file mode 100644 index 0000000..b32761e --- /dev/null +++ b/evals/release-batching/fixtures/negative-zero-critical-path-items.json @@ -0,0 +1,43 @@ +{ + "trigger": "weekly", + "outcome": "candidate", + "stage": "frozen", + "basis": { + "scope": "candidate lists only research-discovery and backlog items with zero critical-path scope", + "value": "exploratory spike progress", + "waiting": "5 days", + "change_risk": "low: docs and exploratory prototype only", + "release_cost": "measured release-only gate" + }, + "admission_passed": true, + "promoted_by_calendar_only": false, + "admission_items": [ + { + "id": "#209", + "item_type": "feature", + "track": "research-discovery", + "requirement_confirmed": false, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": false, + "dependency_owner_identified": true, + "validation_path_defined": false + }, + { + "id": "#210", + "item_type": "chore", + "track": "backlog", + "requirement_confirmed": false, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": false, + "dependency_owner_identified": false, + "validation_path_defined": false + } + ], + "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "validated_sha": null, + "release_gate_passed": false, + "ticket_landing_requested": false, + "release_merge_requested": false, + "release_authorized": false, + "authorized_sha": null +} diff --git a/evals/release-batching/fixtures/positive-discovery-separated.json b/evals/release-batching/fixtures/positive-discovery-separated.json index 694d6d1..e38502c 100644 --- a/evals/release-batching/fixtures/positive-discovery-separated.json +++ b/evals/release-batching/fixtures/positive-discovery-separated.json @@ -3,18 +3,32 @@ "outcome": "candidate", "stage": "frozen", "basis": { - "scope": "admitted feature #201 while #202 stays in discovery", - "value": "admitted feature ready for users", + "scope": "admitted feature #201 and reproduced bug #205 while #202 stays in discovery and #206 stays in backlog", + "value": "admitted feature and bugfix ready for users", "waiting": "5 days", - "change_risk": "localized API addition", + "change_risk": "low: localized API addition and targeted bugfix", "release_cost": "measured release-only gate" }, "admission_passed": true, + "promoted_by_calendar_only": false, "admission_items": [ { "id": "#201", + "item_type": "feature", "track": "critical-path", - "requirement_determined": true, + "promoted_by_calendar_only": false, + "requirement_confirmed": true, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": true, + "dependency_owner_identified": true, + "validation_path_defined": true + }, + { + "id": "#205", + "item_type": "bug", + "track": "critical-path", + "promoted_by_calendar_only": false, + "requirement_confirmed": true, "bug_reproduced_or_pinpointed": true, "acceptance_executable": true, "dependency_owner_identified": true, @@ -22,12 +36,23 @@ }, { "id": "#202", + "item_type": "feature", "track": "research-discovery", - "requirement_determined": false, - "bug_reproduced_or_pinpointed": false, + "requirement_confirmed": false, + "bug_reproduced_or_pinpointed": "not-applicable", "acceptance_executable": false, "dependency_owner_identified": true, "validation_path_defined": false + }, + { + "id": "#206", + "item_type": "chore", + "track": "backlog", + "requirement_confirmed": false, + "bug_reproduced_or_pinpointed": "not-applicable", + "acceptance_executable": false, + "dependency_owner_identified": false, + "validation_path_defined": false } ], "candidate_sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", diff --git a/evals/release-batching/grade.mts b/evals/release-batching/grade.mts index c48e164..8943888 100644 --- a/evals/release-batching/grade.mts +++ b/evals/release-batching/grade.mts @@ -8,9 +8,10 @@ const STAGES = new Set(['collecting', 'frozen', 'verified']); const NO_EVIDENCE = new Set(['', 'unknown', 'n/a', 'na', 'none', 'not measured', 'unavailable', '?']); const SHA = /^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/; const ONLY_COUNTS = /^\d+\s+(?:files?|prs?|commits?|changes?)(?:\s+changed)?(?:\s*(?:,|;|and|&)\s*\d+\s+(?:files?|prs?|commits?|changes?)(?:\s+changed)?)*$/; -const ADMISSION_CRITERIA = [ - 'requirement_determined', - 'bug_reproduced_or_pinpointed', +const ADMISSION_TRACKS = new Set(['critical-path', 'research-discovery', 'backlog']); +const ITEM_TYPES = new Set(['bug', 'feature', 'chore']); +const BOOLEAN_ADMISSION_CRITERIA = [ + 'requirement_confirmed', 'acceptance_executable', 'dependency_owner_identified', 'validation_path_defined', @@ -71,8 +72,12 @@ export function check(data: unknown): string[] { if (typeof value !== 'boolean') failures.push(name + ' must be a boolean'); } - if (Object.hasOwn(data, 'promoted_by_calendar_only') && data.promoted_by_calendar_only === true) { - failures.push('calendar target alone cannot admit unknowns to release critical path'); + if (Object.hasOwn(data, 'promoted_by_calendar_only')) { + if (typeof data.promoted_by_calendar_only !== 'boolean') { + failures.push('promoted_by_calendar_only must be a boolean'); + } else if (data.promoted_by_calendar_only === true) { + failures.push('calendar target alone cannot admit unknowns to release critical path'); + } } if (Object.hasOwn(data, 'admission_items')) { @@ -80,26 +85,62 @@ export function check(data: unknown): string[] { if (!Array.isArray(items)) { failures.push('admission_items must be an array'); } else { + let criticalPathCount = 0; for (const [idx, raw] of items.entries()) { if (!isRecord(raw)) { failures.push('admission_items[' + idx + '] must be an object'); continue; } - const id = typeof raw.id === 'string' && raw.id.trim() ? raw.id : '#' + idx; + const hasValidId = typeof raw.id === 'string' && raw.id.trim().length > 0; + const id = hasValidId ? (raw.id as string).trim() : '#' + idx; + if (!hasValidId) { + failures.push('admission_items[' + idx + '] requires a non-empty id'); + } const track = raw.track; - if (track !== 'critical-path' && track !== 'research-discovery') { + if (typeof track !== 'string' || !ADMISSION_TRACKS.has(track)) { failures.push('admission item ' + id + ' has invalid track'); continue; } - // Research/discovery items may run with open unknowns; critical-path items must pass all 5 admission criteria. + if (Object.hasOwn(raw, 'item_type')) { + if (typeof raw.item_type !== 'string' || !ITEM_TYPES.has(raw.item_type)) { + failures.push('admission item ' + id + ' has invalid item_type'); + } + } + if (Object.hasOwn(raw, 'promoted_by_calendar_only')) { + if (typeof raw.promoted_by_calendar_only !== 'boolean') { + failures.push('admission item ' + id + ' promoted_by_calendar_only must be a boolean'); + } else if (raw.promoted_by_calendar_only === true && track === 'critical-path') { + failures.push('calendar target alone cannot admit critical-path item ' + id); + } + } + // Research/discovery and backlog items may run with open unknowns; + // critical-path items must pass all 5 admission criteria. if (track === 'critical-path') { - for (const key of ADMISSION_CRITERIA) { + criticalPathCount++; + for (const key of BOOLEAN_ADMISSION_CRITERIA) { if (raw[key] !== true) { failures.push('critical-path item ' + id + ' failed admission criterion: ' + key); } } + const itemType = typeof raw.item_type === 'string' ? raw.item_type : undefined; + const bugCriterion = raw.bug_reproduced_or_pinpointed; + if (itemType === 'feature' || itemType === 'chore') { + if (bugCriterion !== true && bugCriterion !== 'not-applicable') { + failures.push('critical-path item ' + id + ' failed admission criterion: bug_reproduced_or_pinpointed'); + } + } else { + // Bug items (or omitted item_type) must prove reproduction/pinpointing and cannot evade with 'not-applicable'. + if (bugCriterion === 'not-applicable') { + failures.push('critical-path bug item ' + id + ' cannot use not-applicable for bug_reproduced_or_pinpointed'); + } else if (bugCriterion !== true) { + failures.push('critical-path item ' + id + ' failed admission criterion: bug_reproduced_or_pinpointed'); + } + } } } + if (outcome === 'candidate' && criticalPathCount === 0) { + failures.push('candidate with admission_items requires at least one critical-path item'); + } } } diff --git a/skills/agent-delivery-estimation/SKILL.md b/skills/agent-delivery-estimation/SKILL.md index 5384779..02054c7 100644 --- a/skills/agent-delivery-estimation/SKILL.md +++ b/skills/agent-delivery-estimation/SKILL.md @@ -348,7 +348,7 @@ unknownを発見したら、まず4種類へ分類する。 ## Structural unknown -scope、dependency、architecture等が未確定でWork Graph自体が安定しない。 +scope、dependency、architecture等が未確定でWork Graph自体が安定しない。`github-delivery` の release scope admission gate([adaptive-release-batching.md](../github-delivery/references/adaptive-release-batching.md))で `critical-path` 基準(`requirement_confirmed`、`bug_reproduced_or_pinpointed`[`bug` は `true`、`feature`/`chore` は `"not-applicable"`]、`acceptance_executable`、`dependency_owner_identified`、`validation_path_defined`、`promoted_by_calendar_only: false`)を満たさない項目は、calendar target だけで `critical-path` へ昇格せず `research-discovery` / `backlog` へ分離する。 結果: diff --git a/skills/github-delivery/references/adaptive-release-batching.md b/skills/github-delivery/references/adaptive-release-batching.md index 5ad59e1..ee38ef5 100644 --- a/skills/github-delivery/references/adaptive-release-batching.md +++ b/skills/github-delivery/references/adaptive-release-batching.md @@ -20,17 +20,17 @@ PR数・変更ファイル数は変更量の一部であり、それだけでrel ## 1.5 Release scope admission gate(#54) -**release scope admission**(critical path へ載せてよいか)と **release terminal gate**(freeze 済み候補を公開してよいか)は別の責務である。calendar target や期限の設定だけで未確定項目を release critical path へ昇格させない。 +**release scope admission**(critical path へ載せてよいか)と **release terminal gate**(freeze 済み候補を公開してよいか)は別の責務である。calendar target や期限の設定だけ(`promoted_by_calendar_only: true`)で未確定項目を release critical path へ昇格させない。 -release critical path へ組み込む項目は、最低限次を満たすこと: +各項目は track を `critical-path` / `research-discovery` / `backlog`、種別(`item_type`)を `bug` / `feature` / `chore` に分類する。`candidate` へ進むには最低 1 件以上の `critical-path` 項目が必要であり、`critical-path` へ組み込む項目は次の 5 基準と非 calendar 昇格(`promoted_by_calendar_only: false`)を満たすこと: -- **requirement**: 実装判断可能な程度に要求が確定している -- **reproduction / targeting**: bug は再現済み、または独立した証拠により修正対象が特定できる(非 bug 項目は非該当) -- **acceptance**: acceptance criteria が実行可能である -- **ownership**: dependency / blocker owner が特定されている -- **validation**: validation path が定義されている +- **`requirement_confirmed`**: 実装判断可能な程度に要求が確定している(`true`) +- **`bug_reproduced_or_pinpointed`**: `item_type: "bug"`(または未指定)は再現済み・独立証跡による修正対象特定が必須(`true`、`"not-applicable"` 不可)。非 bug 項目(`feature` / `chore`)は `"not-applicable"`(または `true`)とする +- **`acceptance_executable`**: acceptance criteria が実行可能である(`true`) +- **`dependency_owner_identified`**: dependency / blocker owner が特定されている(`true`) +- **`validation_path_defined`**: validation path が定義されている(`true`) -いずれかを満たさない項目は **research / discovery / backlog** として実行自体は妨げずに分離し、`agent-delivery-estimation` の **Structural unknown**(未解消のまま critical path へ混ぜると Work Graph 不安定・`forecast_status: unavailable`)として扱う。明示的な判断なしに release critical path や release candidate へ昇格しない。 +いずれかを満たさない項目は `research-discovery` または `backlog` として実行自体は妨げずに分離し、`agent-delivery-estimation` の **Structural unknown**(未解消のまま critical path へ混ぜると Work Graph 不安定・`forecast_status: unavailable`)として扱う。明示的な判断なしに release critical path や release candidate へ昇格しない。 ## 2. Outcomeは3種類