[CTX-0072] feat(cli): implement inspect-only watch mode per accepted design (#121) - #129
Merged
Merged
Conversation
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
Implements the accepted inspect-only
--watchdesign (issue #121, child of #72) forbitty-devtools.Task / RFC / Issue
Scope
Exactly 3 files (approved blobs unchanged):
Behavior (A4 surface)
inspect (--plugins | --subscriptions --plugin | --budgets --plugin) [--generation] [--json] [--watch] [--interval-ms] [--max-ticks]; without--watchthe single-shot path is unchanged.--watchmixed with trace flags exits 2; presence-only--watch; interval default 2000, floor 1000, ceiling 60000.debug.inspectpinned only (src/inspection.tsnarrowed to reject debug.trace/debug.control).ScopeDeniedexits 7 and terminates the loop with zero further ticks;RateLimitedskips the tick and settles as exit 6 only when the loop ends with zero complete frames, exit 0 once >=1 frame.--max-tickscaps complete frames.Evidence (qualified)
bun test tests/cli.test.ts: 69 pass / 0 fail, 350 expects; fullbun test: 444 pass / 0 fail, 3536 expects.tsc --noEmitclean; build clean (dist/cli.js,dist/cli.d.ts); prettier 3.9.6 check clean; oxlint clean (1 pre-existinginspection.tsunused-PanelId warning already at HEAD); markdownlint-cli2 0 issues;git diff --checkclean.RecordingTransport/injectResponsePayload(tests/cli.test.ts:65-79 and the W-suite); no live sockets, no synthesized input, no replay/escalation; W10 prototype spies assert zero trace/control/automation calls.Known follow-up (non-blocking, documented per PX-0377 / PX-0378)
bin/bitty-devtools.ts:9,14) calls the syncrunCli, so--watch(andtrace --wire-trace) is unreachable from the installed CLI until bin is routed to the async/live entry; empiricallyinspect --plugins --watchexits 2. Same pre-existing gap as merged [CTX-0071] feat(devtools): implement wire-trace flag per accepted design (#120) #127 (CTX-0071); correctly scoped out of CTX-0072 per PX-0377.WatchHooks.onSignalcurrently has no production caller (test-only seam); to be wired in the same follow-up task per PX-0378.Docs sync
Tracked separately in
bitty-terminal-docsCTX-0038; code merge proceeds with docs tracked separately while keepingCloses #121.Commit hook
Lefthook pre-commit + commitlint commit-msg hooks pass (no bypass, no bunx, no installs).