Skip to content

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

Draft
1jehuang wants to merge 2 commits into
masterfrom
fix/912-source-update-status
Draft

1jehuang wants to merge 2 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

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

1 participant