Repository navigation
fix(search): expose Write/Edit body query path - #2803
Conversation
Problem: the merged search-text coverage guide incorrectly said no query-DSL field could search Write/Edit bodies, despite action text predicates scanning raw tool_input. Its previous drift test also did not derive claims from the documented matrix or SQL fence. What changed: document the unindexed action-evidence route, retain direct SQL as an inspection alternative, and add a documentation-derived contract test. The test executes both action predicates and the fenced SQL against real Write/Edit blocks, so it fails if the actual routes or documented artifacts drift. Compatibility: Write/Edit bodies remain excluded from FTS; no schema rebuild is introduced. Ref polylogue-013x Co-Authored-By: Claude <[email protected]>
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 34761467 | Triggered | Generic High Entropy Secret | 99e33dc | tests/unit/pipeline/test_search_text_coverage_contract.py | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Adversarial review — iteration 1Findings fixed:
What survived scrutiny: Write/Edit bodies remain deliberately excluded from FTS; their supported fallback is explicitly unindexed and bounded by ordinary action/session/time filters. Focused contract test: 2 passed. Quick static/generated gate: passed. |
Problem: the coverage contract test omitted the documented terminal action query and Edit old_string, so those reader-facing paths could regress unnoticed. Synthetic token shapes also produced an avoidable secret-scanner false positive. What changed: exercise terminal action parsing/execution, both Edit body fields, and the complete indexed tool_input key set using readable fixture markers. Ref polylogue-013x Co-Authored-By: Claude <[email protected]>
Adversarial review — iteration 2Findings fixed:
Verification: env POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest nix develop --command devtools test tests/unit/pipeline/test_search_text_coverage_contract.py — 2 passed. Pre-push quick gate passed. |
Problem: the coverage matrix overstated its indexed JSON path count and cited the legacy fragment test rather than the documentation-derived contract test. What changed: correct the matrix wording and point readers to the test that parses the documented matrix and SQL probe. The contract test now pins both references. Ref polylogue-013x Co-Authored-By: Claude <[email protected]>
Adversarial review — iteration 3Findings fixed:
Verification: env POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest nix develop --command devtools test tests/unit/pipeline/test_search_text_coverage_contract.py — 2 passed. Pre-push quick gate passed. |
Adversarial review — iteration 4 (converged)No legitimate gaps found across all acceptance criteria after the independent iteration-4 review. Review and CI triage
Final acceptance-criteria matrix
Ref polylogue-013x |
…803,2787,2798 013x (search-coverage, PR #2803) and g9f2 (write-model, PR #2798) fully satisfied — closed. y8s5 (distribution, PR #2779), ttu (docs-ia, PR #2778), kwsb (PR #2799), and n4hb/c52g/znwj (test-hardening, PR #2787) partially satisfied — noted with disposition, left open per closure-discipline. Co-Authored-By: Claude <[email protected]>
Summary
Correct the search-text coverage guide after adversarial review: Write/Edit bodies remain excluded from FTS, but the documented action-evidence query route searches raw tool input without a direct-SQL detour.
Problem
Merged PR #2740 incorrectly stated that no query-DSL field could search Write/Edit bodies. Its claimed DDL-to-doc and workaround tests checked independent fragments rather than the documented matrix and fenced SQL themselves.
Solution
Verification
Anti-vacuity
The new test invokes the production query compiler and ArchiveStore lowering path against stored Write/Edit tool_input. Removing tool_input from action text lowering makes the DSL assertion fail. It also parses and executes the SQL fence from docs, and derives every documented Yes/No matrix value from the live search_text DDL, so changes to either contract artifact fail the test.
Adversarial review notes
Iteration 1 found two real gaps in the already-merged #2740 closure: the hidden DSL route and a vacuous docs-to-DDL/workaround test. This PR fixes both; no prior review comments apply to this branch.
Acceptance criteria
Ref polylogue-013x