-
Notifications
You must be signed in to change notification settings - Fork 0
Bolt 2: 品質修復Loop Pluginを追加する #2194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+3,938
−40
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d479189
feat(quality-repair): add bounded repair runtime
j5ik2o e7aeb11
fix(quality-repair): avoid legacy observe callsite
j5ik2o 775b5d5
fix(quality-repair): address review feedback
j5ik2o 656ba85
test(quality-repair): exercise recovery boundaries
j5ik2o 94cdc6e
test(quality-repair): cover recovery boundaries
j5ik2o 927822b
fix(quality-repair): align with loop monitor contract
j5ik2o cac43f9
fix(no-silent-drop): rebind quality repair baseline
j5ik2o e9119b7
fix(quality-repair): align evidence resume with loop latch
j5ik2o dd160c5
fix(quality-repair): address convergence review findings
j5ik2o 2d881cd
test(quality-repair): close patch coverage gaps
j5ik2o 98ace23
test(quality-repair): allowlist replay type-only signature lines
j5ik2o d61afe5
refactor(quality-repair): share validEventSet as a value-level predicate
j5ik2o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...omy/construction/quality-repair-runtime/code-generation/code-generation-plan.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Code Generation Plan — quality-repair-runtime | ||
|
|
||
| ## スコープと追跡元 | ||
|
|
||
| U2 `quality-repair-runtime`(Issue #2096)のみを実装する。追跡元は USR-02 / USR-05 / USR-08、FR-QRP-001〜013、FR-LMC-010、FR-STP-003〜006、FR-HAR-001〜007、2096-AC01〜18、および Functional / NFR Design の QRP-A/E/P/R 規則である。テスト戦略は `Comprehensive` とし、決定論的 unit test、production coordinator / replay integration、5 harness projection、package / promote drift を同じ Bolt で閉じる。 | ||
|
|
||
| U1 `loop-monitor-runtime` の generic Monitor、durable repository、Judge port、latch / resume contract を再利用する。quality の obligation / convergence / route 意味論を generic Monitor へ混入させず、harness 別 Core 分岐も作らない。 | ||
|
|
||
| ## 実装手順 | ||
|
|
||
| - [x] **Step 1 — generic singleton route constraint seam**: U1 Monitor の compiled route 集合から delivery ごとの非空 subset constraint を検証・予約・Judge request へ伝播できるよう最小拡張する。quality 固有語彙は追加しない。(FR-QRP-009〜011、2096-AC09〜10) | ||
| - [x] **Step 2 — first-party contribution と activation**: trusted embedded contribution、descriptor exact resolution、`semi/full` 必須、`none` real-human opt-in / default-off、required outputs 初期空集合を pure contract として実装する。(USR-02 / USR-08、FR-QRP-001〜003 / 012、2096-AC01〜05) | ||
| - [x] **Step 3 — blocking evidence normalization**: reviewer / blocking sensor / required produce / verification・completion の closed observation を stable obligation、snapshot、resolved / added / retained、canonical fingerprint へ正規化する。advisory sensor と Request Changes は除外し、不完全 evidence は fail-closed にする。(FR-QRP-004〜008 / 013、2096-AC06〜08) | ||
| - [x] **Step 4 — bounded quality convergence**: T+1 window、initial / collecting / strict-progress / threshold、fixed-point / churn / regression / undetermined、replan-first と post-replan repair-stalled singleton constraint を pure reducer として実装する。(USR-05、FR-QRP-009〜011、2096-AC09〜11) | ||
| - [x] **Step 5 — durable production coordinator**: canonical quality event set、snapshot / progress / replan reservation-before-effect、closed attempt 0/1、local review cycle、generic Monitor delivery / Judge / latch、`REPAIR_STALLED` / suspended status を統合する。(FR-STP-003〜006、2096-AC10〜15) | ||
| - [x] **Step 6 — resume / replay / status**: `any-of[evidence-change,human-retry]`、atomic latch clear + new quality epoch + workflow unpark、same-fingerprint short circuit、cross-session replay と safe status envelope を実装する。(USR-05、FR-LMC-010、2096-AC11〜16) | ||
| - [x] **Step 7 — Comprehensive tests**: Step 1〜6 の red unit / integration testsを追加し、T-1 Judge 0、初回 T replan、strict progress reset、replan 後 T stalled、Request Changes 非変換、crash / replay / duplicate / cross-scope、latch / resume contract 再利用を検証する。(2096-AC01〜18) | ||
| - [x] **Step 8 — 5 harness projection と品質ゲート**: framework core から Claude Code / Codex / Cursor / OpenCode / Kimi Code へ生成し、共通 fixture の byte-equivalent contract、`bun run typecheck`、`bun run lint`、focused tests、`bun scripts/package.ts --check`、`bun run promote:self:check` を検証する。(FR-HAR-001〜007、2096-AC16〜18) | ||
|
|
||
| ## 非対象 | ||
|
|
||
| U3〜U5、Intent grant、gate / question 認可、PR / merge、外部 runner / supervisor、Kiro live、外部 Plugin manifest、新 stage、固定総 retry cap、新規 mandatory artifact は実装しない。 |
36 changes: 36 additions & 0 deletions
36
...nt-autonomy/construction/quality-repair-runtime/code-generation/code-summary.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Code Summary — quality-repair-runtime | ||
|
|
||
| ## 実装結果 | ||
|
|
||
| U2 `quality-repair-runtime`(Issue #2096)を、U1 `loop-monitor-runtime` の durable delivery / Judge / latch / resume seam を再利用する first-party runtime として実装した。品質固有の obligation、T+1 convergence、replan-first、post-replan `repair-stalled` は専用 reducer に閉じ、generic Monitor には delivery 単位の非空 route subset constraint だけを追加した。 | ||
|
|
||
| ### Core | ||
|
|
||
| - `amadeus-quality-repair.ts`: trusted embedded contribution、depth 別 activation、closed evidence normalization、stable obligation / snapshot / delta / fingerprint、T+1 convergence reducer、replan receipt / review-cycle identity を実装した。 | ||
| - `amadeus-quality-repair-runtime.ts`: quality event と generic Monitor event の atomic transaction、reservation-before-effect、closed attempt 0/1、reconcile-first、`REPAIR_STALLED`、suspended status、human/evidence resume、cross-session replay を実装した。 | ||
| - `amadeus-quality-repair-replay.ts`: canonical audit transaction の decode / repository / replay を実装した。 | ||
| - `amadeus-loop-monitor.ts` / `amadeus-loop-monitor-runtime.ts`: compiled route の検証済み subset を予約・Judge request・適用へ伝播し、replan target を post-replan interval の anchor に更新する generic seam を追加した。 | ||
| - audit event registry に `QUALITY_REPAIR_TRANSACTION_COMMITTED` を追加し、canonical payload の仕様と event count を同期した。 | ||
| - `docs/reference/12-state-machine.md` と coverage registry / ratchet を U2 の新規 canonical audit event へ同期した。 | ||
|
|
||
| ### 投影 | ||
|
|
||
| 同一 Core bytes を Claude Code、Codex、Cursor、OpenCode、Kimi Code の5ハーネスへ投影した。Kiro live、外部 runner / supervisor、U3〜U5、Intent grant、gate / question authorization は追加していない。 | ||
|
|
||
| ## テスト | ||
|
|
||
| - pure unit: contribution / activation、blocking evidence、strict progress / fixed-point / churn / regression / undetermined、replan-first / repair-stalled、Request Changes 除外を検証した。 | ||
| - integration: T-1 Judge 0、初回 threshold replan、post-replan stalled、atomic resume、same-fingerprint no-op、cross-session replay、attempt 0/1 と attempt 2 不在、latch / resume contract 再利用、canonical serialization を検証した。 | ||
| - projection: 5ハーネスの quality runtime 3ファイルが Core と byte-identical であることを検証した。 | ||
| - 品質ゲート: `bun run typecheck`、`bun run lint`、最終 focused 128 tests / 2,185 expects、coverage registry freshness / ratchet、audit emitter / state-machine / audit-format drift、`bun scripts/package.ts --check`、`bun run promote:self:check`、`git diff --check` を通過した。lint は既存 baseline の cognitive-complexity warning のみで error はない。 | ||
| - `bun run test:ci` は全788ファイルを完走した。初回に U2 由来の event count、test size、audit taxonomy、coverage registry の同期漏れを検出し、すべて修正して上記 focused set で再検証した。古い Bolt base に由来する Pi conductor / package、complexity baseline 等の既存 drift は U2外として残した。 | ||
|
|
||
| ## 設計差分と除外 | ||
|
|
||
| - 設計上の singleton route を generic runtime で安全に表現するため、U1 の full-set constraint を「compiled route の非空 subset」へ最小限に一般化した。quality 固有語彙は U1 Core へ追加していない。 | ||
| - U1 依存コミット `89d5afe35` はこの Bolt のローカル前提であり、U2コミットには含めない。 | ||
| - package / promote 実行で顕在化した、古い base に由来する `amadeus-harness-capability.ts`、`amadeus-harness.ts`、`amadeus-swarm.ts`、`amadeus-utility.ts`、Pi / Kiro 等の既存 drift は U2 の変更ではないため、U2コミット対象から明示的に除外する。 | ||
|
|
||
| ## 残作業 | ||
|
|
||
| U2の実装残はない。後続は独立した Build and Test / 統合工程で扱う。 |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.