Extract a shared server-config path helper #438

Open
opened 2026-08-23 19:28:53 +00:00 by mph · 3 comments
Owner

The dashboard server config file's path (~/.local/share/iw/server/config.json) is spelled out independently at every reader:

  • ServerClient.getServerConfig
  • core/commands/Dashboard.scala
  • dashboard/jvm/src/infrastructure/ServerWorkspace.scala (added by IW-423 Phase 2 — the binder resolving workspaceBackend)

and the CLI's iw doctor binder passes None because the path is never read on that side at all.

IW-423 grew this from three independent spellings of the path to four, with no shared helper to centralize it. analysis.md Risk 6 for IW-423 names this cost and explicitly defers it, because extracting the helper touches no behaviour that issue was chartered to change.

Lesson: a fourth caller reading the same on-disk path independently is the signal that a shared path helper would pay for itself.

Fix: extract something like ServerConfigRepository.defaultPath and route every reader through it.


Recorded during IW-423; see project-management/issues/IW-423/LESSONS.md entry 6.

The dashboard server config file's path (`~/.local/share/iw/server/config.json`) is spelled out independently at every reader: - `ServerClient.getServerConfig` - `core/commands/Dashboard.scala` - `dashboard/jvm/src/infrastructure/ServerWorkspace.scala` (added by IW-423 Phase 2 — the binder resolving `workspaceBackend`) and the CLI's `iw doctor` binder passes `None` because the path is never read on that side at all. IW-423 grew this from three independent spellings of the path to four, with no shared helper to centralize it. `analysis.md` Risk 6 for IW-423 names this cost and explicitly defers it, because extracting the helper touches no behaviour that issue was chartered to change. **Lesson:** a fourth caller reading the same on-disk path independently is the signal that a shared path helper would pay for itself. **Fix:** extract something like `ServerConfigRepository.defaultPath` and route every reader through it. --- Recorded during IW-423; see `project-management/issues/IW-423/LESSONS.md` entry 6.
Member

Intake: agent-ready
Workflow: waterfall
Reason: all gates passed
Analysis: project-management/issues/IW-438/analysis.md on branch IW-438

Intake: agent-ready Workflow: waterfall Reason: all gates passed Analysis: project-management/issues/IW-438/analysis.md on branch IW-438
Member

Implement: needs-human
Reason: batch-implement exit 1 — the kanon plugin did not compile against this branch's iw-cli core, so no phase ran

The installed kanon plugin (lib/batch/ForgeCatchUp.scala:143) expects Either[String, …] from fetchPullRequestForBranch. iw-cli main now returns Either[TrackerError, …] (#778, #779, #780). No batch-implement.log was written; the command output was:

[error] /home/mph/.local/share/iw/plugins/kanon/lib/batch/ForgeCatchUp.scala:143:7
[error] Found:    Either[iw.core.model.TrackerError, Option[batch.ForgeState]]
[error] Required: Either[String, Option[batch.ForgeState]]
Compilation failed

The issue itself is not at fault. Update the kanon plugin to the TrackerError port, then release this issue to agent-ready again.

Implement: needs-human Reason: batch-implement exit 1 — the kanon plugin did not compile against this branch's iw-cli core, so no phase ran The installed kanon plugin (`lib/batch/ForgeCatchUp.scala:143`) expects `Either[String, …]` from `fetchPullRequestForBranch`. iw-cli `main` now returns `Either[TrackerError, …]` (#778, #779, #780). No `batch-implement.log` was written; the command output was: ``` [error] /home/mph/.local/share/iw/plugins/kanon/lib/batch/ForgeCatchUp.scala:143:7 [error] Found: Either[iw.core.model.TrackerError, Option[batch.ForgeState]] [error] Required: Either[String, Option[batch.ForgeState]] Compilation failed ``` The issue itself is not at fault. Update the kanon plugin to the `TrackerError` port, then release this issue to `agent-ready` again.
Member

Release: the implement loop failed this issue for a reason outside it. The kanon plugin did not compile against iw-cli main, because the tracker port now returns TrackerError (iw-cli #778). The plugin fix is dev-docs #484, and iw-cli 0.22.1 carries the core change. The issue goes back to the implement loop.

Release: the implement loop failed this issue for a reason outside it. The kanon plugin did not compile against iw-cli main, because the tracker port now returns TrackerError (iw-cli #778). The plugin fix is dev-docs #484, and iw-cli 0.22.1 carries the core change. The issue goes back to the implement loop.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/iw-cli#438
No description provided.