Conversation
There was a problem hiding this comment.
Pull request overview
Adds backlog row B-0196 to track research on arbitrary-precision numerics in Zeta, framing it as a survey-and-decision item rather than an implementation change. This fits the repo’s backlog substrate by recording a new research question and surfacing it in the generated backlog index.
Changes:
- Adds a new P2 backlog row for BigInteger / BigRational / BigDecimal / BigFloat / SRTP-generic numerics research.
- Defines acceptance criteria, candidate risk sites, and decision branches for follow-up work.
- Regenerates
docs/BACKLOG.mdto include the new row in the P2 index.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
docs/backlog/P2/B-0196-bigint-and-bignumber-integration-aaron-2026-05-05.md |
New backlog row describing the numerics-integration research scope, baseline, falsifiers, and related backlog links. |
docs/BACKLOG.md |
Generated backlog index updated to list B-0196 under P2. |
…Gamma + tools/z3->tools/Z3Verify + + bullet + BayesianAggregate Checked correction (#1595 reviewer) Seven reviewer threads addressed: 1. **Bidirectional composes_with** (per tools/backlog/README.md:69-70): added B-0196 to B-0140, B-0156, B-0189, B-0194's composes_with lists. B-0140 + B-0156 had no composes_with field; created. 2. **`+` continuation bullet** at line 139 broke markdownlint MD007 (parsed as nested + list). Changed `+ provides a count` to `AND provides a count`. 3+5. **NormalGamma -> NormalInverseGamma**: BayesianAggregate.fs has NormalInverseGamma, not NormalGamma. Sed-corrected at all occurrences. 4. **BayesianAggregate Checked.* survey baseline**: reviewer correctly noted BayesianAggregate.fs has no Checked.* arithmetic guards (only one doc-comment mention). The original subagent's listing was wrong. Corrected with explicit acknowledgment + note that Bayesian surfaces use double arithmetic without checked guards (different shape from int64- overflow risk; relevant to BigRational candidate, not BigInteger). 6. **Units.fs cross-reference**: was stale at PR time. Now resolves on main since #1590 merged. 7. **tools/z3/ -> tools/Z3Verify/**: corrected dead path reference. Regenerated docs/BACKLOG.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…gration -- substrate survey + per-class adoption recommendation (Aaron 2026-05-05) Aaron 2026-05-05 verbatim "oh backlog bigint and other bitnumbers integration" -- surfaced after a reviewer caught int64 overflow in Units.msToNs (PR #1590, fixed via Checked.(*) + 3 overflow tests). The msToNs case is one instance of a broader question this row owns: should Zeta support arbitrary-precision integers (BigInteger), arbitrary-precision rationals (BigRational), arbitrary-precision decimals (BigDecimal), and arbitrary-precision floats (BigFloat / MPFR-style) for cases where int64 / double overflow or precision- loss is in the operating regime? Research + plan row, NOT implementation. Output is a survey + per- numeric-class adoption recommendation; doing any swap that turns out to be warranted is a separate row filed downstream. Five concrete shapes covered: BigInteger (.NET System.Numerics), BigRational (exact probability arithmetic), BigDecimal (financial, LFG context), MPFR-style BigFloat (scientific), and SRTP-based generic numerics (numeric type-class abstraction). Acceptance criteria with falsifiability hooks: - (a) Substrate survey -- baseline numbers in row: ~470 raw int64|float|double mentions in src/Core, 40 Checked.* arithmetic guard sites across 12 files. - (b) Risk-site identification -- 5 starting candidates each with operating regime + falsifier: msToNs, Z-set weight aggregation, IndexedZSet bilinear delta product, BayesianAggregate (BetaBernoulli / NormalGamma / DirichletMultinomial), TimeSeries window arithmetic. - (c) Decision -- per-class adoption vs system-wide generic-numerics refactor vs defer-until-second-overflow-site (carved-sentence default). - (d) F# UoM compatibility note -- BigInteger likely not on the F# spec's allowed-measure-types list; needs WebSearch verification per Otto-364 search-first authority. Carved sentence: *"Pick numerics by where the regime fires; per- class adoption beats a system-wide refactor until the second overflow site lands. The msToNs fix is a Checked-throws guard, not yet a BigInteger argument; the second site is the trigger."* Composes with B-0140 / B-0156 (TS+Bun BigInt sister), B-0189 (Q# Bayesian -- where precision matters), B-0194 (capability dispatcher -- where the bilinear-product overflow lives). P2 (not P1, not P3): higher than P3 because real trigger (PR #1590 reviewer caught overflow) and Aaron explicitly named the row; lower than P1 because the Checked.* guard already shipped is sufficient for correctness, and the BigInteger / BigRational / BigDecimal decision is research-grade, not blocking. Substrate-or-it-didn't-happen (Otto-363): converts Aaron's chat- weather framing into a falsifiable durable research artifact. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-05-05 same-tick)
Aaron 2026-05-05 added two pieces of context after the initial
subagent draft was committed:
1. **Four-property hodl invariant as binding acceptance test**:
DST-safe + lock-free + scale-free + DBSP-native must all hodl
for any numeric-type candidate. NOT separable -- relaxing any
one lets bugs through (the Prop 3.5 misattribution caught
earlier this session is a worked example). Composes with the
"DST hodls everywhere" lineage at memory/feedback_aaron_class_
discovery_experiment_rodney_razor_on_self_dst_holds_everywhere
_aaron_2026_05_01.md. Per-candidate acceptance scoring against
the conjunction, not score-against-overflow-prevention-alone.
2. **Human anchors** named:
- **Tanner Gooding** (.NET runtime, generic math interfaces) --
primary anchor for SRTP-replacement-for-numeric-typeclass shape
- **Don Syme** (F# language) -- stays the F# anchor for
language-extension work (RFC #1591); numerics-runtime goes
through Gooding
- **Leonid Ryzhyk (@ryzhyk)** (DBSP / Feldera GitHub) --
ENGAGEMENT GATE: only engage IF a real DBSP-compatibility
finding lands (cross-check first; speculative findings don't
reach external engagement -- the Prop 3.5 misattribution was
itself a worked example of why).
Carved-sentence-wise: "BigDecimal-with-rounding may NOT satisfy
DBSP-native (rounding errors don't necessarily compose with
negation)" is one operationally testable per-candidate result.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…Gamma + tools/z3->tools/Z3Verify + + bullet + BayesianAggregate Checked correction (#1595 reviewer) Seven reviewer threads addressed: 1. **Bidirectional composes_with** (per tools/backlog/README.md:69-70): added B-0196 to B-0140, B-0156, B-0189, B-0194's composes_with lists. B-0140 + B-0156 had no composes_with field; created. 2. **`+` continuation bullet** at line 139 broke markdownlint MD007 (parsed as nested + list). Changed `+ provides a count` to `AND provides a count`. 3+5. **NormalGamma -> NormalInverseGamma**: BayesianAggregate.fs has NormalInverseGamma, not NormalGamma. Sed-corrected at all occurrences. 4. **BayesianAggregate Checked.* survey baseline**: reviewer correctly noted BayesianAggregate.fs has no Checked.* arithmetic guards (only one doc-comment mention). The original subagent's listing was wrong. Corrected with explicit acknowledgment + note that Bayesian surfaces use double arithmetic without checked guards (different shape from int64- overflow risk; relevant to BigRational candidate, not BigInteger). 6. **Units.fs cross-reference**: was stale at PR time. Now resolves on main since #1590 merged. 7. **tools/z3/ -> tools/Z3Verify/**: corrected dead path reference. Regenerated docs/BACKLOG.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2083a04 to
e582f38
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e582f38480
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…56/B-0189 (#1595 reviewer follow-up) Three reviewer + CI findings: 1. MD032/blanks-around-lists at line 148: list "- src/Core ..." needed blank line before. Fixed. 2. MD018/no-missing-space-atx at line 412: "#1590 with Checked.(*)..." at line-start parsed as ATX heading. Rephrased "PR #1590" to "PR 1590" in the soft-wrapped paragraph; ATX-collision avoided. 3. last_updated bumps: B-0156 (2026-05-01 -> 2026-05-05) and B-0189 (2026-05-04 -> 2026-05-05) had frontmatter edits adding B-0196 to composes_with but kept stale dates. Bumped per tools/backlog/README.md schema requirement. Regenerated docs/BACKLOG.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…earch-required (#1595 reviewer) Reviewer correctly caught: section (b) asserted as fact ("F# UoM is constrained to primitive numeric types per the F# spec; this is itself a substantive finding") what section (d) treats as unverified research. Pre-answering one's own research question is the failure mode the four-property hodl is meant to catch -- the training-data prior was leaking through as if it were verified fact, contradicting Otto-364 search-first authority. Reframed: BigInteger<weight> is a hypothesis to test. The expected training-data answer is the primitive-numeric-types constraint, but that hypothesis must be WebSearch-verified against current upstream documentation before binding. Recent F# versions may have lifted the constraint, or community workarounds (measure-attributed wrapper structs) may exist. Section (d) is the research task that resolves this. The two stale last_updated reviewer threads (PRRT_kwDOSF9kNM5_kaHu on B-0140, PRRT_kwDOSF9kNM5_kaIL on B-0194) are reviewer-snapshot stale -- e582f38 already bumped B-0140 to 2026-05-05, and B-0194 was created at 2026-05-05 from origin. Both currently correct on the branch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
| (`'T : ( + ) ( * ) Zero One`) rather than hard-coded | ||
| to `int64` / `double`. Existing F# patterns: | ||
| `LanguagePrimitives.GenericZero`, |
| adopt SRTP-based numeric type-classes | ||
| (`'T : ( + ) ( * ) Zero One`) so all DBSP | ||
| operators are numeric-type-polymorphic. Default | ||
| if (b) finds 3+ sites AND the SRTP performance | ||
| cost is judged acceptable. Higher scope, higher | ||
| disruption, future-proofs against new | ||
| numeric-type asks. |
| 3. **Scale-free** -- works across scales, small to BigInteger / arbitrary-precision. | ||
| 4. **DBSP-native** -- retraction-aware. Negative weights compose cleanly through the operation; the operation is consistent under signed-delta application. NOT all numeric types satisfy this trivially: BigInteger as weight type works (ring algebra holds); BigDecimal-with-rounding may NOT (rounding errors don't necessarily compose with negation); float arithmetic explicitly doesn't (commutative-but-not-associative under accumulation). | ||
|
|
||
| **Per-candidate acceptance scoring**: each numeric-type candidate (BigInteger, BigRational, BigDecimal, BigFloat) gets scored against all four. Failure on ANY axis means rejection or restriction-to-non-incremental-use. Score-against-the-conjunction is the binding test, not score-against-overflow-prevention-alone. |
| question" -- it was "BigInt and other bignumbers | ||
| integration" as a broader substrate question. |
Summary
Units.msToNs(PR feat(core/units): F# UoM declarations for Zeta domain (Aaron 2026-05-05) #1590, fixed viaChecked.(*)+ 3 overflow tests).Acceptance criteria (with falsifiability hooks)
int64|float|doublementions insrc/Core, 40Checked.*guard sites across 12 files.Composes with
Why P2 (not P1, not P3)
Checked.*guard already shipped is sufficient for correctness; the BigInteger / BigRational / BigDecimal decision is research-grade, not blocking.Test plan
docs/backlog/P2/B-0196-bigint-and-bignumber-integration-aaron-2026-05-05.mdwith frontmatter conforming totools/backlog/README.mdschema (id, priority, status, title, tier, effort, ask, created, last_updated, depends_on, composes_with, tags).tools/backlog/generate-index.sh --checkreturns clean (docs/BACKLOG.mdregenerated and matches generator output).docs/BACKLOG.mdindex under P2 section.docs/AGENT-BEST-PRACTICES.mdfalsifier discipline.🤖 Generated with Claude Code