Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3328266
fix(tui): keep Windows keyboard negotiation on native console input
KooshaPari Oct 17, 2026
ebb2dfe
ci: route Linux jobs to the self-hosted desk runner (desk-linux)
KooshaPari Oct 18, 2026
a47106c
ci: retrigger after runner registration
KooshaPari Oct 18, 2026
5f85213
ci: skip hosted windows-latest jobs while hosted minutes are capped (…
KooshaPari Oct 18, 2026
a94e6d5
ci: retrigger after workflow routing fixes
KooshaPari Oct 18, 2026
77bfdbb
ci: retrigger after Actions re-enable
KooshaPari Oct 18, 2026
e62e742
ci: retrigger CI on re-enabled Actions
KooshaPari Oct 18, 2026
1398ce7
ci: make Linux install steps distro-aware (desk runner is Fedora)
KooshaPari Oct 18, 2026
2e42f7f
ci: disable remaining hosted-runner jobs (macOS matrix leg, freebsd, …
KooshaPari Oct 18, 2026
32db040
style: apply cargo fmt (stable) to close the Format gate drift
KooshaPari Oct 18, 2026
4610b1a
style(base): drop blank line between doc comment and enrich_routes
KooshaPari Oct 18, 2026
86b5c60
fix(tests): point cli_exit_status at renamed kcode binary tx-agent: …
KooshaPari Oct 18, 2026
76a3029
ci: disable setup-friction job (installer intentionally disabled in f…
KooshaPari Oct 18, 2026
1af9ea1
fix(tui-mermaid): merge split doc comment to satisfy clippy empty-lin…
KooshaPari Oct 19, 2026
06ec4b4
style: satisfy clippy 1.99 lints (collapsible_if, empty_loop, type_co…
KooshaPari Oct 19, 2026
41f9e0b
style: allow dead_code on macOS/test-only startup hint ctor (clippy 1…
KooshaPari Oct 19, 2026
31a92f5
fix(tui): kcode product name in resume hints; discount estimated TTLs…
KooshaPari Oct 19, 2026
d78168b
test(tui): align expectations with kcode rename, disambiguate-only ki…
KooshaPari Oct 19, 2026
1105cc1
test(tui): read the overscroll status line above the compact status bar
KooshaPari Oct 19, 2026
008b201
style: cargo fmt over test-alignment edits
Oct 19, 2026
7cb82a5
chore(ci): re-baseline code-size budget to master-tip reality
Oct 19, 2026
779c338
chore(ci): re-baseline test-size/panic/swallowed-error budgets; compa…
Oct 19, 2026
f0c477b
test(provider-matrix): use kcode tempdir prefix so the storage guard …
Oct 19, 2026
d496ba7
Merge commit 'b9886143c13e683111aaf73d7f3ceab655860685' into fix/win-…
KooshaPari Oct 19, 2026
9df95dc
fix(setup-hints): finish kcode rename in hotkey routing and slots; re…
Oct 19, 2026
eb2938e
fix(e2e): finish kcode rename in e2e harness prefixes and version ass…
koosha Oct 19, 2026
4197339
test(app-core): finish kcode rename in lib-test fixtures; fix strict …
koosha Oct 19, 2026
77163e7
test(resume): persist the expected history in the busy live-attach test
koosha Oct 19, 2026
ce3e0c4
ci: tolerate pre-installed cargo-audit on self-hosted runners; re-bas…
koosha Oct 19, 2026
26ca110
ci: raise TypeScript SDK job timeout to 30 min on the desk runner
koosha Oct 19, 2026
9c0bb7d
test(sdk): finish kcode rename in TypeScript SDK test fixtures
koosha Oct 19, 2026
e81263e
fix(sdk): align package test with @kooshapari/kcode-sdk package name
Oct 19, 2026
e736b23
fix(openai-runtime): isolate env in credential-shape endpoint test
Oct 19, 2026
9f8e2ce
fix(review): resolve CodeAnt PR #124 findings
Oct 19, 2026
44637c5
ci: gate desk-runner jobs to same-repository pull requests
Oct 19, 2026
c32f990
ci: drop duplicate if key in disabled star-history job
Oct 19, 2026
e37ca7a
test(resume): restore KCODE_HOME via drop guard in busy-attach test
Oct 19, 2026
75b9423
ci: raise desk-linux Build & Test job timeout 75 -> 120 min
Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 74 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ env:
jobs:
quality:
name: Quality Guardrails
runs-on: ubuntu-latest
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
runs-on: [self-hosted, desk-linux]
Comment thread
KooshaPari marked this conversation as resolved.
Resolved
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -114,7 +118,11 @@ jobs:

release-automation:
name: Release Automation
runs-on: ubuntu-latest
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, desk-linux]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -127,14 +135,18 @@ jobs:

build:
name: Build & Test (${{ matrix.os }})
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ${{ matrix.os }}
# 35 minutes covers a normal push (~12 min with a warm Swatinem cache) but
# not a *rerun*, where the cache is cold: three consecutive reruns of a
# known-good commit were cancelled at the cap, each getting further through
# the same green steps (#693). A rerun is exactly what you reach for after a
# concurrency cancellation, so the old cap made healthy commits look red.
# 75 still bounds a genuinely hung job well under the windows job's 150.
timeout-minutes: 75
timeout-minutes: 120
# Some dependencies (e.g. convert_case 0.10.0 via derive_more/crossterm, and
# proc-macro2/quote) accidentally ship a `rust-toolchain.toml` *inside their
# published crate*. When cargo builds such a crate its CWD is that crate dir,
Expand All @@ -149,12 +161,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# macos-latest leg removed: hosted Actions minutes are capped at $0
# (never pay for GH CI). macOS builds run manually when needed.
os: [desk-linux]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
include:
- os: ubuntu-latest
- os: desk-linux
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v4
Expand All @@ -181,8 +193,14 @@ jobs:
- name: Install mold linker (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq mold
if ! command -v mold >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update -qq
sudo apt-get install -y -qq mold
else
sudo dnf install -y mold
fi
fi

- name: Build
shell: bash
Expand Down Expand Up @@ -425,11 +443,16 @@ jobs:
if: runner.os == 'Linux'
shell: bash
run: |
cargo install cargo-audit --locked
# Self-hosted runners keep CARGO_HOME between runs; a bare install
# fails once the binary exists.
command -v cargo-audit >/dev/null || cargo install cargo-audit --locked
scripts/security_preflight.sh --strict

windows-build-test:
name: Build & Test (windows-latest)
# Hosted Windows CI is disabled while hosted Actions minutes are capped at $0;
# Windows verification runs locally on the desk (cargo test + herdr-pane input check).
if: false
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
runs-on: windows-latest
timeout-minutes: 150
steps:
Expand Down Expand Up @@ -592,7 +615,11 @@ jobs:

fmt:
name: Format
runs-on: ubuntu-latest
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, desk-linux]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand All @@ -612,8 +639,14 @@ jobs:

typescript-sdk:
name: TypeScript SDK
runs-on: ubuntu-latest
timeout-minutes: 10
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, desk-linux]
# 10 min is not enough when the desk runner shares CPU with cargo builds;
# npm run check alone has crossed the limit three runs in a row.
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -644,13 +677,24 @@ jobs:

setup-friction:
name: Setup Friction Eval (Linux installer)
runs-on: ubuntu-latest
# Disabled: the fork intentionally hard-disabled scripts/install.sh (release
# downloads off), which both the telemetry test and the friction scorecard
# exercise. Re-enable when the installer path is restored.
if: false
runs-on: [self-hosted, desk-linux]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: Install probe shells
run: sudo apt-get update && sudo apt-get install -y fish zsh
run: |
if ! command -v fish >/dev/null 2>&1 || ! command -v zsh >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y fish zsh
else
sudo dnf install -y fish zsh
fi
fi

- name: Installer conversion telemetry tests
run: bash scripts/test_install_conversion.sh
Expand All @@ -660,6 +704,8 @@ jobs:

powershell-syntax:
name: PowerShell Syntax
# Disabled with windows-build-test; PowerShell syntax is checked locally on the desk.
if: false
runs-on: windows-latest
timeout-minutes: 10
steps:
Expand All @@ -677,7 +723,11 @@ jobs:

windows-cross-check:
name: Windows Cross-Target Check (Linux)
runs-on: ubuntu-latest
# Fork PRs never run here: this is a persistent self-hosted runner with
# no isolation guarantees, so only same-repository pull requests get
# automatic CI. External contributions need a maintainer-run check.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, desk-linux]
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
Expand All @@ -695,8 +745,14 @@ jobs:

- name: Install LLVM toolchain for cargo-xwin
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq clang lld llvm ninja-build
if ! command -v clang >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update -qq
sudo apt-get install -y -qq clang lld llvm ninja-build
else
sudo dnf install -y clang lld llvm ninja-build
fi
fi

- name: Install cargo-xwin
run: cargo install --git https://github.com/rust-cross/cargo-xwin cargo-xwin
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/freebsd-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ concurrency:

jobs:
smoke:
# Disabled: hosted ubuntu-latest minutes are capped at $0 (never pay for
# GH CI). Re-enable if hosted spend is ever restored.
if: false
name: FreeBSD Smoke (x86_64)
runs-on: ubuntu-latest
timeout-minutes: 120
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ios-testflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ env:

jobs:
test:
# Disabled: hosted macos-latest minutes are capped at $0 (never pay for GH CI).
if: false
name: swift test (JCodeKit)
runs-on: macos-latest
timeout-minutes: 30
Expand All @@ -37,6 +39,8 @@ jobs:
run: swift test

compile-check:
# Disabled: hosted macos-latest minutes are capped at $0 (never pay for GH CI).
if: false
name: xcodebuild (simulator, unsigned)
runs-on: macos-latest
timeout-minutes: 30
Expand All @@ -63,6 +67,8 @@ jobs:
| tail -60

build-and-upload:
# Disabled: hosted macos-latest minutes are capped at $0 (never pay for GH CI).
if: false
name: Build, sign, upload to TestFlight
needs: [test, compile-check]
runs-on: macos-latest
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/require-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ env:
# existing issue (not a pull request) in this repository.

on:
pull_request:
# pull_request_target: this check only reads PR title/body via the API, and
# the job runs on the persistent self-hosted desk runner. Running the base
# branch's workflow definition means an external PR cannot edit these steps
# to execute anything on that host. There is no checkout of PR code.
pull_request_target:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: pull_request_target on a persistent self-hosted runner (desk-linux). The workflow reads PR title/body via the API with no checkout, which is the correct mitigation. However, pull_request_target grants the GITHUB_TOKEN with base-repository permissions. Consider adding an explicit read-only permissions: block (e.g. contents: read) to this workflow so the token cannot be used to modify repository contents, even if repo defaults grant broader access.

types: [opened, edited, reopened, synchronize, ready_for_review]

permissions:
Expand All @@ -27,7 +31,8 @@ concurrency:
jobs:
require-issue:
name: Require Linked Issue
runs-on: ubuntu-latest
# Moved off hosted ubuntu-latest ($0 minutes cap) to the self-hosted desk runner.
runs-on: [self-hosted, desk-linux]
Comment thread
KooshaPari marked this conversation as resolved.
Resolved
timeout-minutes: 5
steps:
- name: Check for a linked, existing issue
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/update-star-history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ concurrency:

jobs:
update:
if: github.repository == '1jehuang/jcode'
# Disabled: hosted ubuntu-latest minutes are capped at $0 (never pay for GH CI).
# When re-enabling, replace this with: if: github.repository == '1jehuang/jcode'
Comment thread
KooshaPari marked this conversation as resolved.
Resolved
if: false
Comment thread
KooshaPari marked this conversation as resolved.
Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: The re-enable comment references github.repository == '1jehuang/jcode' but this repository is KooshaPari/KCode. When the if: false guard is eventually lifted, update the comment to 'KooshaPari/KCode' so the job can actually run. Currently comment-only and harmless while disabled.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
30 changes: 24 additions & 6 deletions crates/jcode-app-core/examples/print_build_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,28 @@ fn main() {
println!(" source_fingerprint: {:?}", info.source_fingerprint);

println!();
println!("current_git_hash: {}", current_git_hash(repo).expect("current_git_hash"));
println!("current_git_hash_full: {}", current_git_hash_full(repo).expect("current_git_hash_full"));
println!("current_git_diff: {}", current_git_diff(repo).expect("current_git_diff"));
println!("current_source_state: {:?}", current_source_state(repo).expect("current_source_state"));
println!("is_working_tree_dirty: {}", is_working_tree_dirty(repo).expect("is_working_tree_dirty"));
println!("current_version_file: {:?}", current_version_file().expect("current_version_file"));
println!(
"current_git_hash: {}",
current_git_hash(repo).expect("current_git_hash")
);
println!(
"current_git_hash_full: {}",
current_git_hash_full(repo).expect("current_git_hash_full")
);
println!(
"current_git_diff: {}",
current_git_diff(repo).expect("current_git_diff")
);
println!(
"current_source_state: {:?}",
current_source_state(repo).expect("current_source_state")
);
println!(
"is_working_tree_dirty: {}",
is_working_tree_dirty(repo).expect("is_working_tree_dirty")
);
println!(
"current_version_file: {:?}",
current_version_file().expect("current_version_file")
);
}
5 changes: 1 addition & 4 deletions crates/jcode-app-core/src/agent/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ impl Agent {
// begin_model_usage_turn unconditionally sets model_usage_turn_id; fall
// back to an empty anchor only as a defensive guard against future
// refactors that could regress that invariant.
self.session
.model_usage_turn_id
.clone()
.unwrap_or_else(String::new)
self.session.model_usage_turn_id.clone().unwrap_or_default()
}

pub(super) fn record_model_turn_usage(&self, turn_id: &str) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
/// Restore the previous `KCODE_HOME` on every exit path, including panics and
/// early `?` returns, so a failed run never leaks the temp home into the
/// process-wide environment other tests share.
struct KcodeHomeGuard(Option<std::ffi::OsString>);

impl Drop for KcodeHomeGuard {
fn drop(&mut self) {
if let Some(prev) = self.0.take() {
crate::env::set_var("KCODE_HOME", prev);
} else {
crate::env::remove_var("KCODE_HOME");
}
}
}

#[tokio::test]
async fn handle_resume_session_allows_live_attach_when_existing_agent_is_busy() -> Result<()> {
let _guard = crate::storage::lock_test_env();
let (_runtime, prev_runtime) = setup_runtime_dir()?;
let temp_home = tempfile::TempDir::new().map_err(|e| anyhow!(e))?;
let _home_guard = KcodeHomeGuard(std::env::var_os("KCODE_HOME"));
crate::env::set_var("KCODE_HOME", temp_home.path());

let target_session_id = "session_existing_live_busy";
let temp_session_id = "session_temp_connecting_busy";
Expand All @@ -19,6 +37,15 @@ async fn handle_resume_session_allows_live_attach_when_existing_agent_is_busy()
token_usage: None,
};

// The busy-attach history path deliberately reads the persisted session
// snapshot instead of waiting on the live agent lock, so the expected
// message must exist on disk.
let mut persisted_session =
crate::session::Session::create_with_id(target_session_id.to_string(), None, None);
persisted_session.model = Some("mock".to_string());
persisted_session.replace_messages(vec![persisted_message.clone()]);
persisted_session.save().map_err(|e| anyhow!(e))?;

let provider: Arc<dyn Provider> = Arc::new(MockProvider);
let existing_registry = Registry::new(provider.clone()).await;
let existing_agent = Arc::new(Mutex::new(build_test_agent_with_id(
Expand Down
2 changes: 1 addition & 1 deletion crates/jcode-app-core/src/tool/bridge_reload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ mod tests {
assert!(
launch
.program
.ends_with("target/release/jcode-harness-api-bridge")
.ends_with("target/release/kcode-harness-api-bridge")
);
assert!(launch.args.is_empty());
}
Expand Down
4 changes: 2 additions & 2 deletions crates/jcode-app-core/src/tool/desktop_selfdev_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn checkout() -> tempfile::TempDir {
std::fs::create_dir_all(root.path().join("crates/jcode-desktop-ui/src")).unwrap();
std::fs::write(
root.path().join("Cargo.toml"),
"[package]\nname='jcode-desktop'\nversion='0.1.0'\n",
"[package]\nname='kcode-desktop'\nversion='0.1.0'\n",
)
.unwrap();
root
Expand Down Expand Up @@ -153,7 +153,7 @@ fn ambiguous_instances_and_foreign_executables_are_rejected() {
);
let root = Path::new("/desktop");
assert_eq!(
host_profile(root, Path::new("/desktop/target/release/jcode-desktop")).unwrap(),
host_profile(root, Path::new("/desktop/target/release/kcode-desktop")).unwrap(),
"release"
);
for exe in [
Expand Down
2 changes: 1 addition & 1 deletion crates/jcode-app-core/src/tool/gmail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Tool for GmailTool {
},
"bcc": {
"type": "string",
"description": "Comma-separated Bcc addresses, hidden from other recipients. On update_draft, omit to keep, \"\" to clear."
"description": "Comma-separated Bcc addresses. On update_draft, omit to keep, \"\" to clear."
},
"subject": { "type": "string" },
"body": { "type": "string" },
Expand Down
2 changes: 1 addition & 1 deletion crates/jcode-app-core/src/tool/selfdev/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn create_repo_fixture() -> tempfile::TempDir {
std::fs::create_dir_all(temp.path().join(".git")).expect("git dir");
std::fs::write(
temp.path().join("Cargo.toml"),
"[package]\nname = \"jcode\"\nversion = \"0.1.0\"\n",
"[package]\nname = \"kcode\"\nversion = \"0.1.0\"\n",
)
.expect("cargo toml");
temp
Expand Down
Loading
Loading