Skip to content

Commit e8a83df

Browse files
committed
docs: pythia python#104 + python#105 amendments to Tier 8 spec + CLAUDE.md
Bundle of two theologian-authored doc amendments per supervisor dispositions: CLAUDE.md (+2L) — Pre-Edit WT Integrity 'undiagnosed-recurring' honest framing per pythia python#105 (3) + supervisor 02:13:12Z + theologian 02:13:54Z. Acknowledges 5+ prior incidents closed at SYMPTOM layer without root-cause attribution; this 4-step discipline codifies reactive HALT, not automated detection. Detection still depends on agent noticing mid-edit. Recurrence-prevention claim does not exceed what text mechanizes; automated detection feasibility (file-watcher / git-hook) is fixup PIR territory and remains open. docs/tier8-class-b-cport-migrate-arm-spec.md (+93/-20) — pythia python#104 amendments per theologian 01:38:08Z + supervisor 01:38:26Z + 01:37:05Z: §1.1 container-shape transferability caveat (vector-pilot ≠ hash/ stack/allocator-shape pattern transferability) §5 python#11 NEW: bridge-count-delta acceptance (each pilot must NET- SUBTRACT bridges OR honestly add with W45 fixture coverage) §5 python#12 NEW: Phase B FORCING-FUNCTION (Tier 8 SECOND-PILOT block_map_ Step A BLOCKED until exception_table_ Phase B commit lands) Bundle scope: doc-only, no §3.5 BUILD MODE (no builder*.{cpp,h,c} touched). Atomic per supervisor 02:13:12Z + 01:38:26Z dispositions. Push 28 advances the Tier 8 Phase A resume deadline tracker per theologian 02:13:54Z + supervisor 02:13:12Z (push 28 OR session-end whichever first). If Alex disposition + fixup PIR not received by deadline, theologian amends Phase 3 closure summary fa8dfef to remove Tier 8 pilot citation + re-opens pythia python#103 escape question.
1 parent 03a0dcb commit e8a83df

2 files changed

Lines changed: 95 additions & 20 deletions

File tree

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,5 @@ Multi-file edit sequences (≥2 files) require working-tree integrity discipline
158158
4. **HALT response.** When integrity violation detected, restore to clean HEAD per gate-#3 prescription (librarian 01:46:19Z) + post observed-but-not-attributed report per don't-speculate-on-cause (generalist 01:24:43Z precedent). Surface trigger for supervisor disposition; do NOT auto-resume.
159159

160160
Rationale: 5+ prior incidents (D-1775810621, D-1775669703, D-1776414469, D-1776434533, D-1776887480/D-1776890644) caused gate failures + false BUILD PASS + ARM64 build BLOCK. Per pythia #104 (3): gate #3 (HEAD==binary AND tree-clean during build) is REACTIVE; this discipline is PROACTIVE complement.
161+
162+
**Honest framing per pythia #105 2026-04-24:** This is an UNDIAGNOSED-RECURRING class. The 5+ prior incidents closed at the SYMPTOM layer (build break, gate fail, Alex directive) without confirmed root-cause attribution. This 4-step discipline codifies a reactive HALT — it does not provide automated detection. Detection still depends on the agent noticing mid-edit (which generalist did at 01:23Z without the discipline). Recurrence-prevention claim does not exceed what this text mechanizes; automated detection (file-watcher / git-hook) feasibility is fixup PIR territory and remains open.

docs/tier8-class-b-cport-migrate-arm-spec.md

Lines changed: 93 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@ ELIMINATED. Honest test of the keep-vs-migrate forcing-decision
2828
mechanism vs satisfying §5 by emptying the test set (per pythia #103
2929
critique).
3030

31+
**AMENDMENT per pythia #104 2026-04-24 (container-shape transferability):**
32+
The `exception_table_` pilot validates ONLY the std::vector → typed-
33+
inline-array migration shape. Remaining 3 live Class B containers have
34+
DIFFERENT shapes that the vector-pilot does NOT predict transferability
35+
for:
36+
- `block_map_` is hash-shape (2× std::unordered_map) — needs hash-table
37+
port, structurally different infra
38+
- `static_method_stack_` is stack-shape (jit::Stack<Register*> LIFO) —
39+
needs stack port, different ops
40+
- `temps_` is allocator-shape (TempAllocator class with state) —
41+
needs allocator port, fundamentally different from container
42+
43+
Each remaining container requires its OWN pilot OR explicit
44+
re-validation per shape. Phase A success on `exception_table_` does
45+
not authorize 'pattern proven, do all 4'; full Tier 8 across all
46+
containers requires 4 separate pilot validations or a meta-spec
47+
demonstrating shape transferability.
48+
3149
### 1.2 Out-of-scope
3250

