From 05ced5d94dfb25281435a6ea40894212c429640e Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 23 Jun 2026 20:35:00 -0400 Subject: [PATCH] conductor(registry): Add C11 reference track row to tracks.md Row 29b added: C11 Reference (Pass 3 Sub-Track) - 2026-06-23. 4 cluster sub-reports + 1 main c11_convention.md + tracks.md update. PRIMARY sources = Pikuma duffle (9 headers) + forth bootslop attempt_1 (4 files) + forth references (2 files) + gte_hello (2 files). FALLBACK = raddebugger/src/base (5 headers). The C11 reference synthesizes the user's idiomatic C11 with the raddbg fallback for patterns duffle doesn't cover. The per-language << / >> rendering for C11 is included. --- conductor/tracks.md | 1 + .../research/cluster_3_raddbg_src_base.md | 241 ++++++++++++++++++ 2 files changed, 242 insertions(+) create mode 100644 conductor/tracks/video_analysis_deob_c11_reference_20260623/research/cluster_3_raddbg_src_base.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 0cb9b109..dd7f4c33 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -67,6 +67,7 @@ Tracks that are unblocked and ready to start. Ordered by **dependency** (blocked | 28 | A | [Any-Type Componentization (Promote dict[str, Any] to dataclass(frozen=True))](#track-any-type-componentization-promote-dictstr-any-to-dataclassfrozentrue) | spec Γ£ô, plan Γ£ô, metadata Γ£ô, state Γ£ô, **shipped 2026-06-21** with 48/89 fat-struct sites promoted (Phases 1, 2, 4, 5 complete); Phase 3 (`provider_state` call-site migration in `ai_client.py`) DEFERRED to a separate track; 1 runtime bug surfaced (`HookServer.broadcast()` callers in `app_controller.py` + `events.py`); not merged; reconnaissance for `code_path_audit_20260607`; tier2 branch at 24 commits | (none ΓÇö independent; **NEW 2026-06-21**; refactor + ai-readability + type-safety; ships: 3 new modules (`src/mcp_tool_specs.py`, `src/openai_schemas.py`, `src/provider_state.py`); 2 new audit scripts (`scripts/audit_dataclass_coverage.py` + `--strict` mode); styleguide `conductor/code_styleguides/type_aliases.md` ┬º12 "When to Promote TypeAlias to dataclass"; type-registry regenerated; 130+ tests pass; **input artifact**: `docs/reports/ANY_TYPE_AUDIT_20260621.md`; **handoff docs**: `docs/handoffs/PROMPT_FOR_TIER_1.md` + `HANDOFF_FOLLOWUP_TRACK_FROM_any_type_componentization.md` + `HANDOFF_CODE_PATH_AUDIT_FROM_any_type_componentization.md`) | | 29 | A (research) | [Video Analysis De-obfuscation Campaign (Pass 2 of 3)](#track-video-analysis-deob-20260621) | spec ✓, plan ✓, **5 folders scaffolded (1 umbrella + 1 warmup + 3 phase children); Pass 2 of 3 (de-obfuscation)**; **awaits USER action item**: gather 3-10 samples of past de-obfuscation notes into `video_analysis_deob_warmup_20260621/samples/`; warmup produces `report.md` + `prompt_template.md`; lexicon child refines; pilot child validates on 2 videos (`cs229_building_llms` + `entropy_epiplexity`); apply child applies to 10 + synthesis; multi-layer deliverable per video: translation + replacement + decoder | (none — independent; **NEW 2026-06-21**; multi-track research campaign; **de-obfuscation philosophy**: constructive type theory + Wildberger-style finitism + boundedness for knowledge + cycles/iteration explicit + etymology-aware; 4 verification criteria (lossless, bounded, constructively typed, etymology-cited); supersedes Pass 1 spec §11.1; consumed by Pass 3 (projection to applied domain, future user-led); **load-bearing directive**: Pass 1 artifacts must remain lossless because Pass 2 de-obfuscation consumes them as raw input) | | 29a | A (research) | [Lexicon v2 Patch (Pass 2 Phase 1.5)](#track-lexicon-v2-patch-pass-2-phase-15-2026-06-23) | spec ✓, plan ✓, metadata ✓, state ✓, README ✓, V2_CHANGELOG ✓, **spec DRAFT pending user review**; targeted corrective pass after Pass 2 SHIPPED; 5 source files updated + 1 changelog; 8 corrections (L1-L8) + 3 DEFERRED refinements (R1, R4, R6) + 4 template notations (TN1-TN4: B default, C++ opt-in, Odin opt-in, Jai opt-in) + 2 `<<` / `>>` placements (<<1, <<2) + 1 per-language rendering section (<<3); encoding default changed from `float64` to placeholder scheme (`float` general, `integer` general, `Scalar` linear/geo/tensor alg, `float64` resolved); 76 terms in v2 (was 72); v1 state preserved in git history; 33 deliverables + 2 reports NOT re-processed (intermediate artifacts; Pass 3 will use v2) | `video_analysis_deob_apply_20260621` (SHIPPED 2026-06-23, commit 8f2e8a69) | (**NEW 2026-06-23**; **post-apply corrective pass**; not exhaustive; 7 atomic commits planned; Pass 3 (the C11/Python projection) is the next user-led track and will use v2; the 5 DEFERRED gaps are deferred to lexicon v3) | +| 29b | A (research) | [C11 Reference (Pass 3 Sub-Track)](#track-c11-reference-pass-3-sub-track-2026-06-23) | spec ✓, plan ✓, metadata ✓, state ✓, README ✓, **in progress**; 4 cluster sub-reports + 1 main c11_convention.md + tracks.md update; PRIMARY sources = Pikuma duffle (9 headers) + forth bootslop attempt_1 (4 files) + forth references (2 files) + gte_hello (2 files); FALLBACK = raddebugger/src/base (5 headers); the C11 reference synthesizes the user's idiomatic C11 (byte-width types, underscore-suffixed type modifiers, hand-rolled DSL, memory ordering vocabulary, slice + arena, design-doc headers) with the raddbg fallback for patterns duffle doesn't cover (U64/S64, Vec2F32/Vec3S32, String8, force_inline, etc.); the per-language `<<` / `>>` rendering for C11 is included (much_less / much_greater / weakly_coupled with tolerance) | `video_analysis_deob_apply_20260621` (SHIPPED 2026-06-23) + `video_analysis_deob_lexicon_v2_20260623` (SHIPPED 2026-06-23) | (**NEW 2026-06-23**; Pass 3 sub-track; 6 atomic commits planned; hands off to Pass 3 as the primary C11 style guide; per user 2026-06-23: 'use the forth bootslop and pikuma then. Use raddbg's base for stuff missing. otherwise go for jai/odin.') | **Note on numbering:** the legacy file used `0a`, `0b`, `0c`... and `0d`, `0e`, `0f`, `0g` for tracks created 2026-06-06+. This is the **git-blame sort order**, not a logical execution order. The new structure re-orders by dependency. diff --git a/conductor/tracks/video_analysis_deob_c11_reference_20260623/research/cluster_3_raddbg_src_base.md b/conductor/tracks/video_analysis_deob_c11_reference_20260623/research/cluster_3_raddbg_src_base.md new file mode 100644 index 00000000..405e6b49 --- /dev/null +++ b/conductor/tracks/video_analysis_deob_c11_reference_20260623/research/cluster_3_raddbg_src_base.md @@ -0,0 +1,241 @@ +# Cluster 3: raddebugger/src/base (FALLBACK — the "base" for stuff missing) + +**Track:** `video_analysis_deob_c11_reference_20260623` +**Date:** 2026-06-23 +**Files audited:** 5 (base_core.h, base_arena.h, base_math.h, base_memory.h, base_hash.h) +**Role:** FALLBACK (raddbg is the "base" for patterns duffle doesn't cover) + +> **Reading guide.** This cluster sub-report surveys raddebugger's `base/` layer. raddebugger has a different style from duffle (CamelCase types, `internal`/`global`/`local_persist` keywords, the `read_only` section attribute). It's used as the FALLBACK for patterns duffle doesn't cover: 64-bit types (U64/S64), bigger vector types (Vec2F32/Vec3S32), string types (String8), and the codebase-keyword pattern. + +--- + +## File inventory + +| File | LOC | Role | +|---|---|---| +| `base_core.h` | 1135 (read 120) | The core base layer: types, keywords, optimization, platform | +| `base_arena.h` | 93 | Arena allocator (the raddbg style) | +| `base_math.h` | 750 (read 100) | Vector and math types (CamelCase style) | +| `base_memory.h` | 20 | Memory allocation primitives | +| `base_hash.h` | 48 | Hash types (MD5, SHA1, SHA256) | + +--- + +## §1. The raddbg style (different from duffle) + +The raddbg codebase uses: + +```c +#define internal static +#define global static +#define local_persist static + +#if COMPILER_MSVC || (COMPILER_CLANG && OS_WINDOWS) +# pragma section(".rdata$", read) +# define read_only __declspec(allocate(".rdata$")) +#elif (COMPILER_CLANG && OS_LINUX) +# define read_only __attribute__((section(".rodata"))) +#else +# define read_only +#endif + +#if COMPILER_MSVC +# define thread_static __declspec(thread) +#elif COMPILER_CLANG || COMPILER_GCC +# define thread_static __thread +#endif + +#if COMPILER_MSVC +# define force_inline __forceinline +#elif COMPILER_CLANG || COMPILER_GCC +# define force_inline __attribute__((always_inline)) +#endif + +#if COMPILER_MSVC +# define no_inline __declspec(noinline) +#elif COMPILER_CLANG || COMPILER_GCC +# define no_inline __attribute__((noinline)) +#endif +``` + +**Differences from duffle:** + +| Aspect | duffle | raddbg | +|---|---|---| +| Force inline | `FI_` | `force_inline` | +| No inline | `NI_` | `no_inline` | +| Internal linkage | `internal` | `internal` | +| Global data | `global` (mark) | `global` (mark) | +| Read-only | `RO_` (section attribute) | `read_only` (MSVC + section attribute) | +| Thread-local | (not in duffle) | `thread_static` | +| Type widths | `U1`/`U2`/`U4` (PS1-32-bit) | `U8`/`U16`/`U32`/`U64`/`U128` (full-width) | +| Vector types | `V2_S2`/`V3_S4` | `Vec2F32`/`Vec3S32` | +| String type | `Str8` (in memory.h) | `String8` (in base_strings.h, not in base) | +| Opt pattern | `opt_(name, ...)` (designated init) | `name(...)` (variadic args) | + +**Why the differences:** the raddbg is a cross-platform Windows/Linux/Mac codebase; the duffle is PS1-specific. The raddbg uses CamelCase types (the Epic Games Tools style); the duffle uses snake_case with byte-width suffixes. + +**For Pass 3:** when the duffle doesn't have a pattern, use the raddbg fallback. Document the raddbg-style name explicitly. + +--- + +## §2. The `StaticAssert` pattern (raddbg) + +```c +StaticAssert(sizeof(Arena) <= ARENA_HEADER_SIZE, arena_header_size_check); +``` + +The raddbg uses `StaticAssert` (CamelCase). The duffle uses `static_assert` (snake_case, the C11 standard). + +**Why:** the raddbg's `StaticAssert` is a macro that wraps `_Static_assert` (with a different name to avoid collisions with the C11 standard). The duffle's `static_assert` is just an alias for `_Static_assert`. + +**For Pass 3:** use `static_assert` (the C11 standard) for compile-time assertions. If integrating with raddbg, use `StaticAssert`. + +--- + +## §3. The `arena_alloc_` + `arena_alloc(...)` pattern (raddbg) + +```c +internal Arena *arena_alloc_(ArenaParams *params); +#define arena_alloc(...) arena_alloc_(&(ArenaParams){.reserve_size = arena_default_reserve_size, .commit_size = arena_default_commit_size, .flags = arena_default_flags, .allocation_site_file = __FILE__, .allocation_site_line = __LINE__, __VA_ARGS__}) +``` + +**Why:** the raddbg's `arena_alloc(...)` macro is a variadic wrapper around `arena_alloc_` that: +1. Constructs an `ArenaParams` struct on the stack using designated-initializer syntax +2. Captures the call site (`__FILE__`, `__LINE__`) for debugging +3. Passes the struct to `arena_alloc_` + +This is a more sophisticated pattern than the duffle's `FArena`. It includes the call site for debugging, and uses a designated-initializer syntax for the options. + +**For Pass 3:** if a video involves per-call-site debugging (assertions, allocations, etc.), follow this pattern. The macro captures `__FILE__` and `__LINE__` for the error message. + +--- + +## §4. The raddbg math types (`Vec2F32`, `Vec3S32`, etc.) + +```c +typedef union Vec2F32 Vec2F32; +union Vec2F32 +{ + struct + { + F32 x; + F32 y; + }; + F32 v[2]; +}; + +typedef union Vec3S32 Vec3S32; +union Vec3S32 +{ + struct + { + S32 x; + S32 y; + S32 z; + }; + struct + { + Vec2S32 xy; + S32 _z0; + }; + struct + { + S32 _x0; + Vec2S32 yz; + }; + S32 v[3]; +}; +``` + +**Why:** the raddbg uses unions for SIMD / swizzling. The `Vec3S32` has 3 views: +1. `x, y, z` (component access) +2. `xy, _z0` (swizzled: vec2 + scalar) +3. `_x0, yz` (swizzled: scalar + vec2) +4. `v[3]` (array access) + +**For Pass 3:** if a video involves SIMD / vector math, use the union pattern. The raddbg style is more idiomatic for SIMD than the duffle's struct-only style. + +--- + +## §5. The raddbg MD5/SHA types (`base_hash.h`) + +```c +typedef union MD5 MD5; +union MD5 +{ + U8 u8[16]; + U16 u16[8]; + U32 u32[4]; + U64 u64[2]; + U128 u128; +}; +``` + +**Why:** the raddbg's MD5 type has 5 views: +1. `u8[16]` (byte access) +2. `u16[8]` (16-bit access) +3. `u32[4]` (32-bit access) +4. `u64[2]` (64-bit access) +5. `u128` (128-bit access) + +This is the same union pattern as `Vec3S32`. Multiple views for the same memory. + +**For Pass 3:** if a video involves hash functions or fixed-size byte arrays, follow the raddbg's union pattern. + +--- + +## §6. The raddbg `//- rjf:` comment style + +The raddbg uses `//- rjf:` prefixes for section comments (where `rjf` is the author's initials): + +```c +//- rjf: arena creation/destruction +internal Arena *arena_alloc_(ArenaParams *params); +//- rjf: arena push/pop/pos core functions +internal void *arena_push(Arena *arena, U64 size, U64 align, B32 zero); +``` + +**Why:** the `//-` prefix is for collapsible comments (the IDE treats them as section markers). The `rjf` initials are the author's; the duffle doesn't use author initials. + +**For Pass 3:** the comment style is the user's. The duffle uses `// ====` blocks; the raddbg uses `//-` comments. Either is acceptable. + +--- + +## §7. The raddbg `~ rjf:` block comment style + +The raddbg uses `//~ rjf:` for top-level block dividers: + +```c +//////////////// +//~ rjf: Foreign Includes + +#include +#include + +//////////////// +//~ rjf: Third Party Includes + +#define STB_SPRINTF_DECORATE(name) raddbg_##name +``` + +**Why:** the `//~` prefix is for major section dividers. The `rjf:` is the author + comment. + +**For Pass 3:** the duffle uses `// ============================` (equal signs). Either is acceptable. + +--- + +## §8. Summary + +The raddbg is the FALLBACK for patterns duffle doesn't cover: +- 64-bit types (`U64`/`S64`/`U128`/`F32`/`F64`/`B32`) +- Bigger vector types (`Vec2F32`/`Vec3S32`) +- String types (`String8`) +- Per-call-site debugging patterns +- SIMD union patterns + +When the duffle doesn't have a pattern, fall back to the raddbg style. Document the raddbg name explicitly. + +--- + +*End of `cluster_3_raddbg_src_base.md`. 8 sections. ~120 LOC. FALLBACK (raddbg base).*