fix(review-pipeline): improved-from-#6 — narrow code-only successor #7

Merged
pdurlej merged 2 commits from codex/review-pipeline/improved-from-pr6 into main 2026-05-01 17:39:52 +02:00
Owner

Successor to closed/rejected #6

Per operator architectural decision (2026-05-01) + Oracle consult (session platform-meta-decisions-2026-05-01, gpt-5.5 high reasoning, fallback via codex CLI because Oracle MCP browser auth not set up in claude-orchestrator's environment — see operator INBOX for diagnostics):

"PR rejection as learning log" pattern is sound for AI-driven workflow when used for architectural / scope-creep / hygiene contamination — exactly this case.

Closes #6.

Removed (vs PR #6)

  • state/DISPATCH_BRIDGE.json — machine-local session state (4 reviewers convergent in canary #3)
  • state/canary/CANARY_PLAN.md Path C OpenCode credential-extraction (4 reviewers convergent: don't normalize credential scavenging)
  • state/reviews/PR-{5,6}/* review artifact JSONs (per reviewer feedback: cause self-referential confusion in subsequent reviews)
  • state/{AUDIT_LOG,OPERATOR_INBOX,STATUS_NOW} updates — these evolve naturally; not bundled into code PRs

Retained (the actual fixes from canary #1 + canary #2 + canary #3)

File Change Source
_base.py parser iterates REVERSE, picks LAST verdict block canary #1 BLOCKER, 3/3 tech convergent
claude_cli.py stdin (NOT argv); --bare opt-in via PLATFORMCTL_CLAUDE_BARE=1 canary #1 (argv leak) + canary #2 (--bare killed OAuth)
codex_cli.py --ephemeral flag added tech-gpt opportunity
zai.py default URL api/coding/paas/v4 (Coding Plan); /tmp leak removed canary #1 (high) + ops fix
test_run_review.py regression test for parser bug class canary #1 (high)

Changed (charter)

  • PLATFORM_CHARTER.md §3 — added "Learning patterns" subsection with two charter rules (PR rejection as learning log + Oracle escalation discipline). Per Oracle consult.

Tests

60/60 green:

  • 37 in test_run_review.py (incl. new regression test that would FAIL pre-fix)
  • 14 consolidator
  • 4 negative-control
  • 5 platformctl smoke

Linkage

  • Closes #6
  • Builds on canary #1, #2, #3 findings (in PR #6 history + operator INBOX narrative)
  • First exercise of "PRs as learning log" pattern enshrined in this PR's charter update

🤖 Generated with Claude Code

## Successor to closed/rejected #6 Per operator architectural decision (2026-05-01) + Oracle consult (session `platform-meta-decisions-2026-05-01`, gpt-5.5 high reasoning, fallback via codex CLI because Oracle MCP browser auth not set up in claude-orchestrator's environment — see operator INBOX for diagnostics): > "PR rejection as learning log" pattern is sound for AI-driven workflow when used for architectural / scope-creep / hygiene contamination — exactly this case. Closes #6. ## Removed (vs PR #6) - `state/DISPATCH_BRIDGE.json` — machine-local session state (4 reviewers convergent in canary #3) - `state/canary/CANARY_PLAN.md` Path C OpenCode credential-extraction (4 reviewers convergent: don't normalize credential scavenging) - `state/reviews/PR-{5,6}/*` review artifact JSONs (per reviewer feedback: cause self-referential confusion in subsequent reviews) - `state/{AUDIT_LOG,OPERATOR_INBOX,STATUS_NOW}` updates — these evolve naturally; not bundled into code PRs ## Retained (the actual fixes from canary #1 + canary #2 + canary #3) | File | Change | Source | |---|---|---| | `_base.py` | parser iterates REVERSE, picks LAST verdict block | canary #1 BLOCKER, 3/3 tech convergent | | `claude_cli.py` | stdin (NOT argv); `--bare` opt-in via `PLATFORMCTL_CLAUDE_BARE=1` | canary #1 (argv leak) + canary #2 (--bare killed OAuth) | | `codex_cli.py` | `--ephemeral` flag added | tech-gpt opportunity | | `zai.py` | default URL `api/coding/paas/v4` (Coding Plan); `/tmp` leak removed | canary #1 (high) + ops fix | | `test_run_review.py` | regression test for parser bug class | canary #1 (high) | ## Changed (charter) - `PLATFORM_CHARTER.md` §3 — added "Learning patterns" subsection with two charter rules (PR rejection as learning log + Oracle escalation discipline). Per Oracle consult. ## Tests 60/60 green: - 37 in `test_run_review.py` (incl. new regression test that would FAIL pre-fix) - 14 consolidator - 4 negative-control - 5 platformctl smoke ## Linkage - Closes #6 - Builds on canary #1, #2, #3 findings (in PR #6 history + operator INBOX narrative) - First exercise of "PRs as learning log" pattern enshrined in this PR's charter update 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Successor PR to closed/rejected #6 (convergent reviewer feedback: split
before merge — 3-4 reviewers convergent on scope creep + machine-local
state + credential extraction in canonical doc).

Per Oracle consult (2026-05-01, gpt-5.5 high reasoning, session
`platform-meta-decisions-2026-05-01`): "PR rejection as learning log"
pattern is sound for AI-driven workflow when used for architectural /
scope-creep / hygiene contamination — exactly this case.

## Removed (vs PR #6)

- `state/DISPATCH_BRIDGE.json` — machine-local session state (4 reviewers
  convergent: shouldn't be committed; goes to .runtime/ or .gitignore)
- `state/canary/CANARY_PLAN.md` Path C OpenCode credential-extraction
  documentation (4 reviewers convergent: don't normalize credential
  scavenging; goes to private runbook)
- `state/reviews/PR-{5,6}/*` review artifact JSONs (per reviewer
  feedback: cause self-referential confusion in subsequent reviews;
  goes to separate archive repo or out-of-repo storage)
- `state/{AUDIT_LOG,OPERATOR_INBOX,STATUS_NOW}.md` updates — these
  evolve naturally on main; will accumulate organically

## Retained (the actual fixes from canary #1 + #2 + #3 findings)

- `_base.py` parser: REVERSE iteration picks LAST verdict-containing
  block (canary #1 BLOCKER fix, 3/3 tech reviewers convergent)
- `claude_cli.py`: stdin (NOT argv) for user_message; --bare opt-in
  via PLATFORMCTL_CLAUDE_BARE=1 (default OFF — bare disables OAuth +
  Keychain reads; verified via canary #2 self-test)
- `codex_cli.py`: --ephemeral flag added
- `zai.py`: default base URL switched from PaaS (per-call billed)
  to Coding (subscription); /tmp credential-leak pattern removed
  from docstring
- `test_run_review.py`: regression test
  `test_parse_picks_LAST_verdict_block_when_diff_contains_verdict_literal`
  — exercises the bug class (prompt-echo OK + model NOT_OK → must
  return NOT_OK). Would FAIL before parser fix, PASSES after.

## Changed

- `PLATFORM_CHARTER.md` §3 — added "Learning patterns" subsection with
  two charter rules (PR rejection as learning log + Oracle escalation
  trigger discipline). Per Oracle consult.

## Tests

60/60 green (37 in test_run_review.py incl. new regression, 14 consolidator,
4 negative-control, 5 platformctl smoke).

## Linkage

- Closes #6 (rejected per operator architectural decision 2026-05-01)
- Builds on canary #1 findings (state/reviews/PR-5 in PR #6 history)
- Charter rules validated by Oracle session
  `platform-meta-decisions-2026-05-01`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
Owner

Bilateral linkage (per Oracle GPT 5.5 Pro caveat)

This PR is the successor to rejected #6. Per Oracle's "Always link successor PRs both ways" caveat (charter §3 Learning patterns):

  • Rejected predecessor: #6 (commit history preserved on codex/review-pipeline/canary-findings-pr6 branch — keeping per Oracle's "Keep rejected branches or at least record exact commit SHAs until the successor merges" caveat)
  • What this preserves: the actual code fixes from canary #1, #2, #3 cycles
  • What this drops: machine-local state, credential-extraction docs, review-artifact JSONs, ledger noise (everything 4 reviewers convergent flagged)
  • For diffing rewrites: see git range-diff main...origin/codex/review-pipeline/canary-findings-pr6 main...HEAD (Oracle recommendation)

This is the first exercise of the reject + improved-from-#N pattern enshrined in PLATFORM_CHARTER §3 (this PR also adds the rule itself — a meta-test of the pattern: would an Oracle-validated, narrow successor PR pass review where the bundled predecessor failed?).

## Bilateral linkage (per Oracle GPT 5.5 Pro caveat) This PR is the successor to **rejected #6**. Per Oracle's "Always link successor PRs both ways" caveat (charter §3 Learning patterns): - **Rejected predecessor:** #6 (commit history preserved on `codex/review-pipeline/canary-findings-pr6` branch — keeping per Oracle's "Keep rejected branches or at least record exact commit SHAs until the successor merges" caveat) - **What this preserves:** the actual code fixes from canary #1, #2, #3 cycles - **What this drops:** machine-local state, credential-extraction docs, review-artifact JSONs, ledger noise (everything 4 reviewers convergent flagged) - **For diffing rewrites:** see `git range-diff main...origin/codex/review-pipeline/canary-findings-pr6 main...HEAD` (Oracle recommendation) This is the **first exercise** of the `reject + improved-from-#N` pattern enshrined in PLATFORM_CHARTER §3 (this PR also adds the rule itself — a meta-test of the pattern: would an Oracle-validated, narrow successor PR pass review where the bundled predecessor failed?).
Operator pasted the full Oracle response from session
`platform-meta-decisions-2026-05-01`. This commit replaces my
codex-fallback summary in §3 "Learning patterns" with Oracle's actual
wording, which is more complete:

- Adds bilateral linking requirement (operationally critical — Oracle
  caveat #2: "Always link successor PRs both ways")
- Adds `git range-diff` recommendation for comparing rewrites (with
  link to git docs)
- Adds Forgejo PR-as-attempt-history alignment (with link to Forgejo
  docs)
- Adds operational nuance "scope, trust boundary, or review context
  is contaminated" — sharper trigger than my fallback
- Adds 3 stricter Oracle-escalation caveats: don't replace operator
  judgment, ask for decision framing not permission; require
  compressed packet input; convert direction into one operational
  rule then return to deterministic flow

External-source links:
- forgejo.org/docs/next/user/pull-requests-and-git-flow/
- git-scm.com/docs/git-range-diff

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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!7
No description provided.