Skip to content

test(c-host): a real C host gets exact payments, and the wide-intermediates slice closes (§9-73) - #343

Merged
xzawed merged 3 commits into
mainfrom
feat/wide-intermediates-close
Sep 26, 2026
Merged

xzawed merged 3 commits into
mainfrom
feat/wide-intermediates-close

Conversation

@xzawed

@xzawed xzawed commented Sep 26, 2026

Copy link
Copy Markdown
Owner

What

SPEC-wide-intermediates §6 task 2 — acceptance F and I, and the slice closes. Follows #341 (SPEC) and #342 (codegen).

  • F (DP-W11 — one expression of an existing example, fingerprint unchanged). None of the six examples whose codegen changed has an expression whose middle alone overflows (all six bodies read). examples/schedule.mls one_payment is now the difference of two cumulative shares, principal * (month + 1) / months - principal * month / months. At 1,000,000,000 over 12 months principal * (month + 1) leaves int32_t from month 2 on while every payment fits. hosts/c-host/host.c asserts one_payment(1e9, 12, 2) == 83333334, twelve payments summing to the principal, and the domain error at month 12.
    • Price: the remainder is spread one unit at a time instead of folded into month 0 (array_return.rs pins the new values; the parts still sum to the principal, and every payment fits i32 for every input).
  • I — 626 rows. mlprobe built from main (b077cb9) answers all 626 rows exactly as the PURE+CALL prototype: 543 correct / 44 silent / 20 -3-though-it-fits / 18 other, 0 unjudged. The 48,000-call random differential relies on the prototype's env switch and was not re-run — the sample for I is the 626 rows.
  • Size (§0.4 promised a re-measure for PURE+CALL): example .text total 95,334 → 95,472 (+138), six modules, −123..+192 — equal to the PURE numbers. schedule with the new one_payment: 3640 → 3656.
  • Close: SPEC banner (확정 · 구현 완료), index ✅, candidate removed, §9-73 record, HISTORY stub, ▶ entry; the 2026-09-26 (6) entry moved byte-for-byte to start-block-054.md.

Evidence (E2)

  • F discriminates: the same host.c against the pre-slice codegen (8438cf9) fails exactly the two new checks (GATE_D_FAILED (2)); the domain check passes.
  • Full local gate (MATHLESS_GATE_D/FPC/FPC_HOST=require): 704 passed, 0 failed on 73253a1. array_return 13/13 and doc_claims 50/50 on the head.
  • The moved ▶ block: staged blob equals lines 230–250 of STATUS.md at b077cb9.

Grok verify (single claims, REVIEW ONLY)

  • Moved block byte-identical — CONFIRMED (same blob hash f1024a5…).
  • one_payment values [14285, 14286, 14286, 14285, 14286, 14286, 14286], sum 100000, and 83333334 — CONFIRMED (recomputed).
  • host.c block matches the golden header's signature, the int32 sum cannot overflow, and the comment's "from month 2 on" — CONFIRMED.
  • Slice-close consistency (SPEC banner, index, candidates, STATUS ▶, HISTORY stub) — CONFIRMED.
  • §9-73 numbers vs SPEC §0.2/§0.4 — CONFIRMED.
  • Unasked findings, checked against the code:
    • array_return never reached an overflowing product → added the F input to the Rust oracle.
    • "42 rows changed" vs a net category movement of 39 → the record now says 42 counts outputs.
    • if (one_payment) skips on a NULL symbol → sym() already counts a missing symbol as a failure (host.c 390–396).

🤖 Generated with Claude Code

xzawed and others added 3 commits September 27, 2026 02:04
…ts payments whose products leave int32_t

SPEC-wide-intermediates acceptance F (DP-W11: one expression of an existing example, the
fingerprint unchanged). one_payment is now the difference of two cumulative shares,
principal * (month + 1) / months - principal * month / months. At 1,000,000,000 over 12
months the products leave int32_t from month 2 on while every payment fits; the pure tree is
computed exactly, so host.c receives 83333334 for month 2 and twelve payments that sum to the
principal. The remainder is spread instead of folded into month 0 (array_return.rs updated).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ype, sizes equal §0.4 (§9-73)

Acceptance I: mlprobe built from b077cb9 answers all 626 rows exactly as the PURE+CALL
prototype (543 / 44 / 20 / 18, 42 rows changed against main). The example .text sizes equal
the PURE measurement (95,334 -> 95,472). SPEC banner, index row and candidate list close the
slice; the session record is §9-73, and the 2026-09-26 (6) start block moved byte-for-byte to
start-block-054.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… says which 42 it counts

Grok verify (unasked): array_return's one_payment test never reached a product outside i32,
so only the four-minute C host would catch a regression — it now asserts (1e9, 12, 2) =
83333334 as well. The record's "42 rows changed" counts OUTPUTS; the category table's net
movement is 39.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xzawed

xzawed commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

⚠️ AI 리뷰가 완전 검증되지 않음 — 기본값이 적용됐습니다(비활성/API 키 없음/빈 diff). AI 배점은 측정값이 아니므로 총점을 부분 점수로 보세요.
ℹ️ 범용 검사기만 본 언어 포함: rust — 이 배포에서 해당 언어의 전담 분석기가 하나도 실행되지 않아, 다언어 범용 분석기 하나에만 기대었습니다. 그 규칙 밀도는 언어마다 편차가 큽니다 — 여기서의 만점은 "깨끗함" 이 아니라 "거의 검사 안 됨" 입니다 — AI 리뷰와 수동 검토로 보완하세요.

🔵 SCAManager 분석 결과

총점: 89/100 (등급 B)

점수 상세

항목 점수 만점
커밋 메시지 13 15
코드 품질 25 25
보안 20 20
구현 방향성 (AI) 21 25
테스트 10 15

@xzawed
xzawed merged commit c70e02d into main Sep 26, 2026
2 checks passed
@xzawed
xzawed deleted the feat/wide-intermediates-close branch September 26, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant