oliver-zehentleitner / maity
web: one placement-actions helper for /runners and Managed agents; the /runners poll never keeps a stale read
tsk-tty3c3yrs62v Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication / debt.
What is wrong
- #1938 added a placement list per runner on /runners:
web/js/runners.js:274-312(agentsOn) repeats Stop (PATCH {desired:"stopped"}) and Remove (window.confirm+DELETE) with its own labels and busy texts, next toweb/js/placements.js:175-229(path,actions). runners.js:281(placementPath) rebuildsM.api.projectPathby hand (split("/").map(encodeURIComponent)).readLinesclears and refills the sharedlinesOfmap beforereload()(runners.js:453-457) checksread !== reads, so a slow older poll can leave stale lines for the next draw.
Proposal: use M.api.projectPath; pull one placement-actions helper out of placements.js used by both; readLines returns its map, assigned only after the staleness check.
Effort / risk: M. Low-medium risk (smoke tests cover /runners).