Repository navigation
fix: 例の拡張 sessions は、セッションを1本も読めなければ生成を止める - #26
Merged
Merged
Conversation
## 変更内容 - `_sessions()` が config dir ごとの失敗を集め、成功した config dir が1つも無ければ `PluginError` を上げる。メッセージは失敗した config dir ごとの理由を含む英文 - `list --json` の行に `id`・`repo`・`title`・`prompts`・`started`・`updated` のどれかが欠けていれば、その config dir の失敗として扱う(オブジェクトでない行も同じ) - `css()` で `_sessions(ctx)` を呼び、生成前に `error:` で止める(`publish` は指紋の時点で同じ例外が上がり、push せずに非0で終わる) - 一部の config dir だけの失敗は、今までどおり警告して飛ばす。`list` が0件は止めない - モジュールと `_sessions()` の docstring を新しい振る舞いに合わせた ## 保証 - 全 config dir で `list` が失敗・`ccreel` が無い → `error:`・非0・`public/` 無し: tests/test_example_sessions.py `test_build_stops_without_ccreel`、`test_build_stops_when_every_list_fails` - 行の項目が欠ければ config dir の失敗: `test_build_stops_when_a_list_row_lacks_a_field`(6項目それぞれ) - `publish --if-changed` は push しない: `test_publish_if_changed_does_not_push_when_list_fails` - 0件は止めない: `test_build_with_empty_list_is_not_an_error` - 一部の失敗は警告して続ける(維持): `test_build_survives_one_failing_config_dir` - 台帳 §5 を上に合わせて更新 ## 静的確認結果 - `nix develop -c pytest -q`: 81 passed。新しいテストは旧実装で失敗することを確かめた - 本体(`codeview/`)は変更なし。`build.main` / `publish.main` は `css()` / 指紋の例外を既存どおり扱う - git diff --name-only --cached: docs/guarantees.md examples/plugins/sessions.py tests/test_example_sessions.py
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.
変更内容
_sessions()が config dir ごとの失敗を集め、成功した config dir が1つも無ければPluginErrorを上げる。メッセージは失敗した config dir ごとの理由を含む英文list --jsonの行にid・repo・title・prompts・started・updatedのどれかが欠けていれば、その config dir の失敗として扱う(オブジェクトでない行も同じ)css()で_sessions(ctx)を呼び、生成前にerror:で止める(publishは指紋の時点で同じ例外が上がり、push せずに非0で終わる)listが0件は止めない_sessions()の docstring を新しい振る舞いに合わせた保証
listが失敗・ccreelが無い →error:・非0・public/無し:tests/test_example_sessions.pyのtest_build_stops_without_ccreel、test_build_stops_when_every_list_failstest_build_stops_when_a_list_row_lacks_a_field(6項目それぞれ)publish --if-changedは push しない:test_publish_if_changed_does_not_push_when_list_failstest_build_with_empty_list_is_not_an_errortest_build_survives_one_failing_config_dirdocs/guarantees.md§5 を上に合わせて更新静的確認結果
nix develop -c pytest -q: 81 passed。新しいテストは旧実装で失敗することを確かめたcodeview/)は変更なし確認者の判定
nix develop -c pytest -qが通るsiteフィクスチャで生成器を別プロセスで呼び、偽のccreelで確かめている