@plainconceptsplatform/workflows 1.21.1 → 1.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1934,9 +1934,12 @@ fi
|
|
|
1934
1934
|
if worker_installed implement && ! grep -qF 'subagent_type: planner-sub' "$IMPLEMENT_WORKER_MD"; then
|
|
1935
1935
|
LEAD_OK=0; echo "FAIL: the implement prompt must run propose and archive in the planner-sub agent" >&2
|
|
1936
1936
|
fi
|
|
1937
|
-
# agent-harness before 3.
|
|
1937
|
+
# agent-harness before 3.12.1 writes `resource: *`, a YAML alias that does not parse: opencode drops the agent's
|
|
1938
1938
|
# mode and refuses to spawn planner and planner-sub ("cannot run as a subagent"). The CI setup repairs the
|
|
1939
1939
|
# generated files before opencode reads them, and the implement prompt stops at the first spawn error.
|
|
1940
|
+
if ! grep -qF 'resource: ${JSON.stringify(p.resource)}' "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
|
|
1941
|
+
LEAD_OK=0; echo "FAIL: the CI setup must quote the permission resource in the harness generator, which rewrites the agents at startup" >&2
|
|
1942
|
+
fi
|
|
1940
1943
|
if ! grep -qF 'resource: "*"' "${WORKFLOWS_DIR}/shared/opencode-ci.md"; then
|
|
1941
1944
|
LEAD_OK=0; echo "FAIL: the CI setup must quote the generated agents' permission resource (a bare * is a YAML alias)" >&2
|
|
1942
1945
|
fi
|
|
@@ -3731,6 +3734,12 @@ rc 'side-checks\.sh' "${HERE}/../merge-agent-pr/action.yml" 'merge-agent-pr must
|
|
|
3731
3734
|
rc 'land-pull-request/side-checks\.sh' "${HERE}/../merge-train/merge-train.sh" 'the merge train must hold a pull request whose side workflow is red'
|
|
3732
3735
|
rc 'test-timings\.mjs' "$CI_DOTNET" 'the .NET template must summarise the test timings'
|
|
3733
3736
|
[ "$(grep -c -- '--logger trx' "$CI_DOTNET")" -ge 5 ] || { RC_OK=0; echo "FAIL: required checks: every .NET test step must write a trx report" >&2; }
|
|
3737
|
+
# The template sync installs copier on a runner whose Python cannot make a venv: the pinned uv it
|
|
3738
|
+
# falls back to must stay checked against its SHA-256, or the sync never runs (it never had).
|
|
3739
|
+
SYNC_YML="${HERE}/../../templates/platform-template/.github/workflows/platform-template-sync.yml"
|
|
3740
|
+
rc '^ UV_SHA256: [0-9a-f]{64}$' "$SYNC_YML" 'the template sync must pin uv by SHA-256'
|
|
3741
|
+
rc 'sha256sum --check --strict' "$SYNC_YML" 'the template sync must check the uv download'
|
|
3742
|
+
rc "python3 -c 'import ensurepip'" "$SYNC_YML" 'the template sync must not try a venv where ensurepip is missing'
|
|
3734
3743
|
if [ "$RC_OK" -eq 1 ]; then PASS=$((PASS + 1)); else FAIL=$((FAIL + 1)); fi
|
|
3735
3744
|
|
|
3736
3745
|
echo "── App error privacy ─────────────────────────────────────────────────────"
|
|
@@ -25,6 +25,10 @@ concurrency:
|
|
|
25
25
|
env:
|
|
26
26
|
# copier 9.19.1 needs Python 3.10 or newer on the runner.
|
|
27
27
|
COPIER_VERSION: "9.19.1"
|
|
28
|
+
# The pinned uv the copier step downloads when the runner has no uvx, no pipx and no ensurepip
|
|
29
|
+
# (the self-hosted runner image ships Python without python3-venv, so a venv cannot be made).
|
|
30
|
+
UV_VERSION: "0.13.5"
|
|
31
|
+
UV_SHA256: f68d291c75783122dad58ab77def0e13f3233f358731db5d6d7e8715603b928f
|
|
28
32
|
NODE_VERSION: "22"
|
|
29
33
|
SYNC_BRANCH: platform/template-sync
|
|
30
34
|
|
|
@@ -79,7 +83,8 @@ jobs:
|
|
|
79
83
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
|
80
84
|
owner: ${{ github.repository_owner }}
|
|
81
85
|
|
|
82
|
-
# uvx where uv is installed, then pipx, then a virtual environment from the runner's Python
|
|
86
|
+
# uvx where uv is installed, then pipx, then a virtual environment from the runner's Python, and
|
|
87
|
+
# where that Python cannot make one, a pinned uv checked against its SHA-256.
|
|
83
88
|
- name: Install copier
|
|
84
89
|
if: steps.decide.outputs.run == 'true' && startsWith(steps.contract.outputs.update, 'copier ')
|
|
85
90
|
run: |
|
|
@@ -90,10 +95,16 @@ jobs:
|
|
|
90
95
|
run="uvx --from copier==$COPIER_VERSION copier"
|
|
91
96
|
elif command -v pipx >/dev/null 2>&1; then
|
|
92
97
|
run="pipx run --spec copier==$COPIER_VERSION copier"
|
|
93
|
-
|
|
98
|
+
elif python3 -c 'import ensurepip' >/dev/null 2>&1; then
|
|
94
99
|
python3 -m venv "$RUNNER_TEMP/copier-venv"
|
|
95
100
|
"$RUNNER_TEMP/copier-venv/bin/pip" install --quiet "copier==$COPIER_VERSION"
|
|
96
101
|
run="$RUNNER_TEMP/copier-venv/bin/copier"
|
|
102
|
+
else
|
|
103
|
+
tarball="$RUNNER_TEMP/uv.tar.gz"
|
|
104
|
+
curl -fsSL -o "$tarball" "https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-x86_64-unknown-linux-gnu.tar.gz"
|
|
105
|
+
echo "${UV_SHA256} $tarball" | sha256sum --check --strict
|
|
106
|
+
tar -xzf "$tarball" -C "$RUNNER_TEMP"
|
|
107
|
+
run="$RUNNER_TEMP/uv-x86_64-unknown-linux-gnu/uvx --from copier==$COPIER_VERSION copier"
|
|
97
108
|
fi
|
|
98
109
|
cat > "$bin/copier" <<EOF
|
|
99
110
|
#!/usr/bin/env bash
|
|
@@ -251,10 +251,21 @@ pre-agent-steps:
|
|
|
251
251
|
# variants visible from the first turn; the doctor is the audit line.
|
|
252
252
|
run: |
|
|
253
253
|
set -euo pipefail
|
|
254
|
-
|
|
254
|
+
# agent-harness before 3.12.1 generates `resource: *` (see below). Quoting the generated files alone is not
|
|
255
|
+
# enough: the plugin rewrites them when opencode starts, so the generator itself is patched first. A no-op
|
|
256
|
+
# once the harness quotes the value.
|
|
257
|
+
tiers_core=.opencode/plugins/pc-subagent-tiers-core.js
|
|
258
|
+
if [ -f "$tiers_core" ]; then
|
|
259
|
+
sed -i 's/resource: ${p\.resource}`/resource: ${JSON.stringify(p.resource)}`/' "$tiers_core"
|
|
260
|
+
if grep -qF 'resource: ${p.resource}`' "$tiers_core"; then
|
|
261
|
+
echo "::error::Could not quote the permission resource in $tiers_core; opencode would refuse to spawn planner-sub." >&2
|
|
262
|
+
exit 1
|
|
263
|
+
fi
|
|
264
|
+
fi
|
|
265
|
+
if [ -f .opencode/scripts/sync-agents.mjs ] && [ -f "$tiers_core" ]; then
|
|
255
266
|
node .opencode/scripts/sync-agents.mjs --strict
|
|
256
267
|
fi
|
|
257
|
-
# agent-harness before 3.
|
|
268
|
+
# agent-harness before 3.12.1 writes `resource: *` into plan.md, planner.md and planner-sub.md. A bare `*` is
|
|
258
269
|
# a YAML alias, so the frontmatter does not parse, opencode drops the agents' `mode`, treats them as primary
|
|
259
270
|
# and refuses to spawn them ("Agent planner-sub cannot run as a subagent"). These files are generated here on
|
|
260
271
|
# every run and never committed, so quote the value before opencode reads them; a no-op once the harness does.
|