Repository navigation
Pin prefab paths and prim names in a test - #18
Merged
Merged
Conversation
A building's kind is saved as its prefab path (the bridge maps it with prefabFor() and maps it back by comparing against prefabFor()), so a changed path would silently stop old saves from loading. Pin every kind's path, the unknown-kind fallback, primName padding and widening, and the view of huts, plans and tree scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (the Copilot review request did not register:
Judgment note: This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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
Stage B (unit-test expansion) for
src/colony/view.cpp, a cycle with no open issues.prefabFor()is part of the save format:src/bridge/bridge.cppsaves each building's kind as its prefab path (toWorld) and recovers the kind by comparing againstprefabFor()(kindFromPrefab). Only the Stockpile path was asserted before; the Hut and HutPlan paths and the out-of-range fallback (/Prefabs/Unknown) were never checked. A renamed path would stop existing saves from loading. The check now runs in the USD-freerulesjobs, before the Strata build gets involved.primName()gets checks for zero-padding to six digits and for widening, not truncating, ids past six digits.view()gets checks for huts, hut plans, non-tree resources (not drawn) and the tree scale formula.Test-only change: no production code, schema, fingerprint or
strata.refchanges, and no existingCHECKwas removed.No tracking issue: the gap was found during triage.
Test plan
rules (gcc-13),rules (clang-18),rules (asan-ubsan),rules (msvc)green on the PR head. The local build could not run here because the sandbox does not permitcmake/g++, so the local anchor is UNVERIFIED and CI on the exact head SHA is the anchor.game on Strata (saves soak, headless smoke)greenThis PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson