Clarify fixture extension boundary for rope codec work#538
Conversation
…(Phase 1) Apply SDL renames to match jedit's rope schema refactor: - Tick → RopeRewrite, TickReceipt → RopeDiff - TickKind / TickReceiptRewriteKind → RewriteKind (unified enum) - createdAtTickId → createdAtRopeRewriteId - createdByTickId → createdByRopeRewriteId - tick/receipt result fields → ropeRewrite/ropeDiff - Footprint strings updated to RopeRewrite/RopeDiff - File header updated to reflect rope schema doctrine Part of 0024-universal-le-binary-codec Phase 1.
Adds a TypeScript LE binary codec emitter that mirrors the wire layout of echo_wasm_abi::codec (Rust) byte-for-byte. Enums encode as u32 LE zero-based discriminants; input objects encode fields in SDL declaration order; nullable fields use a presence tag; lists use a u32 LE count prefix. New `wesley emit le-binary-typescript` subcommand consumes a schema SDL and emits encode/decode functions for every enum, input object, and operation Vars struct in the schema. The emitted module imports its Writer/Reader/CodecError primitives from a configurable path (--codec-import, defaulting to '../../codec.js' for jedit-shaped repos). Closes Phase 5 of design 0024-universal-le-binary-codec by making the generated TypeScript codec available wherever a Wesley-described schema crosses a TS/JS boundary, structurally guaranteeing parity with the Rust Encode/Decode impls emitted by echo-wesley-gen Phase 4.
Adds `wesley_core::stable_op_id(OperationType, &str) -> u32` (FNV-1a with seed 0x811c9dc5) plus `operation_type_rank` as a first-class part of wesley-core's domain. Five pinned unit tests lock the algorithm and the specific u32 outputs for the rope schema's five operations — any drift breaks every consumer that routes EINT envelopes by op id, so the contract is asserted directly. Extends `wesley emit le-binary-typescript` to emit, alongside each operation's Vars interface and encode/decode functions, an `export const OP_<UPPER_SNAKE>: number = <stableOpId>;` constant. The identifier convention matches echo-wesley-gen's Rust emit so consumers can swap between languages without renaming. Two new unit tests cover the helper naming and concrete op id emission. This is the algorithmic source of truth for the cross-language EINT op id contract. echo-wesley-gen still has a local copy of the algorithm (it pins wesley-core 0.0.4 from crates.io); both copies are asserted against the same pinned outputs and will collapse to one when echo bumps the wesley-core dep to 0.0.5+.
- bad-code/wesley-cli-emit-handler-duplication: each `emit <target>` arm in wesley-cli is a copy-paste of the previous one; should be a declarative registry. - bad-code/stale-fixture-rename-test-leftovers: Phase 1 rename (hot-text-runtime → rope) missed `include_str!` paths and assertion strings in wesley-emit-typescript / wesley-emit-rust / wesley-cli / wesley-core test files. `cargo test -p <crate>` fails to compile on these crates; library builds fine. - cool-ideas/wesley-ts-emitter-emits-zod-layer: Wesley already owns the type/codec emit; the Zod runtime-validation layer is the last hand-maintained drift surface. Generating it closes the gap.
|
Warning Review limit reached
More reviews will be available in 34 minutes and 21 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (17)
✨ 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 |
🔍 The Case of Pull Request #538Plain-English Readout
Suggested next actions
📚 Glossary (what the Holmes terms mean)
🕵️ SHA-lock HOLMES full report (click to expand)🕵️ SHA-lock HOLMES Investigation
🔍 Executive Deduction"Watson, after careful examination of the evidence, I deduce..." Weighted Completion: ██████████ 95.0% 🧩 SCS Breakdown
🧪 TCI Breakdown
|
| Component | Risk Share | Points | Count |
|---|---|---|---|
| Drops | 0.0% | 0 | 0 |
| Renames Without Uid | 0.0% | 0 | 0 |
| Add Not Null Without Default | 100.0% | 1 | 1 |
| Non Concurrent Indexes | 0.0% | 0 | 0 |
📊 The Weight of Evidence
"Observe, Watson, how not all features carry equal importance..."
| Element | Weight | Status | Evidence | Strength | Deduction |
|---|---|---|---|---|---|
| schema | 5 | ✅ Exact SQL & tests | test/fixtures/examples/.wesley-cache/shipme-fixture/tests.sql:1-1@776665a | exact | Elementary! |
🚪 Security & Performance Gates
"Elementary security measures, Watson..."
| Gate | Status | Evidence | Holmes's Ruling |
|---|---|---|---|
| Migration Risk | ✅ | MRI: 10.0% | "Trivial risk" |
| Test Coverage | ✅ | TCI: 90.0% | "Excellent coverage" |
| Sensitive Fields | ✅ | 0 fields | "All secured" |
| Evidence Quality | ✅ | 2 exact · 0 whole-file · 0 coarse | "All 2 citations resolve to exact line spans." |
📋 The Verdict
✅ ELEMENTARY - Ship immediately!
"The evidence is conclusive. No mysteries remain."
Signed and sealed,
- S. Holmes, Consulting Detective
[END OF INVESTIGATION FOR COMMIT 776665a]
🧵 Command Run
- Run ID: run-0d041236-425c-4d82-b5cc-e35e5ae3cf22
- Transmutation: holmes-investigate
- Command: investigate
- Status: completed
- Ledger: /home/runner/work/wesley/wesley/test/fixtures/examples/.wesley-cache/ledger
🩺 Dr. WATSON full report (click to expand)
🩺 Dr. Watson's Independent Verification Report
Medical Examination of Evidence
- Examination Date: 2026-06-01T09:51:37.256Z
- Patient SHA: 776665a
🔬 Citation Verification
"Let me examine each piece of evidence independently..."
- Citations Examined: 2
- Verified: 0 ✅
- Failed: 0 ❌
- Unable to Verify: 2
- Exact Subrange Citations: 0
- Whole-file Citations: 0
- Coarse Citations: 0
- Evidence Trust: missing
- Trust Note: No evidence citations were available for trust analysis.
Verification Rate: 0.0%
📊 Mathematical Verification
"I shall recalculate Holmes's arithmetic..."
Holmes claimed SCS: 95.0%
Watson calculates: 100.0%
Difference:
🔍 Consistency Analysis
"Checking for contradictions in Holmes's deductions..."
✅ No logical inconsistencies detected
🩺 Dr. Watson's Medical Opinion
VERIFICATION: CONCERNS NOTED
"While Holmes's methods are generally sound, I have noted some"
"discrepancies that warrant further investigation. No evidence citations were available for trust analysis."
Respectfully submitted,
- Dr. J. Watson, M.D.
Medical Examiner & Verification Specialist
🧵 Command Run
- Run ID: run-a24738d0-e02a-437a-9989-4a2cd902bc24
- Transmutation: watson-verify
- Command: verify
- Status: completed
- Ledger: /home/runner/work/wesley/wesley/test/fixtures/examples/.wesley-cache/ledger
🔮 Professor MORIARTY full report (click to expand)
🧠 Professor Moriarty's Temporal Predictions
The Mathematics of Inevitability
- Analysis Date: 2026-06-01T09:52:17.008Z
INSUFFICIENT DATA
"I require at least two data points to predict the future."
"Run Wesley generate multiple times to build history."
🧵 Command Run
- Run ID: run-11cd05a3-a0ef-4fa7-8ca1-c9b59e36d83e
- Transmutation: moriarty-predict
- Command: predict
- Status: completed
- Ledger: /home/runner/work/wesley/wesley/test/fixtures/examples/.wesley-cache/ledger
Machine-readable reports: holmes-report.json · watson-report.json · moriarty-report.json (see workflow artifacts).
Filed at 221B Repository Street
Summary
jedit-rope.graphqlconsumer fixture and LE binary TypeScript emitter work from the branchstable_op_idunit-test examples and LE codec docs so generic Wesley surfaces stay domain-neutraljedit-hot-text-runtime.graphqlreferences after the rope fixture renameValidation
cargo test -p wesley-core -p wesley-emit-rust -p wesley-emit-typescriptcargo xtask preflightcargo fmt --checkgit diff --check