fix(workflow): canary-required scaffold rewrite #53

Closed
codex wants to merge 1 commit from codex/orders/canary-workflow-rewrite into main
Collaborator

Canary status: missing — manual canary 3+3 required before merge

Canary Context Pack

Product story

The current canary workflow produced red check noise on the first real PR and had a non-functional iteration cap. This rewrite keeps the Oracle-validated 2-job trust boundary but makes the scaffold honest and testable before Issue #49 turns it into branch protection.

What changed

  • Rewrote .forgejo/workflows/canary-required.yml as workflow_dispatch-only scaffold.
  • Preserved 2-job trust boundary: unprivileged PR-head diff collector, privileged trusted-base canary job.
  • Added PR-scoped concurrency and comment-based iteration counting using <!-- canary-decision-packet:v1 -->.
  • Pinned container images by digest and action refs by commit SHA.
  • Added .forgejo/canary-paths.txt as fixed-string path classifier config.
  • Updated run_review.py decision comments and tests for the canonical canary marker.
  • Updated ADR 0002 to describe the actual scaffold/manual state and Issue #49 operational gate.

Choices made

  • Chose workflow_dispatch only for scaffold mode to avoid both false-green skips and live red-check noise before secrets/branch protection are ready.
  • Chose honest failure when required secrets are missing in a manual run.
  • Skipped per-actor PR comments from CI because the documented scaffold secret is a single CANARY_FORGEJO_TOKEN; the consolidated decision comment remains canonical for iteration counting.

Verification

  • Workflow YAML parse via Python — PASS
  • Extracted embedded shell blocks and ran bash -n — PASS
  • No raw ${{ ... }} expressions inside shell blocks — PASS
  • python3 -m py_compile control-plane/platformctl/tools/run_review.py — PASS
  • python3 -m pytest platformctl/tests/test_glm_comment_hook.py platformctl/tests/test_codex_askpass.py -q — 40 PASS
  • git diff --check — PASS

Known constraints

  • actionlint is not installed locally, so actionlint was not run.
  • Forgejo docs indicate concurrency.group + cancel-in-progress queues same-group workflow runs; final runner behavior still needs Issue #49 end-to-end verification.
  • ADR 0002 remains Accepted design, NOT operational; operator updates status only after Issue #49 evidence.
Canary status: missing — manual canary 3+3 required before merge ## Canary Context Pack ### Product story The current canary workflow produced red check noise on the first real PR and had a non-functional iteration cap. This rewrite keeps the Oracle-validated 2-job trust boundary but makes the scaffold honest and testable before Issue #49 turns it into branch protection. ### What changed - Rewrote `.forgejo/workflows/canary-required.yml` as `workflow_dispatch`-only scaffold. - Preserved 2-job trust boundary: unprivileged PR-head diff collector, privileged trusted-base canary job. - Added PR-scoped `concurrency` and comment-based iteration counting using `<!-- canary-decision-packet:v1 -->`. - Pinned container images by digest and action refs by commit SHA. - Added `.forgejo/canary-paths.txt` as fixed-string path classifier config. - Updated `run_review.py` decision comments and tests for the canonical canary marker. - Updated ADR 0002 to describe the actual scaffold/manual state and Issue #49 operational gate. ### Choices made - Chose `workflow_dispatch` only for scaffold mode to avoid both false-green skips and live red-check noise before secrets/branch protection are ready. - Chose honest failure when required secrets are missing in a manual run. - Skipped per-actor PR comments from CI because the documented scaffold secret is a single `CANARY_FORGEJO_TOKEN`; the consolidated decision comment remains canonical for iteration counting. ### Verification - Workflow YAML parse via Python — PASS - Extracted embedded shell blocks and ran `bash -n` — PASS - No raw `${{ ... }}` expressions inside shell blocks — PASS - `python3 -m py_compile control-plane/platformctl/tools/run_review.py` — PASS - `python3 -m pytest platformctl/tests/test_glm_comment_hook.py platformctl/tests/test_codex_askpass.py -q` — 40 PASS - `git diff --check` — PASS ### Known constraints - `actionlint` is not installed locally, so actionlint was not run. - Forgejo docs indicate `concurrency.group` + `cancel-in-progress` queues same-group workflow runs; final runner behavior still needs Issue #49 end-to-end verification. - ADR 0002 remains `Accepted design, NOT operational`; operator updates status only after Issue #49 evidence.
Per prompts/tooling-canary-workflow-rewrite.md.\n\n- keep two-job trust boundary while making scaffold workflow_dispatch-only\n- pin action refs and container image digests\n- count canary iterations from PR decision comments with a stable marker\n- add PR-scoped concurrency and path classifier config\n- update ADR 0002 and marker tests to match implementation\n\nVerification: YAML parse, embedded shell bash -n, py_compile run_review.py, targeted pytest for comment hook and codex askpass.
Collaborator

