Skip to content

refactor(shard-engine): drop the duplicated json path quoter - #372

Merged
prisis merged 1 commit into
alphafrom
fix/dedupe-json-path-segment
Aug 8, 2026
Merged

prisis merged 1 commit into
alphafrom
fix/dedupe-json-path-segment

Conversation

@prisis

@prisis prisis commented Aug 8, 2026

Copy link
Copy Markdown
Member

What

#365 and #371 both landed, so alpha now carries two copies of the same JSON-path escaping rule: the local jsonPathSegment in reprojection-backfill.ts and the shared shared/json-path-segment.ts. This deletes the local one.

Both PR bodies flagged this as the merge-order follow-through, and the two implementations were deliberately made byte-identical before either merged — verified by extracting and diffing the function bodies — so this is a no-op refactor rather than a behaviour change. Net −44 lines.

It also removes a comment that stopped being true

The local docblock carried:

Known gap, deliberately not widened here: documentPath in do-sql.ts does not quote at all, so such a field is already unaddressable everywhere in this store.

That was accurate when written. #371 made documentPath quote (do-sql.ts:182), so it is now false. Deleting the duplicate takes the stale claim with it — which matters here, because a comment asserting a property the code does not have is the exact defect class this whole line of work kept turning up.

Verification

@lunora/shard-engine 67 files / 1040 passed, lint:eslint --max-warnings=0 exit 0, lint:types clean, Prettier clean, api:check ✅ 47 snapshots unchanged (the helper was never on the public surface — it was exported from the module for its own test only, and the test now imports the shared one directly).

Two process notes, since both cost a cycle here and are worth knowing:

  • Run repo tooling from inside the worktree. pnpm exec eslint <path> from the repo root resolves the root tsconfig.json, whose include is [], and fails with TS18003: No inputs were found — which looks like a code error and is not. The package script (eslint ., cwd = package) is the one that reports real findings.
  • Build before measuring. A worktree that has never run build:packages fails every test file, not just the changed ones.

🤖 Generated with Claude Code

https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP

Both PRs landed, so alpha carried two copies of the same escaping rule
- the local one in the backfill and the shared helper. They were made
byte-identical before merge precisely so this deletion would be a no-op
refactor rather than a behaviour change.

The local docblock also claimed documentPath does not quote at all,
which stopped being true when the shared helper landed there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011sk9BLaUZDkPVAZ1sKhuDP
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@prisis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 65984a68-9b9f-4480-ba82-d7186c9c817e

📥 Commits

Reviewing files that changed from the base of the PR and between c2f07b3 and f743ff0.

⛔ Files ignored due to path filters (1)
  • packages/shard-engine/__tests__/reprojection-backfill.test.ts is excluded by !**/__tests__/**, !**/*.test.ts and included by packages/**
📒 Files selected for processing (1)
  • packages/shard-engine/src/reprojection-backfill.ts

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.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for confirming the Contributor License Agreement! 🙏

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@prisis
prisis merged commit c6613ee into alpha Aug 8, 2026
35 of 36 checks passed
@prisis
prisis deleted the fix/dedupe-json-path-segment branch August 8, 2026 17:21
@netlify

netlify Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for lunorash ready!

Name Link
🔨 Latest commit f743ff0
🔍 Latest deploy log https://app.netlify.com/projects/lunorash/deploys/6a7765347f2ccc000844e439
😎 Deploy Preview https://deploy-preview-372--lunorash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (alpha@c2f07b3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             alpha     #372   +/-   ##
========================================
  Coverage         ?   85.70%           
========================================
  Files            ?      843           
  Lines            ?    50706           
  Branches         ?    12365           
========================================
  Hits             ?    43460           
  Misses           ?     6832           
  Partials         ?      414           
Files with missing lines Coverage Δ
packages/shard-engine/src/reprojection-backfill.ts 93.18% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Aug 8, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 1 regressed benchmark
✅ 150 untouched benchmarks
⏩ 109 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ count, no attributes 60.3 µs 67.1 µs -10.14%
⚡ indexed: groupBy(projectId) — count (read every counter row) 831.3 µs 421.2 µs +97.36%
⚡ 1 after-insert no-op trigger 483.5 µs 425.8 µs +13.55%
⚡ flat 3 primitives (the notify.send attribute shape) 62.5 µs 55.5 µs +12.46%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/dedupe-json-path-segment (f743ff0) with alpha (4361cbc)2

Open in CodSpeed

Footnotes

  1. 109 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on alpha (c2f07b3) during the generation of this report, so 4361cbc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using our GitHub Discussions tab for questions.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 8, 2026

This branch was previously deployed

1 inactive deployment
benchmarks — f743ff08 Deployed Aug 8, 2026 by prisis via Benchmarks #1564
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants