Repository navigation
chore(upstream): Merge master and preserve shared-session ACP behavior - #21
Conversation
…ing history changes
Integrate upstream master at 6af9536. Preserve fork routing, scoped cancellation and turn lifetime; port upstream stop reasons, replay recovery and tool status updates. Union protocol exports and dependency features, and regenerate the workspace lockfile from upstream pins. Raise only exceeded fork size and safety ceilings for incoming upstream growth and the outcome module. Keep upstream-owned files in place and advance the fork formatting base. Validation: cargo check --locked -p jcode --bin jcode --tests; module declarations, whitespace and all four fork budget checks. Tests typechecked, not executed locally.
Give retained history entries their stored indices and synthetic markers no index. Raise the fork client_state.rs ceiling by one line for the production stored_index hook, preserving the upstream file layout. Validation: cargo check --locked -p jcode-app-core --tests; fork code-size budget and git diff --check.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedToo many files! This PR contains 490 files, which is 190 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0abf42b5da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Complete the TUI protocol test constructors. Release request, retry and scroll-anchor fences after disconnect or session change. Recover remote journal projections one record at a time without applying malformed records. Cache the process tree while rereading mutable client session markers on each voice poll. Keep upstream files in place: increase only remote.rs and remote/server_events.rs fork size ceilings by three lines each for the paging reset hooks. No safety baseline widening; the old test-merge import scanner failure is already fixed on custom by cdab454. Validation: nine named recent-history tests, one remote scanner/projector regression and one voice registry-update regression passed under nice. Embedded Python checks, all four fork budgets, module declarations, formatting and diff whitespace passed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0abbf8cc45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Suppress initial empty todo plans while retaining populated resume snapshots and later clear updates. Keep fixture drift semantics unchanged and distinguish plan state from replayed content message IDs. Recover canonical journal entries glued after torn prefixes and restore malformed multi-record coverage. Document connection-scoped disconnect preservation and the detached drain diagnostic limitation without changing lifecycle policy or budget ceilings. Validation: named Rust projector regression and expanded embedded Python corpus passed; binary/test cargo check, size budget and whitespace passed. Named ACP e2e execution and exact-head CI follow on ceres/CI.
Enable only the handshake feature on provider-core’s tokio-tungstenite dev dependency. Crate-scoped test builds now own the APIs their WebSocket reference server requires, independent of workspace feature unification. Production TLS features and Cargo.lock remain unchanged. Verified the four-error failure at current integration head and original fork base 3f936dd, then all six ws_deflate tests pass with cargo test --locked -p jcode-provider-core --lib ws_deflate.
Emit managed-local and remote preparation timings with the existing CLOUD_TIMING field shape. Forward the new preparation prefix while retaining legacy remote timing forwarding. Update the generated-shell fixture assertions and flatten the redundant refusal blocks without changing recovery behavior. Validation: binary/test cargo check, formatting and diff whitespace pass. Named generated-shell execution follows on ceres at the pushed exact head; no budget or policy changes.
There was a problem hiding this comment.
Independent review (GLM-5.3): PASS for 3cdb35bbe4f23c230492417d0aa6078ffe8a1792
Full-integration review of PR21 (upstream master at 6af9536 merged into camerontaylor/jcode) by an independent GLM review team: 1 lead + 3 area reviewers (jcode/zai:glm-5.3-flash), cross-family from the Codex/GPT author, dispatched by the desk. Reviews ran at 0abbf8c, then the two fixer deltas were reviewed hunk-by-hunk at 19fe5f4 and 3cdb35b.
Coverage: 492/492 changed paths (diff 3f936dd..head), plus supplementary lenses:
- Area A daemon/protocol/history: 139/139 (27 fork-overlay files hunk-reviewed, 112 upstream-verbatim proven).
- Area B ACP/provider/agent: 57/57.
- Area C TUI/session-picker/voice/vendor: 261/261 (98 vendor/ratatui-jcode paths byte-identical to upstream; 110 merge-clean paths verified equal to the upstream-only diff, 0 mismatches).
- Lead: 32 cross-cutting paths (Cargo.lock/toml, CI workflows, docs, scripts, small TUI subcrates, provider-core Cargo.toml), the 66-path combined merge lens (--cc on bf0a3e7), the 216 overlay-only fork-authored paths absent from the changed-path manifest (incl. the ACP e2e suite and fixture corpus where the round-1 failures lived), and both deltas.
Integration-critical behavior verified at exact head
- Authoritative turn ownership/cancel: fork turn-claim hook + upstream reminder classification retained (replay reminders stripped, real queued content preserved); turn lifetime, classified terminals, post-close queue drain, optimized fanout survive the merge.
- Legacy ACK + joined prompts: routed outcomes accept local withdrawals before ACK; legacy streams keep the upstream single-reader ACK guard; outcome-only propagation to joined prompts without duplicated text/usage; ticket release + upstream error-report logging preserved.
- Replay/history: stored_index migrated in every fixture constructor (automated scan: all ModelChanged/TurnStarted/TurnFinished/TurnEvent literals carry new fields); recent-history paging fence released on BOTH disconnect and session change; regressions proven non-vacuous by the lead (reverting the hook fails the test).
- Journal recovery: Python preview reader salvages canonical entries glued after torn lines, matching the Rust reader (lead verified functionally: 3 torn variants restore both records).
- Wire compat: every new protocol field serde(default)+skip_serializing_if, no deny_unknown_fields; Pong.capabilities defaulted.
- Voice stale-cache fixed via PID-tree cache + per-poll session-marker re-read, with same-file-update regression.
- Deps/CI: fork-parent deps preserved in Cargo.lock (zero removed); fork-ci FORK_UPSTREAM_BASE pinned to the new upstream parent; only exceeded size ceilings raised (+3 each for remote.rs/server_events.rs, matching 3-line hooks; ceiling == actual size verified).
Round-1 findings and resolution (at 0abbf8c, retained for attribution)
- Fork CI red: 7 ACP e2e failures (fixture drift/replay-id count) caused by upstream's new authoritative resume-todos emission (6428b57). Fixed by initial-empty-plan suppression + plan-state-excluded replay counting + regenerated assertions; ACP conformance cohort 37/37 and shared-session e2e PASS; Fork CI green.
- Journal Python/Rust salvage divergence (P2): fixed and lead-verified.
- Dropped malformed-multi-record test case (P3): restored.
- provider-core ws_deflate_tests crate-scoped compile failure (originally reported P2, re-attributed): verified pre-existing on both custom 67d63a6 and fork base 3f936dd (identical 4 errors; feature tree lacks
handshakeon both sides; voice feature change refuted as cause). Fixed dev-side (+ "handshake" dev-dep); 6/6 tests pass crate-scoped at the final head; Cargo.lock unchanged (lead-verified).
Evidence at exact head 3cdb35b
- CI all green: Fork CI 43118730797 (Quality + Build/e2e), Require Linked Issue, Release Recovery Validation, Windows Companion Compile, Windows Transport Tests, Windows secret ACL regressions.
- Independent lead runs (named checks, nice, memory-scoped, no live providers, umask-normalized): recent_history 9/9, remote_failover battery 144/144, generic failover seed 2/2, cloud_preview projection 4/4, plan_update units 2/2, voice dictation 13/13, provider-core ws_deflate 6/6. Reviewer runs: acp::tests 87, daemon_router/settlement 53, sdk turn_retry 21, fork fmt-check OK. Author's isolated ceres runs (recorded, not attested by us): conformance 37/37, shared-session 1/1, warm-preparation 1/1.
Remaining P3s (non-blocking follow-up)
- P3: TurnEventChannel drop path classifies a producer-aborted turn as Completed without an end_message diagnostic (terminal still published exactly once); documented in-code.
- P3: PrepareDisconnect preserve_work continuation is connection-scoped and survives a session switch on the same transport; documented in-code as intended.
- P3: anthropic-runtime reloads Config::load per retry attempt (cache-backed; accepted no-action).
- P3: [CLOUD_TIMING] label consistency now largely unified; remote legacy "[cloud prepare timing] " lines are still forwarded alongside the new format (intentional compatibility window).
- P3: provider-core ws_deflate_tests needs the
handshakedev-dep feature forever; a future tungstenite bump should re-check the feature set.
Verdict: PASS for 3cdb35bbe4f23c230492417d0aa6078ffe8a1792. P3s are follow-up material per repo policy.
Independent review by GLM-5.3 for 3cdb35b
5 finding(s) (5 minor): 0 as inline threads, 5 listed below.
Queue item ``, reviewed range 53f56f4978477d46051af4a1f56a5b719748cbc2..3cdb35bbe4f23c230492417d0aa6078ffe8a1792. Independent review by GLM-5.3 for 3cdb35b. Reply on a thread or resolve it after an explicit disposition.
Not anchored to the PR diff
crq finding F1 [minor] P3: TurnEventChannel drop path lacks end_message diagnostic on producer abort
Drop path (state.rs ~698-704) can classify a producer-aborted turn as Completed with no end_message diagnostic; the classified terminal itself is published exactly once, so this is diagnostics-only. Now documented in-code. Follow-up: surface a diagnostic when the detached drain finishes without finish().
crq finding F2 [minor] P3: preserve_work continuation is connection-scoped across session switches
PrepareDisconnect{preserve_work:true} sets connection-scoped continue_on_disconnect (client_lifecycle.rs ~1557) which survives a later session switch on the same transport. Documented in-code as intended; revisit if attachment-scoped continuation is ever needed.
crq finding F3 [minor] P3: anthropic-runtime reloads Config::load per retry attempt
lib.rs ~2074-2078 reads Config::load inside the retry loop; cache-backed so cost is low. Accepted no-action; consider hoisting if the loop grows.
crq finding F4 [minor] P3: ws_deflate_tests now permanently require the handshake dev feature
crates/jcode-provider-core/Cargo.toml dev tokio-tungstenite now carries features=[handshake]; the pre-existing crate-scoped compile failure is fixed (6/6 pass). A future tokio-tungstenite bump should re-verify this feature set.
crq finding F5 [minor] P3: legacy [cloud prepare timing] lines still forwarded alongside new CLOUD_TIMING format
cloud_move/transport.rs ~438 forwards both the new [CLOUD_TIMING] stage=prepare format and the legacy [cloud prepare timing] prefix. Intentional compatibility window; drop the legacy prefix once no generated script emits it.
|
Independent review (GLM-5.3): ITERATE for Correction addendum to this review team's earlier review of this exact head (review 5866768089). The scoped PASS at this head stands for the 492 reviewed paths, and the earlier fixes remain verified (ACP resume-todos fixture refresh, torn-line journal salvage, restored plan_update test case; named batteries re-run at this head). But a fourth reviewer finding, thread #discussion_r4543822234 (P2, remote.py:229, filed at 22:18Z against head 0abbf8c), was not included in that review's join, so its "all review findings resolved" statement no longer holds. Superseding verdict for this head: ITERATE until the remaining defect is fixed by the linked follow-up PR. Remaining defect (inherited from upstream, carried through the merge): the Python cloud projector applies journal records unconditionally and lacks parity with the Rust loader's Independently reproduced at this exact head (identical at merge commit a5db6e3; projector blob md5 f2b4e1c53601a1355b7d9c7aeea81d5e), against the canonical Rust stale-prefix rule:
For accuracy: journal entries with unseen message ids are correctly applied even with older timestamps in both the canonical loader and the projector (the message-ID rule overrides timestamps); that case is not a defect. Repro corpus and results live in the reviewer's durable record ( Fix in flight: follow-up PR #26 (head 84bb93d, based on merge commit a5db6e3) implements the Rust stale-prefix/ID/timestamp filter before projection and is under independent exact-head review now. Thread #discussion_r4543822234 stays open until that fix merges. |
Merge upstream master at
6af953607intocustom, bringing upstream fixes and features forward while retaining the fork’s shared-session ACP behavior.Resolve nine conflicting files by combining protocol exports, disconnect cleanup and SQLite features; preserve the fork’s turn lifetime and event routing while adopting upstream replay recovery, efficient fanout and ordered swarm-status publication. Port upstream ACP stop-reason reporting into the fork modules, including joined prompts, without duplicating text or usage. Preserve scoped cancellation and the legacy daemon acknowledgement guard. Regenerate Cargo.lock from upstream pins with only the fork’s three additional dependency entries.
Review attention should focus on ACP ownership/cancellation and joined-prompt outcomes, the shared server event drain, and history-message compatibility. The latter also required
stored_indexon synthetic history rows and test fixtures. Fork-only size/safety ceilings record incoming upstream growth; upstream files were kept in place. Advance the fork formatting base to the merged upstream commit.Local validation: the binary and its tests passed
cargo check --locked -p jcode --bin jcode --tests; module declarations, formatting, whitespace and four fork budget checks passed. The first CI run found two missing history-fixture fields plus a one-line size ceiling mismatch; the follow-up commit fixes those. Tests were typechecked, not executed locally. PR CI supplies execution and full validation.Closes #22.