You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(config): track wake mode in the config-cache fingerprint - #1293
Add JCODE_WAKE_MODE to CONFIG_ENV_KEYS so changes to this override participate in config-cache invalidation, like the other variables read by Config::apply_env_overrides.
This is a one-line, one-file change based on 5cb7b3dad6029a6f868e36fd4c13cbd07d1fca50. It changes no parser, default, API, dependency, test assertion, workflow, or quality baseline. Initial loading with the override set already works. The omission affects detecting subsequent changes within the process, not changes to another shell's environment.
Regression and verification
Validated in an isolated worktree on macOS arm64 with offline, locked Cargo and temporary configuration directories. Candidate: 510f7c3ffdab972d8b92e8a0b3c36a0081d03849. Baseline/candidate comparison used 0735c75317e644ecb440e0c3dddb7a6b3cd0d8bf. Upstream advanced only docs/images/star-history.svg during validation, so the unpublished branch was rebased. All source, test, dependency, and gate files remain byte-identical to the tested candidate, and the 78 config tests were rerun on the final rebased commit.
Untouched base: 0 passed, 1 failed, missing ["JCODE_WAKE_MODE"]. Exact unchanged test with the patch: 1 passed, 0 failed.
Entire existing config::tests:: module
78 passed, 0 failed, 0 ignored on Rust 1.94.1 and the repository selfdev wrapper's installed nightly 1.100.0. Rechecked on the final commit. Includes wake-mode parsing, runtime-only variable exclusion, and file/save cache invalidation.
SDK parity
3 passed, 0 failed. Other integration targets were filtered, not additional passes.
Production cargo check --offline --locked
Exit 0, with 9 existing-source warnings. The separate warning budget fails, as noted below.
The existing completeness regression directly covers the omission, so no duplicate test or weakened assertion is added. Production cache behavior was traced in source. A live-daemon wake transition was not exercised.
Review readiness and CI limits
This is not a full-CI pass or a merge-ready claim. Broader validation was run, and blockers were retained rather than patched into this contribution:
cargo fmt --all -- --check and the code-size, test-size, panic, and swallowed-error gates fail on both untouched base and candidate. Each gate's output is byte-identical before and after this patch.
cargo check --offline --locked --all-targets --all-features fails at five unchanged ModelRoute initializers missing usage in src/cli/commands_tests.rs. The same errors and locations were reproduced on the untouched base.
All-target/all-feature Clippy with -D warnings fails on needless_range_loop in crates/jcode-core/src/stdin_detect.rs:333 and needless_return in crates/jcode-terminal-launch/src/lib.rs:269. The same diagnostics were reproduced on the untouched base.
The official warning budget fails at 9/0 on the candidate. No warning or lint was suppressed and no budget was raised.
Upstream CI's duplicate top-level env mapping remains unchanged. The existing repair is in fix: safe fixes from September 7 issue triage #1193. Linux/Windows execution and full CI acceptance are not claimed. cargo-machete was not installed or run locally.
GitHub's Require Linked Issue run currently reports action_required, with zero jobs executed. No remote test or quality check has been verified green.
Ready for maintainer review: the scoped change is complete, and the full 78-test config module passed again on the exact submitted commit on September 18. This is not a merge-ready or full-CI claim. The upstream baseline failures remain disclosed above; no unrelated fixes are bundled.
Prepared with AI assistance. The submitted diff, production call path, red/green regression, surrounding tests, and baseline-versus-candidate failures were reviewed against recorded evidence.
Workflow assessment: .github/workflows/ci.yml currently has duplicate top-level env keys, already addressed by the open #1193. The issue-link workflow includes ready_for_review; the main CI workflow does not explicitly include that activity type. Existing issue-link runs report action_required with zero jobs. Maintainer workflow approval and repair of the existing CI definition are still needed for usable remote validation. No repository settings or workflow code were changed by this PR.
Initialized the cached wake-mode configuration with JCODE_WAKE_MODE unset and confirmed the default internal wake mode.
Updated JCODE_WAKE_MODE to external, reloaded the cached configuration, and confirmed the wake mode is now external.
Ran a fully qualified unit test to validate the wake-mode behavior and observed the reload generation move from 2 to 3.
Verified the source restoration check to ensure the cache state matches the external wake mode after reload.
Summary
Adds JCODE_WAKE_MODE to the configuration-cache environment fingerprint so changing the override reloads the cached configuration. The focused cache-reload check passed: changing the value from unset to external updated the effective wake mode and advanced the reload generation.
1jehuang
added
area: config
Configuration, defaults, and environment overrides.
size: S
Focused change within one component; limited behavior change and few interactions.
type: bug
Fixes incorrect or broken behavior.
and removed
area: config
Configuration, defaults, and environment overrides.
size: S
Focused change within one component; limited behavior change and few interactions.
type: bug
Fixes incorrect or broken behavior.
labels
Sep 19, 2026
github-actionsBot
added
area: config
Configuration, defaults, and environment overrides.
size: S
Focused change within one component; limited behavior change and few interactions.
type: bug
Fixes incorrect or broken behavior.
labels
Sep 19, 2026
Closing as already fixed upstream: e7a22f6 added JCODE_WAKE_MODE to the config-cache fingerprint and is an ancestor of upstream 2a4edaa. This old branch also carries unrelated integration ancestry, so it should not be merged. The remaining JCODE_MEMORY_JEV_PROVIDER fingerprint defect is tracked separately in #1358 and PR #1360.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area: configConfiguration, defaults, and environment overrides.size: SFocused change within one component; limited behavior change and few interactions.type: bugFixes incorrect or broken behavior.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1292
Summary
Add
JCODE_WAKE_MODEtoCONFIG_ENV_KEYSso changes to this override participate in config-cache invalidation, like the other variables read byConfig::apply_env_overrides.This is a one-line, one-file change based on
5cb7b3dad6029a6f868e36fd4c13cbd07d1fca50. It changes no parser, default, API, dependency, test assertion, workflow, or quality baseline. Initial loading with the override set already works. The omission affects detecting subsequent changes within the process, not changes to another shell's environment.Regression and verification
Validated in an isolated worktree on macOS arm64 with offline, locked Cargo and temporary configuration directories. Candidate:
510f7c3ffdab972d8b92e8a0b3c36a0081d03849. Baseline/candidate comparison used0735c75317e644ecb440e0c3dddb7a6b3cd0d8bf. Upstream advanced onlydocs/images/star-history.svgduring validation, so the unpublished branch was rebased. All source, test, dependency, and gate files remain byte-identical to the tested candidate, and the 78 config tests were rerun on the final rebased commit.config_env_fingerprint_tracks_every_apply_env_override_var["JCODE_WAKE_MODE"]. Exact unchanged test with the patch: 1 passed, 0 failed.config::tests::modulecargo check --offline --lockedReproduce the focused checks:
The existing completeness regression directly covers the omission, so no duplicate test or weakened assertion is added. Production cache behavior was traced in source. A live-daemon wake transition was not exercised.
Review readiness and CI limits
This is not a full-CI pass or a merge-ready claim. Broader validation was run, and blockers were retained rather than patched into this contribution:
cargo fmt --all -- --checkand the code-size, test-size, panic, and swallowed-error gates fail on both untouched base and candidate. Each gate's output is byte-identical before and after this patch.cargo check --offline --locked --all-targets --all-featuresfails at five unchangedModelRouteinitializers missingusageinsrc/cli/commands_tests.rs. The same errors and locations were reproduced on the untouched base.-D warningsfails onneedless_range_loopincrates/jcode-core/src/stdin_detect.rs:333andneedless_returnincrates/jcode-terminal-launch/src/lib.rs:269. The same diagnostics were reproduced on the untouched base.envmapping remains unchanged. The existing repair is in fix: safe fixes from September 7 issue triage #1193. Linux/Windows execution and full CI acceptance are not claimed.cargo-machetewas not installed or run locally.GitHub's Require Linked Issue run currently reports
action_required, with zero jobs executed. No remote test or quality check has been verified green.Ready for maintainer review: the scoped change is complete, and the full 78-test config module passed again on the exact submitted commit on September 18. This is not a merge-ready or full-CI claim. The upstream baseline failures remain disclosed above; no unrelated fixes are bundled.
Prepared with AI assistance. The submitted diff, production call path, red/green regression, surrounding tests, and baseline-versus-candidate failures were reviewed against recorded evidence.
Workflow assessment:
.github/workflows/ci.ymlcurrently has duplicate top-levelenvkeys, already addressed by the open #1193. The issue-link workflow includesready_for_review; the main CI workflow does not explicitly include that activity type. Existing issue-link runs reportaction_requiredwith zero jobs. Maintainer workflow approval and repair of the existing CI definition are still needed for usable remote validation. No repository settings or workflow code were changed by this PR.