Skip to content

Conversation

@tractorss
Copy link
Contributor

@tractorss tractorss commented Jan 7, 2026

PR-Codex overview

This PR updates the version of the @kleros/kleros-v2-subgraph package and adds a new property to the evidence object in the EvidenceModule.ts file to include the dispute ID.

Detailed summary

  • Updated version in subgraph/package.json from 0.19.1 to 0.19.2.
  • Added evidence.dispute = dispute.id; in subgraph/core/src/EvidenceModule.ts.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Bug Fixes

    • Fixed evidence tracking to properly link evidence records with their related disputes.
  • Chores

    • Version bump to 0.19.2.

✏️ Tip: You can customize this high-level summary in your review settings.

@tractorss tractorss requested a review from a team as a code owner January 7, 2026 12:10
@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for kleros-v2-neo failed. Why did it fail? →

Name Link
🔨 Latest commit 279357a
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-neo/deploys/695e4d339cb3d40008889c4c

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit 279357a
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet/deploys/695e4d33c294fa0008f26a46
😎 Deploy Preview https://deploy-preview-2213--kleros-v2-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Adds a single assignment to link evidence to its associated dispute via dispute.id in the EvidenceModule event handler, and bumps the package version from 0.19.1 to 0.19.2. No control flow changes or new logic patterns introduced.

Changes

Cohort / File(s) Summary
Evidence-Dispute Linkage
subgraph/core/src/EvidenceModule.ts
Introduces a new assignment evidence.dispute = dispute.id within the EvidenceEvent handler, establishing explicit linkage between ClassicEvidence and its related Dispute after the evidenceIndex is set.
Version Update
subgraph/package.json
Version field incremented from 0.19.1 to 0.19.2 in the manifest.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through the evidence trail,
Linking disputes to proof without fail,
With one line added, the chain now is tight,
Version bumped up—oh, what a sight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a crash in the subgraph related to evidence handling, which is confirmed by the addition of evidence.dispute linkage in EvidenceModule.ts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46da5a2 and 279357a.

📒 Files selected for processing (2)
  • subgraph/core/src/EvidenceModule.ts
  • subgraph/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: Redirect rules - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-testnet-devtools
  • GitHub Check: Pages changed - kleros-v2-testnet-devtools
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Redirect rules - kleros-v2-neo
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-neo
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Pages changed - kleros-v2-neo
  • GitHub Check: hardhat-tests
  • GitHub Check: Mend Security Check
🔇 Additional comments (2)
subgraph/package.json (1)

3-3: LGTM: Appropriate patch version bump.

The version increment from 0.19.1 to 0.19.2 correctly follows semantic versioning for a bug fix release.

subgraph/core/src/EvidenceModule.ts (1)

32-32: Critical fix: evidence-dispute linkage added correctly.

This assignment properly links the ClassicEvidence entity to its parent Dispute before any save operations. The placement is optimal—after creating and populating basic evidence fields but before ensureUser and the multiple evidence.save() calls throughout the function. This resolves the crash mentioned in the PR title. Verification confirms this is the only location where ClassicEvidence entities are created, so the fix is complete across the codebase.


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

@netlify
Copy link

netlify bot commented Jan 7, 2026

Deploy Preview for kleros-v2-testnet-devtools failed. Why did it fail? →

Name Link
🔨 Latest commit 279357a
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet-devtools/deploys/695e4d33d4a5bd00083cbd21

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
50.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jaybuidl jaybuidl merged commit 12b8303 into dev Jan 7, 2026
11 of 20 checks passed
@jaybuidl jaybuidl deleted the fix/subgraph-evidence-crash branch January 7, 2026 12:46
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.

3 participants