Core: report unreadable implicit configuration files #1796
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1796
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@VlREX on GitHub · 2026-11-24 22:45 UTC · original
VlREX:fix/config-read-errors→main· +50 −12 · 1 files · 1 commits · openNo description provided.
@Marvisak on GitHub · 2026-11-25 01:36 UTC · original · edited 2026-11-25 15:24 UTC
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
@oddmaniv on GitHub · 2026-11-25 08:14 UTC · original
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.
@catminou4 on GitHub · 2026-11-24 23:05 UTC · original · approved these changes
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.
@fuzeofficlal on GitHub · 2026-11-26 18:47 UTC · original · approved these changes
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.