refactor(engine): extract shared CLI runtime from Program.cs into CliRuntime.cs (issue 21) - #41
Merged
Merged
Conversation
added 3 commits
September 5, 2026 02:07
The verify job cargo compiles of the Tauri crate validate tauri.conf.json bundle.resources, but the five declared files were never staged in CI (locally frontend/scripts/prebuild.mjs does it during npm run build), so every main push failed at "Run Tauri crate tests". Insert a fail-closed staging step after "Build CLI" copying the five resources into frontend/src-tauri/bin/. Docs synced: build-and-release.md CI section + AGENTS.md Tauri-shell bullet.
…y (issue 17)
Run 33904993947 proved the five CLI resources stage correctly (5/5 logged)
and the resource gate passed, but compile then hit a second gate:
tauri::generate_context! (main.rs:1409) panics when frontendDist
("../../dist", repo-root dist/) does not exist - the real dist/ is only
produced by "Build frontend", which runs after the cargo steps. Seed a
dist/index.html placeholder in the same staging step; vite build
overwrites it with real output later.
…Runtime.cs (issue 21)
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.
Summary (architecture-recovery issue 21)
Pure mechanical move: the 26 shared CLI runtime members (constants, ValidCommands, JsonOpts, DebugLog, help text, ScrubExceptionMessage, SecretString, protection predicates, provider-hash recording, mutation lock, environment snapshot, atomic writes) move verbatim from
src/Program.cs(446 lines) into newsrc/CliRuntime.cs(326 lines, stillpartial class Program).Program.csstays the thin Main dispatcher (138 lines).Zero-behavior-change evidence chain
head+M1+K+M2+tail === src); 10 anchor guards passed; no signature/visibility/output changes; no new seams or abstractions; usings preserved..scratch/architecture-recovery/reports/21-cliruntime-extraction.md(also mirrored in the branch docs archive when sedimented).Stack note
Stacked on
arch/17-verify-cli-staging(AGENTS.md cross-stack dependency, ticket-03 defense line 1). This PR's diff therefore includes the two issue-17 CI staging commits; CI green here validates the combined merge state.Acceptance