From 854bd78ff91771cfffd438e483d1beca0cf99cdd Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sat, 29 Aug 2026 19:59:16 +0800 Subject: [PATCH] fix: import sys in M0 artifact resolver Co-Authored-By: Codex --- .github/workflows/publish-m0-research-ledger.yml | 1 + python/tests/test_manual_m0_research_publisher_workflow.py | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/publish-m0-research-ledger.yml b/.github/workflows/publish-m0-research-ledger.yml index fc6eb9a..8018290 100644 --- a/.github/workflows/publish-m0-research-ledger.yml +++ b/.github/workflows/publish-m0-research-ledger.yml @@ -111,6 +111,7 @@ jobs: python3 - "${artifacts_metadata}" <<'PY' import json import os + import sys from pathlib import Path payload = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8")) diff --git a/python/tests/test_manual_m0_research_publisher_workflow.py b/python/tests/test_manual_m0_research_publisher_workflow.py index 3d75eba..175f441 100644 --- a/python/tests/test_manual_m0_research_publisher_workflow.py +++ b/python/tests/test_manual_m0_research_publisher_workflow.py @@ -38,6 +38,7 @@ def test_workflow_is_manual_and_binds_one_explicit_successful_qar_artifact(self) self.assertIn('metadata.get("head_branch") != "main"', workflow) self.assertIn('metadata.get("event") not in {"schedule", "workflow_dispatch"}', workflow) self.assertIn("QAR artifact workflow-run binding mismatch", workflow) + self.assertIn('import sys\n from pathlib import Path', workflow) self.assertIn("QAR artifact must contain exactly one dated M0 source snapshot", workflow) self.assertIn("m0_research_source_snapshot_[0-9]{4}-[0-9]{2}-[0-9]{2}", workflow) self.assertIn("M0_SOURCE_SNAPSHOT_SHA256", workflow)