Skip to content

fix: safe fixes from September 7 issue triage - #1193

Draft
1jehuang wants to merge 2 commits into
masterfrom
fix/issue-triage-20260907
Draft

fix: safe fixes from September 7 issue triage#1193
1jehuang wants to merge 2 commits into
masterfrom
fix/issue-triage-20260907

Conversation

@1jehuang

@1jehuang 1jehuang commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Status

Draft while targeted regression tests and a combined TUI build run. No contributor branch code was imported.

Verified so far

  • Merge duplicate top-level environment maps in CI, iOS TestFlight, and Windows Smoke. All nine workflow files pass a duplicate-rejecting YAML parse, and other workflow semantics are unchanged.
  • Fix the two independently reproduced formatting failures. cargo fmt --all -- --check and module declaration checks pass.

Fixes #1191. Related duplicate: #1190. Additional isolated fixes will be added only after verification. Restored parsing does not yet establish that all CI gates pass.


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

@ianalitis

Copy link
Copy Markdown

Independently verified local fix (e7e58c603)

Workflow shellcheck warnings

Pinned source and duplicate check

Local baseline: 0e40fb424 (2026-09-08). actionlint 1.7.12, Homebrew build,
macOS arm64. Public upstream master observed at
4e85d4423cfd248236044564aa8e4d48ce0ae473.
Open issues #1190/#1191 and maintainer PR #1193 concern duplicate YAML mappings.
This patch is separate: it fixes the two shellcheck diagnostics remaining locally
after the duplicate mappings were consolidated. No contributor branch was imported.

Reproduction and expected behavior

Run actionlint at the baseline after installing it separately if unavailable.
Observed: exit 1, SC2155 in .github/workflows/ci.yml Build step and SC2129 in
.github/workflows/release.yml Update AUR package step.
Expected: unchanged lint checks report no diagnostics.

export RUSTC="$(rustup which rustc)" masks a failing lookup. With bash -e,
rustup() { return 42; }; export RUSTC="$(rustup which rustc)"; echo continued
incorrectly reaches the echo. A standalone assignment before export exits 42.
The release script separately redirects every metadata line to .SRCINFO.

Proposed fix and local verification

Split the RUSTC assignment from its export. Group only the existing printf calls
under one .SRCINFO redirection. Do not suppress warnings, alter jobs/triggers,
change release credentials, or execute release operations.

  • actionlint: exit 0 across repository workflows after the patch.
  • Executed the exact extracted old/new .SRCINFO blocks under bash -euo pipefail
    in temporary directories with version 0.83.0-test, source
    https://example.invalid/release.tar.gz, SHA a repeated 64 times.
    Output byte-for-byte identical, 368 bytes.
  • Extracted old/new RUSTC assignment blocks with a stub rustup. Successful
    lookup exports /fixture/rustc to a child bash in both cases. Failing lookup
    reaches the downstream assertion in the old block (exit 1), but immediately
    preserves exit 42 in the new block.
  • git diff --check: passed. Complexity review: standard shell constructs,
    no dependencies or added runner.

Scope: local lint and extracted-shell checks, not hosted Actions or a release.
Submission requires a clean, separately approved contribution branch rather than
publishing unrelated local history.

Patch below contains only this issue's source/test changes. It applies cleanly (git apply --check) to the affected files at upstream 4e85d4423cfd248236044564aa8e4d48ce0ae473. This is not a full build/test on upstream, and no mixed local history is being proposed.

Scoped patch
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 73d397e16..eac23e1c2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -198,7 +198,8 @@ jobs:
           # ("compiled by an incompatible version of rustc"). rust-cache already
           # caches target/ across runs, so a clean, wrapper-consistent build is
           # both correct and fast enough.
-          export RUSTC="$(rustup which rustc)"
+          RUSTC="$(rustup which rustc)"
+          export RUSTC
           CARGO_BIN="$(rustup which cargo)"
           "$CARGO_BIN" build --release --target ${{ matrix.target }}
 
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fb4de7f38..580ea0432 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -883,18 +883,20 @@ jobs:
           sed -i 's/^          //' PKGBUILD
 
           # Generate .SRCINFO without makepkg (AUR uses tab indentation)
-          printf 'pkgbase = jcode-bin\n' > .SRCINFO
-          printf '\tpkgdesc = AI coding agent powered by Claude and ChatGPT\n' >> .SRCINFO
-          printf '\tpkgver = %s\n' "${VERSION_NUM}" >> .SRCINFO
-          printf '\tpkgrel = 1\n' >> .SRCINFO
-          printf '\turl = https://github.com/1jehuang/jcode\n' >> .SRCINFO
-          printf '\tarch = x86_64\n' >> .SRCINFO
-          printf '\tlicense = MIT\n' >> .SRCINFO
-          printf '\tprovides = jcode\n' >> .SRCINFO
-          printf '\tconflicts = jcode\n' >> .SRCINFO
-          printf '\tsource = %s\n' "${LINUX_URL}" >> .SRCINFO
-          printf '\tsha256sums = %s\n' "${LINUX_SHA}" >> .SRCINFO
-          printf '\npkgname = jcode-bin\n' >> .SRCINFO
+          {
+            printf 'pkgbase = jcode-bin\n'
+            printf '\tpkgdesc = AI coding agent powered by Claude and ChatGPT\n'
+            printf '\tpkgver = %s\n' "${VERSION_NUM}"
+            printf '\tpkgrel = 1\n'
+            printf '\turl = https://github.com/1jehuang/jcode\n'
+            printf '\tarch = x86_64\n'
+            printf '\tlicense = MIT\n'
+            printf '\tprovides = jcode\n'
+            printf '\tconflicts = jcode\n'
+            printf '\tsource = %s\n' "${LINUX_URL}"
+            printf '\tsha256sums = %s\n' "${LINUX_SHA}"
+            printf '\npkgname = jcode-bin\n'
+          } > .SRCINFO
 
           git config user.name "Jeremy Huang"
           git config user.email "jeremyhuang55555@gmail.com"

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.

CI broken since Aug 20: duplicate top-level env in ci.yml, ios-testflight.yml, windows-smoke.yml (Invalid workflow file)

2 participants