test(viewer): bundle_diff proptest surface (WBS-6.2 #434) - #439
test(viewer): bundle_diff proptest surface (WBS-6.2 #434)#439KooshaPari wants to merge 1 commit into
Conversation
Adds `crates/sl-viewer/tests/properties_viewer_bundle_diff.rs` with
10 proptest properties pinning the `bundle_diff::diff_fields` and
`OkfBundle::from_bundle` reductions:
* `diff_fields` returns the documented 9-field set in stable order
(guards against UI row-count drift when fields are added).
* `diff_fields(a, a)` is reflexive: no fields differ on equal inputs.
* `diff_fields(a, a.clone())` is idempotent: clone-mirror produces no
differences.
* `diff_fields(a, b)` is value-flipped symmetric:
`diff_fields(b, a)` swaps `value_a`/`value_b` per field but the
`differs` set is identical.
* `FieldDiff::differs` matches `value_a != value_b` per field
(catches drift where the boolean is computed independently of values).
* `Option<String>` fields (model, created_at, goal) render the em-dash
fallback (`—`) when both sides are `None`, and the resulting diff
is not a difference.
* `OkfBundle::from_bundle`:
* `message_count` equals the input slice count.
* `has_acceptance`/`has_contract` reflect presence of those kinds
(any-of) in the input continuation.
* `token_count` falls back to 0 when no Intent slice carries a
numeric `user_turn_count` (3-variant: missing slice / missing field
/ non-numeric field).
* `source_id` carries through from the continuation unchanged.
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 · |
📝 WalkthroughSummaryThe PR adds 10 property-based tests for The changes are focused and do not alter public APIs. The targeted tests, Clippy, and formatting pass. Must FixNone. Should FixNone. ConsiderRun the full workspace test suite before merging if it has not already been run. Approve / Request ChangesApprove. WalkthroughThe PR adds property-based tests for ChangesBundle-diff coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
| #[test] | ||
| fn from_bundle_message_count_matches_len(slice_count in 0usize..8) { | ||
| let bundles: Vec<Bundle> = (0..slice_count) | ||
| .map(|i| Bundle::new(BundleKind::Intent, serde_json::json!({"i": i}))) | ||
| .collect(); |
There was a problem hiding this comment.
Suggestion: The from_bundle properties never construct Context or populated Intent bodies, so they do not exercise extraction of duration_ms, model, created_at, or goal, nor first-context/first-intent selection. Regressions in any of those four reduction paths will pass this purported integration property suite; add populated context and intent cases with assertions for every extracted field. [incomplete implementation]
Severity Level: Major ⚠️
- ⚠️ Context metadata regressions can pass the property suite.
- ⚠️ Intent goal regressions can pass unnoticed.
- ❌ Bundle comparison rows may display incorrect extracted values.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
**Line:** 207:211
**Comment:**
*Incomplete Implementation: The `from_bundle` properties never construct `Context` or populated `Intent` bodies, so they do not exercise extraction of `duration_ms`, `model`, `created_at`, or `goal`, nor first-context/first-intent selection. Regressions in any of those four reduction paths will pass this purported integration property suite; add populated context and intent cases with assertions for every extracted field.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| fn from_bundle_token_count_zero_when_no_intent_or_field( | ||
| // Variants: 0 = no Intent bundle at all; 1 = Intent without | ||
| // user_turn_count; 2 = Intent with non-numeric user_turn_count. | ||
| variant in 0u8..3, | ||
| ) { | ||
| let bundles: Vec<Bundle> = match variant { | ||
| 0 => Vec::new(), | ||
| 1 => vec![Bundle::new(BundleKind::Intent, serde_json::json!({"goal": "x"}))], | ||
| _ => vec![Bundle::new( | ||
| BundleKind::Intent, | ||
| serde_json::json!({"user_turn_count": "not-a-number"}), | ||
| )], | ||
| }; |
There was a problem hiding this comment.
Suggestion: The property only creates zero or one Intent bundle, so it never verifies the documented aggregation behavior when multiple Intent slices are present. A regression that reads only the first intent instead of summing all user_turn_count values would still pass this entire property; generate multiple intent bundles and assert the expected total. [incomplete implementation]
Severity Level: Major ⚠️
- ❌ Multi-Intent token totals can be misrepresented in bundle comparisons.
- ⚠️ Current property suite passes despite first-Intent-only reduction.
- ⚠️ Future aggregation regressions remain undetected.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
**Line:** 248:260
**Comment:**
*Incomplete Implementation: The property only creates zero or one `Intent` bundle, so it never verifies the documented aggregation behavior when multiple `Intent` slices are present. A regression that reads only the first intent instead of summing all `user_turn_count` values would still pass this entire property; generate multiple intent bundles and assert the expected total.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix| /// Compile-time guarantee that the FieldDiff-derived constants stay in sync. | ||
| /// If the impl adds a field, this test fails to compile until EXPECTED_FIELD_NAMES | ||
| /// is updated, prompting the reviewer to confirm the UI row count. | ||
| #[allow(dead_code)] | ||
| const fn _assert_field_count_fits_diff(diff: &[FieldDiff], expected_len: usize) -> bool { | ||
| diff.len() == expected_len | ||
| } |
There was a problem hiding this comment.
Suggestion: This function is never invoked, so it provides no compile-time guarantee and adding or removing a field will not make compilation fail. The only effective check is the runtime property above, which uses a separately maintained list; either invoke this in a real const assertion or remove the misleading guarantee and comment. [comment mismatch]
Severity Level: Minor 🧹
- ⚠️ Claimed compile-time synchronization is not actually enforced.
- ⚠️ Runtime field-order coverage remains effective at lines 95-103.
- ⚠️ The issue affects test documentation and maintainability.(Use Cmd/Ctrl + Click for best experience)
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
**Line:** 284:290
**Comment:**
*Comment Mismatch: This function is never invoked, so it provides no compile-time guarantee and adding or removing a field will not make compilation fail. The only effective check is the runtime property above, which uses a separately maintained list; either invoke this in a real const assertion or remove the misleading guarantee and comment.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fixThere was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/sl-viewer/tests/properties_viewer_bundle_diff.rs`:
- Around line 284-290: Remove the unused `_assert_field_count_fits_diff` helper
and its `#[allow(dead_code)]` suppression; do not add replacement logic unless
it actually references `diff_fields` and `EXPECTED_FIELD_NAMES` to enforce the
intended compile-time check.
In `@docs/ops/WBS.md`:
- Around line 32-36: Resolve the conflict in the WBS-6.2 table row by removing
all Git conflict markers and retaining one consolidated row. Ensure its file
list includes both properties_viewer_timeline.rs and
properties_viewer_bundle_diff.rs, with separate timeline `#433` and bundle_diff
`#434` references, while preserving the other WBS-6.2 entries.
🪄 Autofix
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: ASSERTIVE
Plan: Pro Plus
Run ID: d7128d22-65bd-4548-9c54-7871f4061ad4
📒 Files selected for processing (4)
CHANGELOG.mdcrates/sl-viewer/tests/properties_viewer_bundle_diff.rsdocs/ops/TRACEABILITY.jsondocs/ops/WBS.md
📜 Review details
⏰ Context from checks skipped due to timeout. (35)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: sl-daemon · repository builder image offline build / sl-daemon · repository builder image offline build
- GitHub Check: hermetic · reusable workflow provenance (soft)
- GitHub Check: hermetic · SLSA isolation checklist (soft)
- GitHub Check: jemalloc hard · feature build
- GitHub Check: sl-daemon · locked offline build
- GitHub Check: shuttle permutation · cargo test shuttle_permutation
- GitHub Check: shuttle permutation · SelfCheck
- GitHub Check: daemon graph hard · tokio graph
- GitHub Check: jemalloc default-on · unix default build
- GitHub Check: jemalloc default-on · windows default build
- GitHub Check: visual contract · WCAG AA
- GitHub Check: loom permutation · hermetic wrappers
- GitHub Check: loom permutation · daemon mpsc
- GitHub Check: load macro gate · macro routes smoke
- GitHub Check: browser e2e · axe · responsive · visual
- GitHub Check: prepare
- GitHub Check: session-ledger build · windows-latest
- GitHub Check: fuzz blocking · sustained 30s
- GitHub Check: sl-daemon build · macos-latest
- GitHub Check: exotic check · aarch64-unknown-linux-gnu
- GitHub Check: exotic check · x86_64-unknown-linux-musl
- GitHub Check: Eval Reproducibility SelfCheck
- GitHub Check: sl-viewer macOS app · artifact
- GitHub Check: rootless-only matrix policy
- GitHub Check: ci / rootless-nonet policy smoke
- GitHub Check: sl-viewer help · unit tests
- GitHub Check: soft loom · loom_model core
- GitHub Check: soft loom · daemon broadcast
- GitHub Check: soft loom · daemon mpsc
- GitHub Check: update check hard · sl-daemon tests
- GitHub Check: tsan permutation · race_model
- GitHub Check: Summary
- GitHub Check: prepare
- GitHub Check: browser e2e · axe · responsive · visual
⚠️ CI failures not shown inline (2)
GitHub Actions: Trunk Check / 0_Lint & Format.txt: test(viewer): bundle_diff proptest surface (WBS-6.2 #434)
Conclusion: failure
##[group]Run cat >>$GITHUB_ENV <<EOF
�[36;1mcat >>$GITHUB_ENV <<EOF�[0m
�[36;1mGITHUB_***REDACTED_SECRET_ASSIGNMENT***
�[36;1mTRUNK_LAUNCHER_QUIET=false�[0m
�[36;1mEOF�[0m
�[36;1m�[0m
�[36;1m# First arg is field to fetch, second arg is default value or empty�[0m
�[36;1mpayload() {�[0m
�[36;1m if [ $# -lt 2 ]; then�[0m
�[36;1m DEFAULT_VALUE=empty�[0m
�[36;1m else�[0m
�[36;1m DEFAULT_VALUE=\"$2\"�[0m
�[36;1m fi�[0m
�[36;1m if command -v jq >/dev/null; then�[0m
�[36;1m jq -r ".inputs.payload | fromjson | .$1 // ${DEFAULT_VALUE}" ${TEST_GITHUB_EVENT_PATH:-${GITHUB_EVENT_PATH}}�[0m
�[36;1m else�[0m
�[36;1m echo "::error::jq not installed on system!"�[0m
GitHub Actions: Trunk Check / Lint & Format: test(viewer): bundle_diff proptest surface (WBS-6.2 #434)
Conclusion: failure
##[group]Run cat >>$GITHUB_ENV <<EOF
�[36;1mcat >>$GITHUB_ENV <<EOF�[0m
�[36;1mGITHUB_***REDACTED_SECRET_ASSIGNMENT***
�[36;1mTRUNK_LAUNCHER_QUIET=false�[0m
�[36;1mEOF�[0m
�[36;1m�[0m
�[36;1m# First arg is field to fetch, second arg is default value or empty�[0m
�[36;1mpayload() {�[0m
�[36;1m if [ $# -lt 2 ]; then�[0m
�[36;1m DEFAULT_VALUE=empty�[0m
�[36;1m else�[0m
�[36;1m DEFAULT_VALUE=\"$2\"�[0m
�[36;1m fi�[0m
�[36;1m if command -v jq >/dev/null; then�[0m
�[36;1m jq -r ".inputs.payload | fromjson | .$1 // ${DEFAULT_VALUE}" ${TEST_GITHUB_EVENT_PATH:-${GITHUB_EVENT_PATH}}�[0m
�[36;1m else�[0m
�[36;1m echo "::error::jq not installed on system!"�[0m
🧰 Additional context used
📓 Path-based instructions (5)
*
📄 CodeRabbit inference engine (AGENTS.md)
*: Perform feature work in a git worktree under.claude/worktrees/, created fromorigin/mainon a branch named<type>/<topic>, rather than working directly onmain.
Do not make direct commits to protectedmain; use a pull request.
Do not usegit reset --hard,git stash, orgit cleanin worktrees.
Do not use--no-verifyor bypass hooks without operator approval.
Do not work on a branch or worktree another actor is using.
Files:
CHANGELOG.md
**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{rs,toml}: Use the Rust toolchain pinned inrust-toolchain.toml; the workspace MSRV is Rust 1.85.
Validate Rust workspace changes with the prescribed locked build, all-features test suite, Clippy, and rustfmt checks where applicable.
Files:
crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
Fix Clippy warnings; do not add
#[allow]unless it includes a tracking-issue comment.
Files:
crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
crates/sl-viewer/**/*.{rs,toml}
📄 CodeRabbit inference engine (AGENTS.md)
crates/sl-viewer/**/*.{rs,toml}: Thesl-viewercrate uses Dioxus 0.6; use the Dioxus CLI/toolchain for desktop development and bundling.
Usecargo check -p sl-vieweras the fast inner-loop check for viewer changes.
Files:
crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
crates/sl-viewer/**/*
📄 CodeRabbit inference engine (AGENTS.md)
When packaging the macOS viewer, account for the documented Electrobun/Dioxus code-signing requirements.
Files:
crates/sl-viewer/tests/properties_viewer_bundle_diff.rs
🪛 LanguageTool
docs/ops/WBS.md
[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...; fuzz/fuzz_targets/jsonl_ingest.rs; .github/workflows/ci.yml; .github/workflows/b...
(GITHUB)
[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...ingest.rs; .github/workflows/ci.yml; .github/workflows/bench-gate.yml; docs/ops/pe...
(GITHUB)
[uncategorized] ~35-~35: The official name of this software platform is spelled with a capital “H”.
Context: ...; fuzz/fuzz_targets/jsonl_ingest.rs; .github/workflows/ci.yml; .github/workflows/b...
(GITHUB)
[uncategorized] ~35-~35: The official name of this software platform is spelled with a capital “H”.
Context: ...ingest.rs; .github/workflows/ci.yml; .github/workflows/bench-gate.yml; docs/ops/pe...
(GITHUB)
🪛 markdownlint-cli2 (0.23.2)
docs/ops/WBS.md
[warning] 32-32: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 32-32: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 32-32: Table column count
Expected: 6; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 34-34: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 34-34: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 34-34: Table column count
Expected: 6; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 35-35: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🔇 Additional comments (4)
crates/sl-viewer/tests/properties_viewer_bundle_diff.rs (2)
1-280: LGTM!
23-25: 📐 Maintainability & Code QualityProvide the prescribed Rust validation result.
The supplied summary reports targeted tests, Clippy, and formatting. Confirm the pinned-toolchain locked build, all-features test suite,
cargo check -p sl-viewer, Clippy, and rustfmt checks for this viewer change.As per coding guidelines, “Use the Rust toolchain pinned in
rust-toolchain.toml” and “Validate Rust workspace changes with the prescribed locked build, all-features test suite, Clippy, and rustfmt checks where applicable.”Source: Coding guidelines
CHANGELOG.md (1)
23-24: LGTM!docs/ops/TRACEABILITY.json (1)
306-324: LGTM!
| /// Compile-time guarantee that the FieldDiff-derived constants stay in sync. | ||
| /// If the impl adds a field, this test fails to compile until EXPECTED_FIELD_NAMES | ||
| /// is updated, prompting the reviewer to confirm the UI row count. | ||
| #[allow(dead_code)] | ||
| const fn _assert_field_count_fits_diff(diff: &[FieldDiff], expected_len: usize) -> bool { | ||
| diff.len() == expected_len | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the ineffective lint suppression.
_assert_field_count_fits_diff is never evaluated. It does not reference diff_fields or EXPECTED_FIELD_NAMES, so it cannot enforce the stated compile-time guarantee. Remove this helper and its untracked #[allow(dead_code)], or add an actual tracking-issue comment if the suppression is necessary.
As per coding guidelines, “Fix Clippy warnings; do not add #[allow] unless it includes a tracking-issue comment.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@crates/sl-viewer/tests/properties_viewer_bundle_diff.rs` around lines 284 -
290, Remove the unused `_assert_field_count_fits_diff` helper and its
`#[allow(dead_code)]` suppression; do not add replacement logic unless it
actually references `diff_fields` and `EXPECTED_FIELD_NAMES` to enforce the
intended compile-time check.
Source: Coding guidelines
| <<<<<<< HEAD | ||
| | WBS-6.2 | P6 property tests, fuzzing, race checks, and enforced performance budgets | partial | machine | `tests/properties.rs`; `crates/sl-viewer/tests/properties_viewer.rs`; `crates/sl-viewer/tests/properties_viewer_theme_url.rs`; `crates/sl-viewer/tests/properties_viewer_unfinished_tab.rs`; `crates/sl-viewer/tests/properties_viewer_timeline.rs`; `crates/sl-viewer/tests/properties_viewer_bundle_diff.rs`; `fuzz/fuzz_targets/okf_roundtrip.rs`; `fuzz/fuzz_targets/jsonl_ingest.rs`; `.github/workflows/ci.yml`; `.github/workflows/bench-gate.yml`; `docs/ops/perf-baseline.json`; `scripts/bench-gate.ps1`; `benches/pipeline.rs`; `tests/loom_model.rs` | DESIGN P6 residual; C00 L6-L8; C07 L66-L68; C08 L74; perf-budget enforced Wave-26 #223; p95 latency enforced Wave-30 #256; FSM properties Wave-31 #261; soft loom Wave-31 #264; viewer corpus_paths/parquet/settings properties #425; viewer theme + daemon_url properties #427; viewer unfinished_tab properties + fuzz/rootless CI drift fixes #428; viewer bundle_diff + timeline properties + web_exports/hmetic-pin cleanups #432; viewer bundle_diff properties #434; full loom/shuttle unpaid | | ||
| ======= | ||
| | WBS-6.2 | P6 property tests, fuzzing, race checks, and enforced performance budgets | partial | machine | `tests/properties.rs`; `crates/sl-viewer/tests/properties_viewer.rs`; `crates/sl-viewer/tests/properties_viewer_theme_url.rs`; `crates/sl-viewer/tests/properties_viewer_unfinished_tab.rs`; `crates/sl-viewer/tests/properties_viewer_bundle_diff.rs`; `fuzz/fuzz_targets/okf_roundtrip.rs`; `fuzz/fuzz_targets/jsonl_ingest.rs`; `.github/workflows/ci.yml`; `.github/workflows/bench-gate.yml`; `docs/ops/perf-baseline.json`; `scripts/bench-gate.ps1`; `benches/pipeline.rs`; `tests/loom_model.rs` | DESIGN P6 residual; C00 L6-L8; C07 L66-L68; C08 L74; perf-budget enforced Wave-26 #223; p95 latency enforced Wave-30 #256; FSM properties Wave-31 #261; soft loom Wave-31 #264; viewer corpus_paths/parquet/settings properties #425; viewer theme + daemon_url properties #427; viewer unfinished_tab properties + fuzz/rootless CI drift fixes #428; viewer bundle_diff properties #434; viewer timeline properties #433; full loom/shuttle unpaid | | ||
| >>>>>>> 80e17065 (test(viewer): bundle_diff proptest surface (WBS-6.2 #434)) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Resolve the remaining merge conflict.
Lines 32, 34, and 36 are Git conflict markers. They break the WBS table and leave two incompatible WBS-6.2 rows in the document. Keep one row that includes both properties_viewer_timeline.rs and properties_viewer_bundle_diff.rs, with separate #433 and #434 references, then remove all conflict markers.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...; fuzz/fuzz_targets/jsonl_ingest.rs; .github/workflows/ci.yml; .github/workflows/b...
(GITHUB)
[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...ingest.rs; .github/workflows/ci.yml; .github/workflows/bench-gate.yml; docs/ops/pe...
(GITHUB)
[uncategorized] ~35-~35: The official name of this software platform is spelled with a capital “H”.
Context: ...; fuzz/fuzz_targets/jsonl_ingest.rs; .github/workflows/ci.yml; .github/workflows/b...
(GITHUB)
[uncategorized] ~35-~35: The official name of this software platform is spelled with a capital “H”.
Context: ...ingest.rs; .github/workflows/ci.yml; .github/workflows/bench-gate.yml; docs/ops/pe...
(GITHUB)
🪛 markdownlint-cli2 (0.23.2)
[warning] 32-32: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 32-32: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 32-32: Table column count
Expected: 6; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 34-34: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 34-34: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 34-34: Table column count
Expected: 6; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 35-35: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/ops/WBS.md` around lines 32 - 36, Resolve the conflict in the WBS-6.2
table row by removing all Git conflict markers and retaining one consolidated
row. Ensure its file list includes both properties_viewer_timeline.rs and
properties_viewer_bundle_diff.rs, with separate timeline `#433` and bundle_diff
`#434` references, while preserving the other WBS-6.2 entries.
Source: Linters/SAST tools
|
Closing due to merge conflicts. |
User description
Summary
Adds
crates/sl-viewer/tests/properties_viewer_bundle_diff.rswith 10 proptest properties pinning thebundle_diff::diff_fieldsandOkfBundle::from_bundlereductions (WBS-6.2 #434, redux after the operator closed the original PR due to merge conflicts with #433's timeline surface).diff_fields(6 properties)diff_fields(a, a)is reflexive: no fields differ on equal inputsdiff_fields(a, a.clone())is idempotent: clone-mirror produces no differencesdiff_fields(a, b)is value-flipped symmetric:diff_fields(b, a)swapsvalue_a/value_bper field but thediffersset is identicalFieldDiff::differsmatchesvalue_a != value_bper fieldOption<String>fields render the em-dash fallback when both sides areNone, and the resulting diff is not a differenceOkfBundle::from_bundle(4 properties)message_countequals the input slice counthas_acceptance/has_contractreflect presence of those kindstoken_countfalls back to 0 when no Intent slice carries a numericuser_turn_countsource_idcarries through unchangedValidation
cargo test -p sl-viewer --test properties_viewer_bundle_diff --features "desktop parquet" --locked— 10 passedcargo clippy -p sl-viewer --test properties_viewer_bundle_diff --features "desktop parquet" --locked -- -D warnings— cleancargo fmt --all --check— cleanRebase status
This branch was rebased onto
origin/mainafter #433 (timeline) was merged. The only conflicts were inCHANGELOG.md,docs/ops/WBS.md, anddocs/ops/TRACEABILITY.json— all resolved by keeping both #433 and #434 entries. The new test file (crates/sl-viewer/tests/properties_viewer_bundle_diff.rs) is the only net-new file.CodeAnt-AI Description
Add property coverage for viewer bundle comparisons and bundle summaries
What Changed
Impact
✅ Fewer bundle comparison regressions✅ Consistent missing-value display✅ Reliable bundle summary counts and flags💡 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.