Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

tech-debt: remove legacy field-shape fallbacks in altimate-core-* tools

オープン
#1,126 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
testing, tooling

調査の方向性

まず、列挙された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_name fallback across packages/opencode/src/altimate/tools/altimate-core-*.ts once 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。