Repository navigation
Read saved command diagnostics through Journal queries - #1078
Conversation
PR #1078: Read saved command diagnostics through Journal queries17 files, +1143 / -235 Scope🔴 PR has 1378 lines changed. Split into focused PRs. 🟡 1378 lines changed. PRs under 400 receive more thorough review. StructuralOxlint structural signals:
SlopOxlint slop signals:
Static AnalysisOxlint: 28 diagnostics across 7 files (12 rules) no-floating-promises (7): packages/cli/src/sidekick-acp/server.ts CorrectnessExtraneous Code Findings:
No extraneous code patterns detected. |
taras
left a comment
There was a problem hiding this comment.
Independent review by Codex Astra (gpt-6-astra, high effort), replacing the unavailable Fable review under the repository's fallback policy.
Reviewed commit: 9c17d04378b6f482c19857b7b65f86153d484a7d.
Verdict: blocked on acceptance evidence. Reviewed the feature, affected consumers and final documentation-test correction against all thirteen clauses and the explicit amendments. No production correctness defect found. Acceptance remains blocked on the unfamiliar-Sidekick discovery requirement: supplied evidence establishes diagnostic delivery, but pre-scripts discovery and correction. Reused focused evidence; source remained unchanged. No tests, provider calls, delegation, publication or merge performed.
All 13 recorded clauses and the accepted amendments were examined. The inline finding identifies the remaining evidence requirement. CI #2357 is green on this commit; that is separate from this acceptance verdict. Fable supplied no completed review.
Why
A REPL entry can fail with empty rendered output while its command has retained the useful diagnostic. Journal previously exposed metadata, so Sidekick could see the failure without reading the saved cause.
Closes #1006.
What changes
Before: Journal inspection returned record metadata without saved command channels.
After:
<REPL.Entry.Journal entry={14} yq="..." />and passivexmd sidekick read --attach FILE entry 14 journal --yq '...'queries can select savedexec.exitCode,exec.stdoutandexec.stderr. Both return{value, next, prev, last}. Navigation contains ordinary yq expressions or null.How it works
The shared read resolves the entry once. Every request recomputes from that entry's current acknowledged data; growth may shift pages. Generated expressions retain the positive entry, original query and window. Recognition accepts only exact formatter output, using a strict JSON header and full-expression equality. Authored queries keep normal yq semantics.
Review guide
Start with:
packages/cli/src/repl/sidekick/journal-query.tsand the E1 saved-diagnostic recovery journey inrepl-sidekick-journey.test.ts.Then review: saved exec projection in
model.ts, shared root reads incontrols.ts, and passive Journal handling insidekick-acp/server.ts.Look carefully at: complete input before selection, exact entry identity, absent versus empty channels, frame bounds, and disclosure gates.
What must stay true
How to verify it
The signed delivery candidate is
9c17d04378b6f482c19857b7b65f86153d484a7d. It adds a test-only documentation-boundary correction to the clean combined heade93561b(featureb9cb19fplus merged mainbdc88fff). The combined production candidate passed 52 groups and 248 steps:deno task test packages/cli/tests/repl-model.test.ts packages/cli/tests/repl-sidekick-controls.test.ts packages/cli/tests/repl-sidekick-journey.test.ts packages/cli/tests/repl-sidekick-acp.test.ts packages/core/tests/query-component.test.ts packages/cli/tests/repl-asset-import.test.tsE1 follows the actual failed-entry receipt and saved diagnostic into the next scripted provider input, with one command launch and an unsubmitted correction. E2 finds a match beyond the old record and text windows. E3–E5 verify JSON types, query refusals and complete multi-page Unicode channels. E6 distinguishes actual saved exits, missing channels, cancellation and malformed facts. E7 compares cold component, socket and CLI reads while checking passivity.
Architect and Planner feedback both passed on feature commit
b9cb19f; their provenance remains at that commit. The combined-head focused check covers the overlapping asset-import boundary.CI2356 on
e93561bexposed D1 scanning Sidekick flags as REPL command options under all three runtimes. Test-only9c17d04scopes the comparison to the REPL command-line section while retaining genuine drift detection; its regression file passes 33 tests under each of Deno, Node and Bun. Original Planner feedback on that finite correction passed at exact9c17d04. CI2357 completed successfully on exact9c17d04, including the requiredgreenaggregate. All 57 check runs resolved: 56 success and the expected ordinary-PR composability skip. Current Mainbdc88fffalso has successful authoritative push CI. The approved Fable attempt failed without a substantive review because the ACP adapter's Claude client does not support the requested model. Its failure is preserved. The independent Codex Astra fallback review initially identified a missing unfamiliar-Sidekick discovery check. That evidence is now established: a fresh real Codex Sol/medium Sidekick independently requested Journal, received the actual saved diagnostic, and prepared the targeted unsubmitted correction in four provider turns. Its first input contained no diagnostic, query or correction. One command ran; no correction was tested or submitted; original failed-entry history remained byte-identical and cleanup joined. The same Astra reviewer's targeted assessment passedcommand-verification-1, resolving the blocker while preserving the original review's other conclusions. The thread is resolved, source remains exact9c17d04, and no blocking finding remains. This PR is ready for human merge; no merge has been performed by the delivery coordinator.Scope
Included
--yq, focused regressions and user-facing recovery documentation.Intentionally unchanged
New abstractions
Risks and limitations
Strings page by Unicode code points. Arrays page by item count and serialized size. Oversized objects or indivisible items refuse with a narrower-query direction; directly selected saved stdout/stderr remain pageable. Navigation recomputes current entry data, so pages can shift as that entry grows. Inspection reports retained command-boundary facts and does not promise additional pipe-tail delivery.
Scope confirmation