Repository navigation
wrapup: publish the stranded codex/jcode-stack-e613-20261008 stack - #262
KooshaPari wants to merge 2145 commits into
Conversation
…afe config Preserve contributor ancestry while integrating only 57d5878..bffc2d3 on the current approved-PR candidate. Do not import the old branch tree or unrelated divergent changes. Keep thought signatures on persisted tool calls and provider resume handles separate from jcode session IDs. Retain Gemini/Antigravity compaction and Gemini schema/client compatibility changes. Review corrections: do not enable Cursor summary compaction until its prompt truncation is safe. Resolve Gemini config without sticky process-environment exports, preserve the project alias, and invalidate cached runtime state on route/project changes. Apply compaction caps on construction and refresh them before requests while retaining the uncapped model window. Restrict HTTP retries by method/status/quota, honor bounded Retry-After hints, and avoid replaying onboarding. Validation: provider/schema/message suites, config reload and compaction suites, local HTTP retry fixture, actual runtime cache replacement, and two-turn agent signature/session-identity regression all pass. Shared-target artifacts were rebuilt under the host Cargo gate after a stale dependency caused a false missing-method failure. Live Gemini acceptance remains untested because credentials are unavailable.
* ci: classify PR labels with Jev semantic scope * ci: pin validated Jev semantic labeler revision * ci: allow manually labeling an existing PR
Configure root reasoning effort independently for light and deep swarm modes.
* ci: label PRs after current-head Greptile reviews * ci: isolate trusted review concurrency and pin verified action
Preserve current master and original PR ancestry. The two formatting fixes are already present; apply only the three missing workflow fixes. Duplicate-rejecting YAML parsing passes for every workflow, and negative controls reproduce each old duplicate env failure. Other workflow semantics are unchanged.
Apply only the two scoped contribution commits while preserving current master and original PR ancestry. Keep fallback branch and automatic pull policies unchanged.
Preserve current master and original author history. Resolve terminal test overlap by retaining tmux extended-key coverage and checking the Kitty push sequence specifically rather than rejecting modifyOtherKeys. Candidate is pending combined validation.
… fixes The exact scoped three-fix patch is already present on current master. Preserve original contribution ancestry without replacing newer code. Current candidate tests and public-interface validation follow.
…ixes The scoped three commits are patch-equivalent and all changed blobs matched current master before the other approved integrations. Preserve original PR ancestry without replacing newer code.
Re-verified at HEAD 844016a by running the full jcode-tui serial suite locally (TERMINAL, .scratch-tui-final.txt): test result: FAILED. 2396 passed; 2 failed; 17 ignored; 0 measured; 0 filtered out; finished in 372.03s The 2 failing tests are not the truncate_line_for_narrow_* tests from the prior summary. They are: 1. tui::app::helpers::helpers_tests:: detected_resume_terminal_recognizes_handterm_term_program left: Some("herdr") right: Some("handterm") Cause: the test sets TERM_PROGRAM=handterm via EnvVarGuard but the harness shell already has TERM_PROGRAM=herdr (from earlier jcode session), and EnvVarGuard races the read. 2. tui::app::tests:: test_real_draw_click_on_body_anchored_image_label_cycles_level left: Some("Image size: large · Image copied") right: Some("Image size: large") Cause: status_notice() inherits a stale "Image copied" suffix from a prior test that ran the clipboard copy path. Both are environment-pollution issues that disappear in the CI ubuntu runner's fresh container, which is why CI shows 2402/0. Neither is introduced by the merge and neither needs a code fix in this PR. The 25f3e1f line in \u00a72 now reflects the actual merge-commit stat (numbers verified via 'git show --stat 41fae89') and the correct 4+2 framing with the truncation tests correctly attributed as resolved by the same ui_input.rs width-measurement fix. tx-agent: jcode tx-validated: test tx-task: #24 tx-scope: docs/sessions/20260924-upstream-0.88-sync tx-intent: correct §2 stat numbers and §5 env-pollution detail in 08_FINAL_EVIDENCE
… sessions Regression coverage for 68617e5: `/server-reload` must reload the client binary for every idle remote session, not only self-dev canary sessions. Covers the idle/newer-binary reload, the busy-guard, the already-current skip, and the local-client skip. tx-agent: jcode tx-validated: test tx-scope: jcode-tui tx-intent: lock the relaxed server-reload client reload gate against regression (cherry picked from commit 5e965b1)
HERDR showed jcode panes with `agent_status` but no `agent_session`, so they were not restorable while codex's were. `spawn_report_session_id` was wired only to the remote `ServerEvent::SessionId` arm, but a local or `--resume` client never receives that event (the server comment in client_session.rs notes local clients learn their id from launch state), and the initial Subscribe snapshot adopt did not report either. Report the bound session id at both remaining adoption sites so every pane announces an `agent_session`. tx-agent: jcode tx-validated: test tx-scope: src/cli/tui_launch.rs, jcode-tui/server_events tx-intent: surface jcode agent_session in herdr like codex (cherry picked from commit 591df7a)
The existing EOF regression tests drain with `while let Some(..)`, which stops at the first `Poll::Ready(None)`. That shape never polls the stream again after termination, so the `inner_done` guard from f088975 was uncovered for post-termination polls. Add two tests: - `repeated_post_eof_polls_stay_none_without_repoll_inner` polls three more times after termination and asserts each stays `None`. - `empty_inner_synthesizes_single_message_end_then_clean_eof` asserts an inner yielding only an empty chunk still synthesizes exactly one terminal `MessageEnd` and then reports clean EOF. Negative control: with the `inner_done` guard neutralized, both tests fail with the original panic at futures-util `unfold.rs:108`, confirming they detect the real defect rather than passing vacuously. Suite: 43/43 openrouter tests pass (41 + 2 new), clippy -D warnings clean. Live acceptance: default non-capture path at 195,937 input tokens and capture path at 196,007 input tokens both exit 0 with no panic. tx-agent: jcode tx-task: m3-capture-panic-followup tx-validated: test tx-scope: crates/jcode-provider-openrouter tx-intent: Close the post-EOF polling coverage gap left by f088975 (cherry picked from commit f133cf3)
The previous version of `empty_inner_synthesizes_single_message_end_then_clean_eof` yielded a single empty chunk, while its docstring claimed coverage of "or nothing at all". A response with zero chunks is a distinct path: the stream reports EOF without ever delivering a buffer, so the terminal `MessageEnd` must be synthesized straight from the EOF branch. Iterate both shapes (one empty chunk, and zero chunks) over a boxed common stream trait object, since each `unfold` closure is a distinct type. Negative control re-confirmed: with the `inner_done` guard neutralized the test still fails with the original panic at futures-util `unfold.rs:108`. Suite: 43/43 openrouter tests pass, clippy -D warnings clean. tx-agent: jcode tx-task: m3-capture-panic-followup tx-validated: test tx-scope: crates/jcode-provider-openrouter tx-intent: Make the empty-response test match its documented coverage (cherry picked from commit 62b8ff2)
tx-agent: codex tx-validated: manual tx-scope: jcode
tx-agent: codex tx-validated: manual (cherry picked from commit 82c333f)
tx-agent: codex tx-validated: manual (cherry picked from commit 89ab52b)
tx-agent: codex tx-validated: manual (cherry picked from commit 738f94b)
tx-agent: codex tx-validated: manual (cherry picked from commit 08d34f6)
tx-agent: codex tx-validated: manual (cherry picked from commit 5c4d560)
tx-agent: codex tx-validated: manual (cherry picked from commit 681e99e)
herdr 0.9.3 only persists agent_resume when the reporter source starts
with "herdr:"; "jcode:{agent}" was silently ignored, so no resume_argv
reached session.json. Prefix with herdr: and assert it in the reporter
test (cargo test -p jcode-herdr: 24/24).
tx-agent: jcode
tx-validated: test
tx-scope: jcode-herdr
tx-intent: make jcode report-agent calls persist against stock herdr 0.9.3
(cherry picked from commit ae9681c)
Session 20261001-herdr-crash-persistence deliverables: - 00_SESSION_OVERVIEW: status ledger (C1/C2/C5/C6/K1 done, C3 revised, C3.1 gates closed, C4 operator-gated) - 01_RESEARCH: verified findings on how herdr consumes agent_resume - 07_DRAFT_PRS: 6 upstream issue drafts (4 herdr, 2 jcode), incl. Issue 4 documenting rc=0-empty + async/batched persistence + resume pruning - 08_CUTOVER_RUNBOOK: rev2, Phases 0-8 + 10 abort criteria + Appendix A. Live report-agent injection abandoned (disproven); replacement is ONE server-stopped file transaction via scratch/cutover_session.py Phase 0 preflight executed and passing: PARSE_OK, baseline resume=5/session=7 (5/13 covered, 3 phantoms), build b87cd99 installed, 24/24 tests, config 3/3. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions tx-intent: land session deliverables + rev2 runbook so cutover is executable (cherry picked from commit 14f9493)
…unbook Read-only validation of every Phases 1-4 command executed BEFORE the operator gate, so no typo is discovered mid-cutover: - `herdr server stop` confirmed as the real subcommand (no bare `herdr stop`) - Phase 4 start proven argv-identical to the live server: ps -p 1266 = `~/.local/bin/herdr server`, matching `nohup ... herdr server &` - `herdr status server` and `herdr pane list` both respond (rc=0) - cutover_session.py --help matches runbook invocations exactly - live inventory cross-check: 12 w7 panes + Ag Stat = 13 targets; 3 probe panes match the 3 REMOVE targets; 4 codex sessions = 4 KEPT entries tx-agent: jcode tx-validated: manual tx-scope: docs/sessions tx-intent: pre-validate cutover commands before the destructive phase (cherry picked from commit 54fa3f1)
…json The rev2 cutover hardcoded pane slots, labels, pane IDs and session IDs. Live evidence disproved that repeatedly: slots migrated (Omni 8->7, ForgeCode 9->8), `Cons` vanished, `Cockpit` appeared, and an orphaned SID moved between pane and slot representations between consecutive runs. Its fixed 13/13 acceptance figure also does not match the live topology. reconcile_sessions.py replaces it with runtime discovery from session.json, `herdr pane list`, `herdr pane process-info` (ps eww as fallback), and correlates in strict strength order: unique label -> unique live-SID pane in the same cwd -> unique live holder of the stored SID -> otherwise SKIP. It never invents a SID, so a guess cannot cause a resume storm. Key fixes found while validating: - process-info runs concurrently; serial calls exceeded a 120s timeout, concurrent discovery completes in ~2s. - phantom purge no longer discards a pane's proven resume (the rev2 defect that lost coverage on panes holding both a probe_* and a live SID). - two-phase --emit-plan / --plan-file, so the write makes no herdr CLI call and cannot be clobbered by the daemon; stale plans are refused by _source_sha mismatch. 09_DAEMON_OWNS_STATE.md records the root cause that invalidated the file-write plan: the daemon holds session state in memory and rewrites the whole document on a ~60s timer, reverting external edits. A write must be followed by a daemon restart. Verified live: 0 reverts across 5 samples over 125s, dup_sids=0, probes=0, pane rows unchanged. tx-agent: jcode tx-validated: test tx-scope: docs/sessions/20261001-herdr-crash-persistence tx-intent: Replace hardcoded-topology cutover with runtime discovery and document daemon-owns-file constraint (cherry picked from commit 741c2c6)
tx-agent: codex tx-validated: manual tx-scope: jcode
…ls (#28) * fix(tui): guard against ratatui buffer overflow in degenerate terminals - L1: cargo update -p ratatui (0.30.0 -> 0.30.2, pulls upstream bounds-check fix) - L3: pre-flight size gate (60x20) before ratatui::init in 3 entry points (main TUI, session picker, permissions TUI) - L3.resume: size check in init_tui_terminal_resume before Terminal::new - draw_recovery: skip rendering when frame.area is degenerate - tests: 4 regression tests covering zero/57x1/60x20/80x24 terminal sizes in tests/ratatui_buffer_guard.rs plus a unit test for the draw_recovery degenerate-frame early-return tx-agent: forge tx-validated: cargo-test tx-scope: src/cli/terminal.rs, crates/jcode-terminal-guard/, crates/jcode-tui/src/tui/ui/draw_recovery.rs, crates/jcode-tui/src/tui/session_picker.rs, crates/jcode-tui-permissions/src/lib.rs, crates/jcode-tui/tests/ratatui_buffer_guard.rs tx-intent: prevent buffer-overflow panic in jcode TUI under 1-row / 0-col terminals Refs: ratatui-core 0.1.0 panic at buffer.rs:250 (jcode session cricket 2026-09-18) * fix(tui): restore inherited terminal modes on resume-size-check failure CodeRabbit 2026-10-05 (PR #28 review 5421574647) flagged that init_tui_terminal_resume's early-return path propagated the size-gate error without first restoring the terminal modes preserved across the exec handoff (raw mode + alt-screen + bracketed paste + focus events, written by the previous jcode process via INHERITED_MODES_ENV). The inherited state survived the abort because the abort happens before init_tui_runtime can construct a TuiRuntimeGuard, so the user's terminal was left in a degraded state. Fix: extract the inline cleanup that already exists in install_panic_hook and handle_termination_signal into a new private helper restore_inherited_terminal_modes_quietly() and call it from: - init_tui_terminal_resume's size-check early-return path (NEW) - install_panic_hook (replaces inline block) - handle_termination_signal (replaces inline block) The successful resume path is unchanged. Helper is idempotent and side-effect-safe on stderr (matches the panic hook's contract). Adds a unit test in src/cli/terminal.rs::tests that asserts the helper is callable twice in a row without panicking on a non-TTY test stderr, documenting the cleanup-on-failure contract. tx-agent: forge tx-validated: cargo-test tx-scope: src/cli/terminal.rs tx-intent: terminal cleanup on size-gate failure in resume path Refs: CodeRabbit review 2026-10-05, PR #28 Refs: ratatui/ratatui#2810 * fix(tui): restore inherited modes from INHERITED_MODES_ENV on resume-size-gate failure CodeRabbit 2026-10-05 (PR #28 review 5422560940) flagged two issues on commit 1ac499c: 1. restore_inherited_terminal_modes_quietly was a fixed-shape helper that wrote to stderr and disabled only the always-on modes. It never read INHERITED_MODES_ENV, so mouse capture and keyboard enhancement that the previous jcode process preserved across the exec handoff stayed enabled after the new process aborted. Switch to: decode INHERITED_MODES_ENV, dispatch to a new inner helper that disables the inherited flags (focus, mouse incl. Windows VT, keyboard enhancement) on stdout, mirroring the enable / normal cleanup paths in init_tui_runtime and cleanup_tui_runtime. When the env var is missing or malformed, fall back to the safe minimum on stdout (no flag-specific cleanup, since we don't know which were set). 2. The previous test claimed to prove idempotency and restoration but only smoke-tested the helper in isolation. Replace it with a thread-local RESTORE_HELPER_CALLS counter and a new test that actually exercises init_tui_terminal_resume's size-error branch (in a non-TTY test env the live size check returns Err) and asserts the helper was called exactly once before the error propagated. Three additional smoke tests pin the missing / valid / malformed env-var paths. Successful resume path unchanged. Cleanup is still best-effort and idempotent. tx-agent: forge tx-validated: cargo-test tx-scope: src/cli/terminal.rs tx-intent: env-var-aware terminal-mode restoration + branch-exercising test Refs: CodeRabbit review 2026-10-05 (PR #28 review 5422560940) Refs: CodeAnt AI review 2026-10-05 (PR #28) Refs: #30 Refs: ratatui/ratatui#2810 --------- Co-authored-by: KooshaPari <[email protected]> (cherry picked from commit bf8ac73)
|
Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters. If you still want a review, comment |
|
Important Review skippedToo many files! This PR contains 253 files, which is 153 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Resolve merge conflict for #262 by merging the current master into the PR head. Conflict resolution: keep the PR's side in the conflicting hunks (the PR's own change is the point); the base branch's non-conflicting changes are retained. tx-agent: jcode tx-validated: manual tx-scope: KooshaPari/KCode tx-intent: make #262 mergeable by merging master into wrapup/jcode-stack-rebase-20261108
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
Files Reviewed (sampled)
Fix these issues in Kilo Cloud Reviewed by free · Input: 37.5K · Output: 6K · Cached: 271.9K |
|
Converted to draft during the 2026-11-11 queue triage. This is a 100-file, +9063/-7366 mixed stack that fails Quality Guardrails, Cargo Check & Parity, Clippy, Format, TypeScript SDK, Windows Cross-Target, Security preflight, SonarCloud and Build & Test simultaneously. It is not a reviewable unit in this shape and it holds runner capacity on a two-runner pool for ~20 minutes per attempt. It is genuinely the only copy of the |




Preserves the
codex/jcode-stack-e613-20261008stack, which existed only ina local clone and was never pushed.
This branch is a long-lived stack that diverged from
master(2,142 commitsahead, 290 behind), so it is published under a
wrapup/branch name ratherthan rebased or force-pushed. The branch contents are unchanged from the
local clone; the diff against
masteris large because the two historieshave moved apart.