Skip to content

chore(test): Add test for placeholder presence#281

Merged
c-thiel merged 2 commits into
mainfrom
ct/test-placeholder-presence
Jul 17, 2026
Merged

chore(test): Add test for placeholder presence#281
c-thiel merged 2 commits into
mainfrom
ct/test-placeholder-presence

Conversation

@c-thiel

@c-thiel c-thiel commented Apr 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Added a validation test that verifies all required template/placeholders are present in the embedded console files. This improves reliability by catching missing configuration tokens early, reducing the risk of deployment or runtime template issues. No production behavior or public APIs were changed.

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a085d13-8178-4784-9c22-7c9910924c50

📥 Commits

Reviewing files that changed from the base of the PR and between 789345a and 6a36dd2.

📒 Files selected for processing (3)
  • console-rs/src/lib.rs
  • index.html
  • vite.config.mts

Walkthrough

A new unit test, test_all_placeholders_present_in_embedded_files, was added to assert that a fixed list of Vite/template placeholder strings appears in at least one of the embedded console files enumerated via LakekeeperConsole::iter().

Changes

Test: placeholder presence

Layer / File(s) Summary
Test Data
console-rs/src/lib.rs
Defines an array of expected Vite/template placeholder strings to check.
Collection
console-rs/src/lib.rs
Uses LakekeeperConsole::iter() to gather all embedded console entries and decodes each file.data as UTF-8.
Assertion / Test Logic
console-rs/src/lib.rs
For each placeholder, asserts at least one embedded file's content contains it; on failure reports missing and found placeholders.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A test hops in to peek through each file,
Seeking placeholders with a curious smile,
It checks embedded bits, one by one,
Ensuring templates are intact when done,
Little guardrails, light and agile.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a test for placeholder presence in embedded files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 ct/test-placeholder-presence

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@console-rs/src/lib.rs`:
- Around line 210-220: The test is iterating raw stored paths and calling
LakekeeperConsole::get which returns gzipped bytes, so UTF-8 checks always fail;
replace use of LakekeeperConsole::iter() with the test-only
LakekeeperConsole::embedded_iter() (which strips .gz suffixes) and call
LakekeeperConsole::embedded(name) instead of LakekeeperConsole::get(file_path)
so you receive decompressed content before running
std::str::from_utf8(...).contains(placeholder); update references in the loop to
use embedded_iter() and embedded() (or their returned bytes) so placeholders are
checked against decompressed text.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 41298aee-0974-4621-bb83-a53f2cb81c0f

📥 Commits

Reviewing files that changed from the base of the PR and between ab86b1e and 789345a.

📒 Files selected for processing (1)
  • console-rs/src/lib.rs

Comment thread console-rs/src/lib.rs Outdated
@c-thiel c-thiel closed this Jul 16, 2026
@c-thiel c-thiel reopened this Jul 16, 2026
@c-thiel
c-thiel force-pushed the ct/test-placeholder-presence branch from 789345a to 6a36dd2 Compare July 17, 2026 06:55
@c-thiel
c-thiel merged commit 0b23db9 into main Jul 17, 2026
7 checks passed
@c-thiel
c-thiel deleted the ct/test-placeholder-presence branch July 17, 2026 08:21
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