generated from coulomb/repo-seed
Complete extension SDK maturity
This commit is contained in:
36
extensions/sdk-fixture/runners/native_probe.py
Normal file
36
extensions/sdk-fixture/runners/native_probe.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""SDK fixture runner that writes a native result artifact."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def run(context: dict) -> dict:
|
||||
run_dir = Path(context["run_dir"])
|
||||
artifact_path = run_dir / "artifacts" / "sdk-fixture" / "native-result.json"
|
||||
artifact_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
native_result = {
|
||||
"native_status": "ok",
|
||||
"native_score": 98,
|
||||
"observations": [
|
||||
"SDK fixture native probe completed."
|
||||
],
|
||||
"requirement_refs": [
|
||||
"guide-board.sdk-fixture.v1.native-output"
|
||||
],
|
||||
}
|
||||
artifact_path.write_text(json.dumps(native_result, indent=2, sort_keys=True), encoding="utf-8")
|
||||
artifact_ref = str(artifact_path.relative_to(run_dir))
|
||||
return {
|
||||
"result": "unknown",
|
||||
"observations": [
|
||||
"SDK fixture runner wrote native output for normalization."
|
||||
],
|
||||
"facts": {
|
||||
"native_result_ref": artifact_ref
|
||||
},
|
||||
"artifact_refs": [
|
||||
artifact_ref
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user