You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make noisy CLI list/status/search-style output compact by default with capped human row counts, truncation, pagination hints, and --verbose/--json detail paths.
Add compact defaults and explicit full-detail affordances to MCP list/search/status tools (brief: false, verbose: true, include_raw: true, or detail/get tools).
Add coverage for compact defaults, full JSON/detail behavior, MCP context caps preserving target logs, and compact issue payloads.
Document compact output defaults and detail flags in the README.
Compatibility notes
Existing --json / --format json list paths continue to return full records where possible.
logs health now prints a compact human summary by default; use logs health --json for the full health object.
MCP status tools now return compact objects by default; use verbose: true for the full previous status payloads.
Before / after
Worst noisy path: logs list --limit 1 with a long log message plus large metadata.
Before:
2026-06-24T04:44:35.167Z ERROR checkout-automation-worker-with-long-name checkout failure repeated during browser automation with a nested payload that includes route history request traces serialized context window retry diagnostics and verbose environment metadata repeated repeated repeated repeated repeated repeated repeated repeated repeated repeated end {"request_id":"req-example-123","payload":"metadata metadata metadata ...","nested":{"context":"browser route state retry diagnostics ..."}}
1 log(s)
After:
2026-06-24T04:44:35 ERROR checkout-automa... checkout failure repeated during browser automation with a nested payload that includes route history request traces serialized context w... id=pr-example-log-1 trace=pr-example-trac...
showing 1 log(s).
Use --verbose for full messages/metadata or --json for full records.
Full machine-readable output remains available:
logs list --limit 1 --json
Adversarial review reconciliation
A read-only adversarial reviewer focused on CLI compatibility, output ergonomics, and token bloat found several issues. Reconciled in this branch:
MCP log_context_from_id capped results now preserve the requested target log; brief: false returns full context unless a limit is explicit.
CLI event/test-report list rows keep full IDs for events get <event_id> and test-reports get <report_id> workflows.
MCP include_raw: true now forces raw/full event rows for search/watch instead of requiring brief: false too.
MCP list_issues compact output truncates long issue messages.
Explicit logs list --format compact remains footerless/line-oriented.
MCP tool descriptions now advertise verbose and capped context parameters.
Validation
bun test src/cli/compact-output.test.ts src/mcp/index.test.ts
Closing as obsolete — superseded by the storage refactor on main, not mergeable via rebase.
Why: This PR was cut from base 92c8d00 (pre-refactor). Since then main has been almost entirely rewritten: src/cli/index.ts (~863 lines changed) and src/mcp/index.ts (~1152 lines changed) were migrated from the old synchronous getDb() + searchLogs()/tailLogs()/searchEvents() data-access API to a unified async Store abstraction (LocalStore/ApiStore, routing local | self_hosted | cloud). This PR's diff edits code paths that no longer exist.
A rebase onto current main was attempted and produces semantic conflicts across every hunk in both files (e.g. sync tailLogs(getDb(), …) handlers vs async (opts) => await store.tailLogs(…)), not textual conflicts that can be mechanically resolved. Salvaging it would mean reimplementing the whole compact-output feature against the new async Store API — including adding offset/pagination support to the store list methods across LocalStore, ApiStore, and the cloud server store — which is fresh feature work, not a PR rebase.
Note: Compact/default-brief output is still valuable and is NOT yet on main (verified: zero compact/--verbose markers in main:src/cli/index.ts). It should be re-done as a new PR against the current Store-based CLI/MCP. The intent is already tracked by the fleet-wide 'compact CLI/MCP output' initiative (implementation subtasks are in flight in the hotfixes project).
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
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
--verbose/--jsondetail paths.brief: false,verbose: true,include_raw: true, or detail/get tools).Compatibility notes
--json/--format jsonlist paths continue to return full records where possible.logs healthnow prints a compact human summary by default; uselogs health --jsonfor the full health object.verbose: truefor the full previous status payloads.Before / after
Worst noisy path:
logs list --limit 1with a long log message plus large metadata.Before:
After:
Full machine-readable output remains available:
Adversarial review reconciliation
A read-only adversarial reviewer focused on CLI compatibility, output ergonomics, and token bloat found several issues. Reconciled in this branch:
log_context_from_idcapped results now preserve the requested target log;brief: falsereturns full context unless a limit is explicit.events get <event_id>andtest-reports get <report_id>workflows.include_raw: truenow forces raw/full event rows for search/watch instead of requiringbrief: falsetoo.list_issuescompact output truncates long issue messages.logs list --format compactremains footerless/line-oriented.verboseand capped context parameters.Validation
bun test src/cli/compact-output.test.ts src/mcp/index.test.tsbun testbun run lintbun run buildgit diff --check