← Commit history
Cargo.lock+1−1
@@ -527,7 +527,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"  [[package]] name = "step2glb"-version = "0.12.1"+version = "0.12.2" dependencies = [  "base64",  "clap",
Cargo.toml+1−1
@@ -1,6 +1,6 @@ [package] name = "step2glb"-version = "0.12.1"+version = "0.12.2" edition = "2021" description = "STEP → GLB converter that preserves colors from the source CAD via OCCT's XCAF pipeline. CLI + Hydrogen webview app." license = "MIT"
VERSION+1−1
@@ -1 +1 @@-0.12.1+0.12.2
adom-step2glb
⋯ 1 unchanged line ⋯
adom-step2glb-release
⋯ 1 unchanged line ⋯
package.json+2−2
@@ -1,6 +1,6 @@ {   "slug": "adom-step2glb",-  "version": "1.2.3",+  "version": "1.2.4",   "type": "app",   "description": "The Adom STEP engine: fully manage STEP files. Convert to color-preserving GLB, render thumbnails and vector outlines, laser-etch MPNs, create and edit STEP geometry, extract features, and run molecule mode. One name for the thin Rust CLI and the shared OCCT service. Formerly 'step2glb' + 'service-step2glb'.",   "tags": [@@ -70,5 +70,5 @@     }   ],   "title": "Adom Step2GLB - The Adom STEP Engine",-  "changelog": "1.2.3 (CLI 0.12.1): `thumbnail` no longer advertises GLB input; it refuses a GLB (by --kind, extension or glTF magic) before upload with a pointer to a glTF viewer (adom/adom-step2glb#11). `thumbnail` also polls the service job queue again, so the command works (0.12.0 printed the 202 job JSON as an error). Reconciles the wiki-only 0.12.0 (silk overlays in plain mode) with GitHub main 0.11.2-0.11.3 (--compress, web-grade LOD twin); source of truth is adom-inc/step2glb."+  "changelog": "1.2.4 (CLI 0.12.2): `features` polls the service job queue (it printed the 202 job JSON as an error; adom/adom-step2glb#1). 1.2.3 (CLI 0.12.1): `thumbnail` no longer advertises GLB input; it refuses a GLB (by --kind, extension or glTF magic) before upload with a pointer to a glTF viewer (adom/adom-step2glb#11). `thumbnail` also polls the service job queue again, so the command works (0.12.0 printed the 202 job JSON as an error). Reconciles the wiki-only 0.12.0 (silk overlays in plain mode) with GitHub main 0.11.2-0.11.3 (--compress, web-grade LOD twin); source of truth is adom-inc/step2glb." }
page.json+4−3
@@ -1,6 +1,6 @@ {   "slug": "adom-step2glb",-  "version": "1.2.3",+  "version": "1.2.4",   "type": "app",   "description": "The Adom STEP engine: fully manage STEP files. Convert to color-preserving GLB, render thumbnails and vector outlines, laser-etch MPNs, create and edit STEP geometry, extract features, and run molecule mode. One name for the thin Rust CLI and the shared OCCT service. Formerly 'step2glb' + 'service-step2glb'.",   "tags": [@@ -78,5 +78,6 @@   ],   "install": {     "binary_name": "step2glb"-  }-}+  },+  "changelog": "1.2.4 (CLI 0.12.2): `features` polls the service job queue (it printed the 202 job JSON as an error; adom/adom-step2glb#1). 1.2.3 (CLI 0.12.1): `thumbnail` no longer advertises GLB input; it refuses a GLB (by --kind, extension or glTF magic) before upload with a pointer to a glTF viewer (adom/adom-step2glb#11). `thumbnail` also polls the service job queue again, so the command works (0.12.0 printed the 202 job JSON as an error). Reconciles the wiki-only 0.12.0 (silk overlays in plain mode) with GitHub main 0.11.2-0.11.3 (--compress, web-grade LOD twin); source of truth is adom-inc/step2glb."+}\ No newline at end of file
src/client.rs+14−2
@@ -315,10 +315,22 @@ pub fn extract_features(step: &[u8]) -> Result<String, String> {         .send_bytes(step)         .map_err(|e| format!("POST {url} failed: {e}"))?;     let status = r.status();-    if status != 200 {+    // /features is a queued job too (adom/adom-step2glb#1, John's 9 Sep evidence):+    // poll and read the JSON result instead of reporting the 202 as a failure.+    let r = if status == 202 {+        let body_s = r.into_string().unwrap_or_default();+        let job: serde_json::Value = serde_json::from_str(&body_s)+            .map_err(|_| format!("async 202 but invalid JSON: {body_s}"))?;+        let job_id = job["job_id"].as_str()+            .ok_or_else(|| format!("async 202 but no job_id: {body_s}"))?;+        eprintln!("Feature extraction queued (job {job_id}). Polling...");+        poll_binary_job(job_id, "features")?+    } else if status != 200 {         let body = r.into_string().unwrap_or_default();         return Err(format!("service returned HTTP {status}: {body}"));-    }+    } else {+        r+    };     r.into_string().map_err(|e| format!("read body: {e}")) }