Skip to content

docs: add one-way sync orphan checks to the review guide - #3522

Open
dosubot[bot] wants to merge 1 commit into
mainfrom
dosu/doc-update-32
Open

dosubot[bot] wants to merge 1 commit into
mainfrom
dosu/doc-update-32

Conversation

@dosubot

@dosubot dosubot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Update documentation for amirbiron/amir-bug-patterns#32

Add a review-guide entry for jobs or loops that clone, create, upsert, or index copies when missing, and for cleanup steps that prune or reconcile stale copies. It directs readers to the cron-job guidance and orphan-sync rule to check who removes copies no longer tracked by the source and how to prevent deleting everything.

Generated by Dosu

Review in cubic

Summary by Sourcery

Document review checks for safely managing copies that are no longer tracked by their source.

Enhancements:

  • Add review-guide guidance for identifying one-way synchronization flows that create missing copies and remove stale or orphaned copies.

Documentation:

  • Link the new orphan-sync review guidance to the cron-job and one-way-sync rules.

@sourcery-ai

sourcery-ai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the review-guide index so reviewers can identify one-way sync creation and cleanup logic, then follow the relevant guidance to validate orphan removal ownership and protection against destructive cleanup.

File-Level Changes

Change Details Files
Add a review-guide lookup entry for one-way synchronization code that creates missing copies and cleans up stale or orphaned copies.
  • Recognize clone, create, upsert, and indexing flows guarded by existence checks.
  • Recognize prune, orphan, janitor, and reconcile cleanup steps.
  • Direct reviewers to the cron-job one-way-sync guidance and orphan-sync rule to verify deletion ownership and safeguards against deleting all copies.
CLAUDE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9aa3560b-3a06-4832-863a-8c8087d9e012

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🧯 Dangerous deletes guard report

Policy: see .cursorrules — dangerous deletions are blocked unless wrapped safely.

Summary:

  • Flagged findings (blocking): 0
    0
  • Excluded matches (not blocking): 15
  • Total matches (all files): 128

Flagged findings (file:line:snippet):
(none)

