Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

chore: sync with upstream - #53

Merged
yjuyjuy merged 734 commits into
masterfrom
fm/sync-jcode
Aug 28, 2026
Merged

yjuyjuy merged 734 commits into
masterfrom
fm/sync-jcode

Conversation

@yjuyjuy

@yjuyjuy yjuyjuy commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

Weekly upstream sync: merges upstream/master (1jehuang/jcode) into the fork.

Upstream range: 0ffe9f484..10c26eb12 (728 commits, 673 behind at intake; fork ahead 65)
Result: 405 files changed, +13,201 / -43,477. Merge commit 1e74b4b34 + follow-up fix commit fe249ffe1.

Conflict resolutions

143 conflicted paths, all resolved mechanically or by provenance analysis (upstream's post-sync continuation vs fork-local intent):

  • crates/jcode-desktop2/ (38+ files): upstream removed the in-repo desktop implementation (2a256b4a1); the fork had no local desktop work, so deletions taken.
  • sdk/typescript/*, crates/jcode-harness-api*, telemetry-worker/*, crates/jcode-sdk/*, provider metadata/runtime catalogs: fork content was upstream-at-sync (verified byte-identical per file against the fork's last sync snapshot); upstream side taken.
  • Fork-feature hunks kept (HEAD): submission_nonce wire field + dedup plumbing (wire.rs, client_lifecycle.rs, backend.rs, input_dispatch.rs, acp.rs, protocol tests), account_pin in the Anthropic runtime, poll-driven reselect_account() in turn loops, pre-compact flow latch + tests, compact_context tool + request_session_compaction, JCODE_NO_AGENTS_MD (prompt.rs + tests), JCODE_AUTO_COMPACT_THRESHOLD_TOKENS env + import, usage cache-key regression test, release prompt module wiring, fork AGENTS.md sections.
  • Both-sides hunks combined: tool/mod.rs (upstream maintainer_feedback + fixed MCP surface kept alongside compact_context; block de-interleaved), backend.rs keeps both 4-arg and nonce-carrying send paths.
  • Upstream-only hunks taken (theirs): crash_on_disconnect, MCP deferred-tools surface + claude_mcp_enabled guard + tests, wake-mode config section, prompted turn-loop refactors, grok-build device-login flow, tool registration ordering, todo-card rendering, release prompt rewrite, orcarouter catalog parity.
  • Cargo.toml: upstream 0.81.1 version, desktop2 member removed; Cargo.lock = upstream's.
  • Guardrail baselines retuned: code-size, test-size, panic, and swallowed-error budgets regenerated from the merged tree.

Notable post-merge fixes (fe249ff)

  • Upstream's "Avoid persisting untouched sessions" (9e8d6e13b) over-reached: it silently dropped durability for daemon-prepared sessions (spawn targets, headless debug/create_session, selfdev children) and broke ~40 tests across the root crate, e2e, and jcode-app-core. Added Session::mark_persist_intent() set by Agent::build_base, visible-spawn preparation, and selfdev launch; the skip now only applies to raw panel scaffolding (upstream's own skip test still passes). Test fixtures that intentionally persist mark the intent too.
  • Upstream root-crate test rot fixed (save-skip fallout, concise continuation-message rewrites, orcarouter missing from CLI choices, swarm-id keying, subscription display name, auth report availability, auto-poke wording).
  • Probe fetch (fetch_usage_for_account_sync) made runtime-flavor-safe (current_thread no longer panics).
  • Clippy 1.98 fixes in auth/lifecycle.rs and harness-api-server/translate.rs.

Validation

  • cargo check --workspace --all-targets: clean.
  • cargo test --workspace: green serial (243/243 root crate lib; 49/49 e2e; jcode-app-core 1193+/1201 with 4 pre-existing failures also failing on pre-merge fork master).
  • scripts/check_guardrails.sh: all gates pass (fmt, clippy -D warnings, budgets, dependency boundaries, warning budget).
  • Pre-existing, NOT caused by this sync, and left untouched (fail identically on fork master before the merge): tool::communicate end-to-end member-status tests (4). Parallel-runs-only env races (pass in isolation) also noted: wake-mode config cache, JCODE_HOME-active-pids interference, auth-status cache.

The artifact generator now covers all resting states in onboarding_graph.rs:
welcome-card states render via the onboarding layout, and picker-overlay and
session states (start choice, suggestions, accepted review turn) render the
full app frame via ui::draw. Also update the telemetry golden assertions to
the copy introduced by the transcript-telemetry pipeline.
Two sources of run-to-run drift leaked into the full-frame render: the
Updates box (unseen changelog entries from the generating machine) and the
randomly drawn session mascot name. Pin both. Two consecutive generator
runs now produce byte-identical SVGs for all 12 states.
1jehuang and others added 29 commits August 25, 2026 18:36
# Conflicts:
#	.github/workflows/publish-typescript-sdk.yml
#	.jcode/semantic-todo-migration-spec.md
#	AGENTS.md
#	Cargo.lock
#	Cargo.toml
#	README.md
#	changelog/index.json
#	crates/jcode-app-core/src/agent.rs
#	crates/jcode-app-core/src/agent/turn_execution.rs
#	crates/jcode-app-core/src/agent/turn_loops.rs
#	crates/jcode-app-core/src/agent_tests.rs
#	crates/jcode-app-core/src/protocol_tests/core_events.rs
#	crates/jcode-app-core/src/protocol_tests/misc_events.rs
#	crates/jcode-app-core/src/protocol_tests/randomized.rs
#	crates/jcode-app-core/src/server/client_api.rs
#	crates/jcode-app-core/src/server/client_lifecycle.rs
#	crates/jcode-app-core/src/server/client_lifecycle_tests.rs
#	crates/jcode-app-core/src/tool/communicate_tests.rs
#	crates/jcode-app-core/src/tool/discover.rs
#	crates/jcode-app-core/src/tool/mod.rs
#	crates/jcode-app-core/src/tool/selfdev/build_queue.rs
#	crates/jcode-base/src/auth/grok_build.rs
#	crates/jcode-base/src/config.rs
#	crates/jcode-base/src/config/default_file.rs
#	crates/jcode-base/src/config_tests.rs
#	crates/jcode-base/src/hooks.rs
#	crates/jcode-base/src/mcp/protocol.rs
#	crates/jcode-base/src/mcp/protocol_tests.rs
#	crates/jcode-base/src/message/tests.rs
#	crates/jcode-base/src/prompt.rs
#	crates/jcode-base/src/prompt_tests.rs
#	crates/jcode-base/src/sidecar.rs
#	crates/jcode-base/src/todo.rs
#	crates/jcode-base/src/usage/tests.rs
#	crates/jcode-build-support/src/paths.rs
#	crates/jcode-desktop2/Cargo.toml
#	crates/jcode-desktop2/src/ack.rs
#	crates/jcode-desktop2/src/app_harness.rs
#	crates/jcode-desktop2/src/app_overview.rs
#	crates/jcode-desktop2/src/app_selection.rs
#	crates/jcode-desktop2/src/capture.rs
#	crates/jcode-desktop2/src/cli.rs
#	crates/jcode-desktop2/src/clipboard.rs
#	crates/jcode-desktop2/src/editor.rs
#	crates/jcode-desktop2/src/edits.rs
#	crates/jcode-desktop2/src/harness.rs
#	crates/jcode-desktop2/src/keymap.rs
#	crates/jcode-desktop2/src/layout.rs
#	crates/jcode-desktop2/src/main.rs
#	crates/jcode-desktop2/src/overview.rs
#	crates/jcode-desktop2/src/paint.rs
#	crates/jcode-desktop2/src/reasoning.rs
#	crates/jcode-desktop2/src/render.rs
#	crates/jcode-desktop2/src/scene.rs
#	crates/jcode-desktop2/src/scene_overview.rs
#	crates/jcode-desktop2/src/scroll.rs
#	crates/jcode-desktop2/src/scroll_bench.rs
#	crates/jcode-desktop2/src/select.rs
#	crates/jcode-desktop2/src/states.rs
#	crates/jcode-desktop2/src/strip.rs
#	crates/jcode-desktop2/src/tests/actions.rs
#	crates/jcode-desktop2/src/tests/delivery.rs
#	crates/jcode-desktop2/src/tests/failures.rs
#	crates/jcode-desktop2/src/tests/mod.rs
#	crates/jcode-desktop2/src/tests/overview_gesture.rs
#	crates/jcode-desktop2/src/tests/page_bands.rs
#	crates/jcode-desktop2/src/tests/progress.rs
#	crates/jcode-desktop2/src/tests/strip_visual.rs
#	crates/jcode-desktop2/src/tests/visual.rs
#	crates/jcode-desktop2/src/theme.rs
#	crates/jcode-desktop2/src/transcript.rs
#	crates/jcode-desktop2/src/viewport.rs
#	crates/jcode-desktop2/src/window_state.rs
#	crates/jcode-harness-api-server/Cargo.toml
#	crates/jcode-harness-api-server/src/lib.rs
#	crates/jcode-harness-api-server/src/translate.rs
#	crates/jcode-harness-api-server/src/translate_tests.rs
#	crates/jcode-harness-api/examples/harness_repl.rs
#	crates/jcode-harness-api/src/events.rs
#	crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs
#	crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs
#	crates/jcode-harness-api/src/requests.rs
#	crates/jcode-protocol/src/protocol_tests/core_events.rs
#	crates/jcode-protocol/src/protocol_tests/misc_events.rs
#	crates/jcode-protocol/src/protocol_tests/randomized.rs
#	crates/jcode-protocol/src/wire.rs
#	crates/jcode-provider-anthropic-runtime/src/lib.rs
#	crates/jcode-provider-grok-build-runtime/src/bin/fake_acp.rs
#	crates/jcode-provider-grok-build-runtime/src/lib.rs
#	crates/jcode-provider-grok-build-runtime/tests/fake_acp.rs
#	crates/jcode-provider-metadata/src/catalog.rs
#	crates/jcode-provider-metadata/src/lib.rs
#	crates/jcode-provider-openrouter-runtime/src/lib.rs
#	crates/jcode-provider-openrouter-runtime/src/ollama_context_tests.rs
#	crates/jcode-provider-openrouter-runtime/src/openrouter_tests.rs
#	crates/jcode-provider-openrouter/src/request.rs
#	crates/jcode-provider-openrouter/src/stream.rs
#	crates/jcode-sdk/Cargo.toml
#	crates/jcode-sdk/src/client.rs
#	crates/jcode-sdk/src/launch.rs
#	crates/jcode-sdk/src/lib.rs
#	crates/jcode-sdk/src/sdk_tests/parity.rs
#	crates/jcode-sdk/tests/client_behavior.rs
#	crates/jcode-sdk/tests/lifecycle_events.rs
#	crates/jcode-telemetry-core/src/lib.rs
#	crates/jcode-telemetry-core/src/state_support.rs
#	crates/jcode-telemetry-core/src/tests.rs
#	crates/jcode-tui-markdown/tests/latex_deferred_resolution.rs
#	crates/jcode-tui/src/tui/app.rs
#	crates/jcode-tui/src/tui/app/auth.rs
#	crates/jcode-tui/src/tui/app/commands.rs
#	crates/jcode-tui/src/tui/app/inline_interactive.rs
#	crates/jcode-tui/src/tui/app/input.rs
#	crates/jcode-tui/src/tui/app/remote.rs
#	crates/jcode-tui/src/tui/app/remote/input_dispatch.rs
#	crates/jcode-tui/src/tui/app/remote_tests.rs
#	crates/jcode-tui/src/tui/app/tests.rs
#	crates/jcode-tui/src/tui/app/tests/issue_496_input_routing.rs
#	crates/jcode-tui/src/tui/app/tests/remote_events_reload_05.rs
#	crates/jcode-tui/src/tui/app/tests/state_model_poke_03.rs
#	crates/jcode-tui/src/tui/app/todos_view.rs
#	crates/jcode-tui/src/tui/app/tui_lifecycle.rs
#	crates/jcode-tui/src/tui/backend.rs
#	crates/jcode-tui/src/tui/ui_messages.rs
#	crates/jcode-tui/src/tui/ui_messages/tests.rs
#	crates/jcode-tui/src/tui/ui_viewport.rs
#	docs/SYSTEM_PROMPT_CONFIG.md
#	scripts/code_size_budget.json
#	scripts/dev_cargo.sh
#	scripts/panic_budget.json
#	scripts/swallowed_error_budget.json
#	scripts/test_size_budget.json
#	sdk/typescript/README.md
#	sdk/typescript/src/client.ts
#	sdk/typescript/src/launch.ts
#	sdk/typescript/src/protocol.ts
#	sdk/typescript/test/launch.test.ts
#	src/cli/acp.rs
#	src/cli/startup.rs
#	telemetry-worker/README.md
#	telemetry-worker/dau.sql
#	telemetry-worker/src/worker.js
#	tests/e2e/test_support/mod.rs
- Add Session::mark_persist_intent so daemon-prepared sessions (agents,
  visible spawn targets, headless debug sessions, selfdev children) stay
  durable while upstream's untouched-session skip still covers raw panel
  scaffolding.
- Restore the untouched-session regression tests' fixtures and align stale
  expectations (concise gate continuation messages, session-keyed swarm
  ids, orcarouter CLI choice, Jcode subscription display name, report-level
  auth availability, auto-poke message wording, budget ratchets).
- Make the probe runtime-flavor-agnostic on current_thread runtimes.
- Fix clippy 1.98 lints in lifecycle.rs and harness translate.rs; refresh
  size baselines.
Upstream added a top-level JCODE_CI env to workflow files that already
carried a top-level env block, producing duplicate YAML keys that GitHub
Actions rejects ('env' is already defined, line 16 col 1). Every push or
dispatch of ci.yml, windows-smoke.yml, and ios-testflight.yml failed at
workflow validation with zero jobs. Fold both blocks into one.
- ci.yml, windows-smoke.yml, ios-testflight.yml had duplicate top-level env
  keys (upstream added JCODE_CI atop files that already carried an env
  block), so every push/dispatch failed at workflow validation with zero
  jobs ('env' is already defined, line 16 col 1). Fold the blocks together.
- TUI serial suite (the CI Linux step) had 16 merge-caused failures:
  * judge transcripts now pin ReasoningDisplayMode::Off via a new
    reasoning-mode-aware render entry point, so hidden provider reasoning
    never reaches judge/autojudge sessions under upstream's default
    show-thinking display.
  * transfer sessions mark persist intent (durable before first message).
  * auto-poke tests updated to the merged cycle semantics (one synthetic
    final-response turn at clean-cycle finish, spike latch preserved until
    the next incomplete cycle, /poke off disarm honored at re-arm).
  * account fixtures use canonical animal labels (openai-otter, claude-*);
    app cache fixtures mark persist intent; onboarding notice text and
    picker/todo-card render assertions match the merged layout.
The cargo-audit security gate flagged h2 0.4.13 for RUSTSEC-2026-0258
(unbounded empty DATA frames), the only hard vulnerability failing the
ubuntu Build & Test job. Bump h2 to 0.4.16+ (0.4.18) via Cargo.lock,
mirroring master, which already resolves this advisory the same way. No
manifest or ignore-policy changes; the fix is a lockfile dependency bump.
@yjuyjuy
yjuyjuy merged commit 877e57f into master Aug 28, 2026
11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants