Skip to content

feat(core): expose canonical runtime optic requirements artifact#507

Merged
flyingrobots merged 2 commits into
mainfrom
feat/core-canonical-optic-requirements-artifact
May 15, 2026
Merged

feat(core): expose canonical runtime optic requirements artifact#507
flyingrobots merged 2 commits into
mainfrom
feat/core-canonical-optic-requirements-artifact

Conversation

@flyingrobots
Copy link
Copy Markdown
Owner

Summary

  • add OpticAdmissionRequirementsArtifact with Wesley-owned canonical requirements bytes, codec, and digest
  • emit requirements_artifact from compile_runtime_optic() while keeping structured OpticAdmissionRequirements
  • compute requirements_digest from the exact canonical bytes and include requirements artifact identity in artifact hashing
  • document that runtimes import Wesley's requirements bytes instead of serializing Wesley structs locally

Doctrine

Wesley publishes compiler truth. Echo and other runtimes import compiler truth. Runtimes should verify the requirements artifact bytes/digest/codec instead of recreating admission truth with local serialization.

Validation

  • cargo test -p wesley-core runtime_optic
  • cargo test -p wesley-core canonical_requirements
  • cargo test -p wesley-core
  • cargo check --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo xtask docs-check
  • git diff --check
  • pnpm run preflight

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@flyingrobots has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 13 seconds before requesting another review.

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 @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 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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3e1649c3-d31c-4452-ad9f-3bcc15e9b89d

📥 Commits

Reviewing files that changed from the base of the PR and between e8a8f36 and c0f84e9.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • crates/wesley-core/src/adapters/apollo.rs
  • crates/wesley-core/src/domain/ir.rs
  • crates/wesley-core/src/domain/optic.rs
  • crates/wesley-core/tests/runtime_optic_artifact.rs
  • docs/NORTHSTAR.md
  • docs/SDL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/core-canonical-optic-requirements-artifact

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 May 15, 2026

🔍 The Case of Pull Request #507

Plain-English Readout

  • Holmes (evidence investigation): Holmes says this change should not ship in its current state. Main reasons: No evidence citations were available for trust analysis; test evidence is incomplete; schema coverage is incomplete.
  • Watson (independent verification): Watson found verification concerns. Most important concern: Low migration risk claimed but schema incomplete.
  • Moriarty (trend forecast): Moriarty sees progress as stalled right now, so forecast confidence is limited.

Suggested next actions

  1. Tighten citations so the report points to exact lines instead of whole files or coarse references.
  2. Resolve Watson’s verification concerns before trusting the Holmes verdict as final.
  3. Treat the readiness forecast as stalled until new evidence or real progress moves the trend again.
  4. Add or strengthen tests for the schema elements and operations HOLMES flagged as weakly proven.
📚 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-05-15T10:21:40.770Z
  • Commit SHA: 4943f52
  • Bundle Version: 2.0.0

⚠️ Evidence valid only for commit 4943f52

🔍 Executive Deduction

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

Weighted Completion: ░░░░░░░░░░ 0.0%
Scores: SCS 0.0% · TCI 0.0% · MRI 0.0%
Verification Status: 0 claims verified
Citation Quality: 0 exact · 0 whole-file · 0 coarse
Evidence Trust: missing
Ship Verdict: YOU SHALL NOT PASS

🧩 SCS Breakdown

Component Score Coverage
Sql 0.0% 0.00/154.00
Types 0.0% 0.00/154.00
Validation 0.0% 0.00/154.00
Tests 0.0% 0.00/154.00

🧪 TCI Breakdown

Component Score Coverage Note
Unit Constraints 0.0% 0/104 N/A
Unit Rls 0.0% N/A
Integration Relations 0.0% 0/3 N/A
E2e Ops N/A Query operation test tracking not yet implemented

⚠️ MRI 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 4943f52]

🧵 Command Run

  • Run ID: run-mp6rq35z-ip72am
  • 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-15T10:22:44.994Z
  • Patient SHA: 4943f52

🔬 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..."

⚠️ Low migration risk claimed but schema incomplete

🩺 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-mp6rqsc9-7qgju2
  • 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-15T10:23:24.447Z

🔮 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 2 (0 relevant) · ~2.00 commits/day
↳ Magnitude: ~0 relevant LOC/day across ~0.0 files/day
Activity Index: 3 / 100 (PR 0, Window 8)
Blended Velocity: +0.02%/day
Commit Size Burstiness: 0 / 100 (higher = more uneven commit sizes)
⚠️ PLATEAU DETECTED - Low SCS movement and low recent Git activity.

⏰ 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 88% over ~168h)
  • Evidence Trust ≥ moderate → FAIL ❌ (actual missing) — No evidence citations were available for trust analysis.
  • Delivery context (last 168h): 0 issues closed · 8 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-15: ░░░░░░░░░░ 0.0%
05-15: ░░░░░░░░░░ 0.0%
05-15: ░░░░░░░░░░ 0.0%

"Every problem becomes elementary when reduced to mathematics"
— Professor Moriarty

🧵 Command Run

  • Run ID: run-mp6rrmsd-y1p844
  • 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
Copy link
Copy Markdown
Owner Author

@codex self-audit finding before remediation:

Issue Severity Source File Lines Evidence Recommended mitigation
NORTHSTAR noun count drift after adding OpticAdmissionRequirementsArtifact P5 Docs Self-audit docs/NORTHSTAR.md L251-L260 The prose says "five separate nouns" but the table now contains six noun rows. This is a small but real doctrine precision error. Update the sentence to avoid the stale numeric count, preferably "That flow preserves separate nouns:" so future table additions do not create another mismatch.

@flyingrobots
Copy link
Copy Markdown
Owner Author

Code Lawyer Activity Summary

Issue Severity Source File Addressed by Regression coverage Outcome
NORTHSTAR noun count drift after adding OpticAdmissionRequirementsArtifact P5 Docs Self-audit docs/NORTHSTAR.md c0f84e9 ! rg -n "preserves five separate nouns" docs/NORTHSTAR.md; cargo xtask docs-check; git diff --check Replaced stale numeric prose with non-counted wording: "That flow preserves separate nouns:"

No unresolved inline PR review threads were present in the GraphQL review-thread query at audit start.

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

  • Updated the NORTHSTAR runtime optic section to remove the stale hard-coded noun count, changing:
    • “That flow preserves five separate nouns:” → “That flow preserves separate nouns:”. docs/NORTHSTAR.mdL251
  • Committed the change on branch work with commit 178777b using message: docs(northstar): remove stale noun count wording. docs/NORTHSTAR.mdL251

Testing

  • nl -ba docs/NORTHSTAR.md | sed -n '248,258p'
  • git status --short --branch

View task →

@flyingrobots flyingrobots merged commit 84ed740 into main May 15, 2026
23 checks passed
@flyingrobots flyingrobots deleted the feat/core-canonical-optic-requirements-artifact branch May 15, 2026 10:28
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