feat(format): garbage-oracle-v1 + gemm-backward-tiled-v1 6-gate PARTIAL discharge#1404
Closed
noahgift wants to merge 2 commits into
Closed
feat(format): garbage-oracle-v1 + gemm-backward-tiled-v1 6-gate PARTIAL discharge#1404noahgift wants to merge 2 commits into
noahgift wants to merge 2 commits into
Conversation
…AL discharge Bundles two sister contracts: garbage-oracle-v1 (FALSIFY-GO-001..004): - GO-001: valid English/code output not flagged (no false positives) - GO-002: column-major garbage IS flagged (LAYOUT-002 catch) - GO-003: control characters (except \\n, \\t, \\r) flagged - GO-004: empty/whitespace-only output flagged gemm-backward-tiled-v1 (FALSIFY-GEMM_BACKWARD_TILED_V1_001..002): - GEMM-BW-001: ‖dW_tiled - dW_naive‖ < 1e-4 * ‖dW_naive‖ - GEMM-BW-002: A^T^T == A bit-exact (transpose involution) ## Five Whys 1. Why bundle these two contracts? Both peripheral, span the output-quality + backward-pass coverage band; one verdict module captures both without provenance pin overhead. 2. Why does this block ship? Coverage % cannot move while these peripheral contracts are unbound at PARTIAL_ALGORITHM_LEVEL. 3. Why ship a `classify_garbage()` reference helper? GO-001/003/004 all share the same underlying decision rule (control chars, replacement chars, empty/whitespace). Pinning the predicate in-module prevents future drift between the verdict-test classifier and the actual GarbageOracle implementation. 4. Why allow `\n`, `\t`, `\r` but flag other control chars? Per the contract: code/text legitimately contains those whitespace chars. Other control chars (NUL, ETX, EOT, etc.) indicate encoding corruption — the regression class is "tokenizer produced raw bytes that survived UTF-8 decoding." 5. Why relative tolerance for GEMM-BW-001 (not absolute)? Backward GEMM accumulates over batch × hidden dimensions; the absolute error grows with `‖dW‖`. Relative tolerance `< ε * ‖dW_naive‖` captures the right invariant: "tile-mode error is a fixed fraction of signal magnitude," catching regressions like "tiled lost a full block's worth of contribution" while tolerating numerical-rounding drift. Adds 27 unit tests including a 5-bad / 5-good string sweep on classify_garbage. Realistic-healthy walks the canonical clean output + correct backward; pre-fix walks 6 simultaneous regressions. No runtime % shift; algorithm-level coverage advances by 6 gates.
5def1b8 to
cee18fa
Compare
3 tasks
Contributor
Author
auto-merge was automatically disabled
May 12, 2026 09:20
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bundles two sister contracts:
garbage-oracle-v1(FALSIFY-GO-001..004): no false positives, LAYOUT-002 detection, control chars, empty=garbagegemm-backward-tiled-v1(FALSIFY-GEMM_BACKWARD_TILED_V1_001..002): gradient correctness ε, transpose involution27 unit tests including 5-bad / 5-good string sweep on
classify_garbage.Algorithm-level coverage advances by 6 gates; runtime ship % unchanged.
Gates bound
\n,\t,\r) flagged‖dW_tiled - dW_naive‖ < 1e-4 * ‖dW_naive‖A^T^T == Abit-exactReference helper
classify_garbage(text)— pure-Rust deterministic predicate (empty / control chars / replacement char).Five Whys
See commit message — captures
\n/\t/\rallowance, relative tolerance for GEMM-BW-001, and shared classifier rationale.Test plan
cargo test -p aprender-core --lib go_gembw— 27 passed🤖 Generated with Claude Code