Conversation
problems/<dir>/subtask.toml (キー名は PUT /v1/problems/{id}/subtask と同じ) を
pull / push / diff で同期する。
- pull: 未設定ならファイルを作らない。ローカルにファイルがあるときは、未設定
でも subtasks = [] を書いてリモートの状態に揃える
- push: ファイルが無ければ触らない。設定を消すには subtasks = [] を明示する
(ファイルを消しても設定は消さない。暗黙の削除をしないため)
- 配点合計 100 などの検証はクライアントに写さず、サーバの 400 に任せる
サーバ側の API (本体 PR #1694) がマージ前なので、実測は未実施。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
prefixes の一致判定はサーバの仕事なので、送ったテストケースに対して判定 できる順にする (PUT のレスポンスに一致ゼロの警告を足してもらう前提)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PUT /subtask のレスポンスに、一致するテストケースが無いサブタスク (常に 0 点になる) の警告が入るようになったので、そのまま表示する。一致判定は サーバの仕事で、クライアントには持たない。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JSON は API の本文と同じ形なので、swagger や GET の結果をそのまま置ける。 TOML (subtask.toml) も引き続き使え、pull の書き戻しはローカルにある方の 形式に合わせる。両方あるとどちらを送るか決められないのでエラーにする (statement の .md / .html と同じ)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
変更内容
本体側の
GET/PUT /v1/problems/{id}/subtaskに対応し、problems/<dir>/subtask.json(またはsubtask.toml) を pull / push / diff で同期します。Warningをそのまま表示 (一致判定のルールはクライアントに持たない)name/descriptionは空なら送らない (GET→PUT の往復で差分を出さない)実測 (問題 14009、原状復帰済み)
{"subtasks":[]}→ pull はファイルを作らないsubtask.json) の push → pull の書き戻しも JSON のまま (形式維持)HTTP 400 配点の合計が90%です。合計100%にしてくださいを表示99) の push →サブタスク: 警告 一致するテストケースが無いサブタスクがあります(このままだと常に0点です): 99[]に戻る単体テスト 56 件、clippy
-D warnings/ fmt 通過。🤖 Generated with Claude Code