Repository navigation
Conversation
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.
Spike for #4940 (Wildcard Track): an executable verification of the proposal "Compile the extra subtotals that keep a future regrouping exact after a task discards its input", plus the four artifacts the proposal did not produce.
What this spike does
Standalone directory
spikes/w4940-subtotal-regrouping/(no Hybrid language or compiler change):plan.py- the generator. Grouping-driven, not calendar-driven: it walks each producer cell (Monday-Sunday weeks clipped to the year) in day order, splits it into maximal runs of equal consumer label (calendar months), and saves the prefix subtotal ending at every run boundary but the last.checker.py- a plan checker independent of the generator (no shared code; the groupings are the shared input, the algorithms are not). It decides determinacy per producer cell by exact rational linear algebra, replays recovery against direct totals, proves every saved subtotal necessary with a concrete ablation witness pair, and derives its own lower bound - rank([P;C]) - rank(P) - the minimum over ALL scalar linear measurements, not just prefixes.emit_go.py+emitted/- plain Go for the weekly reducer and the recovery function for the 2026 fixture, generated from the verified plan, with the int64 overflow contract stated up front.fiscal.py- the second-consumer experiment the issue asks for: can the summary compiled for calendar months answer fiscal periods starting on the 15th?baseline.py- the both-totals comparison (state, operations, auditability).Reproduced numbers (the proposer's pre-registered claims)
The four additions beyond the proposal
Verification level, honestly
Python side fully executed:
python3 report.pyends with ALL CHECKS PASSED;python3 -m unittest discover -s testsruns 15 tests, all passing. The emitted Go has also been compiled and run for real: the three emitted files were combined into a single main package and executed in the Go Playground (Go 1.27) on 2026-11-29. It compiled with no errors and printed exactly the expected demonstration output (weekly totals identical: true; extra subtotals identical: false; Jan 31 input -> monthly [1 0 0 0 0 0 0 0 0 0 0 0]; Feb 1 input -> monthly [0 1 0 0 0 0 0 0 0 0 0 0]). The machine that produced this spike has no Go toolchain, so the in-repo module build still rests on repository CI; the construction is additionally verified by a test that parses the emitted tables back and replays the Go code's exact operations on basis and random inputs.Full write-up:
spikes/w4940-subtotal-regrouping/RESULTS.md.