IW-671: Split the Forgejo issue timeline read out of ForgejoClient #731

Closed
claude wants to merge 22 commits from IW-671 into main
Member

Summary

The issue timeline read moves out of core/adapters/ForgejoClient.scala into its own object, ForgejoIssueTimeline. The behavior does not change: the HTTP requests, the results and the error texts are the same. ForgejoIssueTimeline gets its one effect (the authenticated page GET) as a function parameter, so it names no sttp, token or backend.

Changes

  • core/adapters/ForgejoIssueTimeline.scala (new): URL builder, page parser, event mapping, page limit, stop rule and the paged read.
  • core/adapters/ForgejoClient.scala: the moved code is removed (about 1212 lines remain); TextResponse is top level and private[adapters]; fetchIssueState calls ForgejoIssueTimeline.read. No forwarders.
  • core/test/ForgejoIssueTimelineTest.scala (new): the moved pure tests, plus four direct timelineComplete tests (each checked by a mutation).
  • test/contract/forgejo_api_contract.bats: the PURPOSE comment names both objects.
  • CI fix, separate: dashboard/jvm/itest/src/ItestServer.scala retries on another port when any cause of a startup failure is a BindException (Undertow wraps it). Three tests in ItestServerItest.

Testing

  • ForgejoClientTest 126 + ForgejoIssueTimelineTest 14 = 140 pass (baseline 136).
  • ItestServerItest and ClaudeSessionLinksItest pass.
  • core.compile has no warnings; lint passes; the pre-push hook (./iw ./test unit) passed on this branch.
  • Review packet: project-management/issues/IW-671/review-packet.md.

For the reviewer

  • The public names ForgejoClient.parseTimelinePage, TimelinePage, TimelinePageLimit, timelineComplete and buildIssueTimelineUrl are gone. In this repository only the tests used them.
  • IW-672 also edits ForgejoClient.scala next to the deleted buildIssueTimelineUrl. At that conflict, keep both deletions.
  • Follow-ups: #730 (extract the CI and pull-request clusters), and two push cases added to #585.

Release notes

Tato změna je čistě vnitřní úprava nástroje iw-cli. Pro uživatele se nic nemění: všechny příkazy, jejich výstupy i chybová hlášení zůstávají stejné jako dosud.

Úprava zjednodušuje tu část nástroje, která komunikuje s Forgejo a zjišťuje stav úkolů. Díky tomu půjde tuto oblast v budoucnu snáze udržovat a opravovat. Současně jsme odstranili občasné selhání interních automatických testů dashboardu, které se uživatele nedotýkalo.

Po aktualizaci není nutné nic nastavovat ani měnit.

🤖 Generated with Claude Code

Closes #671

## Summary The issue timeline read moves out of `core/adapters/ForgejoClient.scala` into its own object, `ForgejoIssueTimeline`. The behavior does not change: the HTTP requests, the results and the error texts are the same. `ForgejoIssueTimeline` gets its one effect (the authenticated page GET) as a function parameter, so it names no sttp, token or backend. ## Changes - `core/adapters/ForgejoIssueTimeline.scala` (new): URL builder, page parser, event mapping, page limit, stop rule and the paged `read`. - `core/adapters/ForgejoClient.scala`: the moved code is removed (about 1212 lines remain); `TextResponse` is top level and `private[adapters]`; `fetchIssueState` calls `ForgejoIssueTimeline.read`. No forwarders. - `core/test/ForgejoIssueTimelineTest.scala` (new): the moved pure tests, plus four direct `timelineComplete` tests (each checked by a mutation). - `test/contract/forgejo_api_contract.bats`: the PURPOSE comment names both objects. - CI fix, separate: `dashboard/jvm/itest/src/ItestServer.scala` retries on another port when any cause of a startup failure is a `BindException` (Undertow wraps it). Three tests in `ItestServerItest`. ## Testing - `ForgejoClientTest` 126 + `ForgejoIssueTimelineTest` 14 = 140 pass (baseline 136). - `ItestServerItest` and `ClaudeSessionLinksItest` pass. - `core.compile` has no warnings; lint passes; the pre-push hook (`./iw ./test unit`) passed on this branch. - Review packet: `project-management/issues/IW-671/review-packet.md`. ## For the reviewer - The public names `ForgejoClient.parseTimelinePage`, `TimelinePage`, `TimelinePageLimit`, `timelineComplete` and `buildIssueTimelineUrl` are gone. In this repository only the tests used them. - IW-672 also edits `ForgejoClient.scala` next to the deleted `buildIssueTimelineUrl`. At that conflict, keep both deletions. - Follow-ups: #730 (extract the CI and pull-request clusters), and two push cases added to #585. ## Release notes Tato změna je čistě vnitřní úprava nástroje iw-cli. Pro uživatele se nic nemění: všechny příkazy, jejich výstupy i chybová hlášení zůstávají stejné jako dosud. Úprava zjednodušuje tu část nástroje, která komunikuje s Forgejo a zjišťuje stav úkolů. Díky tomu půjde tuto oblast v budoucnu snáze udržovat a opravovat. Současně jsme odstranili občasné selhání interních automatických testů dashboardu, které se uživatele nedotýkalo. Po aktualizaci není nutné nic nastavovat ani měnit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Closes #671
Split the Forgejo issue timeline read out of ForgejoClient

