Status: experimental implementation contract
Date: 2026-09-22
Authority: operational coordination only; no object in this specification grants acceptance or merge authority.
This specification defines the minimum behavior for running IDKMesh in the G0 GitHub-first deployment profile from ADR-0013.
It sits above existing WorkUnit/ResultManifest/EvaluatorPlan/VerificationResult semantics and beside Connector Control API v0.1.
G0 must support this lifecycle:
GitHub issue/spec
-> WorkUnit preview
-> policy/risk/capability route
-> explicit dispatch gate where required
-> one admitted run
-> connector/provider execution
-> candidate reference
-> ResultManifest normalization
-> independent verification
-> evidence/status publication
-> human integration
The coordinator may stop between any two arrows and resume in a later workflow run.
A bootstrapped project should converge on a layout similar to:
.idkmesh/
project.json
connectors.json
policy.json
README.md
.github/
workflows/
idkmesh-preview.yml
idkmesh-dispatch.yml
idkmesh-observe.yml
idkmesh-verify.yml
idkmesh-recovery.yml
Generated workflows should be thin callers of a versioned reusable IDKMesh workflow/action where practical. Generated repositories must not duplicate the full coordinator implementation.
The exact filenames may change before v1.0; semantics below are the contract.
Target command:
idkmesh init --github
Current C8-B safe surface:
idkmesh init --github --dry-run --idkmesh-ref v0.1.0
idkmesh init --github --dry-run \
--idkmesh-ref 0123456789abcdef0123456789abcdef01234567 --json
The current implementation exposes the deterministic bootstrap plan only. It
performs no filesystem writes, GitHub mutations, secret access, workflow
execution, or repository administration. Omitting --dry-run fails closed
until C8-C/C8-D rendering and C8-F safe re-run/conflict handling are
implemented.
Required behavior:
.idkmesh/ config skeleton;--dry-run;Bootstrap must not silently mutate rulesets, secrets, environments, teams, or repository administration.
Primary source types:
When installed, the WorkUnit request form should collect:
All issue fields are untrusted.
They may inform preview, but may not set:
Preview must perform no dispatch.
It returns/records:
A run has a stable run_id.
Before dispatch, compute an idempotency identity from at least:
The system must atomically or conflict-safely persist admission before or together with provider submission so retries do not create duplicate external work.
If provider APIs expose their own idempotency key, use it in addition to the local durable gate.
The G0 ledger is:
Persist:
run_id;The first implementation may use a dedicated Git-native branch/path or another GitHub-native immutable/conflict-safe representation.
It must not require writes to the protected application code branch merely to update run state.
The ledger implementation must expose compare-and-set/optimistic conflict behavior so concurrent workflows cannot silently overwrite each other.
Canonical operational states:
created
-> admitted
-> dispatched
-> waiting_for_agent
-> candidate_ready
-> verification_pending
-> verified | verification_failed
-> awaiting_human_decision
-> integrated | rejected
terminal alternatives:
cancelled
failed
Retries create new attempt identities; they do not rewrite history.
Provider-specific intermediate states remain extensions and cannot redefine canonical state.
A scheduled/manual recovery workflow must be able to:
Recovery is required because normal event delivery is not assumed perfect.
Minimum capability roles:
A WorkUnit claim record must include:
Claims use deterministic conflict resolution. A stale claim can expire/release without deleting history.
Generated workflows must:
permissions;contents: read;Projects may configure GitHub Environments for:
Environment approval is an additional authorization boundary, not proof of candidate correctness.
Environment usage must remain optional for projects/plans where unavailable.
idkmesh doctor --github should observe/report, where API permissions allow:
Report:
UNKNOWN must not be falsely reported as secure.
Projects is an optional projection.
Recommended fields:
Project edits never directly broaden execution permissions or create canonical verification evidence.
Removing Projects must not break execution.
For each run, publish one concise, idempotently updated status surface using issue/PR comments, job summaries, or checks.
Minimum visible information:
Avoid one comment per event.
Two bounded implementation layers intentionally have different responsibilities:
idkmesh.github_actions_summary.render_github_actions_summary() renders the
richer read-only Actions step summary from digest-bound Product Spine,
candidate, and Run Evidence Report projections. It performs no GitHub
mutation.idkmesh.github_status_comment.sync_github_run_status_comment() maintains
one concise issue/PR comment per run. Its stable marker/comment identity is
independent of run lifecycle state, so later canonical states update the
retained comment rather than appending another comment.The mutable C14-B status comment preserves the earlier C5-H immutable dispatch receipt as a separate compatibility surface; C14-B does not change C5-H replay semantics.
Status-comment idempotency rules are:
An optional durable-evidence link is accepted only through the C14-C immutable GitHub evidence-link contract described below. A GitHub-hosted URL by itself is not sufficient: moving branch/tag links and Actions artifacts are not durable canonical evidence.
The REST transport accepts both normal issue-comment HTML URLs and pull-request conversation comment URLs because GitHub exposes both through the Issues comments API.
Neither Actions summaries nor status comments can select/accept a candidate, record a human decision, write canonical application state, push Git, or merge.
The canonical implementation is
idkmesh.github_evidence_link.DurableGitHubEvidenceReference plus
validate_durable_github_evidence_url().
For a Git-backed evidence file to be called durable by GitHub-native presentation surfaces, the link must identify all three parts of the immutable Git object location:
OWNER/REPO form;Accepted canonical URL forms are:
https://github.com/OWNER/REPO/blob/<exact-commit>/path/to/evidence.json
https://raw.githubusercontent.com/OWNER/REPO/<exact-commit>/path/to/evidence.json
The contract deliberately rejects:
/blob/main/..., /blob/master/..., release/tag names, or any other
moving symbolic ref;The helper performs structural provenance validation only. It does not fetch the file, prove that the commit is still reachable from a branch, verify the evidence contents, or convert a presentation link into correctness evidence.
Actions artifacts and caches remain useful transport/diagnostic surfaces but must never be the only retained copy of canonical evidence. Essential evidence must first be stored in the durable Git/ledger retention path owned by C9; C14 then links to that retained object. A runner may terminate after publication without invalidating the exact-commit permalink.
C14-C does not grant repository-write authority. Producing/retaining the evidence file is a separate trusted ledger/publication responsibility; this slice only constructs and validates immutable references to already-retained files.
Optional read-only Control Tower projection may show:
Pages must be generated only from public-safe data and must never expose secret-bearing/private provider payloads.
Pages has no mutation/approval authority.
For pilot/released projects:
When accessing a supported cloud execution/storage service, OIDC short-lived credentials are preferred over long-lived cloud access keys.
OIDC is optional and outside core G0 requirements.
Required classes include:
A provider submission ambiguity must fail safe: do not blindly resubmit if it is unknown whether the provider accepted the first request.
Minimum deterministic tests:
Minimum live/pilot tests:
This specification must not redefine:
A change that alters those meanings requires a new explicit version or the corresponding canonical contract update.