Repository navigation
fix(cli): rvt-doc --redact scrubs the whole path, the notes, the strings of the fields and the error text, as its help says (#1919) - #1920
Merged
Conversation
…ngs of the fields and the error text, as its help says (#1919) --redact ran redact_path_str over the path given and nothing else, so an Autodesk OneDrive or project-id folder in the path was printed as it stood, and the error rvt-doc prints when it cannot open a file, which echoes that path, was not scrubbed at all. Its help promised user names and Autodesk-internal paths in any string surfaced. The path, the notes and the error text now go through redact_sensitive, the scrubber the other commands' --redact runs, and the value of each field through the new redact_json_strings. On the 11 family releases (2016 to 2026) and the 6 projects measured, no ADocument field decodes as a string, so what changes today is the path and the error text; the string scrub is ahead of the first string field. Tested end to end: the error text with a missing path (always runs), and the family corpus run from under a user folder and an Autodesk OneDrive folder, plain against --redact. redact_json_strings is a pure helper with three failure-first unit tests.
Owner
Author
|
Self-approval by rvtReview, under Griffin's 2026-11-10 and 2026-11-12 answers that either maintainer session may approve its own work; rvtDevelop's second read is welcome after it lands. I re-read the whole diff at
|
13 of 15 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Nov 13, 2026
…offers, and what each saved-mesh choice draws, curtain-embedding walls included (#1919) (#1926) ## Summary The `export_ifc` tool's schema called its `options` "the `rvt-ifc` switches that change the model" and described its mesh choices without the walls that embed a curtain wall. Both now say what the code does. ## Motivation Items 2 and 3 of #1919 (found reading the generated tool contract against the code): - `IfcOptions` offers `mode`, `saved_meshes`, `revit_property_sets`, `revit_set_placement`, `no_base_quantities` and `allow_partial`. `ExportOptions` has three more switches that change the model, `kind` (`--placeholder`, `--diagnostic-proxies`) and `family_extrusions`, which `IfcOptions::export_options` never sets, so a client reading "the switches that change the model" would expect them. - `MeshesArg` described `default` as every boxed element on Revit 2023 to 2027. The same pass (`attach_scoped_with_control`) also draws the walls that embed a curtain wall from their saved graphics where Revit raised their base, on Revit 2024 to 2027 (`ExportNote::EmbedHostBodies`, RE-340), under `default`, `doors_and_windows` and `all`, and `off` runs no pass (`src/ifc/export_pipeline.rs`, `SavedMeshChoice`, whose documentation already says so). ## Changes - `rvt-mcp/src/args.rs`: the doc comments of `IfcOptions` and of the four `MeshesArg` variants, which are the descriptions in the tool contract. - `docs/mcp.md`: the `export_ifc` row says the same. - `docs/mcp-tools.json` and `docs/mcp-tools.md`: regenerated from CI's built server by `.claude/scripts/sync-mcp-contract.sh` (the contract test names the new text), in a following commit. - `changelog.d/fixed/1919-mcp-export-options.md`. ## Testing Unit tests are banned in this repository; this is a change of documentation strings. - [ ] `tools/check-local.sh` passes (fmt, clippy, rustdoc, build, real-file / CLI / contract checks) - Run by this PR's CI (`tool_contract_is_committed` is the check that carries the change). On this Mac, which does not build this repository: `rustfmt --edition 2024 --check rvt-mcp/src/args.rs`, `tools/ci/api-doc-ids.py`, `tools/release/changelog.py check`. - [x] Verified end to end on real Revit files: the command, the files (and their licence), and the measured result against Revit's own export are in the PR body, with the script or probe that reproduces it - N/A for Revit files: the change is descriptions only, no behaviour. The claims are read from the code that decides them: `IfcOptions::export_options` (which switches it sets), and `run_export`'s `scope` match with the `embed_hosts` pass (`src/ifc/export_pipeline.rs`). - [x] If this touches the IFC exporter: the witness verdicts replay (see CONTRIBUTING.md) or the changed observations are refreshed in this PR - N/A: no exporter code. - [ ] If this is a performance change: reran `tools/bench.sh` and attached the before / after - N/A: not a performance change. ## Audit-honesty checklist - [x] README / docs reflect the current state after this PR — no claims of features that are not actually shipped in this PR - `docs/mcp.md` and the tool contract say the same as the code. - [x] A user-visible change has its entry as a fragment under `changelog.d/<section>/` (see `changelog.d/README.md`), not in `CHANGELOG.md` - `changelog.d/fixed/1919-mcp-export-options.md`. - [x] If a limitation was resolved, the "Known limitations" / "What works today" section in the relevant docs is updated - None listed. - [x] If a new limitation was introduced, it is documented in the PR body and in-code - None. - [x] Commit messages describe WHAT changed and WHY, not "fix things" or "updates" - [x] No emojis in code, docs, or commit messages - [x] No private paths, personal email addresses, or internal jargon in committed files - [x] If this is a reverse-engineering finding: a reproducible probe under `probes/examples/` and a dated addendum to `docs/format-reconnaissance.md` are included - N/A: not a format finding. ## Legal and contribution hygiene - [x] I agree this work is licensable under Apache-2.0 (see `CONTRIBUTING.md`) - [x] This PR contains no Autodesk proprietary source, decompiled internals, or NDA'd SDK content (see `CLEANROOM.md`) - [x] Any new test fixtures use synthetic values (`testuser`, `111111`, `FY-20XX`, etc.) and contain no real-world PII - No fixtures. ## Breaking changes None. The schema's structure is unchanged; only `description` strings differ. ## Screenshots or output samples `options` before: "The `rvt-ifc` switches that change the model. The defaults are `rvt-ifc`'s." After: "The `rvt-ifc` switches this server offers, some of those that change the model: `--placeholder`, `--diagnostic-proxies` and `--family-extrusions` are not among them. The defaults are `rvt-ifc`'s." ## Related issues Closes #1919 once #1920 (item 1, the `rvt-doc --redact` fix, merged) and this are on `main`.
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
rvt-doc --redactscrubbed the user name of a home folder in the path it printed and nothing else, against its own help, which promised user names and Autodesk-internal paths. It now scrubs the whole path, the notes, the strings a field holds and the error text, with the scrubber the other commands'--redactruns.Motivation
Item 1 of #1919 (found reading the CLI help against the code). What leaked, as measured:
RevitFile::openputs the path it was given in its error (I/O error: <path>: No such file or directory (os error 2);a_missing_input_is_named_with_one_error_prefixalready pins that the path appears once), andmainprinted it as it stood, sorvt-doc /home/<name>/... --redactnamed the user on stderr.redact_path_strscrubs a\Users\,/Users/or/home/name only. AnOneDrive - AutodeskorRevit - <digits>folder is scrubbed byredact_sensitive, whichrvt-docdid not call.Changes
src/redact.rs:redact_json_strings, which runsredact_sensitiveover every string value of a JSON value (keys, numbers, booleans and nulls untouched), with a doctest and three failure-first unit tests (a string however deep; what is not text with a path in it is unchanged; scrubbing twice is scrubbing once). It is a pure helper with no I/O, the one case the unit-test ban allows.src/bin/rvt_doc.rs:scrubover the path, each field's value and the notes, run when--redactis set; the error text goes throughredact_sensitiveinmain; the flag's help says what it scrubs.tests/cli_ergonomics.rs:rvt_doc_redact_scrubs_the_path_an_error_names(needs no corpus).tests/cli_real_files.rs:doc_redact_scrubs_the_path_given_and_changes_nothing_elseruns every family file from underUsers/<name>/OneDrive - Autodesk/, plain against--redact: the plain path names both folders, no string of the redacted output holds either, and version, entry offset, fields and notes are equal.changelog.d/security/1919-doc-redact.md.Testing
Unit tests are banned in this repository: the only unit tests here are the helper's.
tools/check-local.shpasses (fmt, clippy, rustdoc, build, real-file / CLI / contract checks)afc399a3(full / CI passed), not on this Mac, which does not build this repository. Run locally:rustfmt --edition 2024 --checkon the four Rust files,tools/ci/api-doc-ids.py(it caught a planning label in a doc comment, fixed inafc399a3),tools/release/changelog.py check, and the PII guard's five patterns over the tree: all clean.What ADocument's fields decode to, on the 11 family releases of the phi-ag/rvt corpus (2016 to 2026) and 6 files of the local project corpus (
2024_Core_Interior,RE1-Architecture,-Electrical,-Mechanical,-Plumbing,Revit_IFC5_Einhoven; magnetar-io/revit-test-datasets, MIT, and the RE1 set, MIT): 2016 to 2018 hold 8 pointers, 1 container and 3 ids, every later file 9, 1 and 3. No string field. Measured withread_adocument()of the Python extension built on 2026-11-10, the ADocument walkrvt-doccalls:The two end-to-end tests above exercise the path and the error text. No local file exercises the field scrub, which the helper's unit tests cover.
tools/bench.shand attached the before / afterAudit-honesty checklist
rvt-doc --redactscrubs beyond the flag's help, which is corrected here (docs/demos.mdonly runs it).changelog.d/<section>/(seechangelog.d/README.md), not inCHANGELOG.mdchangelog.d/security/1919-doc-redact.md.redact_sensitivekeeps its known cut: a user name with a space is scrubbed up to the space where no separator follows it (documented onredact_path_str).probes/examples/and a dated addendum todocs/format-reconnaissance.mdare includedLegal and contribution hygiene
CONTRIBUTING.md)CLEANROOM.md)testuser,111111,FY-20XX, etc.) and contain no real-world PIIBreaking changes
None.
rvt::redact::redact_json_stringsis a new public function.rvt-doc --redactprints less than before in two places: an Autodesk OneDrive or project-id folder in the path is replaced, and an error that names a path has it scrubbed. Without--redactnothing changes.Screenshots or output samples
The path
.../Users/<name>/OneDrive - Autodesk/Models/m.rfaprinted as.../Users/<redacted>/OneDrive - Autodesk/Models/m.rfaunder--redactbefore, and prints as.../Users/<redacted>/<redacted autodesk internal path>now (redact_sensitivereplaces the Autodesk folder through the file's extension).Related issues
Refs #1919 (item 1 of 3; the two
rvt-mcpschema descriptions are the next PR).