chore(cli): remove dead ArgusTop and clarify TopCommand wiring#172
Merged
Conversation
ArgusTop.java carried its own main loop that mirrored TopCommand byte-for-byte (cursor hide β connect β fetch β render β stdin q-check β sleep β unhide). Nothing reached it: the JAR's Main-Class is ArgusCli, no test referenced it, and TopCommand re-implements the same flow inline rather than delegating. Its only mention outside the file was a stale doc comment in TopCommand and the architecture doc. Drop ArgusTop.java (108 lines). Update TopCommand's docstring to describe what it actually does. Update docs/architecture.md to drop the "Legacy" framing β those classes (ArgusClient, TerminalRenderer, MetricsSnapshot) are still load-bearing for TopCommand. This was originally surveyed as part of a "tick-loop deepening" candidate. On closer inspection the three remaining tickers (HarnessEngine's session-bounded ScheduledExecutorService, the server's long-running EventBroadcaster, ZgcCommand.runWatch's fixed-iteration for-loop) serve genuinely different lifecycles, and a shared Ticker abstraction would force a single-adapter seam β exactly the shallow-module trap to avoid. The honest payoff in this area was just removing the dead duplicate. Signed-off-by: rlaope <piyrw9754@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ArgusTop.javacarried its own main loop that mirroredTopCommandbyte-for-byte (cursor hide β connect β fetch β render β stdin q-check β sleep β unhide). Nothing reached it:Main-ClassisArgusCli, notArgusTopTopCommandre-implements the same flow inline rather than delegatingTopCommanddocstring and adocs/architecture.mdlineThis PR drops
ArgusTop.java(108 lines), updatesTopCommand's docstring to describe what it actually does, and tightensdocs/architecture.mdto drop the "Legacy" framing βArgusClient/TerminalRenderer/MetricsSnapshotare still load-bearing forTopCommand.Why this and not a "Ticker" abstraction
This change was originally surveyed as part of a "tick-loop deepening" candidate. On closer inspection the three remaining tickers β
HarnessEngine(session-boundedScheduledExecutorService+CountDownLatch), the server's long-runningEventBroadcaster(scheduleAtFixedRatewith start/stop), andZgcCommand.runWatch(fixed-iterationfor-loop with shutdown hook) β serve genuinely different lifecycles. A sharedTickerabstraction would force a single-adapter seam at every site, which is the shallow-module trap to avoid (one adapter = hypothetical seam, not a real one). The honest payoff in this area was the dead-duplicate removal here.Test plan
./gradlew build -x integrationTestpasses after deletionargus topstill routes throughTopCommand(unchanged path)argus top --host=β¦ --port=β¦against a running argus-server on the user side