Repository navigation
[feat-semantic] Add differential semantic dataflow execution - #12
Conversation
- Promote TODO.md as the single current implementation and research backlog. - Rename the outdated next-step roadmap to a stable LOTUS lowering reference. - Remove superseded operator and differential-rule TODO documents. Signed-off-by: Von <haodong.lu.me@gmail.com>
- support general deterministic JoinOn restrictions for semantic joins - maintain append-only inner k=None semantic joins with binary state - preserve bag multiplicity and reject unsupported differential shapes - document and test the incremental semantic-join contract Signed-off-by: Von <haodong.lu.me@gmail.com>
- buffer normalized source rows until an explicit count boundary - apply each pending relation-valued delta atomically with flush support - preserve pending rows across failures and schema-v3 checkpoints - document and test eager compatibility and storage transactions Signed-off-by: Von <haodong.lu.me@gmail.com>
- add shared context-bounded prompt batching with strict task validation - support packed execution across semantic filter, map, flat-map, join, groupby, and aggregate paths - narrow semantic state reaggregation inputs and preserve explicit physical fingerprints - expose refresh and prompt-batch controls in benchmark CLIs with tests and API documentation Signed-off-by: Von <haodong.lu.me@gmail.com>
- add count, sum, and average aggregate descriptors - maintain exact hidden aggregate state across insertions and retractions - document the public API and cover direct and differential execution Signed-off-by: Von <haodong.lu.me@gmail.com>
- centralize the grouped-aggregate default - apply join-map consistently across Claude, Zep, and benchmark entry points - preserve explicit historical rules and the Mem0 compatibility path Signed-off-by: Von <haodong.lu.me@gmail.com>
Expose Source, Relation, and SemanticDataflow through the public API. Add try_cast and case_when expressions with serialization and evaluation. Provide defensive named-view reads and cover the public contracts. Signed-off-by: Von <haodong.lu.me@gmail.com>
…sport Centralize bounded JSON repairs and validate complete operator protocols. Add explicit DeepSeek Responses routing, schemas, usage and failure metadata. Version repair contracts for checkpoint isolation while retaining Chat defaults. Fix structured output reserves and reject oversized configured chunks instead of silently shrinking them. Cover transport, repair, batching, and benchmark configuration contracts. Signed-off-by: Von <haodong.lu.me@gmail.com>
Add fail-fast two-pass experiment scheduling and verified completed-condition reuse. Track cumulative physical usage budgets and immutable source provenance. Summarize and plot scale results while retaining mixed-version provenance. Expose trace-excluded insertion distributions and maximum latency with regression tests. Signed-off-by: Von <haodong.lu.me@gmail.com>
Stop owned process groups when monitoring or PID publication fails. Ensure status-write failures cannot bypass shutdown, preserving the original error. Cover failure cleanup and the existing SIGINT-to-SIGTERM escalation contract. Signed-off-by: Von <haodong.lu.me@gmail.com>
Share comparison operators across expression nodes instead of Python dataclass equality. Keep scalar expressions unhashable and preserve boolean literals and serialized query contracts. Verify composite comparisons and reflected operands against real DataFrame filtering. Signed-off-by: Von <haodong.lu.me@gmail.com>
Reject oversized local aggregate documents without empty prompts and recount after renumbering. Preserve ordered Responses failures when accounting metadata is malformed, retaining usable usage. Cover both aggregate paths and response fallbacks; correct two oversized legacy test fixtures. Signed-off-by: Von <haodong.lu.me@gmail.com>
Add an unordered relational limit with deterministic parent-state maintenance. Initialize global aggregate identity on empty parent updates. Allow provider normalization without assumed prices and cover the contracts with regression tests. Signed-off-by: Von <haodong.lu.me@gmail.com>
Add opt-in single-task JSON-schema predicates and preserve default execution paths. Accept current and legacy DeepSeek model names without rewriting requests. Wire explicit context capacity through execution provenance and support audited experiment continuations. Add offline predicate, configuration, and continuation regressions. Signed-off-by: Von <haodong.lu.me@gmail.com>
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. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis change adds numeric relational aggregates, scalar expressions, semantic join maintenance, count-based refresh, LOTUS prompt batching, structured-output repair, DeepSeek Responses support, benchmark wiring, and experiment tooling. Design documents and tests describe these capabilities. ChangesOperator contracts and differential execution
LOTUS execution
Integration and evaluation
Estimated code review effort: 5 (Critical) | ~90 minutes Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fda741ca90
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Reject views derived from undeclared sources, including matching schemas - Detach mutable object cells at ingestion and public read boundaries - Expose the existing checkpoint contract through SemanticDataflow - Keep differential runtime tests isolated from live providers Signed-off-by: Von <haodong.lu.me@gmail.com>
- Add deterministic request identities around DeepSeek Responses sends - Allow callers to persist or replay raw provider responses before returning - Avoid duplicate trace artifacts while an external provider journal is active - Cover request positions, transport guards, and checkpoint recovery offline Signed-off-by: Von <haodong.lu.me@gmail.com>
Summary
Validation
uv run ruff check src tests tools examplesuv run pyrightuv run python -m pytest -q -p no:cacheprovider(1714 passed, 20 skipped)git diff --check origin/main...HEADNotes
Summary by CodeRabbit
New Features
count,sum, andavgaggregates with grouped queries, null handling, and incremental updates.limit, arithmetic expressions, conditional expressions, and safe casting.SemanticDataflowAPI and expanded public exports.Documentation