Skip to content

feat(docs): Update coding standards to clarify database storage guide…#1583

Merged
jokob-sk merged 1 commit intomainfrom
next_release
Apr 3, 2026
Merged

feat(docs): Update coding standards to clarify database storage guide…#1583
jokob-sk merged 1 commit intomainfrom
next_release

Conversation

@jokob-sk
Copy link
Copy Markdown
Collaborator

@jokob-sk jokob-sk commented Apr 3, 2026

…lines

Summary by CodeRabbit

  • Documentation
    • Updated code standards to clarify data storage conventions: database stores temporary statistics while long-term configuration is stored in the /config folder. Configuration files are sufficient to restore system functionality, excluding historical data.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Updated code standards documentation to establish a database convention: temporary statistics storage belongs in the database, while long-term configuration must reside in the /config folder to ensure functionality restoration.

Changes

Cohort / File(s) Summary
Code Standards Documentation
.github/skills/code-standards/SKILL.md
Added database convention clarifying that DB serves as temporary statistics storage while /config stores long-term configuration necessary for functionality restoration.

Poem

🐰 A rule for the wise, now written down clear,
Config in folders, the database near—
Statistics come go, but config stays true,
Building the structure that guides all we do! 📋✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: updating coding standards documentation to clarify database storage guidelines, which matches the file modified and content added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch next_release

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.

Copy link
Copy Markdown
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

🧹 Nitpick comments (1)
.github/skills/code-standards/SKILL.md (1)

16-16: Use hyphenation for the compound adjective.

At Line 16, use “long-term configuration” (hyphenated) for correctness/readability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/skills/code-standards/SKILL.md at line 16, Update the phrasing on
the line that reads "long term configuration" to use hyphenation: change it to
"long-term configuration" so the compound adjective is correct (reference the
sentence containing "treat DB as temporary storage for stats, long term
configuration should be stored in the /config folder").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/skills/code-standards/SKILL.md:
- Line 16: Replace the misleading sentence that says the DB is only for
temporary stats and /config holds long-term configuration with a clarifying
statement framing configuration as "source of truth vs runtime cache" — update
the SKILL.md line to say the DB may hold canonical configuration while /config
provides restoration fixtures and the DB can act as a runtime cache (mention the
behaviour in initialise.py and db_upgrade.py as examples of config represented
in the DB); keep the guidance succinct and avoid absolute language that excludes
storing configuration in the DB.

---

Nitpick comments:
In @.github/skills/code-standards/SKILL.md:
- Line 16: Update the phrasing on the line that reads "long term configuration"
to use hyphenation: change it to "long-term configuration" so the compound
adjective is correct (reference the sentence containing "treat DB as temporary
storage for stats, long term configuration should be stored in the /config
folder").
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8cf4b100-5362-432b-98a5-c31c03abdd5c

📥 Commits

Reviewing files that changed from the base of the PR and between bf986a3 and 4f2fa86.

📒 Files selected for processing (1)
  • .github/skills/code-standards/SKILL.md

- follow DRY principle - maintainability of code is more important than speed of implementation
- code files should be less than 500 LOC for better maintainability
- DB columns must not contain underscores, use camelCase instead (e.g., deviceInstanceId, not device_instance_id)
- treat DB as temporary storage for stats, long term configuration should be stored in the /config folder, the /config folder should allow you to restore most of your functionality (excluding historical data)
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.

⚠️ Potential issue | 🟠 Major

Clarify DB semantics to avoid misleading architecture decisions.

Line 16 currently reads as if DB should only hold stats and /config exclusively holds long-term configuration. That conflicts with current behavior where configuration is also represented in DB (server/initialise.py, Line 732–Line 741; server/db/db_upgrade.py, Line 511–Line 537). Please reword this as “source of truth vs runtime cache” rather than “DB temporary stats only.”

Proposed wording update
-- treat DB as temporary storage for stats, long term configuration should be stored in the /config folder, the /config folder should allow you to restore most of your functionality (excluding historical data)
+- treat `/config` as the source of truth for restorable long-term configuration; DB may store runtime/cache state (including settings representations) and historical/statistical data. `/config` should restore most functionality (excluding historical data).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- treat DB as temporary storage for stats, long term configuration should be stored in the /config folder, the /config folder should allow you to restore most of your functionality (excluding historical data)
- treat `/config` as the source of truth for restorable long-term configuration; DB may store runtime/cache state (including settings representations) and historical/statistical data. `/config` should restore most functionality (excluding historical data).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~16-~16: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...reat DB as temporary storage for stats, long term configuration should be stored in the /...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/skills/code-standards/SKILL.md at line 16, Replace the misleading
sentence that says the DB is only for temporary stats and /config holds
long-term configuration with a clarifying statement framing configuration as
"source of truth vs runtime cache" — update the SKILL.md line to say the DB may
hold canonical configuration while /config provides restoration fixtures and the
DB can act as a runtime cache (mention the behaviour in initialise.py and
db_upgrade.py as examples of config represented in the DB); keep the guidance
succinct and avoid absolute language that excludes storing configuration in the
DB.

@jokob-sk jokob-sk merged commit 9f3dbe2 into main Apr 3, 2026
6 checks passed
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