Core: report unreadable implicit configuration files #1795
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1796"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T22:45:05Z.
No description provided.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:05:48Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae).cargo test -p victory-core --locked → 13 passed, 0 failed. read_config_file distinguishes missing-implicit (optional) from missing-explicit (required) config — missing_implicit_config_is_optional_but_explicit_is_required covers both.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:36:24Z.
Automated triage for the maintainers.
Merge candidate (worth a look). Now that it merges cleanly: in
victory-core/src/config.rs,Config::loadused to checkpath.is_file()first, so an implicit./victory.tomlthat exists but can't be read (a directory, permission denied) was silently ignored, and a directory named byVICTORY_CONFIGwas reported as "does not exist". The newread_config_filetreats onlyNotFoundon the implicit path as optional and reports every other read error with the path; an explicit path keeps failing, now with the OS error. I checked thattempfileis already a dev-dependency ofvictory-core, that the downcast in the UTF-8 test works through anyhow's context, and thatmain's laterexplicit_config_pathhandling is kept. CI: passing.Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 07:03:13 +00:00
Imported from Marvisak/VIctory. Originally posted by oddmaniv on 2026-11-25T08:14:19Z.
Independent native Windows verification of this PR at
5edb19078fa0df07bb178bb97323630dac679afe, plus separately recorded integration results:Original PR head
cargo test --locked -p victory-corepassed 13 tests. Workspace Clippy with all targets passed both default and all-features configurations, warnings denied; asset policy passed.Config::load()entry-point cases passed: a directory at implicitvictory.tomlproduces a read error; a missing implicit file remains optional; a missing explicit file errors; and a valid implicit file loads. Each case ran in an isolated child process throughcargo test --locked -p victory-core --test config_implicit <case> -- --exact --nocapture. Production files were unchanged, and the tested fixture bytes matched the local fixture.Historical main-based integration, not a claim about today's main
4118f33b3910f6b6b738216d6a66e8b355502b28; originating PR head:5edb19078fa0df07bb178bb97323630dac679afe.explicit_config_path()handling while applying the author's configuration-read change. It was a separate local integration tree, not an edit to the author's branch; it does not replace testing the original PR head. No additional production fix is being claimed.The main-integration evidence was collected earlier; the original-head checks above were subsequently added to close that verification gap. No full workspace test suite, game or GPU execution was performed. These results cover the synthetic cases listed, not all filesystem error conditions or gameplay behavior.
Credit to @VlREX for the production change. AI assistance was used for the additional test instrumentation and verification.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T18:47:29Z.
Review: APPROVED
Verified
200dc3205557a691a251132b313168e29193aedecleanly merged ontomain(63bcca43) on Windows 11 x64:read_config_file(crates/victory-core/src/config.rs:125-133) preservesmain'sexplicit_config_path()handling, ignores onlyErrorKind::NotFoundon the implicit path, and surfaces unreadable paths, directory paths, invalid UTF-8, and missing explicitVICTORY_CONFIGfiles with path context.cargo test -p xtask --locked policy::tests::repository_passes_policy:1 passed(asset policy: 191 files ok).cargo clippy --locked -p victory-core --all-targets -- -D warnings: clean.cargo test --locked -p victory-core --lib:16 passed, 0 failed(including all three newconfig::testscases).Minor formatting nit:
rustfmt --edition 2024 --check crates/victory-core/src/config.rsflags wrapping onconfig.rs:129-130. Ready to merge.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.