3351
- Porting ALL 4 live Class B containers (multi-Tier-8 workstream;
@@ -94,16 +112,35 @@ Concrete migration shape:
94112
`findExceptionHandler` shims; HIRBuilder no longer touches
95113
exception_table_ at all (PhxHirBuilderState owns it pure-C).
96114

97-
### 3.2 PhxArray prerequisite check
115+
### 3.2 Container infrastructure (corrected per Tier 8 Step A grep)
116+
117+
Original spec assumed generic `PhxArray<T>` template existed; Step A
118+
grep verification (generalist 2026-04-24T01:11:34Z) found only:
119+
- `PhxPtrArray` (void*-only dynamic array; not POD-inline)
120+
- `PhxStateMap` (refcount-specific hash map; not generic)
121+
122+
No generic `PhxArray<T>` template exists. Three options surfaced:
123+
124+
(A) `PhxPtrArray` + per-entry malloc: reuses existing infra; heap
125+
fragmentation + malloc overhead per access.
126+
(B) **NEW `PhxExceptionTable` typed inline-storage struct in
127+
`builder_state_c.{h,c}`**: purpose-built; ~30L new C; no
128+
fragmentation; sets pilot precedent for per-container custom
129+
structs.
130+
(C) Defer pilot, file W47 generic `PhxArray<T>` template: bigger
131+
blast radius; multi-session template-design workstream itself.
98132

99-
Existing PhxArray usage (refcount_pass C-port) covers:
100-
- `PhxArray_push(arr, &elem)` — single-element push
101-
- `PhxArray_size(arr) → size_t`
102-
- `PhxArray_at(arr, i) → T*` (or equivalent index access)
133+
**ADOPTED: (B) per generalist 2026-04-24T01:11:34Z + theologian
134+
2026-04-24T01:12:14Z + supervisor TBD.** Pilot's job is validating
135+
that ONE Class B can be ported, not laying full Tier-8 infrastructure
136+
simultaneously. Per spec §1.2 out-of-scope ('not re-architecting
137+
PhxArray API beyond what pilot needs'), (C) is over-engineered.
103138

104-
If `PhxArray<T>` template is generic enough for `ExceptionTableEntry`
105-
(POD struct), pilot uses existing API as-is. If gaps surface, file
106-
W47 PhxArray-extension spec before pilot Step 1.
139+
Post-pilot consideration: if (B) per-container custom struct (4
140+
containers = ~120L total infra) proves ugly across full Tier 8,
141+
W47 generic `PhxArray<T>` template SUPERSEDES via bulk refactor.
142+
(B) does not preclude (C); it sequences pilot first, generalization
143+
second.
107144

108145
---
109146

@@ -164,18 +201,54 @@ Tier 8 pilot closure requires ALL:
164201
single bench <0.5x absolute).
165202
9. W45 §3.5 Fixture 3 amended to target C-side struct; still
166203
triggers build-fail.
167-
10. **Substantive C++-line burndown:** Phase 3 added +257L (B1-B6).
168-
Tier 8 pilot must net-subtract enough that Phase 3+Tier-8
169-
cumulative ≤ +0L (validates 'transitional foundation cost paid
170-
back' framing, not 'permanent +257L scaffold').
171-
172-
Estimated subtraction from pilot:
173-
- 4 bridge impl bodies (~80L total, builder.cpp/builder_state_c.c)
174-
- 4 bridge decls (~20L, builder_state_c.h)
175-
- C++ struct + field + 2 method shims (~50L, builder.h + builder.cpp)
176-
- Total estimate: ~-150L (could bring B1-B6 +257L closer to ~+107L
177-
cumulative; full Tier-8 across all 4 Class B containers projects
178-
net-negative)
204+
10. **Substantive C++-line burndown (LINE delta):** Phase 3 added
205+
+257L (B1-B6). Pilot must net-subtract proportionally to its
206+
container scope; cumulative ≤+0L is the FULL Tier-8 endpoint
207+
(all 4 live Class B containers ported), NOT single-pilot
208+
endpoint per theologian 2026-04-24T01:14:29Z amendment.
209+
210+
Estimated per-container subtraction:
211+
- exception_table_ pilot ~-48L (~19% of Phase 3 +257L); pure-
212+
C container infra cost (~+25L PhxExceptionTable) offsets some
213+
bridge deletion (~-73L)
214+
- block_map_ ~-50L (1 bridge + hash port)
215+
- static_method_stack_ ~-30L (1 bridge + Stack port)
216+
- temps_ ~-50L (1 bridge + alloc port)
217+
- Full Tier 8 projection ~-180L cumulative; Phase 3+full-Tier 8
218+
~+77L; further surface elimination beyond Class B (HirBuilder
219+
C++ class shim) needed for ≤+0L absolute.
220+
221+
11. **Bridge-count delta acceptance (NEW per pythia #104 2026-04-24
222+
+ supervisor 01:37:05Z):** Each Tier 8 pilot must NET-SUBTRACT
223+
bridges (or honestly add NEW bridges with W45 fixture coverage
224+
same-commit). Closes 'Phase A adds helper bridges silently'
225+
blind spot.
226+
227+
For exception_table_ pilot Phase A:
228+
- Net bridge delta = -3 (delete push_cpp + size_cpp + entry_cpp;
229+
keep find_exception_handler_c as algorithmic port)
230+
- If Phase A adds ANY new helper bridges to port buildHIRImpl:1198
231+
or emit_call_method_exception_handler_inline_c:2883, those
232+
MUST appear in the same commit's W45 fixture set + bridge-count
233+
delta becomes (-3 + new_count); spec acceptance requires net
234+
negative
235+
- W27a/W27b ZERO-new-bridge precedent (D-1776903189, D-1776904264)
236+
is the structural target — pilot should not silently break it
237+
238+
12. **Phase B FORCING-FUNCTION (NEW per pythia #104 + supervisor
239+
01:37:05Z):** Tier 8 SECOND-PILOT (block_map_) Step A is
240+
BLOCKED until exception_table_ Phase B commit lands. Phase B
241+
deletes C++ findExceptionHandler + parseExceptionTable shims +
242+
rewires builder.cpp:1198 + 2883 callers to PhxExceptionTable
243+
direct.
244+
245+
Rationale: prevents 'Phase B never lands' keep-bias-one-layer-
246+
deeper risk. Without forcing function, kept-shim-with-
247+
PhxExceptionTable-internals replaces kept-vector — identical
248+
retraction-debt shape with fresh _cpp surface stacked atop.
249+
Block_map_ pilot represents the next opportunity to validate
250+
migrate-arm; gating it on Phase B closure ensures no
251+
half-migration accumulates.
179252

180253
---
181254

0 commit comments

Comments
 (0)