Skip to content

fix: report indeterminate source update checks (fixes #912) - #1246

Merged
1jehuang merged 1812 commits into
masterfrom
fix/912-source-update-status
Sep 19, 2026
Merged

1jehuang merged 1812 commits into
masterfrom
fix/912-source-update-status

Conversation

@1jehuang

@1jehuang 1jehuang commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #912.

  • Stop reporting UpToDate when a source update comparison returns None, including an untracked branch, unavailable repository, or failed fetch.
  • Publish the existing UpdateStatus::Error and log the diagnostic. Known-current and update-available paths keep their behavior.
  • Do not select a fallback branch, change tracking configuration, or alter automatic pull/install policy.

The contributor's existing fallback proposal remains a separate policy option. This patch takes the conservative reporting-only path requested in the issue.

Verification

  • Negative control restoring the original None -> UpToDate behavior: exactly two regressions failed, while known-true/false controls passed.
  • On final commit dd717ce25, scripts/dev_cargo.sh test --profile selfdev -p jcode --lib cli::startup::tests: 15 passed. Coverage includes a real temporary Git repository with no upstream, an up-to-date local tracking branch, and a behind branch, without network access.
  • On final commit, scripts/dev_cargo.sh build --profile selfdev -p jcode --bin jcode passed. Startup reports v0.84.43-dev (dd717ce25).
  • The same patched source was also exercised in a real PTY/TUI with a separate HOME, runtime directory, socket, and source fixture having no upstream or remote. Its rendered output showed Update failed: Source update check failed: unable to compare the source checkout with..., and the log recorded that diagnostic. No inference was requested. JSON frame capture was unavailable, so the actual rendered PTY output was inspected instead. The shared daemon was not reloaded.
  • Changed-file formatting and git diff --check passed. Independent read-only review found no blocking concerns.

Test prerequisite and limitations

A separate five-line test-only commit initializes the newly required optional ModelRoute.usage field in existing CLI fixtures. Without it, the unchanged CLI test target fails to compile before any regression can run. No production model-route behavior changed.

This draft does not claim a green full suite or native Windows/macOS acceptance. Hosted CI run 34789313248 failed before creating jobs, as did the Windows smoke and iOS workflows. These inherited duplicate top-level env mappings are tracked in #1191 / PR #1193. The linked-issue check passed, but that is not build/test validation. Please rerun hosted checks once that baseline is repaired. The fix was prepared in an isolated branch, preserving the active dirty worktree.


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

1jehuang and others added 30 commits August 25, 2026 16:52
Jcode and others added 23 commits September 11, 2026 21:45
# Conflicts:
#	crates/jcode-harness-api-server/src/translate_tests.rs
#	crates/jcode-harness-api/src/lib.rs
#	sdk/typescript/src/protocol.ts
…20260913

Welcome pull requests from all contributors
@1jehuang

1jehuang commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner Author

Scoped review complete. Integrating original contribution ancestry as 0f3bc4dfa, including the optional ModelRoute fixture fields.

All fifteen CLI startup tests pass, including the four exact source_update_check tests and real local Git upstream states. The exact combined executable's real private tmux TUI, with a repository lacking remote/upstream, displayed Update failed: Source update check failed, rather than claiming it is up to date. True/false outcomes remain covered as update-available/up-to-date. The acceptance test used only its fixture repository and did not update the live installation or shared daemon.

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

greptile-apps Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

Not safe to merge until the unintended desktop-crate deletion is removed from the branch.

What we checked:

  • T-Rex produced a proof for a posted P1 finding and attached an executed PR fix: report indeterminate source update checks (fixes #912) #1246 diff validation script, following the corresponding review comment. T-Rex
  • T-Rex produced a second proof for another posted P1 finding. T-Rex
  • T-Rex completed general-contract-validation-proof, summarizing GitHub metadata, the local merge-base diff, and before/after captures to support the change footprint. T-Rex

Summary

This branch removes the complete desktop crate in addition to the intended source-update status work. Restore the desktop crate or recreate the branch from the intended base before merging.

Reviews (1) · Last reviewed commit: "fix: report indeterminate source update ..."

@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 Restore desktop crate crates/jcode-desktop/src/main.rs:1 ▶

    This branch deletes crates/jcode-desktop/src/main.rs and every other file in the 95-file desktop crate, including its Cargo.toml, among 1,240 changed paths. Merging this branch would remove the desktop implementation along with the intended source-update status fix. Restore the deleted crate or rebase/recreate the branch so it contains only the intended change before merging.

  • P1 PR 1246 deletes the complete desktop crate ▶

    • Bug
    • Cause
      • The PR head dd717ce25ea399eecbca790c05c93678dfa83f9e no longer contains the desktop crate that exists at merge base 85bed2cf01736ba0f85a77d49ac51eb0764ded78.
    • Fix
      • Restore crates/jcode-desktop (including Cargo.toml and src/main.rs) from the intended base, or explicitly split/rebase the PR so it contains only the intended source-update-status change.

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.

Update check reports "up to date" forever when the source branch has no upstream

2 participants