Repository navigation
ci: the saved-graphics field list is held against the m_ names of the modules it serves (#1694) - #1721
Merged
Conversation
… modules it serves, and its doc comment names the one reader the check cannot see (#1694)
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
A check in the PII guard job holds
SAVED_GRAPHICS_FIELDS(#1717) against the"m_..."string literals of the seven modules that read a graph object between a graphics record and a mesh, and fails with the names when they differ. The constant's doc comment now says so and names the one reader the check cannot see.Motivation
#1717 made the saved-graphics pass build only the listed fields, so a reader that takes another field reads it as absent. Measure's
ifc.sha256catches that only on routes some export reads; the pre-2023 route and any branch no model exercises are outside it. In the review of #1717 I extracted the literals by hand (65 in the seven modules, equal to the list lessm_id); this makes it a contract check instead of a hand count. It is a check of a file against a file, not a unit test.Changes
tools/ci/saved-graphics-fields.py: reads the constant fromsrc/research/native_saved_scene.rsand every"m_..."literal of the seven modules (the constant's own body excluded). Fails naming each literal a reader takes that the list lacks and each listed name no reader takes, exceptm_id, which the decode's identity check reads..github/workflows/ci.yml: a step in the PII guard job, after the API doc ids check.src/research/native_saved_scene.rs: the doc comment only. It says CI fails when the names differ, and thatdefault_representationinnative_graphics_traversal.rsdepends on the count of an object's fields, not a name: a pre-2023InstanceInfowith nom_GRepIdis the default representation only if it holds exactlym_Trf,m_symbolIdandm_cda(RE-342; the 30 sample projects of 2015 to 2022 declare exactly those three, and no export reads that route).Testing
Unit tests are banned in this repository: none added. Run end to end on the sources:
full / CI passedon the final headmainatb647c60bthe check exits 0:saved-graphics fields: 66 names, every literal of 7 readers listed.m_radiusremoved from the list and a new literal added tonative_empty_faces.rsit exits 1 and names both (m_brandNewField is read by native_empty_faces.rs and not in SAVED_GRAPHICS_FIELDS,m_radius is read by native_parametric_surface.rs, native_saved_mesh.rs and not in SAVED_GRAPHICS_FIELDS).yaml.safe_load), the step is in the PII guard job,tools/ci/api-doc-ids.pypasses andrustfmt --checkis clean on the one Rust file.Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.
Related issues
Refs #1694.