Skip to content

style: establish the Lua baseline for 1.3.0 - #17

Merged
jatmn merged 2 commits into
release/1.3.0from
fix/issue-15-lua-baseline
Oct 8, 2026
Merged

jatmn merged 2 commits into
release/1.3.0from
fix/issue-15-lua-baseline

Conversation

@jatmn

@jatmn jatmn commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Establish the Lua formatting and lint baseline for release/1.3.0 on the requested maintenance branch. This branch had 108 Lua files, 109 lint warnings, and no copy of the CI tooling recently merged into main in #16.

The first commit (b348a15) is the dedicated mechanical StyLua 2.5.2 baseline: 103 files needed formatting, with trailing comment whitespace also removed. The second commit reviews and resolves lint debt, ports the existing CI tooling from #16, and updates contributor/development guidance. It preserves the release branch's Factorio 2.1 and adjustable-inserter changes; no gameplay tree is merged from main.

Lint cleanup removes unused code and overwritten connector literals, preserves require side effects and function argument positions, and removes obsolete prototype fields whose referenced globals are nil in the supported engine. Genuine Factorio globals receive precise declarations. One line-specific warning annotation retains deliberately disabled legacy achievements; no blanket suppressions are added.

PRs check changed Lua files. Relevant pushes to main and release/1.3.0 check all tracked Lua, including lint/formatter configuration changes. The existing actual-workflow regression now covers this distinction. The imported authorization helper/tests are retained as dependencies of existing CI; the Pullfrog agent workflow is not installed on this branch.

Validation on reviewed commit d31b4e8c5eeb7da5457204bbad8f9c97349540ec:

  • All 108 Lua files pass Lua 5.2 syntax, Luacheck 1.2.0 with zero warnings/errors, and StyLua 2.5.2 checks.
  • Mechanical formatting passes StyLua AST verification; all 108 files have identical normalized Lua 5.2 instructions/constants before and after formatting.
  • Official Factorio 2.1.21 loads before and after cleanup. Raw prototype dumps are byte-for-byte identical with base (4,206 prototypes) and Space Age (6,310 prototypes).
  • Seven Python files parse; six routing, six authorization, and five package regression tests pass. New selection tests fail against the old workflow and pass with this change.
  • actionlint 1.7.12, Lua configuration probes, whitespace checks, full changed-hunk review, and focused independent review pass.
  • Package build/validation passes for all 1,038 tracked release files, exact bytes, required entrypoints, license/acknowledgments, CRC and SHA256.

Assets, locale, release metadata/version, and attribution notices are unchanged. Engine checks do not cover a graphical playthrough, save migration, or every optional third-party mod combination. Factorio binaries and validation artifacts remain outside Git and GitHub Actions. Keep this PR as a draft for maintainer review.

Closes #15.

GitHub only processes closing keywords for PRs targeting the default branch. Because this PR targets release/1.3.0, close #15 manually when this fix is merged there.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@jatmn jatmn linked an issue Oct 8, 2026 that may be closed by this pull request
@jatmn jatmn self-assigned this Oct 8, 2026
@jatmn

jatmn commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

@pullfrog review

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes Reviewed both commits establishing the Lua baseline and lightweight CI on release/1.3.0, including the linked requirements in #15.

  • Mechanical Lua baseline: Repository-wide StyLua formatting is isolated in the first commit; independently verified all 108 Lua files with StyLua 2.5.2 AST verification and matching normalized Lua 5.2 instructions/constants.
  • Lint cleanup: Reviewed unused-code removal, preserved require side effects and helper argument positions, overwritten connector definitions, obsolete nil-valued fields, and the narrowly scoped legacy-achievement exemption.
  • CI enforcement: Reviewed complete-diff routing, changed-file checks on PRs, full tracked-Lua checks on relevant branch pushes, configuration probes, and actual-workflow file-selection regressions.
  • Tooling and packaging: Reviewed the imported authorization helper, source-boundary checks, deterministic ZIP builder/validator, and contributor/development guidance.

Independent checks passed: Lua 5.2 syntax, Luacheck 1.2.0 with zero warnings/errors across 108 files, StyLua 2.5.2, actionlint 1.7.12, Python AST parsing, all 17 routing/authorization/package regression tests, diff whitespace checks, and validation of all 1,038 packaged files. Official Factorio 2.1.21 prototype dumps before and after lint cleanup were byte-for-byte identical with all optional official mods disabled (3,726 prototypes) and with Space Age enabled (6,310 prototypes).

For this mechanical baseline, I combined inspection of non-whitespace changes and the separate cleanup commit with whole-file AST/bytecode verification; this also covered Lua patches omitted from GitHub's aggregate diff. Graphical playthroughs, existing-save migration, and optional third-party mod combinations were not exercised. No repository files were changed, and the PR remains a draft.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@jatmn
jatmn marked this pull request as ready for review October 8, 2026 20:42

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 20000 lines

@jatmn
jatmn merged commit 62d9981 into release/1.3.0 Oct 8, 2026
8 checks passed
@jatmn
jatmn deleted the fix/issue-15-lua-baseline branch October 8, 2026 20:42
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.

Establish the repository-wide Lua formatting and lint baseline

1 participant