Service links: split the probe and reader components, give DNS lookups their own pool #677
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#677
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The service-link code works but is crowded: wide positional parameters, multi-type files, a probe with too many duties. One item (DNS starvation) is a robustness defect, not only structure.
Found during IW-652 (per-user dashboard, service links, Claude session links). Follow-ups, verbatim:
WorktreeListView.render(dashboard/jvm/src/presentation/views/WorktreeListView.scala) has no production caller; onlyWorktreeListViewTestcalls it.ProjectDetailsView.WorktreeCardDatais an 8-tuple; make it a named case class — review-phase-02-20261001-133339.md composition W1.ServicePortProbeholds a pool, two TTL caches and the deadline policy; extract a TTL cache and a deadline runner — review-phase-02-20261001-133339.md composition W3.dashboard/jvm/src/domain/ServiceLink.scalaholds six public types, andServicePortProbe.scalaalso holdsBindAddresses; split them into files — review-phase-02-20261001-133339.md style W1, W2.ServicePortProberuns DNS lookups and TCP connects on one 16-thread pool, and a cancelled lookup keeps its thread, so many slowHostnames can starve probing; give resolution its own smaller pool — review-phase-02-20261001-133339.md security W2.ServiceLinksReaderreads declarations, de-duplicates log lines and buildsUnreadablefrom three kinds of cause; extract the log-on-change rule as its own small component, also used byClaudeSessionsReader— review-phase-02-20261001-135259.md composition W1.Intake: needs-human
Workflow: waterfall
Reason: G7 — the separate DNS pool only delays starvation under a sustained flood (rejected lookups after the 10 s entry expiry show NotChecked to all users); accept that residual, or add stale-on-reject / pool-free localhost and IP literals
Analysis: project-management/issues/IW-677/analysis.md on branch IW-677
Intake: needs-input
Workflow: waterfall
Reason: G7 (1 [human] finding)
Analysis: project-management/issues/IW-677/analysis.md on branch IW-677
ResolutionLifetimeMs,ServicePortProbe.scala:273), every later lookup of it is rejected at once, and every card showsNotCheckedfor all users again. Risk 1 rates this Low/Low (analysis.md:311-314). What should IW-677 build? Options: a) accept the residual: build the separate pool as analysed, and correct the analysis to say it delays starvation, not prevents it b) also serve the stale cache entry when the pool rejects a lookup c) also resolvelocalhostand IP literals without the pool, so they never wait for it d) both b) and c) Recommended: a)Answer in a comment on this issue; intake reads it on its next iteration.