Repository navigation
ci(bin): split full ShellCheck lint into three single-worker partitions - #25
Merged
Merged
Conversation
Reviewer's GuideThe PR changes full CI lint from two two-worker partitions to three deterministic, complete, disjoint partitions that default to one ShellCheck worker, reducing peak memory pressure while preserving source-aware analysis and adding workflow, documentation, and regression-test coverage for the new contract. Flow diagram for deterministic CI lint partitioningflowchart TD
I[Canonical lint inventory] --> W[Compute root byte weights]
W --> A[Largest-first greedy assignment]
A --> S1[1of3]
A --> S2[2of3]
A --> S3[3of3]
S1 --> C[Complete, disjoint CI coverage]
S2 --> C
S3 --> C
C --> SC[Full source-aware ShellCheck\nwith external sources]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
|
Final disposition for head fe276ca:
|
This was referenced Sep 26, 2026
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
Make the fork's CI Lint 1 job pass again on main and on pull requests, without weakening what it checks.
Since main moved to 47099cc (PR 8, Treehouse allocation binding), the Lint 1 job (
bin/fm-lint.sh --partition 1of2 --telemetry ..., full ShellCheck extended analysis with --external-sources) ends with##[error]Process completed with exit code 143roughly 6-8 minutes in and prints no ShellCheck diagnostics.The previous main run at f843953 passed Lint 1 in about 8 minutes, and Lint 2 still passes everywhere.
The failure reproduced on main run 36219124883, twice on PR 23 run 36221000876, and on PR 20 run 36221073628, so it blocks every fork PR merge.
The job timeout is 30 minutes, so 143 is not the job timeout; locally, tests/fm-lint.test.sh is known to be OOM-killed even on main, which makes memory pressure from a single ShellCheck process following sources across a large root set a leading hypothesis to test, not a conclusion.
Test-step limit: do not run bin/fm-lint.sh partitions, full lint, or any ShellCheck over the whole tree on this shared host; verify with bash -n, the partition inventory via --list-files, and targeted tests only; the PR CI Lint 1/2/3 jobs are the proof.
What Changed
bin/fm-lint.sh --partitionnow accepts1of3,2of3and3of3, and refuses the old1of2/2of2values. The greedy byte-weight assignment now spreads roots across three complete, disjoint partitions. Each partition still runs the full source-aware ShellCheck analysis with--external-sources.FM_LINT_JOBS/--jobsstill override the default.[1, 2]to[1, 2, 3], andLint 3is added to the required job contexts inCONTRIBUTING.md.tests/fm-ci-workflow.test.shnow requires the three-partition matrix.tests/fm-lint.test.shnow checks all three partitions for coverage, unchanged analysis flags and defaultjobs 1telemetry, and confirms1of2,0of3and4of3are rejected. The header comment inbin/fm-lint.shanddocs/fm-test-portable-shards.mdare updated to describe the new layout.Risk Assessment
✅ Low: The change only reconfigures CI lint partitioning: every check is unchanged (full analysis, --external-sources, no excludes, workflow lint and backend purity in each partition), the greedy three-way split stays complete and disjoint, and only partitions default to one worker, so local and gate lint behave as before.
Testing
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-lint.sh:461- The fix assumes the exit code 143 comes from memory pressure. The intent calls that a hypothesis to test, not a conclusion. The change lowers the peak ShellCheck memory at any one time: before, two processes ran at once, each over about 1/4 of the roots (about 1/2 of the tree in memory). Now one process runs at a time over about 1/6 of the roots (two shards per partition, run one after the other). That is consistent with the hypothesis, but if the SIGTERM has another cause, Lint 1/2/3 could still end with 143. Telemetry is written only after all workers finish (bin/fm-lint.sh:895-915). The TERM trap exits before that, so a failing run uploads no telemetry and gives no memory evidence. This was already true before the change. The PR CI Lint 1/2/3 results are the stated proof, so no action is needed here.⏭️ **Test** - skipped
Step was skipped.
✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Summary by Sourcery
Split full CI ShellCheck lint across three single-worker partitions to reduce peak resource usage without weakening coverage.
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests: