Skip to content

ci: the saved-graphics field list is held against the m_ names of the modules it serves (#1694) - #1721

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/1694-saved-graphics-fields-check
Nov 11, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/1694-saved-graphics-fields-check

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

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.sha256 catches 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 less m_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 from src/research/native_saved_scene.rs and 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, except m_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 that default_representation in native_graphics_traversal.rs depends on the count of an object's fields, not a name: a pre-2023 InstanceInfo with no m_GRepId is the default representation only if it holds exactly m_Trf, m_symbolId and m_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 passed on the final head
  • On main at b647c60b the check exits 0: saved-graphics fields: 66 names, every literal of 7 readers listed.
  • On a copy of the sources with m_radius removed from the list and a new literal added to native_empty_faces.rs it 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).
  • The workflow file parses (yaml.safe_load), the step is in the PII guard job, tools/ci/api-doc-ids.py passes and rustfmt --check is clean on the one Rust file.

Audit-honesty checklist

  • No user-visible change, so no changelog fragment; no claim in README or docs changes.
  • No emojis, no private paths in committed files.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk proprietary source, internals or NDA material.
  • No new test fixtures.

Breaking changes

None.

Related issues

Refs #1694.

… modules it serves, and its doc comment names the one reader the check cannot see (#1694)
@DrunkOnJava
DrunkOnJava merged commit 8ec2ac9 into main Nov 11, 2026
68 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/1694-saved-graphics-fields-check branch November 11, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant