fix(identity): align stale charter §4 refs to §3 identity-isolation (canary #2 bonus) #28

Merged
pdurlej merged 1 commit from claude/orders/order-c-followup-stale-§4-refs into main 2026-05-02 23:37:52 +02:00
Collaborator

Summary

Closes Dispatch's "bonus finding follow-up" from canary v2 on PR #26.

Tech-claude reviewer caught stale charter §4 references in identity code that the charter-side fixes (PR #22 + PR #26) didn't reach. Test file even pinned the stale string with assert "charter §4" in msg (line 210) — making it a hard regression block until aligned.

Edits

File Line(s) Change
codex.py 26 charter §4 v2charter §3 identity-isolation v2 (docstring)
codex.py 30 charter §4 intentcharter §3 identity-isolation intent
codex.py 208 charter §4 v2charter §3 identity-isolation v2
codex.py 221 charter §4 v2charter §3 identity-isolation v2 (exception msg)
test_codex_askpass.py 65 comment update
test_codex_askpass.py 191 section comment update
test_codex_askpass.py 197 docstring update
test_codex_askpass.py 210 assert "charter §4" in msgassert "charter §3" in msg

Verification

  • grep -c '§4' on both files: 0 (was 4 each)
  • pytest: 13/13 PASSED in test_codex_askpass.py

Future-review checklist item

When charter section numbers change, grep tests for hardcoded section assertions. The test on line 210 was a textbook "asserts on stale external reference" trap. Could codify in state/CLAUDE_SELF_INSTRUCTIONS.md §3 (consistency anchors) as a new rule.

Scope (per charter §3)

Small impact: code-level fix, single concern, +8 / -8 LOC, no behavior change (docstrings + comments + 1 test assertion). Pre-auth A applies → push directly.

Co-authors

  • Dispatch (Claude Opus 4.6, canary v2 surfaced this via tech-claude reviewer)
  • Claude Opus 4.7 (1M context, code fix + test verification)
## Summary Closes Dispatch's "bonus finding follow-up" from canary v2 on PR #26. Tech-claude reviewer caught stale `charter §4` references in identity code that the charter-side fixes (PR #22 + PR #26) didn't reach. Test file even **pinned the stale string with `assert "charter §4" in msg`** (line 210) — making it a hard regression block until aligned. ## Edits | File | Line(s) | Change | |---|---|---| | `codex.py` | 26 | `charter §4 v2` → `charter §3 identity-isolation v2` (docstring) | | `codex.py` | 30 | `charter §4 intent` → `charter §3 identity-isolation intent` | | `codex.py` | 208 | `charter §4 v2` → `charter §3 identity-isolation v2` | | `codex.py` | 221 | `charter §4 v2` → `charter §3 identity-isolation v2` (exception msg) | | `test_codex_askpass.py` | 65 | comment update | | `test_codex_askpass.py` | 191 | section comment update | | `test_codex_askpass.py` | 197 | docstring update | | `test_codex_askpass.py` | 210 | **`assert "charter §4" in msg` → `assert "charter §3" in msg`** | ## Verification - `grep -c '§4'` on both files: **0** (was 4 each) - pytest: **13/13 PASSED** in `test_codex_askpass.py` ## Future-review checklist item When charter section numbers change, **grep tests for hardcoded section assertions**. The test on line 210 was a textbook "asserts on stale external reference" trap. Could codify in `state/CLAUDE_SELF_INSTRUCTIONS.md §3 (consistency anchors)` as a new rule. ## Scope (per charter §3) **Small impact**: code-level fix, single concern, +8 / -8 LOC, no behavior change (docstrings + comments + 1 test assertion). Pre-auth A applies → push directly. ## Co-authors - Dispatch (Claude Opus 4.6, canary v2 surfaced this via tech-claude reviewer) - Claude Opus 4.7 (1M context, code fix + test verification)
Per Dispatch's canary v2 report on PR #26 (now merged): tech-claude reviewer
flagged stale `charter §4` references in identity code that were not addressed
by the charter doc fixes (PR #22 + #26 amended §3, but code didn't follow).

References fixed (8 total):

control-plane/platformctl/identity/codex.py (4):
- Line 26: `charter §4 v2` → `charter §3 identity-isolation v2` (WorktreeIsolationViolation docstring)
- Line 30: `charter §4 intent` → `charter §3 identity-isolation intent` (rationale text)
- Line 208: `charter §4 v2` → `charter §3 identity-isolation v2` (setup_worktree_git_config docstring)
- Line 221: `charter §4 v2` → `charter §3 identity-isolation v2` (raised exception message)

control-plane/platformctl/tests/test_codex_askpass.py (4):
- Line 65: comment update
- Line 191: section comment update
- Line 197: docstring update
- Line 210: **`assert "charter §4" in msg` → `assert "charter §3" in msg`** (was pinning the stale string!)

Verification:
- `grep -c '§4' control-plane/platformctl/identity/codex.py` → 0 (was 4)
- `grep -c '§4' control-plane/platformctl/tests/test_codex_askpass.py` → 0 (was 4)
- pytest test_codex_askpass.py: **13/13 PASSED**

Per charter §3 (PR #22 amended): code-level fix, single concern, ≤30 LOC,
docstring/comment changes + 1 test assertion → small impact. Pre-auth A applies
(operator instruction "z powodu zakresu będziesz mógł sam wypchnąć").

Bonus: canary v2 caught this because the test pinned the OLD string with
`assert "charter §4" in msg` — a textbook example of "test asserts on stale
external reference". Future review-checklist item: when changing charter
section numbers, grep tests for hardcoded section assertions.

Closes Dispatch's "follow-up PR" item from OPERATOR_INBOX 14:26Z entry.

Co-authored-by: Dispatch (Claude Opus 4.6, canary finder via tech-claude reviewer)
Co-authored-by: Claude Opus 4.7 (1M context, code fix + test verification)
pdurlej removed their assignment 2026-05-02 23:37:02 +02:00
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!28
No description provided.