IDKMesh

GitHub Bootstrap Workflow Wrappers v0.1

Status: experimental implementation contract
Issue: #596 / C8-D
Authority: rendering only; no filesystem write, GitHub mutation, secret resolution, dispatch, verification, approval, push, or merge authority. The rendered workflows themselves hold none of those authorities either, beyond the narrow, explicit permissions listed below.

Purpose

C8-D turns the deterministic C8-A bootstrap file plan into the four thin GitHub Actions wrappers a target repository would commit to run IDKMesh without an always-on server.

The renderer lives in idkmesh/github_bootstrap_workflows.py. It consumes a validated GitHubBootstrapPlan and emits exactly these files, reusing the C8-C BootstrapRenderedFile shape (path, ownership, overwrite policy, UTF-8 content, byte size, SHA-256 digest):

File Effect (from the plan) Trigger
.github/workflows/idkmesh-preview.yml none issues: labeled gated on the idkmesh:preview label, or manual dispatch
.github/workflows/idkmesh-dispatch.yml candidate_dispatch manual dispatch only
.github/workflows/idkmesh-verify.yml verification manual dispatch only
.github/workflows/idkmesh-status.yml publication manual dispatch only

All four are idkmesh_managed: a later safe re-run (C8-F) may replace one only while it still matches its retained generated digest.

Thin by construction

A wrapper contains no orchestration logic. Each one:

  1. checks out the trusted project revision (persist-credentials: false);
  2. checks out MSKazemi/idkmesh at the bootstrap plan’s --idkmesh-ref (a release tag or full SHA) into .idkmesh-runtime;
  3. sets up Python;
  4. probes that the pinned runtime provides the runner entry point and fails closed if it does not;
  5. runs one command, python -m idkmesh.cli github-workflow <phase>, with the runtime directory as the working directory so a same-named package in the project checkout cannot shadow the pinned IDKMesh.

Event data reaches the runner through IDKMESH_* environment variables only. No expression is ever interpolated into a shell script, and no workflow reads issue titles, issue bodies, comment bodies, or head refs.

The runner and its environment contract

The runner is idkmesh github-workflow {preview,dispatch,verify,status}, implemented in idkmesh/github_workflow_runner.py and specified in GitHub Workflow Runner. preview and status are read-only; dispatch and verify fail closed with dispatch_unavailable and verify_unavailable. Step 4 above still exists so that a wrapper pinned to an older ref that predates the runner fails loudly with The pinned IDKMesh ref does not provide the github-workflow runner. instead of succeeding vacuously. Because apply mode is still disabled, nothing renders these files into a repository today; they appear only in dry-run output.

The environment names the wrappers pass are the interface the runner implements (tests/test_github_workflow_runner.py builds each phase’s environment from the names the rendered wrapper declares): IDKMESH_PROJECT_ROOT, IDKMESH_REPOSITORY, IDKMESH_BASE_SHA, IDKMESH_RUN_ID, IDKMESH_GITHUB_TOKEN (preview, dispatch, status), IDKMESH_ISSUE_NUMBER, IDKMESH_EVENT_PATH (preview), IDKMESH_WORK_UNIT_DIGEST and IDKMESH_CONNECTOR_ID (dispatch), IDKMESH_WORK_UNIT_DIGEST, IDKMESH_CANDIDATE_SHA and IDKMESH_CANDIDATE_DIR (verify), and IDKMESH_RUN_REFERENCE (status). Changing any of them is a coordinated change to the renderer, this specification, and the runner.

Security properties

Every property below is asserted by tests/test_github_bootstrap_workflows.py; most are also enforced by the repository’s own governance linter (idkmesh.github_governance_preflight.lint_workflow_text, see GitHub Governance Preflight), which finds nothing in any rendered wrapper.

A governance integration check evaluates the rendered dispatch wrapper against the committed governance-pass-v0.1.json fixture for the secret_bearing_dispatch and high_risk_dispatch operations, and the other three wrappers for read_only; all are allowed.

Dry-run integration

idkmesh init --github --dry-run now also reports the four wrappers. The JSON form adds rendered_workflow_files beside rendered_config_files, with exact content, digest, size, ownership, and overwrite metadata. The human form prints a rendered C8-D workflow wrappers: list of paths and digests. Zero writes, zero GitHub mutation, zero secret access; apply mode stays fail-closed.

Failure semantics

Rendering fails closed with BootstrapRenderError when:

A plan/renderer mismatch is never treated as permission to omit or add a workflow.

Non-goals

This slice does not:

Follow-on