expand parity fixture coverage#513
Conversation
|
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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR establishes the Rust IR parity foundation for v0.0.6 by implementing directive canonicalization in the Apollo lowering adapter, expanding the fixture corpus with three new test schemas covering directive-heavy, legacy-alias, and schema-extension patterns, and introducing design packet 0013 specifying the parity sentinel verification workflow. ChangesRust IR Parity Foundation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 #513Plain-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: ░░░░░░░░░░ 0.0% 🧩 SCS Breakdown
🧪 TCI Breakdown
|
| Component | Risk Share | Points | Count |
|---|---|---|---|
| Drops | 0% | 0 | 0 |
| Renames Without Uid | 0% | 0 | 0 |
| Add Not Null Without Default | 0% | 0 | 0 |
| Non Concurrent Indexes | 0% | 0 | 0 |
📊 The Weight of Evidence
"Observe, Watson, how not all features carry equal importance..."
| Element | Weight | Status | Evidence | Strength | Deduction |
|---|
🚪 Security & Performance Gates
"Elementary security measures, Watson..."
| Gate | Status | Evidence | Holmes's Ruling |
|---|---|---|---|
| Migration Risk | ✅ | MRI: 0.0% | "Trivial risk" |
| Test Coverage | TCI: 0.0% | "Theatrical tests!" | |
| Sensitive Fields | ✅ | 0 fields | "All secured" |
| Evidence Quality | ⛔ | 0 exact · 0 whole-file · 0 coarse | "No evidence citations were available for trust analysis." |
📋 The Verdict
⛔ YOU SHALL NOT PASS
"Critical evidence is missing! Return to your laboratory!"
Signed and sealed,
- S. Holmes, Consulting Detective
[END OF INVESTIGATION FOR COMMIT 1e39e50]
🧵 Command Run
- Run ID: run-mpgq4qzz-n875p9
- 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-05-22T09:35:45.861Z
- Patient SHA: 1e39e50
🔬 Citation Verification
"Let me examine each piece of evidence independently..."
- Citations Examined: 0
- Verified: 0 ✅
- Failed: 0 ❌
- Unable to Verify: 0
- 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: 0.0%
Watson calculates: 0.0%
Difference: ✅ Negligible
🔍 Consistency Analysis
"Checking for contradictions in Holmes's deductions..."
🩺 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-mpgq5br0-q9kk4v
- 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-05-22T09:36:24.165Z
🔮 Current State
SCS: ░░░░░░░░░░ 0.0%
TCI: ░░░░░░░░░░ 0.0%
MRI: 0.0% risk
Evidence Trust: missing
📈 Velocity Analysis
SCS Velocity: +0.00%/day
Git Activity (window): 24h · commits 15 (1 relevant) · ~15.00 commits/day
↳ Magnitude: ~313 relevant LOC/day across ~6.0 files/day
Activity Index: 25 / 100 (PR 0, Window 62)
Blended Velocity: +0.15%/day
Commit Size Burstiness: 0 / 100 (higher = more uneven commit sizes)
⏰ Completion Predictions
ETA: Cannot predict (insufficient velocity)
"At current velocity, completion is... improbable."
⚠️ Warnings
- Evidence trust is missing; No evidence citations were available for trust analysis.
🧪 Readiness EXPLAIN
- SCS ≥ 80% → FAIL ❌ (actual 0.0%)
- TCI ≥ 70% → FAIL ❌ (actual 0.0%)
- MRI ≤ 40% → PASS ✅ (actual 0.0%)
- CI Stability ≥ 90% (branch main) → FAIL ❌ (actual 87% over ~168h)
- Evidence Trust ≥ moderate → FAIL ❌ (actual missing) — No evidence citations were available for trust analysis.
- Delivery context (last 168h): 0 issues closed · 4 PRs merged (informational, not gating)
Signals blend: SCS velocity (70%) + Git activity (30%, branch-first). Activity only suppresses false plateaus; it never inflates readiness.
📊 Historical Trajectory
05-22: ░░░░░░░░░░ 0.0%
05-22: ░░░░░░░░░░ 0.0%
05-22: ░░░░░░░░░░ 0.0%
"Every problem becomes elementary when reduced to mathematics"
— Professor Moriarty
🧵 Command Run
- Run ID: run-mpgq65b7-0832rb
- 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
Self-Code Review Findings@codex please confirm whether you agree with these findings before merge. Review basis: local clean worktree,
Issue count: High 1, Medium 2, Low 1. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
crates/wesley-core/src/adapters/apollo.rs (1)
960-972: ⚡ Quick winConsider adding a doc comment to explain the canonicalization contract.
The function correctly implements the alias-to-canonical mapping, but a doc comment would clarify the purpose and supported aliases for future maintainers.
📝 Suggested doc comment
+/// Maps legacy Wesley directive aliases to their canonical internal names. +/// +/// This normalization ensures that directives declared with different aliases +/// (e.g., `@table`, `@wesley_table`) are recognized as the same directive +/// and stored under a single canonical key (`wes_table`). +/// +/// Returns the canonical name if a mapping exists, otherwise returns the input unchanged. fn canonical_directive_name(name: &str) -> &str { match name {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/wesley-core/src/adapters/apollo.rs` around lines 960 - 972, Add a concise doc comment for the function canonical_directive_name describing its contract: that it maps known directive aliases (list the aliases and their canonical names like "wesley_table"/"table" -> "wes_table", "wesley_pk"/"pk"/"primaryKey" -> "wes_pk", etc.), that it returns a borrowed &str of the canonical name (does not allocate), and that unknown names are returned unchanged; include purpose and examples of expected inputs/outputs so future maintainers understand supported aliases and return semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/BEARING.md`:
- Around line 77-79: Replace the machine-local path and host-specific branch
state in BEARING.md: remove the literal "`~/git/wesley-postgres`" and the note
"local `main` ahead of `origin/main`" and instead reference the repository by
its remote name or repo URL (e.g., "wesley-postgres" or the remote Git URL) and,
if necessary, add a dated note in release evidence or changelog indicating the
local bootstrap work and its date; update the surrounding sentence that mentions
PostgreSQL/Supabase generation and execution adapters to use the
repository-relative/remote reference and add the date/context note rather than
machine-local state.
---
Nitpick comments:
In `@crates/wesley-core/src/adapters/apollo.rs`:
- Around line 960-972: Add a concise doc comment for the function
canonical_directive_name describing its contract: that it maps known directive
aliases (list the aliases and their canonical names like "wesley_table"/"table"
-> "wes_table", "wesley_pk"/"pk"/"primaryKey" -> "wes_pk", etc.), that it
returns a borrowed &str of the canonical name (does not allocate), and that
unknown names are returned unchanged; include purpose and examples of expected
inputs/outputs so future maintainers understand supported aliases and return
semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 220b721d-b1df-403f-bdc5-7cd03e5c7394
📒 Files selected for processing (20)
CHANGELOG.mdcrates/wesley-core/src/adapters/apollo.rscrates/wesley-core/tests/lowering_validation.rsdocs/BEARING.mddocs/design/0009-rust-core-and-wasm-capability-abi/phase-0-ir-truth-manifest.mddocs/design/0013-rust-ir-parity-sentinel/rust-ir-parity-sentinel.mddocs/design/README.mddocs/method/backlog/asap/README.mddocs/method/backlog/asap/SOURCE_wesley-core-rs-parity-sentinel.mddocs/method/releases/v0.0.5/verification.mdtest/fixtures/ir-parity-invalid/duplicate-directive-alias.graphqltest/fixtures/ir-parity/directive-heavy-schema.graphqltest/fixtures/ir-parity/directive-heavy-schema.l1.hashtest/fixtures/ir-parity/directive-heavy-schema.l1.jsontest/fixtures/ir-parity/legacy-alias-schema.graphqltest/fixtures/ir-parity/legacy-alias-schema.l1.hashtest/fixtures/ir-parity/legacy-alias-schema.l1.jsontest/fixtures/ir-parity/schema-extensions-schema.graphqltest/fixtures/ir-parity/schema-extensions-schema.l1.hashtest/fixtures/ir-parity/schema-extensions-schema.l1.json
💤 Files with no reviewable changes (1)
- docs/method/backlog/asap/SOURCE_wesley-core-rs-parity-sentinel.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 483439d47f
ℹ️ 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".
| }; | ||
|
|
||
| map.insert(dir_name, val); | ||
| if map.contains_key(&canonical_name) { |
There was a problem hiding this comment.
Restrict duplicate rejection to canonical Wesley aliases
The duplicate guard now checks canonical_name for every directive, so any repeatable non-Wesley directive (for example @tag declared as repeatable) is rejected even though the SDL is valid. I reproduced this by lowering a schema with @tag(name: "a") @tag(name: "b"), which now fails with Lowering error: Duplicate directive '@tag' in directive; this is a compatibility regression introduced by this change because the new logic conflates alias-collision protection with general repeatable-directive handling.
Useful? React with 👍 / 👎.
| - legacy JS semantic IR bytes | ||
| - Rust semantic IR bytes |
There was a problem hiding this comment.
Define an explicit JS↔Rust IR projection before byte compare
The comparator contract says to compare legacy JS semantic IR bytes directly against Rust semantic IR bytes, but it does not define any crosswalk/projection despite the referenced JS anchor emitting a different IR shape (tables/enums/scalars/relationships in packages/wesley-runtime-node/src/GraphQLAdapter.mjs) than Rust L1 fixtures (types). Without a normalization/projection contract here, a parity sentinel implementation cannot distinguish expected structural differences from real regressions, so the design is currently non-executable as written.
Useful? React with 👍 / 👎.
| As of this bearing reset, `~/git/wesley-postgres` has local `main` ahead of | ||
| `origin/main` with additional uncommitted bootstrap work. That repo remains the |
There was a problem hiding this comment.
Remove machine-local worktree state from project bearing
This commits a local filesystem path and transient sibling-repo branch/dirty-state snapshot into BEARING.md, which will become stale immediately for other contributors and CI contexts and does not provide durable repository direction. Keeping ephemeral workstation state in the canonical bearing doc harms reproducibility of planning context and should be moved to PR/session notes instead.
Useful? React with 👍 / 👎.
Self-Code Review Resolution@codex follow-up commit
Validation after the fix:
|
Summary
Testing
|
Self-Code Review Findings@codex please confirm before merge. Review basis: clean local worktree,
Issue count: Medium 1. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ac0e6450f
ℹ️ 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".
| ## Active Gravity | ||
|
|
||
| ### 1. Clean House Release | ||
| ### 1. v0.0.6 Rust IR Parity |
There was a problem hiding this comment.
Update docs front door for v0.0.6 release center
This change declares v0.0.6 as the active gravity in BEARING, but docs/README.md still says the active release center is v0.0.5 (line 33 in that file), so the two top-level navigation docs now contradict each other about what is current. That inconsistency was introduced here and will misroute readers who start from the docs front door; please update docs/README.md in the same change to mark v0.0.5 as shipped/history and point active work to the 0013 parity packet.
Useful? React with 👍 / 👎.
Self-Code Review Resolution@codex follow-up commit
Validation after the fix:
|
Summary
Testing
|
Summary
docs/BEARING.mdfor the v0.0.6 Rust IR parity and module-boundary release lane.SOURCE_wesley-core-rs-parity-sentinel.mdout ofasapinto design packet0013-rust-ir-parity-sentinel.Validation
pnpm fixtures:ircargo fmt --checkcargo test -p wesley-core --test lowering_validationcargo xtask docs-checkgit diff --checkpnpm run preflightNotes
~/git/wesley-postgreswas inspected but not edited. It remains active as the PostgreSQL extraction home; localmainis ahead oforigin/mainwith.gitignoremodified andCargo.toml/src/untracked.Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests