Repository navigation
fix(score): give Upload and WebPage explicit source weights - #181
Conversation
The source weight calculation was incorrectly handling negative signal values, causing the weight to be computed as zero when it should have been proportional to the signal magnitude. This fix ensures that the absolute value of the signal is used in the weight calculation, preserving the intended behavior where stronger signals, regardless of direction, contribute more to the source weight. Auto-committed-on: dragonfly
Tiny Sweeper reviewTiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete What changedThe review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below. FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred.
FindingsNo active actionable findings. Could not review: src/memory/score/signals/source_weight.rs, tinysweeper/description, tinysweeper/e2e, tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["weight_for_explicit<br/>changed"]:::changed
n1["weight_for"]:::impacted
n2["kind_default"]:::impacted
n3["score"]:::impacted
n4["every_data_source_has_an_explicit_weight"]:::impacted
n5["infer_data_source"]:::impacted
n1 -->|calls| n0
n1 -->|calls| n2
n3 -->|calls| n1
n3 -->|calls| n2
n3 -->|calls| n5
n4 -->|calls| n0
n4 -->|tests| n0
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe explicit source weight mapping now assigns weights of 0.7 to uploads and 0.6 to web pages. ChangesExplicit source weights
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~4 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Uploads retain their prior score, and web pages receive an explicit 0.6 weight. The available evidence does not show that this intended scoring change violates a repository contract, so no actionable merge risk is established. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
A rabbit checks the source weights with care Comment |
Root cause:
DataSourcegainedUploadandWebPagein the contract crate with no entry inweight_for_explicit, so the guard testevery_data_source_has_an_explicit_weightfailed on main (it reportedupload,web_page).Fix: add explicit weights (Upload 0.7, matching the Document default; WebPage 0.6, alongside mixed-provenance Drive docs). The guard test is unchanged.
Verified locally: fmt, clippy -D warnings, cargo test --all-features, the feature matrix (no-default, tokio, git-diff, sync, persona, all), and rustdoc -D warnings.
Note: the single commit's subject was written by the auto-commit hook; the change is only the two match arms in source_weight.rs.
Co-authored-by: Medulla medulla@tinyhumans.ai
Summary by CodeRabbit