Files
BFM-decomp/phase-ends/current/tasks/T6.md
T

4.4 KiB

T6 — lying declarations to 0 outside the ledger

Status: done | expert: expert-opus55 | ctx-at-completion: n/a | commit: see COMMIT | coder runs: c1 opus55 partial (6eb926af83), c2 opus55 done (9aa5887362) Done: lying 229 → 11, all 11 ledgered in config/lying_exceptions.tsv (3 callees, 4 rows); 22 of 25 (callee, def_file, kind) groups drawn by restruct rung D (def + all callers, C0508), R22 218/218; check-structs 0. progress: readability snapshot 'P3.39 T6: lying declarations ledgered (229 -> 11 ledgered)' at 9aa588736; timeline (82 rows) and README regenerated in the T6 commit. Files:

  • src//*.c, src/shared//*.h — caller declarations redrawn to the real prototype (~1,600 files, c1 ad4c0f60b1..6eb926af83, c2 e2b6ad8c09..7e55b9e83a); in-TU unalias src/ov_SC03_002/ov_SC03_002_jr_8018431C.c:3695-3703, src/ov_SC03_014/ov_SC03_014_jr_801848E4.c:5811,6137-6150
  • tools/restruct.py — rung D: alias-def lookup (aF asm labels), caller-only unit (def already spelled → not edited/judged), shared-header def scope = includers' tu_aliases, no-op decl skip, decl_sites skips asm-label decls; selftest 109/109 (+ corpus copy)
  • config/lying_exceptions.tsv — 4 rows (T6)
  • docs/ops/p39-t6-2026-10-02-restruct-rung-d-callers.md, docs/ops/INDEX.md — H7 note
  • README.md, docs/progress*.{json,md}, docs/readability*, docs/story-timeline.*, docs/struct-map.md — D1 regeneration Decisions:
  • Lying decls are drawn as per-callee --callee/--signature [--all-defs|--tu] units; --plan --rung D does not see them (0 units, even with --redraw).
  • Ledgered: func_8012BD14 (narrow + K&R-empty) and func_8012CBF4 (narrow) ZERO-ARG-CALLERS (callers use the result of a zero-arg call, e.g. ov_SC04_015_jr_8017AE2C.c:4566, so a prototype is a compile error); func_80014CF8 (src/800.c, K&R-empty) PROTO-DIFFERS ov_MAIN_012 jr_801458E0.o.
  • binding: a lying declaration stays only with a config/lying_exceptions.tsv row whose cause is byte evidence from a real judgement (compile error or DIFFERS object), never untried. Deviations:
  • Plan verify type_census --check-casts --quiet exits 1 by design while raw residue exists (reading A: raw P/I/X/M are covered RESIDUAL, gated by --residue); its lying clause reads lying=11 (ledgered 11). The reading-A gate --check-casts --residue --quiet exits 0.
  • restruct.py changed beyond the brief (5 fixes, see Files), needed to express caller-only units on alias defs.
  • c1 stopped at context threshold; c2 finished from its progress file (archived logs/T6.c1.progress1.md).
  • func_80014CF8's DIFFERS comes from c1's run, before c2's tu_aliases fix; the fix changes binary scope only, not the caller object that differed. Findings:
  • 17 of the 24 callees were aF<addr> asm-label aliases whose K&R-empty decls sat in caller TUs; their latest D rows were DECL-NONE because the planner keys by the real name.
  • c1's first asm-decl regex respelled three !FAKE barrier declarations of aF8014C4AC (restored 5060c15679, make check green) — a rung-D decl rewrite must skip asm-label declarations.
  • T11's restruct_cycle.sh:66 stale census dir: not touched here (no cycle used); the D1 chain ran census into .run/P39/census by hand. Left for T9. Gotchas:
  • generalizable: a function defined in a shared header must be judged on every binary its includers build (a source can build two binaries, ov_SC01_005 → ov_SC01_006); scoping by includer path misses one and fails as "conflicting types".
  • generalizable: a K&R-empty declaration can be load-bearing when callers call with zero args and use the value; the prototype is a compile error, so the lie is a source fact to ledger, not to draw.
  • harness: a coder's heredoc left a junk file at repo root named after a shell fragment; git status at close catches it. Research: none Next task needs: lying 11 all ledgered (4 rows); --check-casts --residue rc 0 at 9aa5887362; T9 owns the restruct_cycle.sh census-dir fix (T11 finding); restruct selftest --real red after these commits until recalibration. Verified: PY tools/type_census.py --check-casts --quiet → lying=11 (ledgered 11), unbacked 0, rc 1 on raw residue only; PY tools/type_census.py --check-casts --residue --quiet → uncovered P=0 I=0 X=0 M=0, rc 0; PY tools/type_census.py --check-structs --quiet → OK conflicting_types=0, rc 0 (.run/logs/t6_verify.log); R22 make clean && make extract-all JOBS=16 && make check-all JOBS=16 → 218 passed 0 failed (c2, logs/T6.c2.md) Full log: phase-ends/current/logs/T6.md