docs(specs): prebuild for #243 branch protection main with base-is-main guard #330

Merged
pdurlej merged 1 commit from claude/c-batch/canary-pr-body-context-bug-prebuild into main 2026-05-23 09:19:02 +02:00
Collaborator

Summary

Bug prebuild (codex's preferred shape per 2026-05-17 feedback: reproduction + evidence + expected/actual + hypothesis ranking + minimal fix surface + acceptance + tests) for issue #85.

Bug observed

Canary reviewers (claude/codex/glm) report PR description: none for PRs with non-empty Forgejo body. Reached 3-iter cap on PR #84 due to this false dissent.

Hypothesis ranking

  • H1 (60%): body parameter not threaded through run_review CLI/builder
  • H2 (20%): adapter strips body in prompt template
  • H3 (10%): Forgejo null vs empty-string body normalization
  • H4/H5 (5% each): workflow YAML wrong PR id / race condition

3-state model (per ADR-0018)

Decision packet evidence must distinguish:

  • pr_body_source: provided (body supplied to reviewer)
  • pr_body_source: forgejo_empty (legitimately empty PR body)
  • pr_body_source: runner_error (pipeline failure to fetch)

Without this, agent reads conflated signal as "PR description: none" → false blocker → wasted operator-attention. Direct ADR-0018 application (agent-readable surface that lies = wrong action).

Files

  • docs/specs/canary-pr-body-context-bug/README.md
  • docs/specs/canary-pr-body-context-bug/01-reproduction.md (steps + evidence from PR #82/#84)
  • docs/specs/canary-pr-body-context-bug/02-expected-vs-actual.md (3-state model)
  • docs/specs/canary-pr-body-context-bug/03-hypothesis-ranking.md (ranked H1-H5 with test procedures)
  • docs/specs/canary-pr-body-context-bug/04-minimal-fix-surface.md (files allowed/forbidden per hypothesis)
  • docs/specs/canary-pr-body-context-bug/05-acceptance-and-tests.md (5 regression test cases + fixture spec)
  • prompts/codex-canary-pr-body-context-bug.md (codex execution: investigate → fix → tests, per ADR-0018 stop conditions)

Tier

Trivial per ADR-0007 (docs-only prebuild). The downstream fix (separate PR) is Lite.

Part of batch C (process/governance) prebuild shift

This is 2/6 prebuilds. Others: #243 branch protection (PR #327 done), #86 security-sensitive routing, #49 ADR-0002 CI enforcement, DeepSeek #11 ADR-0018 mechanical guard, #75 governance globalne.

Refs #85 #82 #84

## Summary Bug prebuild (codex's preferred shape per 2026-05-17 feedback: reproduction + evidence + expected/actual + hypothesis ranking + minimal fix surface + acceptance + tests) for issue #85. ## Bug observed Canary reviewers (claude/codex/glm) report `PR description: none` for PRs with non-empty Forgejo body. Reached 3-iter cap on PR #84 due to this false dissent. ## Hypothesis ranking - **H1 (60%):** body parameter not threaded through `run_review` CLI/builder - **H2 (20%):** adapter strips body in prompt template - **H3 (10%):** Forgejo null vs empty-string body normalization - **H4/H5 (5% each):** workflow YAML wrong PR id / race condition ## 3-state model (per ADR-0018) Decision packet evidence must distinguish: - `pr_body_source: provided` (body supplied to reviewer) - `pr_body_source: forgejo_empty` (legitimately empty PR body) - `pr_body_source: runner_error` (pipeline failure to fetch) Without this, agent reads conflated signal as "PR description: none" → false blocker → wasted operator-attention. Direct ADR-0018 application (agent-readable surface that lies = wrong action). ## Files - `docs/specs/canary-pr-body-context-bug/README.md` - `docs/specs/canary-pr-body-context-bug/01-reproduction.md` (steps + evidence from PR #82/#84) - `docs/specs/canary-pr-body-context-bug/02-expected-vs-actual.md` (3-state model) - `docs/specs/canary-pr-body-context-bug/03-hypothesis-ranking.md` (ranked H1-H5 with test procedures) - `docs/specs/canary-pr-body-context-bug/04-minimal-fix-surface.md` (files allowed/forbidden per hypothesis) - `docs/specs/canary-pr-body-context-bug/05-acceptance-and-tests.md` (5 regression test cases + fixture spec) - `prompts/codex-canary-pr-body-context-bug.md` (codex execution: investigate → fix → tests, per ADR-0018 stop conditions) ## Tier Trivial per ADR-0007 (docs-only prebuild). The downstream fix (separate PR) is Lite. ## Part of batch C (process/governance) prebuild shift This is 2/6 prebuilds. Others: #243 branch protection (PR #327 done), #86 security-sensitive routing, #49 ADR-0002 CI enforcement, DeepSeek #11 ADR-0018 mechanical guard, #75 governance globalne. Refs #85 #82 #84
docs(specs): prebuild for #243 branch protection main base-is-main guard
All checks were successful
base-is-main / guard (pull_request) Successful in 2s
canary-required / collect-diff (pull_request) Successful in 4s
patchwarden-pr-sanity / collect-diff (pull_request) Successful in 3s
canary-required / canary (pull_request) Successful in 14s
patchwarden-pr-sanity / sanity (pull_request) Successful in 20s
13bced9cc3
Operator-action issue #243 deferred since ADR-0017 merge (PR #220, 2026-05-12)
because RS2000 cutover window was active. F3 stateful smokes landed
2026-05-17 ~02:37 CEST, so the deferral preconditions are now satisfied.

This prebuild documents:

- Why this now, what changed since #243 was deferred
- Exact Forgejo UI checklist (steps, fields, required values)
- Post-enablement verification smoke (test stacked PR red, escape hatch
  green, normal PR no regression)
- Rollback procedure if anything breaks ongoing work
- Companion execution prompt for codex (verification-only role; operator
  is the only actor who toggles UI settings)

Files:
- docs/specs/branch-protection-main-base-guard/README.md
- docs/specs/branch-protection-main-base-guard/01-context.md
- docs/specs/branch-protection-main-base-guard/02-checklist.md
- docs/specs/branch-protection-main-base-guard/03-verification.md
- docs/specs/branch-protection-main-base-guard/04-rollback.md
- prompts/codex-branch-protection-main-base-guard.md

Hard gates preserved:
- Operator-UI only for protection toggle (codex MUST NOT call branch
  protection API)
- No test PR merge during verification (test PRs created, observed,
  closed without merge)
- Per ADR-0018: no "accept workaround" outcomes if verification fails

Tier: Trivial per ADR-0007 (docs-only, no runtime/schema/sacred-path
mutation). The action this enables (branch protection enable) is itself
operator-UI-only, no code involved.

Part of batch C (process/governance) prebuild shift.
Refs #243 #220 ADR-0017 ADR-0018
claude changed title from docs(specs): bug prebuild for #85 canary PR body in reviewer context to docs(specs): prebuild for #243 branch protection main with base-is-main guard 2026-05-17 22:43:42 +02:00
Author
Collaborator

Title corrected (fork-anchor szpachla 2026-05-17)

Original title said "bug prebuild for #85 canary PR body in reviewer context" but the 6 committed files are entirely #243 branch protection Spec Kit (docs/specs/branch-protection-main-base-guard/* + prompts/codex-branch-protection-main-base-guard.md). Fork-anchor cross-branch collision.

Retitled to reflect actual content. The #85 canary PR body bug prebuild was genuinely lost. Retry #85 in fresh worktree session.

This PR addresses #243.

## Title corrected (fork-anchor szpachla 2026-05-17) Original title said "bug prebuild for #85 canary PR body in reviewer context" but the 6 committed files are entirely #243 branch protection Spec Kit (docs/specs/branch-protection-main-base-guard/* + prompts/codex-branch-protection-main-base-guard.md). Fork-anchor cross-branch collision. Retitled to reflect actual content. The #85 canary PR body bug prebuild was genuinely lost. Retry #85 in fresh worktree session. This PR addresses #243.
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
1 participant
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!330
No description provided.