fix: 無音の打ち切りを潰し、internal/usecase を入れる(Phase 2 立て直し Part 1) - #59
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…sections Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
.claude/rules/go-style.md keeps a comment only for an external fact, for why odd-looking code is right, or as a doc comment on an exported identifier. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…l order into it Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e out how every recording was taken Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
.claude/rules/go-style.md keeps a comment for an external fact, for why odd-looking code is right, or as a doc comment on an exported identifier. The design rationale this branch had written into internal/usecase and the views' interfaces is none of those; it lives in the design and the rules. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Metrics Report
Code coverage of files in pull request scope (84.5%, patch 75.3%)
Reported by octocov |
Owner
Author
|
テストコメント |
kukv
commented
Sep 7, 2026
| for i := range sections { | ||
| sections[i] = WorkSection(i) | ||
| } | ||
| return sections |
This was referenced Sep 7, 2026
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.
Phase 2 立て直し Part 1(設計書の作業順 2 / 5 / 3 / 4)。実装計画は
docs/superpowers/plans/2026-09-07-phase2-remediation-part1.md。何を直したか
無音の打ち切り(作業順 2)
reviewThreadsを Go 側のループでページングする。GitHub は connection を 100 で打ち切り、
gh api --paginateは最上位より下の GraphQL カーソルを追えないので、101 本目以降のスレッドはエラーも出さずに消えていた
labels(first: 10)を 100 に上げた。据え置く connection(スレッド内のcomments、Work のsearch、REST のper_page)には、なぜ据え置くのかをコメントで残した
gh.Workの配列長を section の enum から引くようにし、diff.goの裸の定数に名前を付けた
実物の testdata(作業順 5)
internal/gh/cliのパーステストが、手書き JSON ではなくghの実出力の録りものを読む。手書きだと「GitHub が実際には返さない形」でも通ってしまう
work.jsonは@me検索なので全リポジトリをなめる。公開リポジトリのノードだけに絞り、エイリアスごとに 5 件で打ち切り、公開 PR の本文経由で私有リポジトリ名と
インフラ構成に触れていた 2 件を落とした。録り方は
testdata/README.mdにあるinternal/usecase(作業順 4)GetItem/AddComment/SetState/EditLabels/EditAssignees)と、レビューの呼び出し順序(PostLineComment/SubmitReview)がビューから下りた。ビューは「何をしたいか」を言い、それが何回の API 呼び出しに
なるかは知らない
detailが宣言する interface は 6 / 2 / 1 メソッド(規約の上限は宣言あたり 6)cmd/octoscopeはcli.New → usecase.New → app.Newの 3 行規約(作業順 3 の後始末)
TRANSIENT(Part1 ...))を削除した。Part 2 に持ち越す 2 件は意図的に残してある
検証
make check: 781 テスト / lint 0 件make release-check: goreleaser 設定 OK、Windows / macOS / Linux のクロスコンパイル成功確認をお願いしたいこと
実機での動作確認は未実施です。
.claude/rules/tui.mdの「テストが通っただけで完了にしない」の分が残っています。以下を
--lang en/--lang ja、80 桁と 160 桁で:j/k/enter→ 詳細o/c/x→y/l/a/v/dj/k/c→ctrl+s/v/Xtab→j→enter→ 詳細 →oPart 2 に持ち越すもの
detail/diffの bool を enum に畳む、Updateの case 分割、コード中のspec N/Task N参照 26 箇所の削除、画面をまたぐシナリオテストcが開かないことがある(再現せず)、--repoを渡しても Work タブが出る🤖 Generated with Claude Code