Artifacts:
- analysis.md
- issue.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
Split the Forgejo issue timeline read out of ForgejoClient

Artifacts:
- tasks.md
- review-state.json (tasks_ready)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ZD5foFWAE2zV1xYojPMa
Issue: IW-671
Phase: 1 - Extract ForgejoIssueTimeline + move its tests

This commit marks the checkpoint for phase 1 context generation.
Use wf-implement IW-671 to return to this point.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extract ForgejoIssueTimeline + move its tests

Artifacts:
- phase-01-tasks.md

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(IW-671): review packet and release notes
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 11s
CI / lint (pull_request) Successful in 12s
CI / compile (pull_request) Successful in 1m41s
CI / dashboard-build (pull_request) Successful in 1m29s
CI / test (pull_request) Successful in 18m15s
5587ae796b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mph requested changes 2026-10-07 07:33:50 +00:00
Dismissed
mph left a comment

There are conflicts after merging other branches.

There are conflicts after merging other branches.
docs(IW-671): rework for final PR review 19
Some checks failed
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 12s
CI / compile (pull_request) Successful in 1m43s
CI / dashboard-build (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
1831128a45
Issue: IW-671
Phase: 2 - Rework for final PR review 19

This commit marks the checkpoint for phase 2 context generation.
Use wf-implement IW-671 to return to this point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
workflow(wf): Generate Phase 2 tasks for IW-671
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m37s
CI / dashboard-build (pull_request) Successful in 1m25s
CI / test (pull_request) Successful in 18m8s
daf0cebd36
Rework for final PR review 19

Artifacts:
- phase-02-tasks.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 2: Rework for final PR review 19 (#747)
Some checks failed
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m39s
CI / test (pull_request) Has been cancelled
CI / dashboard-build (pull_request) Has been cancelled
5aa8033843
workflow(IW-671): add Phase 3 sync with main d9e76182fb
Some checks failed
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 11s
CI / lint (pull_request) Successful in 14s
CI / compile (pull_request) Successful in 1m33s
CI / dashboard-build (pull_request) Successful in 1m28s
CI / test (pull_request) Has been cancelled
bd5d6f8e91
Final PR #731 cannot merge: core/adapters/ForgejoClient.scala conflicts with IW-610 (#694).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 3: context ready
All checks were successful
CI / changes (pull_request) Successful in 5s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 11s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m37s
CI / dashboard-build (pull_request) Successful in 1m28s
CI / test (pull_request) Successful in 18m20s
691224b0c2
Issue: IW-671
Phase: 3 - Sync with main d9e76182fb

Adds a CLARIFY in analysis.md: the squash merge of the Phase 2 PR dropped main as a
parent, so the way the merge lands on IW-671 needs a decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Member

Implement: rework for review 19
The rework phase merged into IW-671 through #747; this pull request carries it.

Implement: rework for review 19 The rework phase merged into IW-671 through #747; this pull request carries it.
mph requested changes 2026-10-08 06:24:02 +00:00
Dismissed
mph left a comment

We have some conflicts again.

We have some conflicts again.
workflow: Resolve clarifications for IW-671
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / compile (pull_request) Successful in 1m42s
CI / format (pull_request) Successful in 11s
CI / lint (pull_request) Successful in 15s
CI / dashboard-build (pull_request) Successful in 1m24s
CI / test (pull_request) Successful in 18m28s
6e8915b307
Resolved:
- analysis.md: How does the merge from main land on IW-671? → b) Phase 3 PR, merged by hand with a merge commit; sync to current origin/main, which now conflicts in five files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gb1uDXz47sTSnzukutVe2t
mph requested changes 2026-10-10 18:36:52 +00:00
mph left a comment

We have still conflicts

We have still conflicts
workflow: Triage lessons for IW-671
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m3s
CI / dashboard-build (pull_request) Successful in 1m28s
CI / test (pull_request) Successful in 18m31s
b01a793509
Follow-ups filed: 0, commented: 0, struck: 0
Lessons: 1 approved, 0 rejected, 0 still pending

Promoted:
- 2026-10-08 — a squashed phase PR drops the merge from main → source fix #750

Decided on the issue: #671 (comment)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Member

Closed without a merge, at Michal's decision. The branch is 318 commits behind main, and a merge of main conflicts in 14 files, among them ForgejoClient.scala, which the TrackerError change (#778) rewrote. To resolve that costs more than to do the split again on current main. A new issue takes the work again; the branch stays on the forge.

Closed without a merge, at Michal's decision. The branch is 318 commits behind main, and a merge of main conflicts in 14 files, among them ForgejoClient.scala, which the TrackerError change (#778) rewrote. To resolve that costs more than to do the split again on current main. A new issue takes the work again; the branch stays on the forge.
claude closed this pull request 2026-10-16 18:07:59 +00:00
All checks were successful
CI / changes (pull_request) Successful in 4s
CI / contract (pull_request) Has been skipped
CI / format (pull_request) Successful in 10s
CI / lint (pull_request) Successful in 13s
CI / compile (pull_request) Successful in 1m3s
CI / dashboard-build (pull_request) Successful in 1m28s
CI / test (pull_request) Successful in 18m31s

Pull request closed

Sign in to join this conversation.
No description provided.