state(phase-03-security): WIP roadmap for 26-issue codex execution batch (BATCH F) #350

Closed
claude wants to merge 2 commits from claude/state/phase-03-security-batch into main
Collaborator

Summary

Earl Grey fork dispatched on BATCH F (Phase 03 security-sensitive batch #188-#213). Operator's direction 2026-05-17: "obszar F - pokaż na co Cię stać! wróć jak wszystkie WIP PRy będą gotowe pod egzekucje dla codexa".

26 issues are ralph review follow-ups from PRs #161-#167 (2026-05-09 to 2026-05-12), all class/security-sensitive + phase/03. Grouped into 7 thematic clusters with natural dependency order. ONE meta-PR delivering 15 files for codex to execute as 7 follow-up theme PRs.

Files (15)

state/phase-03-security/ (8 files)

  • README.md — roadmap, dependency graph, cross-cousin coordination, master stop conditions
  • theme-1-approval-hardening.md — #188-191 (4 issues): apply.py approval path
  • theme-2-provenance.md — #192-194 (3 issues): plan.py git toplevel + plan_hash [foundation]
  • theme-3-plan-observability.md — #195-197 (3 issues): no-op JSONL events + exit handling
  • theme-4-transport-safety.md — #198-202 (5 issues): host allowlist + redaction + post-apply health
  • theme-5-status-artifacts.md — #203-206 (4 issues): atomic write + fsync + scrub
  • theme-6-workflow-contract.md — #207-209 (3 issues): shell crash + YAML structural tests [coords with BATCH C]
  • theme-7-health-smoke.md — #210-213 (4 issues): env allowlist + container validation

prompts/codex-phase03-<theme>.md (7 files)

Companion execution prompts, one per theme. Each contains: Safety/production boundary statement, pre-flight identity check, slice order, acceptance recap, stop conditions, reporting format, cousin coordination notes.

Format rationale

Uses Codex's preferred bug prebuild shape (operator forwarded feedback 2026-05-17): reproduction + evidence + expected/actual + hypothesis ranking + stop conditions + minimal fix surface + acceptance criteria + test plan. Differs from feature prebuild shape (#323/#324/#325) which is spec-kit-style.

Cross-references ADR-0007 (tiers), ADR-0017 (no stacked), ADR-0018 (fix root causes).

Dependency order

THEME 2 (provenance)                <- foundation; plan_hash needed by THEME 3
       |
       v
THEME 1 (approval) || THEME 4 (transport)    <- apply.py, different sections; can parallel
       |
       v
THEME 3 (observability) || THEME 5 (status)  <- depend on 1+2+4 fields
       |
       v
THEME 6 (workflow) || THEME 7 (health)       <- orthogonal; any time

Recommended: THEME 2 first, then 1+4+6+7 in any order, then 3+5.

Cross-cousin coordination

  • BATCH C (governance fork): THEME 6 touches .forgejo/workflows/; codex must rebase before PR. THEME 7 may touch AGENTS.md runbook index.
  • BATCH H (Hermes/persona fork): no overlap; H uses docs/specs/hermes-* + docs/specs/iskra-family-*.

Tier

Trivial per ADR-0007 (state + prompts docs only, no code/schema/runtime/sacred-path mutation). Single review.

When codex later executes each theme: opens own PR codex/phase-03/<slug>, Full tier (class/security-sensitive), canary 3+3 + operator merge, adversarial test cases mandatory.

Execution plan (after this PR merges)

Operator pastes one execution prompt at a time to codex:

  1. THEME 2 → codex/phase-03/provenance (foundation)
  2. After THEME 2 green: THEMES 1, 4, 6, 7 in parallel or sequence per operator pace
  3. After THEMES 1+2+4 green: THEMES 3 and 5

Total codex output: 7 Full-tier PRs, ~80-100 new test cases across the batch.

Note on PR creation identity

This PR is opened via MCP (operator/pdurlej PAT) because direct claude-PAT curl API calls hit unrecoverable shell-side networking blocks during this session. The branch and all 15 files are authored by claude per identity discipline (commit e5aee2c). Only the PR-open API call uses operator credentials.

Refs #188 #189 #190 #191 #192 #193 #194 #195 #196 #197 #198 #199 #200 #201 #202 #203 #204 #205 #206 #207 #208 #209 #210 #211 #212 #213
Refs #142 (cutover main thread)
Refs DeepSeek 2026-05-14 review (THEME 3 closes part of "no structured agent-observability" gap)

## Summary Earl Grey fork dispatched on **BATCH F** (Phase 03 security-sensitive batch #188-#213). Operator's direction 2026-05-17: *"obszar F - pokaż na co Cię stać! wróć jak wszystkie WIP PRy będą gotowe pod egzekucje dla codexa"*. 26 issues are ralph review follow-ups from PRs #161-#167 (2026-05-09 to 2026-05-12), all `class/security-sensitive` + `phase/03`. Grouped into 7 thematic clusters with natural dependency order. **ONE meta-PR** delivering 15 files for codex to execute as 7 follow-up theme PRs. ## Files (15) ### `state/phase-03-security/` (8 files) - `README.md` — roadmap, dependency graph, cross-cousin coordination, master stop conditions - `theme-1-approval-hardening.md` — #188-191 (4 issues): apply.py approval path - `theme-2-provenance.md` — #192-194 (3 issues): plan.py git toplevel + plan_hash **[foundation]** - `theme-3-plan-observability.md` — #195-197 (3 issues): no-op JSONL events + exit handling - `theme-4-transport-safety.md` — #198-202 (5 issues): host allowlist + redaction + post-apply health - `theme-5-status-artifacts.md` — #203-206 (4 issues): atomic write + fsync + scrub - `theme-6-workflow-contract.md` — #207-209 (3 issues): shell crash + YAML structural tests **[coords with BATCH C]** - `theme-7-health-smoke.md` — #210-213 (4 issues): env allowlist + container validation ### `prompts/codex-phase03-<theme>.md` (7 files) Companion execution prompts, one per theme. Each contains: Safety/production boundary statement, pre-flight identity check, slice order, acceptance recap, stop conditions, reporting format, cousin coordination notes. ## Format rationale Uses Codex's preferred **bug prebuild shape** (operator forwarded feedback 2026-05-17): reproduction + evidence + expected/actual + hypothesis ranking + stop conditions + minimal fix surface + acceptance criteria + test plan. Differs from feature prebuild shape (#323/#324/#325) which is spec-kit-style. Cross-references ADR-0007 (tiers), ADR-0017 (no stacked), ADR-0018 (fix root causes). ## Dependency order ``` THEME 2 (provenance) <- foundation; plan_hash needed by THEME 3 | v THEME 1 (approval) || THEME 4 (transport) <- apply.py, different sections; can parallel | v THEME 3 (observability) || THEME 5 (status) <- depend on 1+2+4 fields | v THEME 6 (workflow) || THEME 7 (health) <- orthogonal; any time ``` Recommended: THEME 2 first, then 1+4+6+7 in any order, then 3+5. ## Cross-cousin coordination - **BATCH C (governance fork)**: THEME 6 touches `.forgejo/workflows/`; codex must rebase before PR. THEME 7 may touch `AGENTS.md` runbook index. - **BATCH H (Hermes/persona fork)**: no overlap; H uses `docs/specs/hermes-*` + `docs/specs/iskra-family-*`. ## Tier **Trivial** per ADR-0007 (state + prompts docs only, no code/schema/runtime/sacred-path mutation). Single review. When codex later executes each theme: opens own PR `codex/phase-03/<slug>`, **Full** tier (class/security-sensitive), canary 3+3 + operator merge, adversarial test cases mandatory. ## Execution plan (after this PR merges) Operator pastes one execution prompt at a time to codex: 1. THEME 2 → `codex/phase-03/provenance` (foundation) 2. After THEME 2 green: THEMES 1, 4, 6, 7 in parallel or sequence per operator pace 3. After THEMES 1+2+4 green: THEMES 3 and 5 Total codex output: 7 Full-tier PRs, ~80-100 new test cases across the batch. ## Note on PR creation identity This PR is opened via MCP (operator/pdurlej PAT) because direct claude-PAT curl API calls hit unrecoverable shell-side networking blocks during this session. The branch and all 15 files are authored by `claude` per identity discipline (commit `e5aee2c`). Only the PR-open API call uses operator credentials. Refs #188 #189 #190 #191 #192 #193 #194 #195 #196 #197 #198 #199 #200 #201 #202 #203 #204 #205 #206 #207 #208 #209 #210 #211 #212 #213 Refs #142 (cutover main thread) Refs DeepSeek 2026-05-14 review (THEME 3 closes part of "no structured agent-observability" gap)
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
state(phase-03-security): WIP prebuild roadmap for 26-issue codex execution batch (BATCH F)
All checks were successful
base-is-main / guard (pull_request) Successful in 1s
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 13s
patchwarden-pr-sanity / sanity (pull_request) Successful in 20s
e5aee2c05b
Earl Grey fork dispatched on BATCH F (Phase 03 security-sensitive batch
#188-#213). Operator's direction 2026-05-17: "obszar F - pokaż na co Cię
stać! wróć jak wszystkie WIP PRy będą gotowe pod egzekucje dla codexa".

26 issues are ralph review follow-ups from PRs #161-#167 (2026-05-09 to
2026-05-12), all `class/security-sensitive` + `phase/03`. Grouped into
7 thematic clusters with natural dependency order. ONE meta-PR (this),
delivering 15 files for codex to execute as 7 follow-up theme PRs.

Files:

state/phase-03-security/
  README.md                          (roadmap + dependency graph + cross-cousin coordination)
  theme-1-approval-hardening.md      (#188-191, 4 issues, apply.py approval path)
  theme-2-provenance.md              (#192-194, 3 issues, plan.py git toplevel + hash)
  theme-3-plan-observability.md      (#195-197, 3 issues, no-op events + exit handling)
  theme-4-transport-safety.md        (#198-202, 5 issues, host allowlist + redaction + post-apply health)
  theme-5-status-artifacts.md        (#203-206, 4 issues, atomic write + fsync + scrub)
  theme-6-workflow-contract.md       (#207-209, 3 issues, shell crash detect + YAML structural tests)
  theme-7-health-smoke.md            (#210-213, 4 issues, env allowlist + container name + adversarial)

prompts/codex-phase03-<theme>.md     (7 companion execution prompts with safety boundary,
                                      pre-flight, slice order, stop conditions, reporting)

Each theme uses Codex's preferred BUG PREBUILD shape (operator forwarded
feedback 2026-05-17): reproduction + evidence + expected/actual +
hypothesis ranking + stop conditions + minimal fix surface + acceptance
criteria + test plan. Each execution prompt has explicit Safety /
production boundary statement per platform discipline (vs openclaw's
prebuild pattern). Cross-references ADR-0007 (tiers), ADR-0017 (no
stacked), ADR-0018 (fix root causes not workarounds).

Dependency order (recommended): THEME 2 first (provenance foundation),
then THEMES 1+4+6+7 in parallel (different file surfaces), then THEMES
3+5 (depend on THEMES 2/1/4 fields).

Cross-cousin coordination noted: THEME 6 may conflict with BATCH C
(governance fork) on .forgejo/workflows/; codex must rebase before PR.
THEME 7 runbooks/ + AGENTS.md edge case noted.

Tier: Trivial per ADR-0007 (state + prompts docs only, no code/schema/
runtime/sacred-path mutation). Single review.

When codex executes each theme: opens own PR `codex/phase-03/<slug>`,
Full tier per ADR-0007, canary 3+3 + operator merge, tests including
adversarial inputs mandatory.

Refs #188 #189 #190 #191 #192 #193 #194 #195 #196 #197 #198 #199 #200
     #201 #202 #203 #204 #205 #206 #207 #208 #209 #210 #211 #212 #213
state(phase-03-security): add Pre-flight 0 mandatory pre-reading
All checks were successful
base-is-main / guard (pull_request) Successful in 1s
canary-required / collect-diff (pull_request) Successful in 3s
patchwarden-pr-sanity / collect-diff (pull_request) Successful in 3s
canary-required / canary (pull_request) Successful in 13s
patchwarden-pr-sanity / sanity (pull_request) Successful in 19s
83aa4ac704
Per operator direction 2026-05-17 ~22:30, add cross-reference to
`state/ANY-COUSIN-WAKEUP.md` (PR #322) and `pdurlej/agent-souls/practices/`
triplet (welcome / credential-management / infisical-machine-identity)
as MANDATORY first read for any cousin entering BATCH F cold.

Rationale specific to this batch: each theme PR is `class/security-sensitive`
(Full tier per ADR-0007). Identity isolation matters more here than anywhere
else. A wrong-PAT commit on a security-sensitive theme PR is a real audit
trail violation. The multi-PAT keychain drift anti-pattern (canonical 2026-05-15
claude blunder, repeated 2026-05-17) is precisely the failure mode this batch
must NOT introduce while hardening apply path.

Numbered the new section as Pre-flight 0 (before Safety / production boundary)
so it's literally the first thing codex reads after the front-matter.

Tier: Trivial per ADR-0007 (single file, additive ~17 lines, docs only).

Refs PR #322 (ANY-COUSIN-WAKEUP cross-ref source), agent-souls/practices/.
Collaborator

W9 rewrite/archive triage: closing this old PR as stale/superseded, not rejecting the underlying idea. Reason: Phase-03 security batch roadmap is too large and stale for current execution; split current #188-#213 work if/when resumed.

If the idea is still useful, it should be rewritten from current main as a smaller atomic PR or issue. No old branch should merge only because it is green.

W9 rewrite/archive triage: closing this old PR as stale/superseded, not rejecting the underlying idea. Reason: Phase-03 security batch roadmap is too large and stale for current execution; split current #188-#213 work if/when resumed. If the idea is still useful, it should be rewritten from current main as a smaller atomic PR or issue. No old branch should merge only because it is green.
codex closed this pull request 2026-05-27 08:41:20 +02:00
All checks were successful
base-is-main / guard (pull_request) Successful in 1s
Required
Details
canary-required / collect-diff (pull_request) Successful in 3s
patchwarden-pr-sanity / collect-diff (pull_request) Successful in 3s
canary-required / canary (pull_request) Successful in 13s
patchwarden-pr-sanity / sanity (pull_request) Successful in 19s
Required
Details

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!350
No description provided.