feat(769): body templates for 9 remaining trinity concepts — verdict 13→4#769
Conversation
…13→4
Fills in real Java body templates for assert, list, option, option-bind,
pair, result, result-bind, retry-loop, tagged-union. Each non-canonical
template carries a literal ir-formula loss_record_contribution flagging
fixture-specific aspects (sentinel values, fixture-specific bind bodies,
tuple-to-array lifts, etc.) per Supra omnia rectum.
Trinity verdict drops from 13 loss entries to 4. All 9
bind-stub-body-emitted entries gone. The 4 remaining are substrate-
deferred capabilities (Rust-only source lift cascades through legs 2-3),
not template gaps — that's the next backlog after this stack.
Empirical: 0 stubs, 11 real return lines, 1 void-return (unit). swap_pair
emits 'return new long[] { b, a };'; classify emits the if-else cascade;
retry_until_success emits the real while-loop.
New CID minted via mint-plugin-cid (per #767 recipe):
blake3-512:e9c5dd41...204b
Pinned in substrate_default_cids drift test.
Also: SugarRealizer multi-line indent fix — each internal line of a
multi-line template now gets the same 8-space method-body indent.
Single-line bodies unaffected.
Closes the federation-by-construction boundary: Rust holds zero Java
syntax for the bind production path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Fourth and final PR in the body-template stack. Fills in real
concept:* → java codebody templates for the 9 concepts that #768 left as language-stubs. Trinity verdict drops from 13 loss entries to 4 — and the remaining 4 are all substrate-deferred capabilities, not template gaps.What
menagerie/java-language-signature/specs/body-templates/java-canonical-bodies.jsonexpanded from 3 entries (identity / unit / bool-cell) to 12 — adding the 9 named in #768'sbind-stub-body-emittedlist:assert— translatespanic!tothrow new RuntimeException(...)with documented message-losslist— Rust slice-sum-with-+=lowered to enhanced-for accumulatoroption—-1sentinel forNone(documented inloss_record_contribution)option-bind— fixture-specific doubling body (loss-flagged)pair— Rust tuple(b, a)lifted tonew long[] { ${param1}, ${param0} }(two loss-dims)result—-1sentinel forErrresult-bind— fixture-specific doubling body (loss-flagged)retry-loop— fixture-specific termination condition (loss-flagged)tagged-union— fixture-specific labels 0/1/2 (loss-flagged)Each non-canonical template carries
loss_record_contributionas a literalir-formulaMapkeyed by loss-dimension name, so the compound loss-record this template participates in stays honestly characterized per Supra omnia rectum.CID mint
New plugin CID (re-minted via
cargo run -p provekit-plugin-loader --bin mint-plugin-cidper #767):Stamped in the JSON header and pinned in
substrate_default_cids.rs::java_canonical_bodies_cid_self_consistent. Drift test green.Multi-line indent fix
SugarRealizer.javapreviously rendered every template as a single 8-space-indented line. Multi-line bodies (list, retry-loop, option-bind, result-bind, tagged-union) now have each internal line re-indented to the 8-space method-body column. Single-line bodies unchanged.Trinity verdict — load-bearing measurement
Count: 13 → 4. All 9
bind-stub-body-emittedentries gone. The 4 remaining are substrate-deferred capabilities (Rust-only source lift cascades through legs 2-3), and they're the next-up backlog after this stack.Empirical verification on the bind output:
Sample real-body emission:
swap_pair→return new long[] { b, a };classify→if (x < 0L) return 0L; else if (x == 0L) return 1L; else return 2L;retry_until_success→ real while-loop with attempt counterCloses the federation-by-construction boundary
With #769 in, Rust holds zero Java syntax for the bind production path. The Java plugin owns every byte of
final class XTransported { ... }it emits. cmd_transport's staleTargetStyle::Javaarms remain only as dead code for non-bind callers (cross-language transport CLI); boy-scout cleanup is follow-up.Tests
trinity_roundtrip_test: PASS (4 entries, all substrate-deferred)substrate_default_cids::java_canonical_bodies_cid_self_consistent: PASS (new pin)Gated by
#766 (spec, merged), #767 (data + minting recipe, merged), #768 (dispatch + is_stub threading, merged)
Blocks
Nothing in the trinity stack. The next backlog item is non-Rust source lift (the
source-language-not-supportedloss entry).🤖 Generated with Claude Code