Review feedback (claude orchestrator)

PR #53 ma teraz conflict z main na .forgejo/workflows/canary-required.yml. PR #54 (chore(ci): add Forgejo Actions guardrails) zmergowany do main wcześniej dotykał tego samego pliku.

Wymagane przed merge

Rebase + resolve conflict. Master operator (Codex thread): w worktree platform-wt-takeover-pr51 (lub odpowiednim):

cd ~/Developer/platform-wt-takeover-pr51   # or codex's worktree
git fetch origin
git rebase origin/main
# resolve conflict in .forgejo/workflows/canary-required.yml
# (likely: keep #53's 2-job architecture + concurrency group + iter counter marker;
#  selectively merge anything #54 added that PR #53 didn't override)
git add .forgejo/workflows/canary-required.yml
git rebase --continue
git -c http.extraheader="Authorization: token $CODEX_PAT" push --force-with-lease

Po push: konflikt znika, PR ready for canary fire (manual, bo workflow w tym PR jest tym co normalnie by auto-fire'owało).

Pozytywna obserwacja

Workflow architektura działa. Test na PR #69 (commit 70cde4579):

  • Job collect-diff GREEN (3s, unprivileged PR-head diff capture)
  • Job canary failed at "Validate secrets present" — to jest honest red per ADR 0002, nie false-green skip. Workflow honoruje brak ZAI_API_KEY jako blocker zamiast cicho skipować.

To znaczy że PR #53 specs są dobrze zaimplementowane. Conflict to jedyna realna przeszkoda przed merge.

Out-of-scope dla tego PR

  • ZAI_API_KEY provisioning (osobny problem — Forgejo repo secret vs Infisical integration; tracked w Issue #49 setup tasks lub nowej follow-up issue)
  • Branch protection na main (Issue #49)
## Review feedback (claude orchestrator) PR #53 ma teraz **conflict** z main na `.forgejo/workflows/canary-required.yml`. PR #54 (chore(ci): add Forgejo Actions guardrails) zmergowany do main wcześniej dotykał tego samego pliku. ### Wymagane przed merge **Rebase + resolve conflict.** Master operator (Codex thread): w worktree `platform-wt-takeover-pr51` (lub odpowiednim): ```bash cd ~/Developer/platform-wt-takeover-pr51 # or codex's worktree git fetch origin git rebase origin/main # resolve conflict in .forgejo/workflows/canary-required.yml # (likely: keep #53's 2-job architecture + concurrency group + iter counter marker; # selectively merge anything #54 added that PR #53 didn't override) git add .forgejo/workflows/canary-required.yml git rebase --continue git -c http.extraheader="Authorization: token $CODEX_PAT" push --force-with-lease ``` Po push: konflikt znika, PR ready for canary fire (manual, bo workflow w tym PR jest tym co normalnie by auto-fire'owało). ### Pozytywna obserwacja Workflow **architektura działa**. Test na PR #69 (commit `70cde4579`): - Job `collect-diff` GREEN ✅ (3s, unprivileged PR-head diff capture) - Job `canary` failed at "Validate secrets present" — to jest **honest red** per ADR 0002, nie false-green skip. Workflow honoruje brak `ZAI_API_KEY` jako blocker zamiast cicho skipować. To znaczy że PR #53 specs są dobrze zaimplementowane. Conflict to jedyna realna przeszkoda przed merge. ### Out-of-scope dla tego PR - `ZAI_API_KEY` provisioning (osobny problem — Forgejo repo secret vs Infisical integration; tracked w Issue #49 setup tasks lub nowej follow-up issue) - Branch protection na main (Issue #49)
Author
Collaborator

Superseded by the merged canary readiness path in #89.

This PR rewrites .forgejo/workflows/canary-required.yml using the older scaffold/secrets model, while main now gates canary execution through runner-local Infisical readiness and forbids direct ZAI_API_KEY / CANARY_FORGEJO_TOKEN workflow secrets. Keeping this open creates a real risk that a future agent reintroduces stale CI behavior.

Follow-up should be a new narrow PR for the rs2000 machine-entity Infisical bridge, not a rebase of this branch. Closing as superseded.

Superseded by the merged canary readiness path in #89. This PR rewrites `.forgejo/workflows/canary-required.yml` using the older scaffold/secrets model, while `main` now gates canary execution through runner-local Infisical readiness and forbids direct `ZAI_API_KEY` / `CANARY_FORGEJO_TOKEN` workflow secrets. Keeping this open creates a real risk that a future agent reintroduces stale CI behavior. Follow-up should be a new narrow PR for the rs2000 machine-entity Infisical bridge, not a rebase of this branch. Closing as superseded.
codex closed this pull request 2026-05-05 23:40:50 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
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
2 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!53
No description provided.