Skip to content

fix(ci): restore the Format job on master (three rustfmt hunks, two files) - #1772

Closed
ianalitis wants to merge 1 commit into
1jehuang:masterfrom
ianalitis:pr/master-format-drift
Closed

ianalitis wants to merge 1 commit into
1jehuang:masterfrom
ianalitis:pr/master-format-drift

Conversation

@ianalitis

Copy link
Copy Markdown
Contributor

Restore the Format job on master (three rustfmt hunks, two files)

Format fails on master at a6ba7844f:

python3 scripts/check_module_files.py   # OK
cargo fmt --all -- --check              # exit 1
  Diff in crates/jcode-provider-openai-runtime/src/lib.rs:966
  Diff in crates/jcode-tui/src/tui/app/onboarding_flow_control.rs:633
  Diff in crates/jcode-tui/src/tui/app/onboarding_flow_control.rs:874

Exactly three hunks in two files, nothing else in the tree (1360 .rs files).
The patch is rustfmt's own output, not hand-written formatting judgement: after
applying it, cargo fmt --all -- --check exits 0 and the module check still
passes.

Which commit introduced each, by bisecting with rustfmt --check over the
candidate trees:

That second date is after PR #1764's head (13375d186, 21:28:14-07:00), and
git diff 21eb960a2 13375d186 -- crates/jcode-tui/src/tui/app/onboarding_flow_control.rs
is empty. #1764 therefore no longer restores the gate on its own: its own run
already fails Quality Guardrails at the oversized-file ratchet step while its
Check formatting step passes. This change is independent of #1764 and can land
before or after it.

Reproduce:

git archive origin/master | tar -x -C /tmp/master-tree && cd /tmp/master-tree
command cargo fmt --all -- --check            # exit 1, three hunks
patch -p1 < patches-master-format-drift-2026-10-09.patch
command cargo fmt --all -- --check            # exit 0

(The command prefix matters only if you have the repo's dev_cargo shell
shim installed; it cds to the checkout when the caller is inside it.)

Fixes the formatting half of #1740. Happy for this to be squashed into whatever
PR lands first; it is a pure cargo fmt --all application against a6ba7844f.

The Format job fails at a6ba784: `cargo fmt --all -- --check` exits 1 with
exactly three hunks in two files after checking the whole tree (1360 .rs
files) plus scripts/check_module_files.py (OK):

  crates/jcode-provider-openai-runtime/src/lib.rs:966
  crates/jcode-tui/src/tui/app/onboarding_flow_control.rs:633
  crates/jcode-tui/src/tui/app/onboarding_flow_control.rs:874

Bisected each hunk with `rustfmt --check` over candidate trees: lib.rs:966 is
clean at f5d963a and dirty at bda5f3d (2026-10-06, the hunk reported in
#1740); both onboarding hunks are clean at 7df55c3 and dirty at 72faaf1
(2026-10-08T23:08:28-07:00). That commit postdates PR #1764's head
(13375d1), so #1764 no longer restores the gate on its own.

The change is rustfmt's own output applied verbatim against a clean archive
of a6ba784: exit 1 before, exit 0 after, module check still OK. No
hand-written formatting judgement.

Fixes the formatting half of #1740.
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] Safe to merge: the workspace formatting and module-file checks pass, and the patch introduces no behavioral changes.

T-Rex evidence

Evidence from the check

  • The executed Python script runs both exact CI checks and compares formatted base copies with HEAD, preserving the complete reproducible validation source.

Evidence from the check

  • The executed wrapper records the validation command, working directory, exit code, and observed output, preserving the complete capture source.

Command output from the check

  • Ran the exact workspace formatting and module-file checks on HEAD; both exited 0.

Command output from the check

  • Checked both merge-base source copies with Rust 2024 formatting and child traversal disabled; both failed and displayed the three formatting corrections.

Command output from the check

  • Checked both HEAD source copies with the same formatter configuration; both passed with exit code 0.

Command output from the check

  • Captured the three-hunk diff and formatted both base files for byte comparison with HEAD; both matched exactly and tracked files remained unchanged.

Command output from the check

  • Executed the saved validation script and captured its output; every scoped assertion passed and the runner exited 0.

View artifacts

Summary

Applies three formatting fixes across two Rust files to address the Format job failure.

  • The Format job accepts the updated OpenAI and onboarding code.

No actionable issues found. This formatting-only change is safe to merge.

Reviews (1) · Last reviewed commit: "fix(ci): restore the Format job on maste..." · Reviewed by Greptile

@ianalitis

Copy link
Copy Markdown
Contributor Author

Superseded by #1354. Closing to avoid a second review round on the same two files; nothing here is unique.

#1354 is open against the current master tip (04c7d2b04) and carries both of this PR's files with identical hunks:

File This PR #1354
crates/jcode-provider-openai-runtime/src/lib.rs +3 / -4 +3 / -4
crates/jcode-tui/src/tui/app/onboarding_flow_control.rs +14 / -17 +14 / -17

Those two files are a strict subset of #1354's 20 changed files, so the fix is not being dropped, it just has a newer home. This PR's base is 1a513aec2, three commits behind the tip; #1354's base is 04c7d2b04.

Re-verified at 04c7d2b04 just now: cargo fmt --all --check still fails on master, with exactly the three hunks in these two files, so the fix is still needed and #1354 still carries it.

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.

1 participant