Skip to content

Remove .NET and Lua; move the test data to testdata/ (port stage 13b) - #177

Merged
wormeyman merged 10 commits into
mainfrom
port/stage-13b
Oct 21, 2026
Merged

wormeyman merged 10 commits into
mainfrom
port/stage-13b

Conversation

@wormeyman

Copy link
Copy Markdown
Collaborator

Stage 13b of the Rust port (#138), the last stage. The C# planner, the .NET apps and the Lua build are gone. The repo is now rust/ (the planner) and src/vue (the site).

Merging deploys the site, but the site output does not change. Outside comments, the only code changes are the new test-data paths, and small-list.txt moved with no content change. The live site has run the Rust planner since #174.

The fixtures are now frozen. The JSONL fixtures under rust/*/fixtures were recorded from the C# planner at commit 0532d92. This PR deletes the recorders, so nothing can re-record them. To see a recorder, check out that commit. If a planner change on purpose breaks one, edit the fixture by hand and say why in the commit. The 2,748 snapshots are not frozen: UPDATE_SNAPSHOTS=1 rewrites them from the Rust output, as it has since #176.

What changed

Test data moved (git mv, so history follows). The blueprint lists, factorio-oracle.json and all 2,748 *.verified.txt snapshots moved from test/FactorioTools.Test/OilField/ to testdata/oil-field/. Every reader points at the new place: the snapshots crate, the blueprint, contract and planner tests, vite.config.ts and tools/capture-factorio-oracle.sh.

Deleted:

  • src/FactorioTools, FactorioTools.Cli, FactorioTools.Contract, FactorioTools.Serialization, WebApp, BlazorWebApp, BrowserWasm, Benchmark and lua
  • test/
  • the FluteSharp, delaunator-sharp and CSharp.lua submodules, and .gitmodules. The FLUTE tables are vendored in rust/flute/data, and the licenses are in rust/flute and rust/delaunator-net.
  • the C# fixture recorders under rust/*/oracle
  • extract_issue_cases.py. It read PlannerIssueTest.cs; issue_cases.rs is now edited by hand.
  • FactorioTools.sln, global.json, Directory.Build.props, docker-build.sh, .dockerignore, .editorconfig and tools/check-lua.sh
  • Get-BlueprintsFromAzure.ps1 and last-blob-date.txt. The Azure API they used is retired, and the script ran the .NET CLI.

CI: the four .NET and Lua jobs are gone, along with the Verify, swagger and recorder drift checks they ran. CI is now Build front-end and Rust port, plus Build and deploy and the devcontainer smoke job, both of which only run when their paths change. No submodules: recursive is left.

Devcontainer: it is based on ubuntu:24.04, pinned by digest, instead of the .NET SDK image. It keeps Rust 1.98.1, Node 24.21.0 (pinned and checksummed), python3 and gcc. .NET, PowerShell and Lua are gone. The image went from 4.97 GB to 1.93 GB on disk.

Renovate: all the NuGet rules, the submodule block and the .NET SDK grouping are gone. There is no enabledManagers list, so expect Cargo and rust-toolchain.toml PRs. The Dockerfile rule now proposes Ubuntu major versions as their own PRs, where before it skipped them. Nothing automerges.

Other:

  • normalize-lists moved to rust/snapshots/src/bin/. The old .gitignore had a [Bb]in/ rule that kept it out of there. The command is the same.
  • .gitignore went from the 416-line Visual Studio template to the rules this repo uses, plus local secret files (.dev.vars, .env, *.pfx, *.publishsettings).
  • CLAUDE.md is rewritten around rust/ and src/vue.
  • In the README, the old .NET benchmark table and the Lua performance log are replaced by measured Rust numbers, with a link to the public write-up.
  • Comments in rust/ and src/vue/src no longer name deleted files as if they still exist. "Ported from X.cs" notes stay as history.
  • docs/superpowers/ is unchanged.

Checks run

  • From rust/:
    • cargo fmt --all -- --check and cargo clippy --all-targets -- -D warnings: clean
    • cargo test --all-targets: 190 passed, 7 ignored, the same as before the move
    • cargo test --release -p snapshots -p contract -- --include-ignored: 37 passed, covering all 2,748 snapshots and the scoreboard
    • cargo build --workspace --target wasm32-unknown-unknown: OK
    • cargo run --release -p snapshots --bin normalize-lists: both lists unchanged
  • From src/vue:
    • npm ci, npm run build-wasm and npm run build: OK
    • npm test: 55 passed
    • eslint .: clean
    • the build has no framework/ folder
  • Devcontainer: built on Docker Desktop. Then devcontainer up and every run: step of devcontainer.yml ran inside it: cargo test 190 passed, and the front end built with 55 tests passing.
  • actionlint on ci.yml and deploy-cloudflare.yml: no findings. renovate-config-validator: OK.
  • A security pass in guidance mode found no problems:
    • The workflows' triggers and contents: read permissions are unchanged.
    • The new base image is pinned by digest, and the Node and rustup checksums are kept.
    • Nothing new is downloaded.
    • It found one gap, .gitignore losing the template's secret-file rules, which is fixed here.

After merge

Issue #175 step 2 is to add required status checks to the ProtectMain ruleset. Build and deploy and smoke only run when their paths change. If either is required, a PR that doesn't touch those paths would wait forever. So the safe set is Build front-end and Rust port.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH

wormeyman and others added 10 commits October 21, 2026 06:49
git mv the blueprint lists, the Factorio oracle fixture and all 2,748
Verify snapshots out of test/FactorioTools.Test/OilField, and repoint
every reader: the snapshots crate, the blueprint, contract and planner
tests, vite.config.ts and capture-factorio-oracle.sh. Drop the C# test
classes, Get-BlueprintsFromAzure.ps1 and last-blob-date.txt with them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
The Rust planner has been live since #174, and stage 13a moved the last
C#-only jobs to Rust. Delete src/{FactorioTools,FactorioTools.Cli,
FactorioTools.Contract,FactorioTools.Serialization,WebApp,BlazorWebApp,
BrowserWasm,Benchmark,lua}, the test project, the three submodules, the
C# fixture recorders under rust/*/oracle, extract_issue_cases.py (it read
PlannerIssueTest.cs; issue_cases.rs is now the source), the .NET root
files and tools/check-lua.sh. Trim .gitignore from the Visual Studio
template to the rules still in use, and .gitattributes to the snapshot
line-ending pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
CLAUDE.md: Prerequisites, Common commands, Devcontainer and Architecture now
describe rust/ (the eight crates) and src/vue. The .NET Docker build,
performance build flags and Lua transpilation sections are gone, as are the
CLI, WebApp, BlazorWebApp, BrowserWasm, Benchmark, submodule and xUnit/Verify
notes. The oracle section points at testdata/oil-field/ and the Rust oracle
test. "Rust port (in progress)" becomes "Ordering rules" plus a short History
section, which also gives the docs/superpowers link its context. The frozen
fixtures (recorded at 0532d92) are explained.

