test(viewer): corpus_paths round-trip proptest surface (WBS-6.2 #446) - #451
test(viewer): corpus_paths round-trip proptest surface (WBS-6.2 #446)#451KooshaPari wants to merge 1 commit into
Conversation
Adds `crates/sl-viewer/tests/properties_viewer_corpus_paths.rs` with
10 proptest properties pinning the `corpus_paths` reductions:
* `CorpusPathConfig`:
* `empty()` returns a config with zero custom paths.
* `Default::default()` equals `empty()`.
* `is_empty()` is true iff `custom_paths` is empty.
* JSON round-trip preserves `custom_paths` exactly (order-sensitive).
* JSON round-trip is idempotent.
* JSON round-trip preserves `custom_paths.len()`.
* `save_config_to` / `load_config_from`:
* `save_config_to(c, p); load_config_from(p)` round-trips an equal
config (the contract the viewer's pick-then-read flow depends on).
* Missing file yields `Ok(empty())` — first-launch must not fail.
* Junk JSON surfaces `Err` — never silently drops the user's picks.
* `save_config_to` creates missing parent directories.
Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reached
Next review available in: 55 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
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. Comment |
|
Closing due to merge conflicts. |
Code Review SummaryStatus: 1 Issue Found | Recommendation: Approve with notes (non-blocking) Overview
Issue Details (click to expand)CRITICAL(none — by inspection the suite compiles: SUGGESTION
Files Reviewed (4 files)
Notes
Fix these issues in Kilo Cloud Reviewed by laguna-s-2.1:free · Input: 159.1K · Output: 25.9K · Cached: 210.7K |
…S-6.2 #451 #452 #453) (#461) * test(viewer): mock_data fixture proptest surface (WBS-6.2 #451) Adds crates/sl-viewer/tests/properties_viewer_mock_data.rs with 18 proptest properties pinning the deterministic demo fixtures: * sample_bundles(): * Non-empty, returns the documented 3-entry sample. * Every source_id is non-empty and unique. * Every ContinuationBundle has at least one Bundle slice, at least one Intent slice, and an Intent with a non-empty goal. * Every Acceptance slice carries ready: true. * Deterministic across calls. * sample_sessions(): * Non-empty, returns the documented 3-entry sample. * Every session id is non-empty and unique. * Every session has at least one non-empty-content message. * Every session has non-empty cwd and title. * Every session contains at least one User and one Assistant message so the timeline UI can render both sides. * Deterministic across calls. Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG. * test(viewer): cli_help + command_palette proptest surface (WBS-6.2 #452) Adds crates/sl-viewer/tests/properties_viewer_cli_help.rs with 17 proptest properties pinning the CLI help and palette SSOT: * cli_help::version_text: * Non-empty. * Contains the package version. * Contains the daemon: label and the help doc link. * Deterministic across calls. * cli_help::help_text: * Non-empty. * Documents SL_DAEMON_URL, FORGE_DB, and SL_VIEWER_DEMO. * Links the documented SSOT and quick-start docs. * Mentions the keyboard shortcuts. * Deterministic across calls. * command_palette::COMMANDS: * Non-empty. * Every command has a non-empty id, label, and hint. * Every id is unique across the palette. * Every id is kebab-case ASCII (used as a DOM id). * Every documented PaletteAction variant is covered. * Every label and hint is single-line (no tabs / newlines). * Each action appears 1-7 times. Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG. * test(viewer): corpus_cta constants proptest surface (WBS-6.2 #453) Adds crates/sl-viewer/tests/properties_viewer_corpus_cta.rs with 9 proptest properties pinning the first-run CTA SSOT: * QUICKSTART_URL: * Non-empty, uses HTTPS, ends in QUICKSTART.md. * Points at the canonical KooshaPari/SessionLedger repo. * Basename matches QUICKSTART_CORPUS_DOC's basename. * QUICKSTART_CORPUS_DOC: * Equals docs/guides/quick-start/QUICKSTART.md. * CORPUS_PICKER_INPUT_ID, FORGE_DB_HINT_STORAGE_KEY: * Non-empty, kebab-case ASCII (used as DOM id / localStorage key). * Distinct so the picker never confuses the two. Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG. --------- Co-authored-by: SessionLedger Bot <team@sessionledger.local>
* test(viewer): mock_data fixture proptest surface (WBS-6.2 #451) Adds crates/sl-viewer/tests/properties_viewer_mock_data.rs with 18 proptest properties pinning the deterministic demo fixtures: * sample_bundles(): * Non-empty, returns the documented 3-entry sample. * Every source_id is non-empty and unique. * Every ContinuationBundle has at least one Bundle slice, at least one Intent slice, and an Intent with a non-empty goal. * Every Acceptance slice carries ready: true. * Deterministic across calls. * sample_sessions(): * Non-empty, returns the documented 3-entry sample. * Every session id is non-empty and unique. * Every session has at least one non-empty-content message. * Every session has non-empty cwd and title. * Every session contains at least one User and one Assistant message so the timeline UI can render both sides. * Deterministic across calls. Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG. * test(viewer): theme + settings property surfaces (WBS-6.2 #454) Adds two complementary property surfaces for sl-viewer's pure data-reducers: * crates/sl-viewer/tests/properties_viewer_theme.rs (28 props): - Theme::default() is System; JSON round-trips for every variant. - ThemeColors::dark and ThemeColors::light each expose 9 fields that all match the documented lab_coat::* constants; every field is non-empty; focus == accent for both palettes. - for_theme(Dark|Light|System) is the documented palette. * crates/sl-viewer/tests/properties_viewer_settings.rs (21 props): - DefaultTab::default() is Bundles; ALL covers every variant, length 9, every tab_id/value_attr unique kebab-case ASCII. - Settings::default() matches documented; JSON round-trips; serialised theme is lowercase, default_tab is kebab-case. - save_to_path / load_from_path round-trip; missing/corrupt files fall back to default(); parent dirs created. - resolve_settings_dir honours overrides; falls through on empty; picks documented macOS / Windows / Linux paths. Updates WBS-6.2 evidence list, TRACEABILITY.json, and CHANGELOG. --------- Co-authored-by: SessionLedger Bot <team@sessionledger.local>
User description
Summary
Adds
crates/sl-viewer/tests/properties_viewer_corpus_paths.rswith 10 proptest properties pinning thecorpus_pathsconfiguration round-trip contract (WBS-6.2 #446).CorpusPathConfig(3 properties)empty()produces a config with zero custom paths.Default::default()equalsempty().is_empty()agrees withcustom_paths.is_empty().JSON round-trip (3 properties)
serde_json::to_string→serde_json::from_strpreservescustom_pathsexactly (order-sensitive).save_config_to/load_config_from(4 properties)save_config_tothenload_config_fromround-trips equal configs.Ok(empty()).Err.save_config_tocreates missing parent directories.Validation
cargo test -p sl-viewer --test properties_viewer_corpus_paths --features "desktop parquet" --locked— 10 passedcargo fmt --all --check— cleanWBS / TRACEABILITY
WBS-6.2 evidence list and
TRACEABILITY.jsongaincrates/sl-viewer/tests/properties_viewer_corpus_paths.rs. CHANGELOG Unreleased documents the new surface.CodeAnt-AI Description
Add property coverage for viewer corpus path configuration persistence
What Changed
Impact
✅ Reliable corpus path restoration✅ Safe first launch without a configuration file✅ Clear errors for corrupted path settings💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.