From 61a28b94c082c2e4804fcec4018ae6946fe2ba05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:32:03 -0700 Subject: [PATCH 01/57] fix(ci): bootstrap pcs-core workspace dependency in benchmark.yml --- .github/workflows/benchmark.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c6af728..b3401db 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -11,6 +11,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Checkout pcs-core (workspace dependency) + uses: actions/checkout@v4 + with: + repository: SentinelOps-CI/pcs-core + path: pcs-core + - uses: astral-sh/setup-uv@v4 - name: Install deps From 77fda6bf8a5c79d94f34e30c6499c65ff9581da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:32:05 -0700 Subject: [PATCH 02/57] fix(ci): bootstrap pcs-core workspace dependency in contributor-dry-run-monthly.yml --- .../workflows/contributor-dry-run-monthly.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/contributor-dry-run-monthly.yml b/.github/workflows/contributor-dry-run-monthly.yml index 98ef3cc..85f1ea1 100644 --- a/.github/workflows/contributor-dry-run-monthly.yml +++ b/.github/workflows/contributor-dry-run-monthly.yml @@ -10,14 +10,24 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Checkout pcs-core (workspace dependency) + uses: actions/checkout@v4 + with: + repository: SentinelOps-CI/pcs-core + path: pcs-core - uses: astral-sh/setup-uv@v4 + - uses: pnpm/action-setup@v4 + with: + version: 10 - uses: actions/setup-node@v4 with: node-version: "22" cache: "pnpm" - - uses: pnpm/action-setup@v4 - with: - version: 10 + - name: Install elan for Lean build + run: | + curl -sSf https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain none + echo "$HOME/.elan/bin" >> "$GITHUB_PATH" - name: Install Python deps run: uv sync --all-packages - name: Install portal deps From 36a8b76d59893a2873a9966bd39d4d95bcfca7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:32:07 -0700 Subject: [PATCH 03/57] fix(ci): bootstrap pcs-core workspace dependency in mcp-contract.yml --- .github/workflows/mcp-contract.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/mcp-contract.yml b/.github/workflows/mcp-contract.yml index 1971c82..e1fdbd8 100644 --- a/.github/workflows/mcp-contract.yml +++ b/.github/workflows/mcp-contract.yml @@ -11,6 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Checkout pcs-core (workspace dependency) + uses: actions/checkout@v4 + with: + repository: SentinelOps-CI/pcs-core + path: pcs-core - uses: astral-sh/setup-uv@v4 - name: Install deps (including MCP extras) run: uv sync --all-packages --extra mcp From 61f44d7ca70ace3cd9023122f8d9d7979b0b1fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:32:10 -0700 Subject: [PATCH 04/57] fix(ci): bootstrap pcs-core workspace dependency in security-sarif.yml --- .github/workflows/security-sarif.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/security-sarif.yml b/.github/workflows/security-sarif.yml index acd7b3f..b15ad2c 100644 --- a/.github/workflows/security-sarif.yml +++ b/.github/workflows/security-sarif.yml @@ -15,6 +15,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Checkout pcs-core (workspace dependency) + uses: actions/checkout@v4 + with: + repository: SentinelOps-CI/pcs-core + path: pcs-core - uses: astral-sh/setup-uv@v4 - name: Install Python deps run: uv sync --all-packages From b06b9ced7bbf7aa9cc2859915687e5e203d9ece0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:32:13 -0700 Subject: [PATCH 05/57] fix(ci): bootstrap pcs-core workspace dependency in release.yml --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 180dd5a..3bff2f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Checkout pcs-core (workspace dependency) + uses: actions/checkout@v4 + with: + repository: SentinelOps-CI/pcs-core + path: pcs-core + - uses: astral-sh/setup-uv@v4 - uses: pnpm/action-setup@v4 with: From 46e53b0dca6d48a5c346788369e56b5d7b5bd92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:41 -0700 Subject: [PATCH 06/57] fix(ci): match uv sibling path and package manager pin in benchmark.yml --- .github/workflows/benchmark.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index b3401db..baf4ffc 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -17,6 +17,11 @@ jobs: repository: SentinelOps-CI/pcs-core path: pcs-core + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - uses: astral-sh/setup-uv@v4 - name: Install deps From ded3b00ab8fdd27f4caaaea4f7994d565d8730ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:43 -0700 Subject: [PATCH 07/57] fix(ci): match uv sibling path and package manager pin in contributor-dry-run-monthly.yml --- .github/workflows/contributor-dry-run-monthly.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contributor-dry-run-monthly.yml b/.github/workflows/contributor-dry-run-monthly.yml index 85f1ea1..f7d639c 100644 --- a/.github/workflows/contributor-dry-run-monthly.yml +++ b/.github/workflows/contributor-dry-run-monthly.yml @@ -16,10 +16,15 @@ jobs: with: repository: SentinelOps-CI/pcs-core path: pcs-core + + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" - uses: astral-sh/setup-uv@v4 - uses: pnpm/action-setup@v4 with: - version: 10 + version: "10.0.0" - uses: actions/setup-node@v4 with: node-version: "22" From fa40933288132f838405b64879e3d4fdbc9445db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:46 -0700 Subject: [PATCH 08/57] fix(ci): match uv sibling path and package manager pin in mcp-contract.yml --- .github/workflows/mcp-contract.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/mcp-contract.yml b/.github/workflows/mcp-contract.yml index e1fdbd8..0fb8ee2 100644 --- a/.github/workflows/mcp-contract.yml +++ b/.github/workflows/mcp-contract.yml @@ -17,6 +17,11 @@ jobs: with: repository: SentinelOps-CI/pcs-core path: pcs-core + + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" - uses: astral-sh/setup-uv@v4 - name: Install deps (including MCP extras) run: uv sync --all-packages --extra mcp From 1d904006756d5d3be5e621dc2cabcbc4e3d7e0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:48 -0700 Subject: [PATCH 09/57] fix(ci): match uv sibling path and package manager pin in security-sarif.yml --- .github/workflows/security-sarif.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/security-sarif.yml b/.github/workflows/security-sarif.yml index b15ad2c..f80d939 100644 --- a/.github/workflows/security-sarif.yml +++ b/.github/workflows/security-sarif.yml @@ -21,6 +21,11 @@ jobs: with: repository: SentinelOps-CI/pcs-core path: pcs-core + + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" - uses: astral-sh/setup-uv@v4 - name: Install Python deps run: uv sync --all-packages From 08e3bb5139559c658af61cb8e0cecec645813558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:51 -0700 Subject: [PATCH 10/57] fix(ci): match uv sibling path and package manager pin in release.yml --- .github/workflows/release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bff2f2..f047918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,15 @@ jobs: repository: SentinelOps-CI/pcs-core path: pcs-core + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - uses: astral-sh/setup-uv@v4 - uses: pnpm/action-setup@v4 with: - version: 10 + version: "10.0.0" - uses: actions/setup-node@v4 with: node-version: 22 From f873c27c93f4b550defad39bea81d2828c7613e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:54 -0700 Subject: [PATCH 11/57] fix(ci): match uv sibling path and package manager pin in corpus-validation.yml --- .github/workflows/corpus-validation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/corpus-validation.yml b/.github/workflows/corpus-validation.yml index ff3d34a..4e304f7 100644 --- a/.github/workflows/corpus-validation.yml +++ b/.github/workflows/corpus-validation.yml @@ -16,6 +16,11 @@ jobs: with: repository: SentinelOps-CI/pcs-core path: pcs-core + + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" continue-on-error: true - uses: astral-sh/setup-uv@v4 @@ -50,7 +55,7 @@ jobs: - uses: pnpm/action-setup@v4 with: - version: 10 + version: "10.0.0" - uses: actions/setup-node@v4 with: From 26ab56ce927fb62932f141ed93db3818c77fa6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:56 -0700 Subject: [PATCH 12/57] fix(ci): match uv sibling path and package manager pin in pcs-bench-producer.yml --- .github/workflows/pcs-bench-producer.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pcs-bench-producer.yml b/.github/workflows/pcs-bench-producer.yml index be5906d..5bc3ffc 100644 --- a/.github/workflows/pcs-bench-producer.yml +++ b/.github/workflows/pcs-bench-producer.yml @@ -31,6 +31,11 @@ jobs: repository: SentinelOps-CI/pcs-core path: pcs-core + - name: Make PCS dependency available at uv.lock sibling path + run: | + test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" + ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - name: Checkout pcs-bench uses: actions/checkout@v4 with: From 0e78be2d33f37f9659e284eddfb45b431059a142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:33:59 -0700 Subject: [PATCH 13/57] fix(ci): match uv sibling path and package manager pin in portal-ci.yml --- .github/workflows/portal-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/portal-ci.yml b/.github/workflows/portal-ci.yml index 42f5b8d..f9dc883 100644 --- a/.github/workflows/portal-ci.yml +++ b/.github/workflows/portal-ci.yml @@ -13,7 +13,7 @@ jobs: - uses: pnpm/action-setup@v4 with: - version: 10 + version: "10.0.0" - uses: actions/setup-node@v4 with: From 9bc3c7f0b53ebbe75aa5349f63fe78f84921a589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:36:08 -0700 Subject: [PATCH 14/57] fix(ci): provision pinned Ruff CLI for security SARIF job --- .github/workflows/security-sarif.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/security-sarif.yml b/.github/workflows/security-sarif.yml index f80d939..6cfb7e1 100644 --- a/.github/workflows/security-sarif.yml +++ b/.github/workflows/security-sarif.yml @@ -31,7 +31,7 @@ jobs: run: uv sync --all-packages - name: Generate Ruff SARIF (warning-first) run: | - uv run --project pipeline ruff check pipeline kernels kernels/conformance scripts tests --output-format sarif --exit-zero > ruff.sarif + uvx --from ruff==0.17.0 ruff check pipeline kernels kernels/conformance scripts tests --output-format sarif --exit-zero > ruff.sarif - name: Upload SARIF to code scanning uses: github/codeql-action/upload-sarif@v3 with: From 8d349cb10bd5e26bec5ab695738c3b1a3d7f368b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:40:44 -0700 Subject: [PATCH 15/57] fix(ci): pass actual pcs-core schemas directory to mirror script --- .github/workflows/corpus-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/corpus-validation.yml b/.github/workflows/corpus-validation.yml index 4e304f7..354b576 100644 --- a/.github/workflows/corpus-validation.yml +++ b/.github/workflows/corpus-validation.yml @@ -34,7 +34,7 @@ jobs: - name: Sync PCS benchmark schemas from pcs-core if: hashFiles('pcs-core/schemas/**') != '' - run: uv run python scripts/sync_pcs_benchmark_schemas.py pcs-core + run: uv run python scripts/sync_pcs_benchmark_schemas.py pcs-core/schemas - name: Install pcs-core extra (when checked out) run: | From 49b842cdd170b9df55966f2e063b40c888b6a15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:40:46 -0700 Subject: [PATCH 16/57] fix(ci): pass actual pcs-core schemas directory to mirror script --- .github/workflows/pcs-bench-producer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pcs-bench-producer.yml b/.github/workflows/pcs-bench-producer.yml index 5bc3ffc..9843ca9 100644 --- a/.github/workflows/pcs-bench-producer.yml +++ b/.github/workflows/pcs-bench-producer.yml @@ -54,7 +54,7 @@ jobs: run: uv pip install --system -e pcs-bench - name: Sync PCS benchmark schemas - run: uv run python scripts/sync_pcs_benchmark_schemas.py pcs-core + run: uv run python scripts/sync_pcs_benchmark_schemas.py pcs-core/schemas - name: LabTrust producer gate (release-grade) env: From d299123dc4fe2a9071db4db3b85ac31bc4948ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:45:54 -0700 Subject: [PATCH 17/57] fix(ci): add fail-closed, pinned PCS packaging bootstrap --- scripts/prepare_pcs_core_workspace.py | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 scripts/prepare_pcs_core_workspace.py diff --git a/scripts/prepare_pcs_core_workspace.py b/scripts/prepare_pcs_core_workspace.py new file mode 100644 index 0000000..acb28da --- /dev/null +++ b/scripts/prepare_pcs_core_workspace.py @@ -0,0 +1,73 @@ +"""Prepare the pinned pcs-core checkout for reproducible editable CI installs. + +Temporary packaging-only compatibility shim for upstream pcs-core's +python/pyproject.toml, whose readme points outside its Hatchling project root. +This never changes application source, PCS schemas, or scientific fixtures. + +Remove this shim once upstream fixes the Python package metadata and the +pinned source revision has been updated. +""" + +from __future__ import annotations + +import hashlib +import json +import shutil +import subprocess +import sys +from pathlib import Path + +PINNED_PCS_CORE_SHA = "9c971f5f9da8a424924dd8f48d6a3b71a1009e1b" +OLD_README = 'readme = "../README.md"' +NEW_README = 'readme = "README.md"' + + +def prepare(repo_root: Path) -> None: + """Check the upstream revision and apply only the known README build fix.""" + upstream = repo_root / "pcs-core" + project = upstream / "python" + metadata = project / "pyproject.toml" + source_readme = upstream / "README.md" + distribution_readme = project / "README.md" + + if not metadata.is_file() or not source_readme.is_file(): + raise FileNotFoundError("Required pcs-core package metadata/README is missing") + + revision = subprocess.check_output( + ["git", "-C", str(upstream), "rev-parse", "HEAD"], text=True + ).strip() + if revision != PINNED_PCS_CORE_SHA: + raise RuntimeError( + f"Unexpected pcs-core revision {revision}; expected {PINNED_PCS_CORE_SHA}. " + "Review the upstream package metadata before updating this shim." + ) + + original = metadata.read_text(encoding="utf-8") + occurrences = original.count(OLD_README) + if occurrences == 1: + if distribution_readme.exists(): + raise RuntimeError("Unexpected pcs-core/python/README.md; review packaging state") + updated = original.replace(OLD_README, NEW_README) + metadata.write_text(updated, encoding="utf-8") + shutil.copyfile(source_readme, distribution_readme) + operation = "README relocation compatibility patch" + elif NEW_README in original and distribution_readme.is_file(): + operation = "upstream packaging already fixed" + else: + raise RuntimeError("Unknown pcs-core packaging layout; refusing to patch") + + manifest = { + "upstream_revision": revision, + "operation": operation, + "metadata_sha256": hashlib.sha256(metadata.read_bytes()).hexdigest(), + "readme_sha256": hashlib.sha256(distribution_readme.read_bytes()).hexdigest(), + } + print(json.dumps(manifest, sort_keys=True)) + + +if __name__ == "__main__": + try: + prepare(Path(__file__).resolve().parents[1]) + except (FileNotFoundError, RuntimeError, subprocess.CalledProcessError) as error: + print(f"pcs-core bootstrap failed: {error}", file=sys.stderr) + raise SystemExit(1) from error From b3e34e4e06e4d66b5055b4596fb55a89edca6e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:13 -0700 Subject: [PATCH 18/57] fix(ci): pin and validate PCS workspace dependency in benchmark.yml --- .github/workflows/benchmark.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index baf4ffc..8e3f228 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path @@ -22,6 +23,9 @@ jobs: test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py + - uses: astral-sh/setup-uv@v4 - name: Install deps From c72a73edd985acfbd73c9b6949b6a9c9e4d5e6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:15 -0700 Subject: [PATCH 19/57] fix(ci): pin and validate PCS workspace dependency in contributor-dry-run-monthly.yml --- .github/workflows/contributor-dry-run-monthly.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/contributor-dry-run-monthly.yml b/.github/workflows/contributor-dry-run-monthly.yml index f7d639c..6239a4b 100644 --- a/.github/workflows/contributor-dry-run-monthly.yml +++ b/.github/workflows/contributor-dry-run-monthly.yml @@ -15,12 +15,16 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path run: | test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py - uses: astral-sh/setup-uv@v4 - uses: pnpm/action-setup@v4 with: From 6bda359a4cd7e0a1f85134d57eaa8b19aafce4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:18 -0700 Subject: [PATCH 20/57] fix(ci): pin and validate PCS workspace dependency in mcp-contract.yml --- .github/workflows/mcp-contract.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/mcp-contract.yml b/.github/workflows/mcp-contract.yml index 0fb8ee2..33e2d9d 100644 --- a/.github/workflows/mcp-contract.yml +++ b/.github/workflows/mcp-contract.yml @@ -16,12 +16,16 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path run: | test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py - uses: astral-sh/setup-uv@v4 - name: Install deps (including MCP extras) run: uv sync --all-packages --extra mcp From 59a09cfc61404ee0d51d72392955fb3bd3963487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:20 -0700 Subject: [PATCH 21/57] fix(ci): pin and validate PCS workspace dependency in security-sarif.yml --- .github/workflows/security-sarif.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/security-sarif.yml b/.github/workflows/security-sarif.yml index 6cfb7e1..9ad6849 100644 --- a/.github/workflows/security-sarif.yml +++ b/.github/workflows/security-sarif.yml @@ -20,12 +20,16 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path run: | test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py - uses: astral-sh/setup-uv@v4 - name: Install Python deps run: uv sync --all-packages From 7cf6283b5d8bf2172c5c56618555424c4eec9707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:23 -0700 Subject: [PATCH 22/57] fix(ci): pin and validate PCS workspace dependency in release.yml --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f047918..48faad4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,7 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path @@ -26,6 +27,9 @@ jobs: test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py + - uses: astral-sh/setup-uv@v4 - uses: pnpm/action-setup@v4 with: From 9fef033393dc0bb08fd857de5b1f244e5c55fbdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:25 -0700 Subject: [PATCH 23/57] fix(ci): pin and validate PCS workspace dependency in corpus-validation.yml --- .github/workflows/corpus-validation.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/corpus-validation.yml b/.github/workflows/corpus-validation.yml index 354b576..f89c338 100644 --- a/.github/workflows/corpus-validation.yml +++ b/.github/workflows/corpus-validation.yml @@ -15,13 +15,16 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path run: | test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" - continue-on-error: true + + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py - uses: astral-sh/setup-uv@v4 From f995bd342a650acd082fd07b735bf5ced659a9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:46:28 -0700 Subject: [PATCH 24/57] fix(ci): pin and validate PCS workspace dependency in pcs-bench-producer.yml --- .github/workflows/pcs-bench-producer.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pcs-bench-producer.yml b/.github/workflows/pcs-bench-producer.yml index 9843ca9..a826b23 100644 --- a/.github/workflows/pcs-bench-producer.yml +++ b/.github/workflows/pcs-bench-producer.yml @@ -29,6 +29,7 @@ jobs: uses: actions/checkout@v4 with: repository: SentinelOps-CI/pcs-core + ref: 9c971f5f9da8a424924dd8f48d6a3b71a1009e1b path: pcs-core - name: Make PCS dependency available at uv.lock sibling path @@ -36,6 +37,9 @@ jobs: test -f "$GITHUB_WORKSPACE/pcs-core/python/pyproject.toml" ln -sfn "$GITHUB_WORKSPACE/pcs-core" "$GITHUB_WORKSPACE/../pcs-core" + - name: Verify pinned PCS revision and repair upstream packaging metadata + run: python scripts/prepare_pcs_core_workspace.py + - name: Checkout pcs-bench uses: actions/checkout@v4 with: From 27ecef249bb36268101f06f96cc4156aa8e94149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:50:24 -0700 Subject: [PATCH 25/57] fix(ci): install pcs-bench into project venv instead of protected system Python --- .github/workflows/corpus-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/corpus-validation.yml b/.github/workflows/corpus-validation.yml index f89c338..7b4d980 100644 --- a/.github/workflows/corpus-validation.yml +++ b/.github/workflows/corpus-validation.yml @@ -54,7 +54,7 @@ jobs: - name: Install pcs-bench CLI if: hashFiles('pcs-bench/pyproject.toml') != '' - run: uv pip install --system -e pcs-bench + run: uv pip install --python .venv/bin/python -e pcs-bench - uses: pnpm/action-setup@v4 with: From 442cf391edf61980460d3b0d620c34c8f12176fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:55:23 -0700 Subject: [PATCH 26/57] ci(temporary): produce checked Prettier output without write permission --- .../temporary-portal-format-export.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/temporary-portal-format-export.yml diff --git a/.github/workflows/temporary-portal-format-export.yml b/.github/workflows/temporary-portal-format-export.yml new file mode 100644 index 0000000..b7d3b64 --- /dev/null +++ b/.github/workflows/temporary-portal-format-export.yml @@ -0,0 +1,55 @@ +name: Temporary portal formatting export + +on: + pull_request: + branches: [main] + paths: + - ".github/workflows/temporary-portal-format-export.yml" + +permissions: + contents: read + +jobs: + format-export: + if: github.repository == 'fraware/scientific-memory' && github.head_ref == 'fix/ci-workspace-bootstrap-20261011' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: "10.0.0" + - uses: actions/setup-node@v4 + with: + node-version: "22" + cache: pnpm + - name: Install pinned tooling without lifecycle scripts + run: pnpm install --frozen-lockfile --ignore-scripts + - name: Produce exact formatting, then check portal + run: | + pnpm --dir portal exec prettier --write \ + "app/pcs/claims/[claimId]/page.tsx" \ + "app/pcs/page.tsx" \ + "lib/pcsData.ts" \ + "scripts/verify-pcs-phase2-read-model.mjs" \ + "scripts/verify-pcs-read-model.mjs" + git diff --check + pnpm --dir portal lint + - name: Export deterministic formatted bytes to log + run: | + python - <<'PY' + from pathlib import Path + from base64 import b64encode + paths = [ + "portal/app/pcs/claims/[claimId]/page.tsx", + "portal/app/pcs/page.tsx", + "portal/lib/pcsData.ts", + "portal/scripts/verify-pcs-phase2-read-model.mjs", + "portal/scripts/verify-pcs-read-model.mjs", + ] + for i, path in enumerate(paths): + value = b64encode(Path(path).read_bytes()).decode("ascii") + print(f"__FMT_BEGIN_{i}__", flush=True) + for j in range(0, len(value), 96): + print("FMT_" + value[j:j + 96], flush=True) + print(f"__FMT_END_{i}__", flush=True) + PY From c29ee116eb2d1062478d3ce5537d44098d0dc192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:59:06 -0700 Subject: [PATCH 27/57] fix(ci): install all uv workspace packages for full pytest collection --- .github/workflows/corpus-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/corpus-validation.yml b/.github/workflows/corpus-validation.yml index 7b4d980..2b12c11 100644 --- a/.github/workflows/corpus-validation.yml +++ b/.github/workflows/corpus-validation.yml @@ -85,7 +85,7 @@ jobs: run: uv run --project pipeline python -m sm_pipeline.cli validate-all - name: Run pipeline tests - run: uv run --project pipeline pytest + run: uv run --all-packages pytest - name: Run PCS contract tests env: From 97ac4fe013d0af0d06b50ed79f4daff696618c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:01:30 -0700 Subject: [PATCH 28/57] style(portal): apply CI-verified Prettier formatting --- portal/app/pcs/claims/[claimId]/page.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/portal/app/pcs/claims/[claimId]/page.tsx b/portal/app/pcs/claims/[claimId]/page.tsx index 3738220..dbc77b4 100644 --- a/portal/app/pcs/claims/[claimId]/page.tsx +++ b/portal/app/pcs/claims/[claimId]/page.tsx @@ -22,9 +22,14 @@ export default async function PcsClaimRoute({

PCS claim not found

No imported claim with id “{claimId}”. Run{" "} - just pcs-import-bundle{" "} + + just pcs-import-bundle + {" "} then{" "} - just pcs-render-claim. + + just pcs-render-claim + + .

); From 9cf5c573a17a87e72e80b477c1309b31a327f4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9o=20H=2E=20Petel?= <113530345+fraware@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:01:32 -0700 Subject: [PATCH 29/57] style(portal): apply CI-verified Prettier formatting --- portal/app/pcs/page.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/portal/app/pcs/page.tsx b/portal/app/pcs/page.tsx index ab5fd4b..aeb6a54 100644 --- a/portal/app/pcs/page.tsx +++ b/portal/app/pcs/page.tsx @@ -16,9 +16,14 @@ export default async function PcsClaimsIndexPage() { {claimIds.length === 0 ? (

No claims imported yet. Run{" "} - just pcs-import-release{" "} + + just pcs-import-release + {" "} then{" "} - just pcs-render-claim claim-pcs-qc-release-v0.1. + + just pcs-render-claim claim-pcs-qc-release-v0.1 + + .

) : (