README.md: links point at testdata/oil-field/ and rust/flute/'s licenses. The
.NET 8 benchmark table and the Lua performance log are replaced by one Runtime
performance section with the measured Rust numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
Measured on the live site after stage 13a with the browser-check script:
the four small-list fields with 20 to 58 pumpjacks plan in 131-402 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
The image now starts from ubuntu:24.04 pinned by digest instead of the
.NET SDK image. It keeps Node (pinned and checksummed), python3, git,
gcc and libc6-dev for cargo's linker, and the Rust toolchain from 13a.
The base already has the ubuntu user at uid 1000, so remoteUser and
the volume paths are unchanged.

devcontainer.json drops the NuGet env and volume, the submodule update
and the C#, PowerShell and Lua extensions. The Devcontainer workflow
drops global.json from its paths, the submodule checkout, the dotnet,
pwsh and Lua checks, dotnet test and the Lua transpile step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
- ci.yml: delete transpile-lua, test-lua-settings, test-location-as-class
  and test-default. Keep build-vue and rust, and say the snapshot and
  contract fixtures are frozen inputs recorded from the C# planner at
  0532d92.
- Drop `submodules: recursive` from ci.yml and deploy-cloudflare.yml.
  Keep the deploy job's /framework/ guard, since public/framework/ is no
  longer ignored.
- renovate.json5: delete the NuGet holds, the git-submodules block and
  the dotnet SDK grouping. The dockerfile rule now fits the Ubuntu 24.04
  devcontainer base, and the automerge comment names the real checks.
- src/vue: drop public/framework from eslint and prettier ignores, and
  fix the wrangler.jsonc comment about the .NET bundle.
- .vscode/settings.json: the workflow schema pointed at a deploy.yml that
  no longer exists; point it at every workflow.
- Move normalize-lists to rust/snapshots/src/bin, now that the root
  .gitignore has no [Bb]in/ rule, and let Cargo find it by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
The fixture docs now say the fixtures are frozen inputs, recorded from the
C# planner at commit 0532d92 by recorders that stage 13b deleted. Test
module docs keep the recorder paths as history and say they were removed.
issue_cases.rs is now the hand-maintained source of truth. Paths that
describe where data is now point at testdata/oil-field. The front-end
comments name the Rust plannerDefaults generator and the FLUTE license in
rust/flute. Comments only; no logic changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
The trimmed .gitignore dropped the Visual Studio template's *.pfx and
*.publishsettings rules. Restore them, and add Wrangler's .dev.vars and
.env files, which neither version ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PTSQFMEdmByebgkoa9RiqH
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

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