fix(ci): repair docker-host guardrail follow-up #1561
Reference in New Issue
Block a user
Delete Branch "fix/ci-docker-host-guardrail-red"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the current main red introduced by the docker-host guardrail follow-up.
Evidence from the 19:42 PDT triage:
lint-required-workflows-docker-host-pinnedfailed onmolecule-core/main@c6e89219e110withpanic: unclosed stringbecause the Python heredoc contained a literal Gitea expression marker.CI / Shellcheck (E2E scripts)failed on three SC2034 warnings in peer-visibility map/verdict plumbing.Fix:
Local verification:
OK: all docker-bound jobs are pinned to docker-host or publish.shellcheck --severity=warning tests/e2e/lib/peer_visibility_assert.sh tests/e2e/test_peer_visibility_mcp_local.shpython3 .gitea/scripts/lint-workflow-yaml.py --workflow-dir .gitea/workflowsgit diff --checkFive-axis pass (core-devops):
runs-onit found — silently broken for multi-job workflows. Fix scansraw_lines[j.line - 1:j.end]per job: correct slicing,enddefaults tolen(raw_lines)for the last job, then re-set toi - 1when a new header appears. Sound.runs-on: ubuntu-latest→docker-host(orpublishfor the canvas image build) migration on 7 workflows aligns with mc#1529 + internal#512 + feedback_cp_workspaces_must_run_as_docker_not_native_systemd. Docker-bound jobs that drift onto the Windows act_runner break non-deterministically — pinning to the dedicated host label is the durable fix.expression_marker = '$' + '{{'indirection sidesteps the Gitea-1.22.6-hostile workflow-yaml linter literal that would parse the embedded Python heredoc. Cheap, local, correct.WS_IDS_MAP/VERDICT_MAP/PV_VERDICT) are accurate — these ARE read through portable bash-3.2 eval shims; suppression is targeted, not file-wide.CI / all-requiredis green on the head commit (id=80, 2026-05-19T02:58:21Z), proving the new lint logic passes on the very workflows it migrates.LGTM. Unblocks the shared upstream failure for mc#1559 + mc#1563.
Five-axis pass (core-devops):
runs-onit found — silently broken for multi-job workflows. Fix scansraw_lines[j.line - 1:j.end]per job: correct slicing,enddefaults tolen(raw_lines)for the last job, then re-set toi - 1when a new header appears. Sound.runs-on: ubuntu-latest->docker-host(orpublishfor the canvas image build) migration on 7 workflows aligns with mc#1529 + internal#512 + feedback_cp_workspaces_must_run_as_docker_not_native_systemd. Docker-bound jobs that drift onto the Windows act_runner break non-deterministically — pinning to the dedicated host label is the durable fix.expression_marker = '$' + '{{'indirection sidesteps the Gitea-1.22.6-hostile workflow-yaml linter literal that would parse the embedded Python heredoc. Cheap, local, correct.WS_IDS_MAP/VERDICT_MAP/PV_VERDICT) are accurate — these ARE read through portable bash-3.2 eval shims; suppression is targeted, not file-wide.CI / all-requiredis green on the head commit (id=80, 2026-05-19T02:58:21Z), proving the new lint logic passes on the very workflows it migrates.LGTM. Unblocks the shared upstream failure for mc#1559 + mc#1563.
Five-axis pass (core-devops):
runs-onit found — silently broken for multi-job workflows. Fix scansraw_lines[j.line - 1:j.end]per job: correct slicing,enddefaults tolen(raw_lines)for the last job, then re-set toi - 1when a new header appears. Sound.runs-on: ubuntu-latest->docker-host(orpublishfor the canvas image build) migration on 7 workflows aligns with mc#1529 + internal#512 + feedback_cp_workspaces_must_run_as_docker_not_native_systemd. Docker-bound jobs that drift onto the Windows act_runner break non-deterministically — pinning to the dedicated host label is the durable fix.expression_marker = '$' + '{{'indirection sidesteps the Gitea-1.22.6-hostile workflow-yaml linter literal that would parse the embedded Python heredoc. Cheap, local, correct.WS_IDS_MAP/VERDICT_MAP/PV_VERDICT) are accurate — these ARE read through portable bash-3.2 eval shims; suppression is targeted, not file-wide.CI / all-requiredis green on the head commit (id=80, 2026-05-19T02:58:21Z), proving the new lint logic passes on the very workflows it migrates.LGTM. Unblocks the shared upstream failure for mc#1559 + mc#1563.
Five-axis pass (core-devops):
runs-onit found — silently broken for multi-job workflows. Fix scansraw_lines[j.line - 1:j.end]per job: correct slicing,enddefaults tolen(raw_lines)for the last job, then re-set toi - 1when a new header appears. Sound.runs-on: ubuntu-latest->docker-host(orpublishfor the canvas image build) migration on 7 workflows aligns with mc#1529 + internal#512 + feedback_cp_workspaces_must_run_as_docker_not_native_systemd. Docker-bound jobs that drift onto the Windows act_runner break non-deterministically — pinning to the dedicated host label is the durable fix.expression_marker = '$' + '{{'indirection sidesteps the Gitea-1.22.6-hostile workflow-yaml linter literal that would parse the embedded Python heredoc. Cheap, local, correct.WS_IDS_MAP/VERDICT_MAP/PV_VERDICT) are accurate — these ARE read through portable bash-3.2 eval shims; suppression is targeted, not file-wide.CI / all-requiredis green on the head commit (id=80, 2026-05-19T02:58:21Z), proving the new lint logic passes on the very workflows it migrates.LGTM. Unblocks the shared upstream failure for mc#1559 + mc#1563.
Five-axis pass (core-security):
runs-onswaps and 2 shellcheck disable comments don't change any secrets surface.# shellcheck disable=SC2034annotations are scoped to assignment lines for variables read through portable bash-3.2eval-based map shims (WS_IDS_MAP,VERDICT_MAP,PV_VERDICT). Theevalpaths are unchanged in this PR — disable is targeted and accurate, not papering over a real injection..gitea/workflows/lint-required-workflows-docker-host-pinned.yml) takes its inputs from workflow filenames under.gitea/workflows/.github/workflowsviaos.listdirand reads file contents withopen(...). No user-supplied data flows into a shell or eval; no string interpolation into a command. Theexpression_marker = '$' + '{{'indirection is a literal-string defense (avoids the workflow yaml linter parsing the heredoc), not an injection vector.runs-on: ubuntu-latest→docker-host/publishmigrations move workloads from a hosted-runner label to a self-hosted label. Self-hosted runners DO inherit any secrets the workflow declares — but no newsecrets.*references are introduced in this PR, and the dedicateddocker-host/publishrunners are the canonical surface for these jobs per fleet policy (mc#1529 / internal#512). Migration does not change the secrets blast radius.CI / all-requiredis green on head commit00351b4(id=80, 2026-05-19T02:58:21Z). Secret-scan context (Secret scan / Scan diff for credential-shaped strings) passed alongside.LGTM from a security review standpoint. No new attack surface.