← Commit history

signin: land the freshness guard (v1.6.95 heredoc errored before writing server.py) - refuse >150s-old captured URL, stage:stale -> restart Fusion sign-in

John Lauer ·bd18eb8fb8 ·2mo ago ·parent d77c2ab
5 files changed +24−11
BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.6.95+1.6.96
adom-bridge-fusion-manifest.json+5−5
@@ -1,13 +1,13 @@ {   "manifest_version": 1,   "name": "fusion360",-  "version": "1.6.95",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.95/adom-bridge-fusion-v1.6.95.zip",-  "sha256": "9f599b63ba05f03106eacc423589fcec6d52b122236c083bff07c265ec65a2b8",-  "size": 480560,+  "version": "1.6.96",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-fusion-bridge/1.6.96/adom-bridge-fusion-v1.6.96.zip",+  "sha256": "4e117ad36177bbd4028dda7b9952a186d52d1d3a87c4bd7e5d04af435d31a579",+  "size": 480870,   "verbPrefixes": [     "fusion_"   ],   "healthEndpoint": "/status",-  "released_at": "2026-07-21T02:51:20Z"+  "released_at": "2026-07-21T02:57:06Z" }\ No newline at end of file
bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "fusion360",   "displayName": "Autodesk Fusion 360",-  "version": "1.6.95",+  "version": "1.6.96",   "description": "Drive Autodesk Fusion 360 from the cloud: launch Fusion, electronics board layout, design rules, exports (STEP/IGES/STL/3MF/USDZ/OBJ/DXF/DWG/Gerbers/BOM/CPL), fast APS server-indexed cloud search plus browse/recent/file-info/versions, cloud file download/upload and folder creation, and in-app parametric modeling (fusion_run_modeling_script). Never-charge: APS calls are capped to the free tier.",   "homepage": "https://wiki.adom.inc/adom/adom-desktop-fusion-bridge",   "author": "Adom Inc.",
page.json+2−3
@@ -1,6 +1,6 @@ {   "slug": "adom-desktop-fusion-bridge",-  "version": "1.6.95",+  "version": "1.6.96",   "type": "app",   "description": "Installs this bridge's skills into your container so your AI knows how to drive the bridge. The bridge runtime itself is loaded by Adom Desktop from the release zip.",   "dependencies": {@@ -74,6 +74,5 @@     "set up the fusion bridge"   ],   "discovery_pitch": "Use the Adom Desktop Fusion 360 bridge when the user wants to DRIVE Autodesk Fusion 360 from the cloud: open/search their team's Fusion cloud designs, lay out a PCB or do electronics, export STEP/IGES/STL/Gerbers/BOM, or build a component library with real rendering 3D. It runs Fusion on the user's own machine via Adom Desktop. NOT for web/browser/login/form-filling (that's the native-browser extension) and NOT for KiCad (that's the kicad bridge).",-  "brief": "Drive Autodesk Fusion 360 from the cloud via Adom Desktop: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling.",-  "visibility": "public"+  "brief": "Drive Autodesk Fusion 360 from the cloud via Adom Desktop: component libraries, IPC package generation, board layout, exports (STEP/Gerbers/BOM/CPL), fast APS cloud search, and parametric modeling." }\ No newline at end of file
server.py+15−1
@@ -3672,7 +3672,7 @@ def _remember_signin_profile(profile: str):         pass  -def _chrome_authorize_urls(max_age_min: int = 45):+def _chrome_authorize_urls(max_age_min: int = 15):     """Scan Chrome + Edge profile History DBs for RECENT Autodesk-desktop OAuth authorize     URLs (the Fusion Identity SDK ones - marked by `idsdk` / redirect to idmgr/callback). @@ -3777,6 +3777,20 @@ def _orchestrate_signin(args: dict) -> dict:     auth = urls[0]     steps.append("captured Fusion OAuth URL from %s profile '%s' (%ss old)"                  % (auth["browser"], auth["sourceProfileDir"], auth["ageSec"]))+    # Fusion's sign-in request EXPIRES in ~2 min. A URL older than that completes the LOGIN but+    # Fusion no longer waits on its request_id -> "Sign-in request expired", no handoff. Never+    # silently reuse it; force a fresh request. (Learned live 2026-07-21.)+    if auth["ageSec"] > 150:+        return {"success": True, "stage": "stale", "done": False, "steps": steps,+                "signinAuthUrl": auth["url"], "signinAgeSec": auth["ageSec"],+                "_hint": ("The newest Fusion sign-in URL is %ss old - Fusion expires the request in "+                          "~2 min, so completing it yields 'Sign-in request expired' and NO handoff. "+                          "Get a FRESH request: fusion_stop then fusion_start (resets Fusion to a "+                          "clean 'Welcome to Fusion'), click Fusion's Sign In, and call fusion_signin "+                          "again PROMPTLY. Completion is near-instant when the target profile is "+                          "already signed into Autodesk (auto-consents). Skill: "+                          "fusion-multiprofile-signin." % auth["ageSec"]),+                "statusVerb": "fusion_signin"}      # choose the TARGET profile if not already fixed     reason = ""