tech-debt: remove legacy field-shape fallbacks in altimate-core-* tools
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
まず、列挙された8つのファイル packages/opencode/src/altimate/tools/altimate-core-*.ts における #1090 の変更を確認し、それぞれの legacy fallback を見つけます。次に、各 consumer がどのように engine のレスポンスを受け取るかを調べ、その consumer 用の shape-drift テストを定義します。fallback が削除され、欠落した primary field が明示的に失敗し、CI が実際の engine のレスポンスにおける欠落フィールドを検出できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Deferred from the v0.9.6 release review (Tech Lead persona, P1).
Context
#1090 fixed 10+ silent-empty-output bugs where CLI consumers of @altimateai/altimate-core read fields the engine no longer emits. The fix added a "legacy fallback" pattern to soften the shape transition, e.g.:
data.diffs ?? data.differences // altimate-core-compare.ts
data.findings ?? data.risks // altimate-core-migration.ts
f.suggestion ?? f.remediation // ~8 sites across altimate-core-*.ts
The concern: these fallback branches are untested dead code. A future engine bump that renames or removes the primary field (data.diffs, data.findings, f.suggestion) silently falls through to the always-undefined legacy key and reintroduces the exact silent-empty-output bug this PR spent 10 review rounds fixing. No test catches it because the fallback branch is never exercised.
What to do
- Remove every
?? legacy_field_namefallback acrosspackages/opencode/src/altimate/tools/altimate-core-*.tsonce we've soaked 0.7.0 in prod for 1-2 releases. - Replace with an explicit shape assertion (or a loud
console.warn+ telemetry event) so a future engine contract break fails loud instead of silently degrading to empty output. - Add a "shape drift" alarm — a unit test per consumer that asserts the primary field IS present in a real engine response, so removal of it in a future engine bump breaks CI immediately.
Affected files (from the #1090 diff)
- `packages/opencode/src/altimate/tools/altimate-core-compare.ts`
- `packages/opencode/src/altimate/tools/altimate-core-migration.ts`
- `packages/opencode/src/altimate/tools/altimate-core-policy.ts`
- `packages/opencode/src/altimate/tools/altimate-core-check.ts`
- `packages/opencode/src/altimate/tools/altimate-core-query-pii.ts`
- `packages/opencode/src/altimate/tools/altimate-core-classify-pii.ts`
- `packages/opencode/src/altimate/tools/altimate-core-track-lineage.ts`
- `packages/opencode/src/altimate/tools/altimate-core-semantics.ts`
Priority
P1 — same class of bug as #1090, but latent. Address before shipping another engine bump.
- 主要言語
- TypeScript
- スター
- 813
- フォーク
- 134
- 平均マージ
- 2日 3時間
- マージ済み PR(30日)
- 65
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AltimateAI/altimate-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AltimateAI/altimate-code#1359 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AltimateAI/altimate-code#1323 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
AltimateAI/altimate-code#1288 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
AltimateAI/altimate-code#1284 ·
AltimateAI/altimate-code の issue をすべて見る
似ている issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Crush オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ElementsProject/cln-application#167 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Quantco/pnpm-licenses#17 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100