Skip to content

refactor: extract database singleton to AttributeStore, add name field to Graph#377

Merged
AviAvni merged 1 commit intomainfrom
db-singleton-name-field
Apr 14, 2026
Merged

refactor: extract database singleton to AttributeStore, add name field to Graph#377
AviAvni merged 1 commit intomainfrom
db-singleton-name-field

Conversation

@AviAvni
Copy link
Copy Markdown
Contributor

@AviAvni AviAvni commented Apr 14, 2026

Summary

Split from #359.

  • Move the fjall DATABASE static from graph.rs to attribute_store.rs as get_database() function
  • Remove database parameter from AttributeStore::new() — stores create/access the shared database internally
  • Add name: String field to Graph struct (needed for RDB persistence and virtual key naming)
  • Add Graph::name() accessor

Test plan

  • cargo check passes
  • cargo test -p graph passes
  • No behavioral changes, pure refactoring

…d to Graph

- Move fjall DATABASE static from Graph to AttributeStore as get_database()
- Remove database parameter from AttributeStore::new()
- Add name: String field to Graph struct for persistence/identification
- Add Graph::name() accessor

Split from #359.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 53 minutes and 34 seconds.

⌛ 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 02c0229b-ec1e-43ec-8663-7528f52d8b7b

📥 Commits

Reviewing files that changed from the base of the PR and between d51f96e and eb1ccc1.

📒 Files selected for processing (2)
  • graph/src/graph/attribute_store.rs
  • graph/src/graph/graph.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch db-singleton-name-field

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.

@AviAvni AviAvni merged commit c2587c7 into main Apr 14, 2026
14 checks passed
@AviAvni AviAvni deleted the db-singleton-name-field branch April 14, 2026 13:12
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.15%. Comparing base (d51f96e) to head (eb1ccc1).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
graph/src/graph/graph.rs 57.14% 3 Missing ⚠️
graph/src/graph/attribute_store.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #377      +/-   ##
==========================================
- Coverage   84.15%   84.15%   -0.01%     
==========================================
  Files         110      110              
  Lines       28963    28964       +1     
==========================================
  Hits        24375    24375              
- Misses       4588     4589       +1     
Flag Coverage Δ
fuzz 42.03% <74.07%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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