Skip to content

Track live commands with /track (initial slice of #393) - #394

Closed
raiseCatError wants to merge 33 commits into
devfrom
feature/track-live-command-refresh
Closed

raiseCatError wants to merge 33 commits into
devfrom
feature/track-live-command-refresh

Conversation

@raiseCatError

Copy link
Copy Markdown
Owner

Goal

Initial implementation of #393 built on NMSh's existing finite-command /watch scheduler. This is a post-v0.20 draft and must not merge into the ongoing v0.20 release candidate.

Implemented

  • /track df -h /Volumes/T7Projects and /track --every 5s -- docker system df; native alias sharing the scheduler and manager with /watch.
  • List, pause, resume, refresh, stop, multiple finite trackers. One current and previous snapshot, no repeated foreground transcript entries.
  • Exact read-only Docker disk-report allowance; unknown Docker commands still require confirmation.
  • Snapshot freshness, current exit code, and explicit C-to-copy the latest sanitized display snapshot.
  • Display-control sanitization, child stdio close before snapshot, and no overlapping manual refreshes.
  • Regression tests and docs/development/track-live-command-refresh.md.

Still outstanding in #393

Release coordination

Based on release/v0.20.0 for interface compatibility, not in v0.20 scope. Do not merge until separately approved. Frozen #359 branches, Opus release heads, site, tap and history are untouched. PR CI is new and must be checked; no claims of completed physical verification.

Refs #393, #382, #388.

Copy link
Copy Markdown
Owner Author

/track hardening review — exact-head verification

Review/fix head: d72aeb8aeb86e3a27923d0db5b3d562a45bb9709.

Published PR CI 38715312969 completed successfully on attempt 1 at this head: both macOS and Ubuntu shards, Node 22 compatibility, Quality and aggregate Verify (22.x/26.x) all passed. PR-triggered Fedora and both timing smoke jobs are skipped by workflow design; they are not acceptance evidence here. Physical terminal/clipboard QA remains unperformed.

Problems found and corrected: the first PR CI (38710353898) exposed missing Ask coverage and altered palette ranking; both were corrected without changing palette order. An intermediate macOS shard exposed two test-portability assumptions (OS-specific spawn error code and a width-clipped fallback message); assertions now check failure semantics and safety at the actual visible width. Earlier failed/cancelled runs remain recorded, not reclassified as flakes.

Hardened behaviors:

  • Strict finite cadence parsing (no invalid/overflow timer fallback), 2s/15s minima, 60m upper bound, eight active trackers, bounded retention.
  • No overlapping refreshes; manual requests report whether a run actually began.
  • Byte-bounded (200 KB) incremental UTF-8 capture and truthful truncation, error, signal and timeout presentation; waits for stdio close before freezing a snapshot.
  • Owned process-group SIGTERM then bounded SIGKILL escalation; closes inherited output pipes on timeout/forced stop. No claim of controlling descendants that escape the owned group.
  • Repeated shell substitutions, heredocs and detached background operators refused; unknown side effects remain opt-in; exact read-only docker system df is allowed.
  • Direct-copy of latest sanitized snapshot (not previous samples), with explicit clipboard failure messaging and no hidden review bypass in narrow terminals.
  • Focused regression tests for parsing/safety, freshness/copy, output limits, concurrent trackers, unavailable commands/cwd, and narrow confirmation fallback.

Scope limits: This is an initial window-scoped /watch-based feature, not the service-owned persistent inline transcript-block implementation from #393. Detach/reattach continuity, physical QA, independent non-PR timing/Fedora coverage and full #393 acceptance remain pending. Keep the PR draft and out of the v0.20 release candidate; no automatic release merge.

@raiseCatError

Copy link
Copy Markdown
Owner Author

Its base release/v0.20.0 is now released as v0.20.0 (#392). /track (#393) stays future work; retarget this draft to master before review.

Copy link
Copy Markdown
Owner Author

v0.21 handoff (2026-10-18): Retargeted this draft from the released/stale release/v0.20.0 base to current dev (now fast-forwarded to match master). Treat d72aeb8a as an implementation reference, not a merge-ready acceptance. Before reuse, rebase/integrate on the exact v0.21 branch, inspect conflicts and regressions with the now-shipped #382 background supervisor, and deliver #393's session-owned lifecycle, live-block/transcript semantics, raw-vs-sanitized copy/search, safe repetitive execution, and physical QA. Preserve existing /watch, PTY/input ownership and confirmed release behavior. Leave this PR draft until implementation is re-reviewed; do not blindly squash it into dev.

@raiseCatError

Copy link
Copy Markdown
Owner Author

v0.21 reconciliation: this draft's WatchTasks.ts and WatchPanel.ts were carried as written into #416 (neither file changed on dev since this branch's base), together with tests/track.test.ts; its app and slash edits were re-applied by hand on current dev. #416 adds the in-place transcript block, live-PATH samples, /track copy and the final result on stop. This draft was not merged and can be closed once #416 lands.

@raiseCatError

Copy link
Copy Markdown
Owner Author

Closing as superseded by #416 (merged into dev as a5f2fd69, part of the v0.21 line). Nothing here is lost:

Verified in the v0.21.0 release audit against dev 433af8fd. The branch feature/track-live-command-refresh is left in place for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant