Skip to content

fix: safe fixes from September 7 issue triage - #1193

Merged
1jehuang merged 1866 commits into
masterfrom
fix/issue-triage-20260907
Sep 19, 2026
Merged

1jehuang merged 1866 commits into
masterfrom
fix/issue-triage-20260907

Conversation

@1jehuang

@1jehuang 1jehuang commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Status

Draft while targeted regression tests and a combined TUI build run. No contributor branch code was imported.

Verified so far

  • Merge duplicate top-level environment maps in CI, iOS TestFlight, and Windows Smoke. All nine workflow files pass a duplicate-rejecting YAML parse, and other workflow semantics are unchanged.
  • Fix the two independently reproduced formatting failures. cargo fmt --all -- --check and module declaration checks pass.

Fixes #1191. Related duplicate: #1190. Additional isolated fixes will be added only after verification. Restored parsing does not yet establish that all CI gates pass.


— Jcode agent (automated triage), on behalf of @1jehuang

1jehuang and others added 30 commits August 28, 2026 20:44
* fix: update Claude OAuth client version (fixes #1134)

* fix: share Claude OAuth user agent across requests
…#1145)

Anthropic released claude-fable-5-1 on 2026-08-28. Without a catalog entry,
`jcode -m claude-fable-5-1` on a fresh home (no cached live catalog) failed
set_model and silently ran on the default claude-opus-5 instead. Add it to
ALL_CLAUDE_MODELS / AVAILABLE_MODELS, the 128K max-output prefix list, and
Anthropic API pricing ($10/$50, $0.25 cache read per models.dev).
…nt (fixes #1095)

openrouter_route_pricing and model_pricing::normalize_model_id now strip the
`@Provider` pin before the endpoint-cache and models.dev lookups, and the pin
selects the matching endpoint's real rate. Previously both lookups missed and
the cost widget fell back to the generic $15/$60 defaults, over-reporting
spend ~300x for pinned routes.
…arm list (fixes #1165)

Workers spawned without an explicit `effort` used to inherit the
provider-wide `anthropic_reasoning_effort`, so effort drifted between
spawns of the same role with nothing visible in the UI. Add an
`agents.swarm_effort` config default with the same precedence as the model
path (explicit spawn arg > config pin > inherit), and append the live
reasoning effort to the `swarm list` Model line so drift is visible.
…etrying (fixes #1148)

"The usage limit has been reached ... Resets in 28d" matched the generic
"rate limit" needle, so auth-test retried a quota exhaustion three times
through the 120s smoke timeout (~6 minutes). Classify deterministic quota
markers as non-retryable before the transient 429 check.
…visible message (fixes #1144)

The untouched-session save gate only counted custom_title as caller-owned
state, so Session::create(_, Some(title)) returned Ok(()) without writing
anything. Later lookups by id (review/judge parent walks, menubar labels)
found no file and silently fell back. Treat title like custom_title.
…ixes #1153)

tempfile exposes the logical /var path on macOS while the fake terminal
records the physical /private/var cwd, so the literal comparison failed and
poisoned ENV_LOCK for the sibling test. Canonicalization is a no-op on Linux.
…ixes #1152)

idle_live_agent checked try_lock, dropped the guard, and returned the Arc, so
two concurrent wakes could both observe the agent idle and then serialize
behind each other. Return an OwnedMutexGuard as the reservation and run the
tracked turn through the already-locked agent, releasing it only after the
completion report is captured. The resume path takes the same owned guard.
…me (fixes #1142)

clear_persisted_test_ui_state followed whatever JCODE_HOME pointed at, so a
create_test_app call on one thread deleted the ambient queue of a test that
scoped its own temporary home on another. Restrict the wipe to the shared
test home while JCODE_HOME still points at it.
… override (#1165)

Mirror the swarm_model plumbing: default config template entry, env override
with blank-clears semantics, and a parse test through the TOML interface.
…us fanout (#1152)

Releasing the OwnedMutexGuard before publishing ready/failed let a follow-up
wake reserve the agent and publish running, which the older turn then
overwrote, hiding the newer turn and suppressing its coordinator completion
notification. Keep the guard alive until after the status update.
Retain current master while applying the scoped contribution, preserving original author history in the second parent.
Retain current master while applying the scoped contribution, preserving original author history in the second parent.
Retain current master while applying the scoped contribution, preserving original author history in the second parent.
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.
@1jehuang

Copy link
Copy Markdown
Owner Author

Refreshed this PR onto current master without rewriting history or applying the divergent old upstream tree. Both formatting fixes are already present, so the remaining diff is only the three duplicate-env repairs. All ten workflows now pass duplicate-rejecting YAML parsing. Negative controls reproduce the original duplicate-key error in each repaired workflow, and semantic comparison confirms no other workflow behavior changed. This update is to exercise hosted workflow validation on the current scoped candidate before the merge decision.

@1jehuang
1jehuang marked this pull request as ready for review September 19, 2026 01:54
@1jehuang

Copy link
Copy Markdown
Owner Author

Scoped review complete. Integrating ancestry-preserving commit 6ac6b2ed2, whose diff against current master is only the three workflow environment-map repairs. Original formatting changes are already present.

Validation: all ten workflows pass duplicate-key-rejecting YAML parsing. Each of the three old files fails the duplicate-env negative control. All non-env ASTs and merged environment values are preserved. Fresh hosted run https://github.com/1jehuang/jcode/actions/runs/35413409929 actually starts ten jobs.

Baseline CI exception: both formatting jobs fail in twelve files byte-identical to master 89d54e635; no workflow change caused those failures. Five other jobs pass and three platform build/test jobs remain running at review completion. Clippy did not run past formatting. This is not a claim of fully green CI. No unrelated formatting changes are imported.

@1jehuang
1jehuang merged commit 0f3bc4d into master Sep 19, 2026
8 of 13 checks passed
@greptile-apps

greptile-apps Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

Do not merge until the Linux quality check can build all enabled features with its required native audio dependency installed. The remote cache-expiry regression is non-blocking but should be corrected.

Findings

  1. P1 Install ALSA for CI ▶
  2. P2 Preserve cache provider identity ▶
Fix with agent prompt
### Issue 1
crates/jcode-base/Cargo.toml:91
The quality job builds all enabled features, which activates `voice-capture` and its `cpal` dependency on Linux. That dependency requires ALSA development metadata, but the workflow does not install it; the check fails when `alsa-sys` cannot locate `alsa.pc`. Install `libasound2-dev` before this check so the required merge check can complete.

### Issue 2
crates/jcode-app-core/src/server/client_state.rs:85-88
This turns a persisted compatible-provider key such as `deepseek` into the display label `DeepSeek` in History. A remote client then stores that label as its cache provider identity, but cache-expiry classification recognizes canonical family keys such as `openrouter`; affected remote sessions therefore receive no cache TTL and do not detect expiry. This is non-blocking, but it leaves those sessions using stale cache baselines longer than intended. Keep the canonical family separate from the human-facing label.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This change introduces two reproduced regressions. The Linux quality check cannot build the new voice-capture feature because its ALSA development dependency is not installed, so the change is not ready to merge. Separately, remote OpenAI-compatible sessions use a display label instead of a canonical provider identity for cache expiry, preventing expiry detection for affected sessions.

Reviews (1) · Last reviewed commit: "Merge PR #1193: restore valid workflow e..."

jcode-usage-types = { path = "../jcode-usage-types" }

# Native microphone input is opt-in so CLI builds need no audio development libraries.
cpal = { version = "0.15", optional = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Install ALSA for CI

The quality job builds all enabled features, which activates voice-capture and its cpal dependency on Linux. That dependency requires ALSA development metadata, but the workflow does not install it; the check fails when alsa-sys cannot locate alsa.pc. Install libasound2-dev before this check so the required merge check can complete.

Artifacts

Linux all-features validation script

  • The authored executable runs the package-level Linux equivalent of the quality gate and captures its complete output, showing the claimed dependency path was exercised.

All-features check without ALSA headers

  • Captured output from `cargo check -p jcode-base --all-targets --all-features` on Linux shows `alsa-sys` cannot locate `alsa.pc` and exits 101, confirming the failure.

Baseline validation script

  • The authored baseline executable checks the same package and targets without enabling all features, providing a same-scope comparison.

Baseline check without voice capture

  • Captured output from `cargo check -p jcode-base --all-targets` exits 0, showing the failure is introduced by the all-features feature set.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/jcode-base/Cargo.toml
Line: 91

Comment:
**Install ALSA for CI**

The quality job builds all enabled features, which activates `voice-capture` and its `cpal` dependency on Linux. That dependency requires ALSA development metadata, but the workflow does not install it; the check fails when `alsa-sys` cannot locate `alsa.pc`. Install `libasound2-dev` before this check so the required merge check can complete.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +85 to +88
let profile_id = other.strip_prefix("openai-compatible:").unwrap_or(other);
crate::provider_catalog::openai_compatible_profile_by_id(profile_id)
.map(|profile| profile.display_name.to_string())
.unwrap_or_else(|| other.to_string())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve cache provider identity

This turns a persisted compatible-provider key such as deepseek into the display label DeepSeek in History. A remote client then stores that label as its cache provider identity, but cache-expiry classification recognizes canonical family keys such as openrouter; affected remote sessions therefore receive no cache TTL and do not detect expiry. This is non-blocking, but it leaves those sessions using stale cache baselines longer than intended. Keep the canonical family separate from the human-facing label.

Artifacts

Remote cache identity test source

  • The authored focused test injects a remote History display label and verifies the resulting cache provider identity and TTL classification.

Remote cache identity test output

  • The test output shows `DeepSeek` persisted as the remote cache provider, with no TTL, while canonical `openrouter` receives a 300-second TTL.

View artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/jcode-app-core/src/server/client_state.rs
Line: 85-88

Comment:
**Preserve cache provider identity**

This turns a persisted compatible-provider key such as `deepseek` into the display label `DeepSeek` in History. A remote client then stores that label as its cache provider identity, but cache-expiry classification recognizes canonical family keys such as `openrouter`; affected remote sessions therefore receive no cache TTL and do not detect expiry. This is non-blocking, but it leaves those sessions using stale cache baselines longer than intended. Keep the canonical family separate from the human-facing label.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@greptile-apps

greptile-apps Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P1 Linux quality gate lacks ALSA development dependency for all-features build ▶

    • Bug
      • The quality job runs cargo check --all-targets --all-features at .github/workflows/ci.yml:52-53. jcode-base declares optional cpal at crates/jcode-base/Cargo.toml:91, and its voice-capture feature enables it at line 133. On Linux this resolves to alsa-sys; the executed package-equivalent all-features check exited 101 because alsa.pc was unavailable. The same package/target baseline without all features completed successfully.
    • Cause
      • --all-features enables voice-capture, which activates cpal and its Linux ALSA backend. The quality workflow has no step installing libasound2-dev (and therefore no alsa.pc) before the check.
    • Fix
      • Install ALSA development headers before the quality all-features commands, e.g. sudo apt-get update -qq && sudo apt-get install -y -qq libasound2-dev, or exclude this platform-native optional feature from the Linux all-features gate if that feature is intentionally unsupported there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI broken since Aug 20: duplicate top-level env in ci.yml, ios-testflight.yml, windows-smoke.yml (Invalid workflow file)

7 participants