Skip to content

Clarify fixture extension boundary for rope codec work#538

Merged
flyingrobots merged 6 commits into
mainfrom
stack/wesley-rope-fixture-rename
Jun 1, 2026
Merged

Clarify fixture extension boundary for rope codec work#538
flyingrobots merged 6 commits into
mainfrom
stack/wesley-rope-fixture-rename

Conversation

@flyingrobots
Copy link
Copy Markdown
Owner

Summary

  • adds the jedit-rope.graphql consumer fixture and LE binary TypeScript emitter work from the branch
  • keeps rope/jedit/Echo vocabulary framed as external-consumer fixture data, not Wesley base product semantics
  • neutralizes stable_op_id unit-test examples and LE codec docs so generic Wesley surfaces stay domain-neutral
  • adds descriptor-only fixture extension docs and a Stack Witness 0001 fixture-extension descriptor
  • fixes stale jedit-hot-text-runtime.graphql references after the rope fixture rename

Validation

  • cargo test -p wesley-core -p wesley-emit-rust -p wesley-emit-typescript
  • cargo xtask preflight
  • cargo fmt --check
  • git diff --check
  • pre-push hook: Rust product preflight and repo Bats smoke suite

…(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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Warning

Review limit reached

@flyingrobots, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a031c579-8e92-4174-b51c-e746505bc592

📥 Commits

Reviewing files that changed from the base of the PR and between 8e373da and 1061fa4.

📒 Files selected for processing (17)
  • .gitignore
  • README.md
  • crates/wesley-cli/src/main.rs
  • crates/wesley-cli/tests/cli.rs
  • crates/wesley-core/src/domain/operation.rs
  • crates/wesley-core/tests/operation_analysis.rs
  • crates/wesley-emit-rust/src/lib.rs
  • crates/wesley-emit-typescript/src/le_binary.rs
  • crates/wesley-emit-typescript/src/lib.rs
  • docs/JEDIT_CAPABILITY_PROGRESS.md
  • docs/method/backlog/bad-code/wesley-cli-emit-handler-duplication.md
  • docs/method/backlog/cool-ideas/wesley-ts-emitter-emits-zod-layer.md
  • test/fixtures/README.md
  • test/fixtures/consumer-models/jedit-rope.graphql
  • test/fixtures/extensions/README.md
  • test/fixtures/extensions/stack-witness-0001/README.md
  • test/fixtures/extensions/stack-witness-0001/fixture-extension.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stack/wesley-rope-fixture-rename

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🔍 The Case of Pull Request #538

Plain-English Readout

  • Holmes (evidence investigation): Holmes says this change looks ready to ship.
  • Watson (independent verification): Watson found verification concerns. Most important concern: No evidence citations were available for trust analysis.
  • Moriarty (trend forecast): Moriarty does not have enough historical data yet to forecast readiness.

Suggested next actions

  1. Resolve Watson’s verification concerns before trusting the Holmes verdict as final.
📚 Glossary (what the Holmes terms mean)
  • HOLMES: Wesley’s main evidence investigation. It decides whether the cited proof is strong enough to justify shipping this commit.
  • WATSON: An independent verification pass. It checks Holmes’s citations and score math instead of trusting them blindly.
  • MORIARTY: A readiness forecast over time. It is advisory trend analysis, not the release gate itself.
  • Schema coverage score (SCS): How much of the schema has direct supporting evidence across generated artifacts and cited proof.
  • Test confidence index (TCI): How much test evidence exists for constraints, policies, relationships, and operations.
  • Migration risk index (MRI): How risky the schema change is to roll out. Lower is better.
  • Evidence trust: Whether the report is backed by exact citations, whole-file citations, or coarse references. Weak trust means the claim may be directionally right but not specific enough to trust blindly.
  • Citation quality: A count of exact line-span citations versus whole-file or coarse references.
  • ELEMENTARY: Ready to ship based on the current evidence.
  • REQUIRES INVESTIGATION: More work or review is needed before shipping.
  • YOU SHALL NOT PASS: Do not ship this change in its current state.

🕵️ SHA-lock HOLMES full report (click to expand)

🕵️ SHA-lock HOLMES Investigation

  • Generated: 2026-01-01T00:00:00.000Z
  • Commit SHA: 776665a
  • Bundle Version: 2.0.0

⚠️ Evidence valid only for commit 776665a

🔍 Executive Deduction

"Watson, after careful examination of the evidence, I deduce..."

Weighted Completion: ██████████ 95.0%
Scores: SCS 95.0% · TCI 90.0% · MRI 10.0%
Verification Status: 2 claims verified
Citation Quality: 2 exact · 0 whole-file · 0 coarse
Evidence Trust: strong
Ship Verdict: ELEMENTARY

🧩 SCS Breakdown

Component Score Coverage
Sql 100.0% 1.00/1.00
Types 100.0% 1.00/1.00
Validation 100.0% 1.00/1.00
Tests 100.0% 1.00/1.00

🧪 TCI Breakdown

Component Score Coverage Note
Unit Constraints 100.0% 1/1 N/A
Unit Rls 100.0% 1/1 N/A
Integration Relations 100.0% 1/1 N/A
E2e Ops 90.0% 9/10 fixture

⚠️ MRI 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: ⚠️ Significant

🔍 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

@flyingrobots flyingrobots merged commit 8e90480 into main Jun 1, 2026
20 checks passed
@flyingrobots flyingrobots deleted the stack/wesley-rope-fixture-rename branch June 1, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant