Skip to content

Conversation

@mirooon
Copy link
Contributor

@mirooon mirooon commented Dec 18, 2025

Which Jira task belongs to this PR?

Why did I implement it this way?

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

Adds a new Git workflow policy document at .cursor/rules/502-git-workflow.mdc that outlines branching strategy, PR targeting conventions, and handling of large topics. Updates .cursor/rules/README.md to reference the new rule in its catalog.

Changes

Cohort / File(s) Summary
Git workflow documentation
.cursor/rules/502-git-workflow.mdc
New file defining Git workflow conventions, including branch naming with Jira tickets, PR targeting rules (default main branch), feature branch strategy for large topics, and special cases for config file updates.
Rule catalog
.cursor/rules/README.md
Updated to add entry for new 502-git-workflow.mdc rule in the rules list.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Documentation/policy additions with straightforward content
  • No complex logic or structural changes
  • Simple reference update in README

Suggested labels

AuditNotRequired

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description follows the required template structure but has critical gaps: the Jira task field is empty, the 'Why did I implement it this way?' section lacks explanation, and most documentation/testing checkboxes remain unchecked despite being non-applicable to documentation-only changes. Add the Jira task ID, explain the implementation rationale for the Git workflow policy, and clarify which checklist items apply to documentation-only changes (e.g., why tests/audits aren't applicable here).
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add git workflow cursor rule' accurately and concisely describes the main change: adding a new Cursor rule file (.cursor/rules/502-git-workflow.mdc) documenting Git workflow conventions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-git-workflow-cursor-rule

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

@lifi-action-bot lifi-action-bot marked this pull request as draft December 18, 2025 17:02
@mirooon mirooon marked this pull request as ready for review December 18, 2025 17:03
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5e2999e and f8bda17.

📒 Files selected for processing (2)
  • .cursor/rules/502-git-workflow.mdc (1 hunks)
  • .cursor/rules/README.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.cursor/rules/*.mdc

📄 CodeRabbit inference engine (.cursor/rules/README.md)

.cursor/rules/*.mdc: Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files
Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like */

Files:

  • .cursor/rules/502-git-workflow.mdc
🧠 Learnings (21)
📓 Common learnings
Learnt from: mirooon
Repo: lifinance/contracts PR: 1187
File: .github/workflows/versionControlAndAuditCheck.yml:596-612
Timestamp: 2025-06-05T11:25:43.443Z
Learning: The user mirooon has an internal system for tracking tickets and technical debt. They acknowledged the security concern about disabled commit hash verification in the audit workflow and plan to implement conditional logic to skip verification only for revert PRs in a future update.
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/50[0-1]-*.mdc : GitHub Actions rule activations: Use glob patterns .github/workflows/**/*.yml and .github/workflows/**/*.yaml for workflow files
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check for existing PR comments before creating new ones; use Markdown for readability with headers, lists, and code blocks
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the `.github/workflows/protectSecurityRelevantCode.yml` file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Use /add-new-rule command as the standard workflow for adding or updating rules and commands
Learnt from: mirooon
Repo: lifinance/contracts PR: 1328
File: docs/LDAPeripheryRegistryFacet.md:14-27
Timestamp: 2025-08-29T14:05:25.335Z
Learning: mirooon prefers interface-level documentation to focus on the API contract and function purposes rather than implementation details like access control restrictions or specific modifiers, keeping documentation clean and consumable at the interface level.
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/50[0-1]-*.mdc : GitHub Actions rule activations: Use glob patterns .github/workflows/**/*.yml and .github/workflows/**/*.yaml for workflow files

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check for existing PR comments before creating new ones; use Markdown for readability with headers, lists, and code blocks

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check base branch targeting using condition: `if: ${{ github.event.pull_request.base.ref == 'main' }}`

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-05-27T12:36:26.987Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-07-03T01:44:43.968Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Keep workflows focused on single responsibilities for maintainability

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Every workflow file must start with a clear header comment block describing: purpose, triggers (events/branches/paths), key behaviors, and known limitations

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Use descriptive artifact names (e.g., `contracts_for_audit`) and initialize empty files to prevent upload failures

Applied to files:

  • .cursor/rules/502-git-workflow.mdc
  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Use /add-new-rule command as the standard workflow for adding or updating rules and commands

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:27:39.700Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/099-finish.mdc:0-0
Timestamp: 2025-12-17T10:27:39.700Z
Learning: In summary format: Start with applied rules (filename/anchor), include tests/lints run, call out follow-ups/gaps

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-08-07T10:20:01.383Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1283
File: deployments/ronin.diamond.json:65-68
Timestamp: 2025-08-07T10:20:01.383Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) and deployment log files have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/10[0-7]-*.mdc : Solidity rule activations: Use glob pattern **/*.sol for all Solidity files, src/**/*.sol for production contracts (excluding test and script files), src/Facets/**/*.sol for facets, src/Interfaces/**/*.sol for interfaces

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/40[0-2]-*.mdc : Testing rule activations: Use glob patterns test/**/*.t.sol for Solidity tests, **/*.test.ts for TypeScript tests, and test/**/*.t.sol + **/*.test.ts + script/**/*.ts for cross-language testing rules

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/200-*.mdc : TypeScript rule activations: Use glob patterns script/**/*.ts and tasks/**/*.ts for TypeScript scripting and helper files

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to .github/workflows/*{audit,version}*.yml : CI workflows must enforce audit-log and audit-report expectations through automated verification in `.github/workflows/versionControlAndAuditCheck.yml`

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to src/**/*.sol : All contracts in `src/` require audits except Interfaces in `src/Interfaces/**` (type definitions only) and external dependencies in `lib/`

Applied to files:

  • .cursor/rules/README.md
🪛 LanguageTool
.cursor/rules/README.md

[uncategorized] ~110-~110: The official name of this software platform is spelled with a capital “H”.
Context: ... conventions | ❌ On match | .git/**, .github/pull_request_template.md, `.github/**/...

(GITHUB)


[uncategorized] ~110-~110: The official name of this software platform is spelled with a capital “H”.
Context: ..., .github/pull_request_template.md, .github/**/.md, **/*.md` ...

(GITHUB)

⏰ 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). (3)
  • GitHub Check: run-unit-tests
  • GitHub Check: enforce-min-test-coverage
  • GitHub Check: run-unit-tests
🔇 Additional comments (2)
.cursor/rules/502-git-workflow.mdc (2)

1-10: Rule structure compliant; glob patterns require revision (see README comment).

The MDC format is well-structured with proper frontmatter (name, description, globs, alwaysApply) and the rule content is clear and well-organized. However, the glob patterns (lines 4–8) inherit the overly-broad scope issue flagged in the README. Coordinate the fix there.


12-40: Git workflow guidance is clear and well-documented.

The rule content effectively covers:

  • Clear branching model with Jira ticket requirements (lines 14–20)
  • Sensible PR targeting defaults with rationale (lines 22–30)
  • Well-motivated exceptions for config files (lines 32–40)

The guidance strikes a good balance between prescriptive branching conventions and pragmatic allowance for large-topic multi-PR workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants