interactive: pin corgi past the gather_lanes arity fix, with gate coverage - #817
Conversation
|
Follow-up study found the root cause one layer down, and it is smaller than this PR. The bug is corgi's, and it is one line. let arity = sums[0].2.len(); // <- drops lanes the out tags still referenceA shorter source 0 therefore loses lanes the output still names, and It subsumes this PR's DDIR-side reconciliation. With wip#10 patched in and all four
My recommendation: merge wip#10, then reduce this PR to the two test programs plus the pin bump. That is strictly fewer lines and fewer concepts, and it removes a I have also corrected a wrong claim in the fixture comment I pushed earlier. I wrote that The cause underneath both is still open (charter S18): |
ebc55b9 to
8fe4f8a
Compare
A DDIR variant column becomes a corgi `Sum`: a tag column plus one lane per constructor. Nothing carries the declared universe, so each shape derivation infers the arity from what it sees -- `infer_shape_cols` from the batch's tags, `infer_term_shape` from `Inject(tag, _)` as `tag + 1`. A collection holding only `Rare(_)` therefore gets one lane and one holding only `Common(_)` gets two, for the same DDIR type. Concatenating them into one arrangement panicked corgi while vec rendered it fine. frankmcsherry/WIP#10 fixed that where it lives: `gather_lanes` took the output Sum's arity from `sums[0]` while gathering out tags from every source, dropping lanes the tags still named. This bumps the pin onto it and keeps the two programs that found it as gate coverage -- one on the row-wise fallback, one on the compiled path, since both derivations under-approximate. Earlier revisions of this PR reconciled arities DDIR-side in `chunk.rs` at the four sites that read two independently-inferred columns. That is all gone: the corgi fix subsumes it, and dropping the per-merge shape walk is worth ~4% on scc steady-state (4.54s vs 4.72s, median of 3) now that #824/#826 have taken the baseline down to where it shows. Gate 14/14 debug and release; both new programs panic without the pin bump. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168NJWzHwrLGW2RXToGooYP
8fe4f8a to
3dfd4bd
Compare
A DDIR variant column becomes a corgi
Sum: a tag column plus one lane per constructor. Nothing carries the declared universe (Parser.consholds it and discards it after desugaring), so each shape derivation infers the arity from whatever it sees:infer_shape_cols(row-wise path) — from the batch's tagsinfer_term_shape(compiled path) — fromInject(tag, _), astag + 1A collection holding only
Rare(_)therefore getsSum([Some])and one holding onlyCommon(_)getsSum([None, Some])— same DDIR type, two arities. Concatenate them into one arrangement and corgi panicked while vec rendered it fine.frankmcsherry/WIP#10 fixed that where it lives:
gather_lanestook the output arity fromsums[0]while gathering out-tags from every source, dropping lanes the tags still named, sosum_from_primindexed past its own (index out of bounds: the len is 1 but the index is 1).This PR is now just the pin bump plus the two programs that found it — one on the row-wise fallback, one on the compiled path, since both derivations under-approximate and I'd initially claimed only the fallback did.
What changed since the first revision
Earlier revisions reconciled arities DDIR-side in
chunk.rs, at the four sites that read two independently-inferred columns together. All of that is gone. The corgi fix subsumes it, and removing the per-merge shape walk is worth ~4% on scc steady-state — 4.54s vs 4.72s (median of 3). That cost was invisible when the baseline was 17.4s; #824 and #826 took it down far enough to show.Checks
interactivesuite green.master-next(no conflicts — nothing upstream touched these files).🤖 Generated with Claude Code
https://claude.ai/code/session_0168NJWzHwrLGW2RXToGooYP