app
Fusion - the Fusion 360 Bridge
Public Made by Adomby adom
Drive Autodesk Fusion 360 from the cloud via Adom Bridge: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.
← Commit history
Review changes for #22: triage the mech verbs, no todo!() on macOS
- tests/run_verb_tests.py: fusion_mech_capabilities and fusion_mech_operation_status are daily
read-only checks (an unknown operation is answered from the journal), fusion_mechanical a
negative check (an unknown operation is refused by the exe's validation, before Fusion).
- os-mac: mechanical_state_dir returns the add-in's journal root instead of todo!(), so a
mechanical verb cannot panic the bridge on a Mac.
- CHANGELOG: the triage, and what has not run live yet (joint origins, motion links,
mcmaster_open).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 files changed
+27−1
CHANGELOG.md+6@@ -24,6 +24,12 @@ Its development history is in [docs/MECHANICAL-HISTORY.md](docs/MECHANICAL-HISTO dimension or joint, with its role), so `feature_edit` no longer needs a parameter-list diff. - `material_list` without `libraryId` searches the document's materials and then every loaded library; each row names the `libraryId` that `material_assign` needs.+- The verb suite triages the three verbs: `fusion_mech_capabilities` and `fusion_mech_operation_status` as daily+ read-only checks, `fusion_mechanical` as a negative check (an unknown operation is refused by the exe's+ validation). The typed writes are covered by the mechanical drill. On macOS the journal path is returned, not a+ `todo!()`.+- Not yet run live: `joint_origin_*` and `motion_link_*` (their campaign groups were cut off by the restart bug+ that 1.12.9 fixes) and `mcmaster_open` (interactive by design). ## 1.12.9 (unreleased)
rust/os-mac/src/lib.rs+15−1@@ -25,5 +25,19 @@ impl HostPaths for MacHost { fn fusion_log_dir(&self) -> Option<PathBuf> { todo!("~/Library/Application Support/Autodesk/Autodesk Fusion 360/<userId>/logs") } fn bridge_state_dir(&self) -> PathBuf { todo!("~/.adom/fusion-bridge") } fn scratch_dir(&self) -> PathBuf { todo!("$TMPDIR/adom-fusion") }- fn mechanical_state_dir(&self) -> PathBuf { todo!("~/Library/Application Support/Adom/FusionBridge/mechanical (the add-in's journal.storage_root)") }+ // not a todo!(): the mechanical verbs read this before anything else, so a panic here would take+ // the bridge down on a Mac even for fusion_mech_capabilities. It is the add-in's journal root.+ fn mechanical_state_dir(&self) -> PathBuf {+ PathBuf::from(std::env::var("HOME").unwrap_or_default()).join("Library/Application Support/Adom/FusionBridge/mechanical")+ }+}++#[cfg(test)]+mod tests {+ use super::*;+ #[test]+ fn the_mechanical_journal_lives_where_the_addin_writes_it() {+ let p = MacHost.mechanical_state_dir();+ assert!(p.ends_with("Library/Application Support/Adom/FusionBridge/mechanical"), "{}", p.display());+ } }
tests/run_verb_tests.py+6@@ -135,6 +135,12 @@ t("fusion_get_app_state", "daily", {}, {}) # shape only; content depends on Fus t("fusion_search_cloud_files", "negative", {"query": "x"}, {"pred": "must_refuse"}, "hard-blocked: must refuse") t("fusion_walk_cloud_tree", "negative", {}, {}, "expect refusal text") +# the mechanical layer's exe-side verbs: answered from the exe's own files and validation, so they+# never wait on Fusion and never change a document (the typed writes run in the mechanical drill)+t("fusion_mech_capabilities", "daily", {}, {"ok": True, "fields": ["operations", "idempotency", "sessionId"]}, "read-only: schemas and the live add-in session, from the exe's files")+t("fusion_mech_operation_status", "daily", {"sessionId": "verb-test", "operationId": "verb-test-unknown"}, {"errorCode": "operation_unknown"}, "read-only: an unknown operation is answered from the journal, never by asking Fusion")+t("fusion_mechanical", "negative", {"op": "no_such_operation"}, {"errorCode": "unsupported_operation"}, "refused by the exe's validation before Fusion is touched; typed writes are covered by the mechanical drill")+ # ── stage 1: APS, no Fusion needed ─────────────────────────────────────────── t("fusion_aps_status", "daily", {}, {"ok": True}) t("fusion_aps_get_browser", "daily", {}, {"ok": True})