Repository navigation
Adopt read_output controls on brief readers - #148
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Summary by CodeRabbit
Walkthroughpm-brief adopts pm CLI read-output controls for nine read commands. The commands provide structured results for host processing and retain ordinary rendering. The extension updates its service registration and minimum supported CLI version, and adds packaged-host tests and documentation. ChangesRead-output controls
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant BriefCommand
participant PmCliHost
participant OutputFormatService
BriefCommand->>PmCliHost: Return declared structured rows
PmCliHost->>PmCliHost: Apply requested output controls
PmCliHost->>OutputFormatService: Request formatting for file-summary output
OutputFormatService-->>PmCliHost: Return JSON or text output
Possibly related PRs
Merge Risk: ⚪ Minimal · up to
|
Reviewer's GuideThis PR upgrades all nine pm-brief readers to the pm CLI/SDK 2026.10.13 read_output contract by declaring real row paths, returning structured data for host-controlled requests, and routing ordinary documents through a scoped output service; it also raises compatibility floors, guards file writes, adds packed-host continuation and projection coverage, and documents the adoption model. Sequence diagram for host-controlled brief outputsequenceDiagram
actor User
participant CLI as pm_CLI_host
participant Brief as pm_brief_reader
participant Service as output_format_service
User->>CLI: Invoke brief command with output controls
CLI->>Brief: run(ctx)
Brief->>Brief: validateReadOnlyOutput(ctx)
Brief-->>CLI: Structured result with declared rows
CLI->>CLI: Apply projection, budget, omission, cursor
CLI-->>User: Projected page and optional continuation cursor
User->>CLI: Invoke brief command without controls
CLI->>Brief: run(ctx)
Brief-->>Service: Rendered document result
Service-->>CLI: Raw document output
CLI-->>User: Existing document rendering
Flow diagram for brief file-write control validationflowchart TD
A[Brief reader invoked] --> B{--output and read controls supplied?}
B -- Yes --> C[validateReadOnlyOutput]
C --> D[Reject with usage error]
B -- No --> E{File output requested?}
E -- Yes --> F[writeFileSync]
E -- No --> G[Return structured or rendered result]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@coderabbitai full review Please review head 46478e7, including outside-diff findings. |
✅ Action performedFull review finished. |
- [pm-brief-ccwo](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-ccwo.toon): #148 (a0b44b5) Co-authored-by: SteveBot <1153461+unbraind@users.noreply.github.com>
Universal context controls previously refused every pm-brief reader. This change opts all nine commands into the SDK 2026.10.13 read_output contract and returns structured results when canonical controls are requested. Ordinary documents and file-summary JSON/TOON keep their existing output; file writes refuse read controls before writing.
Design and before/after
Validation
env HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 npm run release:check: 390 passed, 0 failed/skipped.env HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 bun run release:check: 390 passed, 0 failed/skipped.node --test test/read-output-host.test.ts: 13 passed, 0 failed/skipped. The packaged-host suite also passes on Node 22.23.1; archive discovery tolerates npm 10 lifecycle stdout. Strict tracker health with required merge drivers passes.Adoption recipe
Tracker: pm-brief-ccwo.
SDK observation: generic budget-string compaction can shorten compound identifiers longer than 240 characters. Tests use ordinary stable IDs and allow disclosed detail compaction; SDK changes and upstream issue filing are outside this task.
Summary by Sourcery
Adopt the SDK 2026.10.13 read-output contract across pm-brief readers while preserving existing document rendering and safely rejecting incompatible file writes.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores:
Summary by cubic
Adopts the SDK 2026.10.13
read_outputcontract on all nine brief read commands, so the host can now apply universal projection, amount, token-budget, and cursor-continuation controls. Previously the host refused these controls; now commands return structured results when canonical controls are requested, while ordinary documents and file summaries keep existing output and file writes refuse read controls before writing.read_outputwith real, non‑overlapping row paths on all nine readers.pm_min_versionto2026.10.13.Written for commit 46478e7. Summary will update on new commits.