Repository navigation
健康監査: schemastery 統合テスト・型安全化・リリースノート検証 - #58
Merged
Merged
Conversation
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
Co-authored-by: AliceSaikawa <AliceSaikawa@users.noreply.github.com>
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.
概要
main向けのリポジトリ健康監査の結果です。ビルド・型チェック・全テストを通したうえで、見つかった問題とテストギャップを修正しています(バージョン・タグ・リリース作業は変更していません)。監査の実行内容
pnpm run buildpnpm run typecheckstrict+noUncheckedIndexedAccess)pnpm testany/ 本体の安易な castsrc/にanyなし(テストのモック用unknown経由は既存のまま)修正内容(コミットごと)
1.
fix(test):CACHE_SENTINEL_SCHEMASTERYの読み込み失敗でテストファイル全体が落ちる問題(バグ)
環境変数
CACHE_SENTINEL_SCHEMASTERYに schemastery のパスだけを指すと、依存の@deepseek-ai/cosmokitが無いためrequireが失敗し、Node のテストランナーが ファイル単位で not ok になる。個別のモックテストは通ってもサマリが赤になる。再現
修正
loadRealSchemaFactoryで try/catch し、読めないときは本物テストを skip(メッセージを「依存不足」と区別)。テスト(修正後)
同じ再現手順で 14 pass / 0 fail / 4 skip(本物テストのみ skip、ファイルは緑)。
2.
ci: schemastery 統合テストで #10 の本物validateを実行問題(テストギャップ)
tests/config-schema.test.tsの「本物 schemastery」4 件は常に skip され、設定スキーマと DSH の~standard.validateの整合が CI で検証されていなかった。修正
CI で
.ci-schemastery/にnpm install @deepseek-ai/schemastery@3.19.0(依存は npm が解決)し、CACHE_SENTINEL_SCHEMASTERYを渡してpnpm testを実行。テスト(修正後・Linux + schemastery)
484 pass / 0 fail / 0 skip(従来 skip だった 4 件が実行される)。
3.
refactor(config):isVolatileRefをReflectで判定問題
(value as { get?: unknown }).getのキャストに依存していた。修正
Reflect.getでget関数の有無を判定(挙動不変)。4.
refactor(index):profileNameOfでprofileContextを型安全に読む問題
ctx.get('profileContext') as { name?: unknown }の単純アサーション。修正
typeof raw === 'object' && raw !== nullを確認してからReflect.get(raw, 'name')(挙動不変)。5.
feat(modes):asModeヘルパー設定 UI で
Modeへ正規化する共通関数。tests/modes.test.tsを追加。6.
refactor(client): 設定 UI のモード表示と exhaustive switch変更
SegmentedControlの表示値をasMode(fieldState.text, DEFAULTS.mode)に統一(isMode+ 既定モード)。settings-fields/settings-pageのswitchにnever用defaultを追加。lib/client.jsを再ビルドしてコミット。7.
test(release-notes): New Contributors 削除後の空行圧縮背景
scripts/release-notes.tsのtidyReleaseNotes(リリース workflow で使用)は既にテストあり。New Contributors 節除去時の\n{3,}→\n\n圧縮のケースを追加。変更しなかったもの
package.jsonの version / peerDependencies / タグ・リリース workflow のロジック本体は未変更。npm installのみ)。検証結果(この PR ブランチ)