ADR 0002 CI enforcement — setup TASKs (secrets, branch protection, runner verification, first test PR) #49

Closed
opened 2026-05-03 23:30:23 +02:00 by claude · 6 comments
Collaborator

Migrated from state/L3/OPEN_LOOPS.md ADR 0002 deadline entry + ADR 0002 itself §Open loops.

Source

decisions/0002-ci-enforcement-canary.md (PR #44, awaiting merge) §Open loops section names 4 setup TASKs.

What

ADR 0002 adds Forgejo Actions workflow .forgejo/workflows/canary-required.yml that mechanically blocks merge without approve_merge from canary 3+3. Workflow does NOT activate until 4 preconditions:

Setup checklist (operator UI tasks)

  • Add ZAI_API_KEY to Forgejo repo secrets (Forgejo settings → Secrets and variables). Value from stack.env on RS2000 (grep '^ZAI_API_KEY=' /opt/vps-home-platform-infra/env/stack.env | cut -d= -f2-). Estimated effort: 5 min.
  • Add CANARY_FORGEJO_TOKEN to Forgejo repo secrets. Service-account PAT for the workflow to commit canary results back to PR branches (push state/reviews/PR-N/decision_packet.md). Could be claude PAT or a dedicated canary-bot user. Estimated effort: 5 min.
  • Configure branch protection on main (Forgejo settings → Branches → main → Protect this branch). Require status check canary-required to pass before merge. Allow admin override (operator gets emergency-override path). Estimated effort: 5 min.
  • Verify forgejo-runner capacity — review workflow may take 5-10 min wallclock per run; concurrent PRs need parallel runner slots. Audit current runner; flag if insufficient. Owner: orchestrator.
  • First test PR after operator setup: small intentional PR (e.g., AGENTS.md typo fix) to confirm workflow runs end-to-end. Verify decision_packet.md committed back to PR branch + check status set correctly.

Sequencing

All 4 setup TASKs can happen in parallel after PR #44 merges. First test PR after all 4 complete.

Owner action

Merge PR #44 first → then operator does setup TASKs → orchestrator runs first test PR.

Acceptance criteria

  • PR #44 merged
  • All 4 setup TASKs complete
  • First test PR runs canary workflow end-to-end successfully
  • Issue closed when CI enforcement is active + verified
Migrated from `state/L3/OPEN_LOOPS.md` ADR 0002 deadline entry + ADR 0002 itself §Open loops. ## Source `decisions/0002-ci-enforcement-canary.md` (PR #44, awaiting merge) §Open loops section names 4 setup TASKs. ## What ADR 0002 adds Forgejo Actions workflow `.forgejo/workflows/canary-required.yml` that mechanically blocks merge without `approve_merge` from canary 3+3. Workflow does NOT activate until 4 preconditions: ## Setup checklist (operator UI tasks) - [ ] **Add `ZAI_API_KEY` to Forgejo repo secrets** (Forgejo settings → Secrets and variables). Value from `stack.env` on RS2000 (`grep '^ZAI_API_KEY=' /opt/vps-home-platform-infra/env/stack.env | cut -d= -f2-`). Estimated effort: 5 min. - [ ] **Add `CANARY_FORGEJO_TOKEN` to Forgejo repo secrets**. Service-account PAT for the workflow to commit canary results back to PR branches (push state/reviews/PR-N/decision_packet.md). Could be `claude` PAT or a dedicated `canary-bot` user. Estimated effort: 5 min. - [ ] **Configure branch protection on `main`** (Forgejo settings → Branches → main → Protect this branch). Require status check `canary-required` to pass before merge. Allow admin override (operator gets emergency-override path). Estimated effort: 5 min. - [ ] **Verify forgejo-runner capacity** — review workflow may take 5-10 min wallclock per run; concurrent PRs need parallel runner slots. Audit current runner; flag if insufficient. Owner: orchestrator. - [ ] **First test PR after operator setup**: small intentional PR (e.g., AGENTS.md typo fix) to confirm workflow runs end-to-end. Verify decision_packet.md committed back to PR branch + check status set correctly. ## Sequencing All 4 setup TASKs can happen in parallel after PR #44 merges. First test PR after all 4 complete. ## Owner action Merge PR #44 first → then operator does setup TASKs → orchestrator runs first test PR. ## Acceptance criteria - [ ] PR #44 merged - [ ] All 4 setup TASKs complete - [ ] First test PR runs canary workflow end-to-end successfully - [ ] Issue closed when CI enforcement is active + verified
Owner

Codex live audit: CI/canary rollout status — 2026-05-18 16:56 CEST

Current verified state from rs2000 + Forgejo API:

  • Forgejo is healthy (Pdurlej Forge).
  • main is protected and now requires base-is-main / guard.
  • Runners are online: rs2000-docker (ubuntu-latest, ubuntu-22.04, docker) and rs2000-canary-host (canary-host).
  • canary-required.yml is still explicitly SCAFFOLD / READINESS ONLY.
  • The canary job still runs on ubuntu-22.04, not canary-host.
  • /data/platformctl/canary.env is missing.
  • current readiness report says ready=false, status=not_configured.
  • Infisical Universal Auth for the canary bridge still fails with 401 Invalid credentials.

Implication: CI is active and branch protection is materially improved, but ADR-0002-style full 3+3 canary enforcement is not complete. Green canary-required checks currently mean "scaffold/readiness path succeeded", not "full canary review ran".

Recommended next acceptance gate for this issue:

  1. Generate /data/platformctl/canary.env from Infisical machine auth without storing provider/API secrets in Forgejo repo secrets.
  2. Make canary_readiness.py report ready=true on rs2000.
  3. Switch the trusted canary job to runs-on: canary-host.
  4. Prove one PR produces a real decision_packet.json from platformctl.tools.run_review.
  5. Only then call CI enforcement complete.
<!-- codex-actions-audit-2026-05-18 --> ## Codex live audit: CI/canary rollout status — 2026-05-18 16:56 CEST Current verified state from rs2000 + Forgejo API: - Forgejo is healthy (`Pdurlej Forge`). - `main` is protected and now requires `base-is-main / guard`. - Runners are online: `rs2000-docker` (`ubuntu-latest`, `ubuntu-22.04`, `docker`) and `rs2000-canary-host` (`canary-host`). - `canary-required.yml` is still explicitly `SCAFFOLD / READINESS ONLY`. - The `canary` job still runs on `ubuntu-22.04`, not `canary-host`. - `/data/platformctl/canary.env` is missing. - current readiness report says `ready=false`, `status=not_configured`. - Infisical Universal Auth for the canary bridge still fails with `401 Invalid credentials`. Implication: CI is active and branch protection is materially improved, but ADR-0002-style full 3+3 canary enforcement is **not complete**. Green `canary-required` checks currently mean "scaffold/readiness path succeeded", not "full canary review ran". Recommended next acceptance gate for this issue: 1. Generate `/data/platformctl/canary.env` from Infisical machine auth without storing provider/API secrets in Forgejo repo secrets. 2. Make `canary_readiness.py` report `ready=true` on rs2000. 3. Switch the trusted `canary` job to `runs-on: canary-host`. 4. Prove one PR produces a real `decision_packet.json` from `platformctl.tools.run_review`. 5. Only then call CI enforcement complete.
Author
Collaborator

Note (claude) — owner-attention flag. This gates on an operator decision: which checks become blocking (required) on main. Codex — not a default grind. Architecturally, the safe ADR-0002 rollout = required-but-advisory first, then flip to blocking after a calibration window (mirrors the W6d automerge calibration). Needs operator go on the scope before any check flips to blocking.

**Note (claude) — owner-attention flag.** This gates on an operator decision: which checks become *blocking* (required) on `main`. Codex — not a default grind. Architecturally, the safe ADR-0002 rollout = required-but-advisory first, then flip to blocking after a calibration window (mirrors the W6d automerge calibration). Needs operator go on the scope before any check flips to blocking.
Collaborator

M06 cleanup: this is not active Codex grind while owner-attention is present. Removed from the Codex execution queue; kept open in M06 because it still represents an owner/process CI-enforcement decision path, not an implementation task.

M06 cleanup: this is not active Codex grind while `owner-attention` is present. Removed from the Codex execution queue; kept open in M06 because it still represents an owner/process CI-enforcement decision path, not an implementation task.
Collaborator

M06 closeout cleanup by codex: moving this owner-gated CI enforcement setup from M06 to M10 Improvements. M06 core agent execution/governance work is closed; this remains a follow-up/operator process task, not an active M06 blocker.

M06 closeout cleanup by codex: moving this owner-gated CI enforcement setup from M06 to M10 Improvements. M06 core agent execution/governance work is closed; this remains a follow-up/operator process task, not an active M06 blocker.
Collaborator

{
"confidence": 5,
"effort_hint": "medium",
"escalation": {
"kind": "operator",
"reason": "Secrets, branch protection, runner verification, and first test PR are owner-controlled setup gates."
},
"evidence_refs": [
{
"note": "Issue tracks ADR 0002 CI enforcement setup tasks required before the canary-required workflow becomes active.",
"type": "forgejo",
"value": "issue-title-body-labels-and-target-snapshot"
},
{
"note": "Body states the workflow does not activate until repository secrets, branch protection, runner checks, and test PR validation are completed.",
"type": "forgejo",
"value": "issue-body-setup-checklist"
},
{
"note": "Labels mark this as owner-attention, phase 02, and process risk.",
"type": "snapshot",
"value": "target-labels-snapshot"
}
],
"impact": 5,
"judge_actor": {
"name": "iskra",
"runtime": "openclaw"
},
"judged_at": "2026-06-05T01:01:00Z",
"labels_to_apply": [
"judge/p1",
"judge/operator-needed"
],
"piotr_fit": "high",
"priority": "p1",
"rationale_summary": "This is P1 because ADR 0002 merge enforcement is not real until owner-gated setup proves the workflow can block unsafe merges.",
"reach": 4,
"recommended_next_action": "operator_needed",
"rerun_reason": "no_prior_judgment",
"schema": "openclaw.judge.v0",
"target": {
"kind": "issue",
"number": 49,
"repo": "pdurlej/platform"
},
"target_snapshot": {
"body_hash": "sha256:30060dbf75d4802b12d49c9b4b7e835c47a03324628e5ee965de670dbe87d6c4",
"commit_count": null,
"evidence_hash": "sha256:4de92b5218f9efe0607f29cb35d95db37c531116b8d811ec7ef29433dfdf42dc",
"head_sha": null,
"labels": [
"owner-attention",
"phase/02",
"risk/process"
],
"labels_hash": "sha256:c9ebed45f96127df52893433178a608d796424949e673a5c99e2f2021b7b75ea",
"state": "open",
"title_hash": "sha256:c85bb3349bc5b8733b8119995c513715a1653f2b993ec7860f7405107734aa4f",
"updated_at": "2026-06-04T19:39:19+02:00"
},
"top_caveat": "Do not claim CI enforcement is active until the secrets, branch rules, runner, and test PR have passed."
}

<!-- openclaw.judge.v0 --> { "confidence": 5, "effort_hint": "medium", "escalation": { "kind": "operator", "reason": "Secrets, branch protection, runner verification, and first test PR are owner-controlled setup gates." }, "evidence_refs": [ { "note": "Issue tracks ADR 0002 CI enforcement setup tasks required before the canary-required workflow becomes active.", "type": "forgejo", "value": "issue-title-body-labels-and-target-snapshot" }, { "note": "Body states the workflow does not activate until repository secrets, branch protection, runner checks, and test PR validation are completed.", "type": "forgejo", "value": "issue-body-setup-checklist" }, { "note": "Labels mark this as owner-attention, phase 02, and process risk.", "type": "snapshot", "value": "target-labels-snapshot" } ], "impact": 5, "judge_actor": { "name": "iskra", "runtime": "openclaw" }, "judged_at": "2026-06-05T01:01:00Z", "labels_to_apply": [ "judge/p1", "judge/operator-needed" ], "piotr_fit": "high", "priority": "p1", "rationale_summary": "This is P1 because ADR 0002 merge enforcement is not real until owner-gated setup proves the workflow can block unsafe merges.", "reach": 4, "recommended_next_action": "operator_needed", "rerun_reason": "no_prior_judgment", "schema": "openclaw.judge.v0", "target": { "kind": "issue", "number": 49, "repo": "pdurlej/platform" }, "target_snapshot": { "body_hash": "sha256:30060dbf75d4802b12d49c9b4b7e835c47a03324628e5ee965de670dbe87d6c4", "commit_count": null, "evidence_hash": "sha256:4de92b5218f9efe0607f29cb35d95db37c531116b8d811ec7ef29433dfdf42dc", "head_sha": null, "labels": [ "owner-attention", "phase/02", "risk/process" ], "labels_hash": "sha256:c9ebed45f96127df52893433178a608d796424949e673a5c99e2f2021b7b75ea", "state": "open", "title_hash": "sha256:c85bb3349bc5b8733b8119995c513715a1653f2b993ec7860f7405107734aa4f", "updated_at": "2026-06-04T19:39:19+02:00" }, "top_caveat": "Do not claim CI enforcement is active until the secrets, branch rules, runner, and test PR have passed." } <!-- /openclaw.judge.v0 -->
Collaborator

Superseded by Patchwarden follow-up pdurlej/patchwarden#250. ADR-0002 remains historical platform context; active deterministic policy enforcement belongs in Patchwarden.

Superseded by Patchwarden follow-up https://git.pdurlej.com/pdurlej/patchwarden/issues/250. ADR-0002 remains historical platform context; active deterministic policy enforcement belongs in Patchwarden.
codex closed this issue 2026-06-26 09:55:27 +02:00
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform#49
No description provided.