Repository navigation
feat(ifc): let callers set the Saved graph value limit - #2157
shifatrHtH wants to merge 2 commits into
Conversation
Allow callers to budget field values per Saved graphics graph while preserving the default attach behavior and fallback. Cover request limits and cancellation on public Autodesk sample projects.
DrunkOnJava
left a comment
There was a problem hiding this comment.
@shifatrHtH, thank you for #2157. The change reads cleanly. The default stays at 1,000,000, and every existing call still goes through attach_scoped_with_control, the export pipeline's included (src/ifc/export_pipeline.rs:741 at eb268fdd), so no export moves, as your byte-identical runs show. It also fits where main stands: the 1,000,000 cap stays the default because it is also a guard against hostile input, and the cost of a file built to spend more has not been timed (2026-11-20). A caller who knows its files can now raise it.
The tests should also run in CI. CI sets RVT_SAMPLE_PROJECTS_DIR only for the Python tests (.github/workflows/ci.yml:1606 at eb268fdd), so these three skip there, as the contributing guide says corpus tests do when their path is absent. tools/fetch-autodesk-samples.sh already fetches Autodesk's sample projects from the pinned list for the Measure (.github/workflows/measure.yml). Could the three run where that fetch runs, with the two 2023 projects? If that does not fit, say so here and we will work out how CI gets them.
Question: the limit is reachable only through attach_scoped_with_limits_and_control. So run_export and the CLI keep 1,000,000 with no way to raise it, and the chairs in #2085 (1,789,525 values in their symbol) export only from Rust code that calls the attach directly. Is ExportOptions, with a CLI flag, meant as a follow-up to this pull request, or should it come in here?
Once the tests run in CI, the rvt-rs-review app's approval on a green head is what lands it.
|
@DrunkOnJava, thanks for the review.
Pushed
Yes. This PR covers the Rust attach API and its CI checks. I’d put the |
|
Thanks. Confirmed in the CI log for One change before this is ready. The step downloads about 25 MB from Autodesk's host in the
The fetcher already tells the two apart: run against a scratch pin file, an unreachable host exits with curl's status (7) and a pin mismatch exits 1. |
Summary
Rust callers can set a per-graph field-value limit for a Saved graphics attach request. Existing attach calls keep the one-million-value default.
Motivation
Applications that know their workload can set a limit for Saved decoding. A graph beyond the requested limit follows the existing per-element refusal and fallback behavior.
Changes
SavedMeshLimitsoption and preserve the other reader budgets.Testing
tools/check-local.shand the Rust 1.87 all-targets check.Put the two Autodesk samples in a local directory as
2023-rstbasicsampleproject.rvtand2023-racbasicsampleproject.rvt.Performance benchmark applicability is N/A.
Audit-honesty checklist
A reverse-engineering report or new format fixture is N/A.
Legal and contribution hygiene
Breaking changes
None.
Screenshots or output samples
N/A. The testing section records the public sample results.
Related issues
Refs #2085.
See CONTRIBUTING.md for the contributor gate and fixture guidance.