Skip to content

Define shared search-evidence contracts for Review - #12

Closed
sidkmenon wants to merge 13 commits into
codex/diff-storefrom
codex/review-evidence-contract
Closed

sidkmenon wants to merge 13 commits into
codex/diff-storefrom
codex/review-evidence-contract

Conversation

@sidkmenon

@sidkmenon sidkmenon commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the reorganized stack: #6 contracts/output → #7 plugins → #20 Rust storage → #8 search/bindings → #10 Jev → #13 Review evidence.

The plan and final shared contracts now live in their owning layers; this separate plan-only branch is retired. The final implementation tree is unchanged.

AI assistance: authored and reorganized with Codex.

Add a compiling Node-API scaffold and a TypeScript output contract. Search entry points deliberately reject until implemented.

AI assistance: authored with Codex.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Carry search spans through the shared leaf schema, SDK records, native/WASM conversions, and leaf splits. Keep highlighted content open through file, ancestor, and linked-state collapse. Expand context around actual matched lines and protect search evidence in grouping, removed runs, and summaries. Add unchanged file metadata and rebuild the bundled component.

Validation: engine/plugin and SDK tests, plus the JS search output contract. AI assistance: authored with Codex.
Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Move the CLI implementation unchanged into the library and keep a thin binary entry point. Use the existing diffr binary name in help text, and label two prose examples as text now that library doctests run. No matching or identical-file fast-path behavior changes.

AI assistance: authored with Codex.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Resolve file correspondence through Git, validate worktree pins and hit text, cache query-independent trees, and retain per-hit candidates until postprocessing. Analyze unchanged blobs in the search path only. Restore full trees and run configured plugins with selected highlights attached.

AI assistance: authored with Codex.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Construct JS result and region helpers around native data. Render aligned changes, unchanged excerpts, and actionable collapsed gaps; update visibility locally through setCollapsed. Keep the full-output integration assertion and add validation, selection, isolation, options, and rename tests.

Correct the hand-authored expected gap to retain lines 16–17, as required by the existing context policy for short region remainders. No hits are removed and the assertion is not weakened.

Validation: six JS tests and TypeScript checking pass. AI assistance: authored with Codex.
Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Build the real Rust addon, type-check the API, and run the search snapshot and API tests with Bun and ripgrep.

AI assistance: authored with Codex.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Preserve try/catch and loop boundaries while folding the unchanged body. Verify the exact search output and ordinary diff context behavior.

Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Move result methods and region helper binding into an internal module without changing behavior. Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Expose diffr/jev with per-region relevance probabilities, bounded concurrent requests, local threshold selection, and independent postprocess-ready results. Include deterministic SDK transport tests and a live Jev fixture that prints scores and selected output.

Validated with TypeScript, eight code-mode tests, and the real Jev service using workspace credentials. Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Send Jev a JSON body containing the exact rendered result. Remove per-region line extraction and arbitrary preceding context. Filter whole results while preserving paired context and fold state. Record live request/response bodies on demand.

Validated with TypeScript, all eight code-mode tests, and a real Jev run. Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Remove the redundant view/body object and update the prompt and transport assertion. TypeScript, eight integration tests, and the live Jev example pass. Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Let Index<S: Store> own one shared computed-diff store. Keep pinned scopes, manifests, and plugin pipelines in separate sessions that share the index across comparisons and analysis settings. Replace the active index only when storage backend/location changes. Keep hydration and postprocessing typed; convert JSON only in the native binding.

Keep the Store contract beside search and split memory, atomic-file, and SQLite implementations into backend modules. diffr config owns backend/path selection entirely in Rust. Persist query-independent computed trees with canonical versioned keys; run native setup and computation on the blocking pool.

Validation: Rust workspace tests, native build, TypeScript, and the same eight code-mode tests with all three backends configured externally. Persistent-store tests forbid recomputation after reopen and verify query/config isolation, corruption handling, and atomic publication. Pretty-output snapshots unchanged.

Implemented with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
Record agreed APIs, stored JSON, implementation layers, E2E acceptance, and change-control boundary. Authored with Codex assistance.

Agent-Session: 01a0b305-beed-70b1-834d-75943cf58d53
@sidkmenon
sidkmenon added this pull request to stack #14 September 19, 2026 02:10
@sidkmenon sidkmenon changed the title codex/review evidence contract Define shared search-evidence contracts for Review Sep 19, 2026
@sidkmenon
sidkmenon removed this pull request from stack #14 September 19, 2026 21:50
@sidkmenon sidkmenon closed this Sep 19, 2026
@sidkmenon
sidkmenon deleted the codex/review-evidence-contract branch September 19, 2026 21:52
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