Excluded matches (by path pattern)
./node_modules/katex/src/fonts/Makefile:139:	rm -rf pfa ff otf ttf woff woff2
./node_modules/katex/package.json:153:    "build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c --failAfterWarnings && webpack && node update-sri.js package dist/README.md",
./node_modules/mermaid/dist/mermaid.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values for tr … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm/chunk-2M32CCKP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence d … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.core/chunk-KS23V3DP.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequence  … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs.map:4:  "sourcesContent": ["{\n  \"name\": \"mermaid\",\n  \"version\": \"11.12.0\",\n  \"description\": \"Markdown-ish syntax for generating flowcharts, mindmaps, sequen … [truncated]
./node_modules/mermaid/dist/chunks/mermaid.esm.min/chunk-4HFYJGYH.mjs:1:var r={name:"mermaid",version:"11.12.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graph … [truncated]
./node_modules/mermaid/dist/mermaid.min.js:1524:`,"getStyles"),c1e=RQe});var h1e={};dr(h1e,{diagram:()=>NQe});var NQe,f1e=N(()=>{"use strict";$ge();a1e();l1e();u1e();NQe={parser:Fge,db:n1e,renderer:o1e,styles:c1e}});var m1e,g1e=N(()=>{"use  … [truncated]
./node_modules/mermaid/dist/mermaid.min.js.map:4:  "sourcesContent": ["/**\n* Default values for dimensions\n*/\nconst defaultIconDimensions = Object.freeze({\n\tleft: 0,\n\ttop: 0,\n\twidth: 16,\n\theight: 16\n});\n/**\n* Default values fo … [truncated]
./README.md:829:find . -name "__pycache__" -exec rm -rf {} +
./webapp/static/js/md_preview.bundle.js.map:4:  "sourcesContent": ["// Markdown-it plugin to render GitHub-style task lists; see\n//\n// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments\n// https://github.com/blog/1825-t … [truncated]
./Dockerfile:42:    rm -rf /var/lib/apt/lists/*
./Dockerfile:121:    rm -rf /var/lib/apt/lists/*
./docs/DOCUMENTATION_GUIDE.md:453:rm -rf _build
./docs/Makefile:24:	rm -rf $(BUILDDIR)

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="CLAUDE.md" line_range="86" />
<code_context>
+| ג'וב או לולאה שיוצרים עותק ממקור אמת "אם חסר" — `if not ...exists(` ואחריו clone / create / `upsert` / אינדוקס — או שלב שמוחק מה שהמקור כבר לא מכיר (`prune`, `orphan`, `janitor`, `reconcile`) | `BY-STACK/cron-jobs.md`, "סנכרון חד-כיווני" + `bugbot-rules/one-way-sync-orphans.md` — מי מוחק את העותק כשהמקור מפסיק לרשום אותו, ומה עוצר מחיקה של הכול |
</code_context>
<issue_to_address>
**issue:** The new review-guide entry points readers to `bugbot-rules/one-way-sync-orphans.md`, but that rule file does not exist. Following this guidance causes the documented `codekeeper_get_repo_file` lookup to fail, so reviewers cannot access the rule they are instructed to apply.

**Triggers:** When a reviewer encounters a one-way synchronization or orphan-cleanup pattern.

**Suggested fix:** Add and approve the referenced rule before adding this trigger, or defer this table entry until the rule file exists.

```suggestion

```
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: CLAUDE.md:86


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread CLAUDE.md
| `clientX` בחיסור, `left`/`right`, גרירה, שינוי גודל, או הצמדה ל-viewport | `BY-STACK/hebrew-source.md` H7 + `bugbot-rules/rtl-geometry-and-clamp.md` |
| `EWMA` / `_ewma`, `anomaly_detected`, `cooldown`, `first_ts`, `adaptive_*_threshold_*` | `RECURRING-PATTERNS.md` R9 + `BY-STACK/observability.md` |
| הרצה ראשונה של ג'וב סנכרון: `baseline`, `last_*_check_time`, `if not last_seen` | `BY-STACK/cron-jobs.md` דפוס 10 — מה ההרצה הראשונה שולחת |
| ג'וב או לולאה שיוצרים עותק ממקור אמת "אם חסר" — `if not ...exists(` ואחריו clone / create / `upsert` / אינדוקס — או שלב שמוחק מה שהמקור כבר לא מכיר (`prune`, `orphan`, `janitor`, `reconcile`) | `BY-STACK/cron-jobs.md`, "סנכרון חד-כיווני" + `bugbot-rules/one-way-sync-orphans.md` — מי מוחק את העותק כשהמקור מפסיק לרשום אותו, ומה עוצר מחיקה של הכול |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The new review-guide entry points readers to bugbot-rules/one-way-sync-orphans.md, but that rule file does not exist. Following this guidance causes the documented codekeeper_get_repo_file lookup to fail, so reviewers cannot access the rule they are instructed to apply.

Triggers: When a reviewer encounters a one-way synchronization or orphan-cleanup pattern.

Suggested fix: Add and approve the referenced rule before adding this trigger, or defer this table entry until the rule file exists.

Suggested change
| ג'וב או לולאה שיוצרים עותק ממקור אמת "אם חסר" — `if not ...exists(` ואחריו clone / create / `upsert` / אינדוקס — או שלב שמוחק מה שהמקור כבר לא מכיר (`prune`, `orphan`, `janitor`, `reconcile`) | `BY-STACK/cron-jobs.md`, "סנכרון חד-כיווני" + `bugbot-rules/one-way-sync-orphans.md` — מי מוחק את העותק כשהמקור מפסיק לרשום אותו, ומה עוצר מחיקה של הכול |

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

⏱️ Performance report

(No performance test durations collected. Mark tests with @pytest.mark.performance.)

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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.

0 participants