Server code: keep each rule in one place (jar argv, cause message, wildcard check) #676
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#676
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?
Three small duplications in the server code; each should be one pure function.
Found during IW-652 (per-user dashboard, service links, Claude session links). Follow-ups, verbatim:
java -jar <jar> <statePath> <port> <hosts>argv is built in three places (core/commands/Server.scalarunServer,core/adapters/ProcessManager.scala:111,core/commands/Dashboard.scala:209); one pureDashboardJar.commandwould keep the server's argument contract in one place.messageOf(core/adapters/ServerClient.scala),causeOf(core/commands/LiveCommandEnv.scala),shortCause(core/model/ServerStatus.scala).ServerConfig.validateHost(core/model/ServerConfig.scala:36) andanalyzeHostsSecurity(:118) still test the wildcards0.0.0.0and::inline; IW-652 Phase 2 addedServerConfig.isWildcardand changed onlyanswersOnLoopback.Intake: needs-human
Workflow: waterfall
Reason: G7 — scope: the analysis also unifies two cause-message copies outside the server code (Rm.scala:313, BuildToolCleanupRunner.scala:74) and changes user-visible error text at all copies; keep that, or record the two copies in FOLLOW-UPS.md
Analysis: project-management/issues/IW-676/analysis.md on branch IW-676
Intake: needs-input
Workflow: waterfall
Reason: G7 (1 [human] finding)
Analysis: project-management/issues/IW-676/analysis.md on branch IW-676
core/commands/Rm.scala:313andcore/commands/BuildToolCleanupRunner.scala:74, and the shared rule changes what users see at every copy: a multi-line message is cut to its first line, and an empty or blank message shows the exception's class name. The choice is stated in the analysis ("Decision on scope") and is reversible, but the issue does not ask for it. Which scope should IW-676 have? Options: a) keep the wider scope: all five copies use the one rule, with the changed error text b) only the copies in the server code; record theRm.scalaandBuildToolCleanupRunner.scalacopies as one line in FOLLOW-UPS.md c) the wider scope, but keep each copy's current text for multi-line and blank messages Recommended: b)Answer in a comment on this issue; intake reads it on its next iteration.