Repository navigation
fix(maintenance): harden state saves, diagnostics and translation checks - #173
Merged
Merged
Conversation
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.
What and why
Several existing state stores duplicate atomic-write logic, while Session title updates and VTS token saves overwrite their destination directly. Runtime initialization also contains 25 placeholder log messages, and translation/configuration maintenance can silently introduce drift.
This maintainer-requested draft collects separately reviewable maintenance commits and focused review follow-ups. Most of the diff volume is the translation dictionary move and removal of unused files. Base:
7528a7f; full-suite baseline:fab61d8; review follow-up:92c6d5b; issue-form update:00a0669.Linked Issue for product-semantic or public-contract changes: none. VN recovery behavior and extension runtime implementation are explicitly deferred.
Change class
Owning layers: serialized file publication, runtime diagnostics, source-boundary tests, renderer translations, and repository tooling.
Review order
2b823e8— State publication. Add standard-library-onlyconfig.durable_io.write_text/write_bytes; migrate Session persistence/title updates, character TOML, VN launch profiles, visual profiles, VTS tokens, and Provider activity compaction. Serialization, locks, exclusive Session creation, and read/recovery policies remain with their current owners. Journal append behavior is unchanged.bb704f8— Diagnostics. Replace placeholder messages while retaining log levels. Failure messages use event descriptions and exception type names rather than raw exception payloads.18a263f— Guardrails and ownership. Record exact import edges and environment-read pairs, reject new entries, check state-write exceptions and placeholder logs, and report broad silent exceptions without making them a CI gate. Document built-in versus extension configuration boundaries.d8ba213— Translations. Extract 1,027 handwritten entries into JSON, move two conflicting visual-option translations to their declarations, and translate four previously untranslated strings. Adjust two test loaders to match production module interoperability. No layout, theme, or CSS changes.fab61d8— Repository hygiene. Add issue forms, CODEOWNERS, tool and repository indexes, generated-file marking, explicit line-ending rules, and remove unused copies/an obsolete probe. Remove obsolete typing fallbacks while preservingMethodstring-enum behavior.92c6d5b— Review follow-up. Detect direct and nested same-file environment helpers; add the 47 verified existing file/key pairs to the baseline while rejecting future additions. Exclude imported module value replacements from the state-write rule. Share one scan within the test module without caching future inventories. Restore Bedrock region/model/cache configuration diagnostics and prevent Windows retry sleeps on event-loop threads.00a0669— Accessible issue reporting. Keep blank issues available alongside the two forms and the existing Discussions/security links. Make form names, labels and help text bilingual; make the feature-request outcome/example optional.User-visible effects and compatibility
Explicitly deferred
vn_player/context_store.pyand VN runtime behavior are unchanged, including the existing non-atomic fallback. R3 has an owner-specific deferred exception. VN launch profile saves only reuse the common writer.Evidence
Validation used an isolated Windows / CPython 3.12.10 / Node 22.21.1 / locked L1 model-less environment. The full-suite results below apply to
fab61d8:python -X utf8 tools/run_tests.py: 5,365 passed, 20 skipped, all 435 suites completed.npm testinelectron/: 382 passed.npm run build: passed, including generated configuration checks.python -m pytest -q tests/test_release_tooling.py: 13 passed.python -m ruff check ., architecture view/README generation checks, andgit diff --check: passed.Linux/macOS execution, real models/devices, and remote CI results are not claimed by these local checks. Dependencies and lockfiles were not changed.
Review follow-up validation (
92c6d5b)python -m ruff check .,git diff --check, andpython tools/maintainability_ratchet.py: passed. No new or stale import/environment baseline entries.Issue-form validation (
00a0669)git diff --check: passed. This follow-up changes only issue-template YAML; no runtime tests were rerun for it.Final check
Please review the storage commit boundary and caller invariants, the precision of static-rule exceptions, and translation behavior first. This remains a draft for review; no merge has been requested.