Skip to content

Safe modification to imprint API for preserved targets support#1108

Open
mlfarrell wants to merge 1 commit intomainfrom
mike/imprint-targets-support
Open

Safe modification to imprint API for preserved targets support#1108
mlfarrell wants to merge 1 commit intomainfrom
mike/imprint-targets-support

Conversation

@mlfarrell
Copy link
Contributor

Comment on lines +6340 to +6349
"target_ids": {
"nullable": true,
"description": "Geometry to imprint from, if provided, these bodies will be unmodified and body_ids will be used as imprint targets",
"default": null,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semantic contradiction in API design: The field is named target_ids but the description states "Geometry to imprint from" and "body_ids will be used as imprint targets". This means target_ids are actually the tools/sources (geometry to imprint from), not the targets.

Furthermore, the description states these bodies "will be unmodified" (unconditionally), but there's also a keep_tools boolean parameter. If target_ids represents the tools and they're always unmodified per this description, then keep_tools becomes ambiguous or contradictory.

This will cause API consumer confusion and potential misuse:

  • Users may pass targets in target_ids when they should pass tools
  • The interaction between keep_tools and the "will be unmodified" guarantee is unclear

Recommendation:

Option 1: Rename field to clarify
  "tool_ids": "Geometry to imprint from (tools). When provided, body_ids become the imprint targets."
  
Option 2: Clarify the keep_tools interaction
  Add: "The keep_tools parameter controls whether these tool bodies are preserved."
Suggested change
"target_ids": {
"nullable": true,
"description": "Geometry to imprint from, if provided, these bodies will be unmodified and body_ids will be used as imprint targets",
"default": null,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"target_ids": {
"nullable": true,
"description": "Geometry to imprint from (tools). When provided, these bodies act as imprint tools and body_ids become the imprint targets. The keep_tools parameter controls whether these tool bodies are preserved.",
"default": null,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@a1f682c). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1108   +/-   ##
=======================================
  Coverage        ?   30.03%           
=======================================
  Files           ?       34           
  Lines           ?     1588           
  Branches        ?        0           
=======================================
  Hits            ?      477           
  Misses          ?     1111           
  Partials        ?        0           
Flag Coverage Δ
unittests 30.03% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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