Route eligible recursive multiway plans through TDD instead of K-Fusion dispatch

オープン
#1,982 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c
領域
backend

調査の方向性

Start by reading the TDD planner/evaluator and the existing ENABLE_K_FUSION=0 branch expansion, then inspect #1984 for the CSPA capability this pilot depends on. Add a selector for eligible recursive multiway plans while preserving the fused path for non-targets and existing fallback behavior. Validate plan-shape and exact-result tests first, then collect the specified paired same-host dispatch, timing, and memory evidence; completion requires CSPA and another K>=2 workload to meet an agreed performance criterion.

索引モデルが issue の本文から書いたものです。

説明

enhancement p1-high

Discovery context

PR #1979's hosted CSPA W=1 performance run exceeded the current target once (3145.9 ms mean against 2050 ms); later retries were invalid because the runner failed the strict performance-governor preflight. This does not establish that K-Fusion caused the miss, and the target must not be changed from these data. It does make the current opaque K-Fusion branch executor a high-priority alternative to investigate.

The code already has two relevant mechanisms: ENABLE_K_FUSION=0 emits explicit semi-naive FORCE_DELTA/FORCE_FULL branches followed by CONCAT/CONSOLIDATE, and the TDD evaluator analyzes K-Fusion and expanded plans. Existing unfused TDD audit evidence confirms dispatch on some workloads, but it does not show that TDD actually parallelizes the K explicit branches or improves end-to-end performance. TDD has strict eligibility gates and serial fallback; no universal replacement is established.

This pilot fills the gap before the broader qualification/default/removal work in #1398, #1399, and #1400. It does not delete the K-Fusion opcode or change TDD admission policy.

Scope

For selected recursive multiway-delta plans admitted by TDD, add a planner selection path that emits the existing explicit semi-naive branch plans and routes them through TDD worker execution instead of the opaque K-Fusion branch executor. Retain K-Fusion and its tests for non-target plans and as a temporary control/fallback. Keep current conservative TDD eligibility and serial fallback unchanged.

Cover representative K>=2 recursive workloads, including CSPA and at least one non-CSPA workload. Record the selected plan shape, TDD decision, active workers, completed dispatch rounds, fallback/replay, and exact result identity. Benchmark paired same-host builds with identical compiler/options/data and alternating trial order; include total time including replay and memory/RSS evidence. Do not relax the governor preflight or edit performance thresholds as part of this work.

Acceptance criteria

  • Plan-shape tests prove selected target plans contain the expected FORCE_DELTA/FORCE_FULL branches and CONCAT/CONSOLIDATE, with no WL_PLAN_OP_K_FUSION; non-target plans retain the existing fused path during the pilot.
  • Exact tuples and multiplicities match the serial oracle for recursive multiway joins, SCC/UNION branches, base seeds, incremental insert/retraction/reinsert, compound values, and retry after admission/allocation failure at W=1/2/8.
  • TDD audit evidence for each claimed replacement case shows use_tdd=1, actual selected worker count and completed rounds; any fallback or serial replay is reported and included in the end-to-end result.
  • Repeated paired same-host measurements cover CSPA plus at least one other K>=2 workload and report per-trial timing, median/variation, paired delta, host/build identity, RSS and managed-memory evidence. They demonstrate correctness and meet an explicit performance criterion agreed before interpreting the measurements; invalid governor-preflight runs do not count.
  • Existing K-Fusion controls and tests remain green while the pilot selector is available; no broad opcode/runtime deletion or global default change is included.

CSPA execution prerequisite — 2026-09-27

Depends on #1984 for the CSPA replacement case. A fresh diagnostic at 6bf089f0255efbb157aa00647136af4f4d8a3932 reconfirmed #1378's documented limitation: both default and unfused CSPA at W=2/8 report unsafe_plan, with zero submitted TDD tasks and completed rounds. Disabling K-Fusion alone therefore does not deliver CSPA TDD execution. All six W=1/2/8 runs returned 20,381 tuples / 6 iterations; these count/dispatch diagnostics are not exact-content or performance qualification.

#1984 owns narrowly proved occurrence-specific delta driving for CSPA's cross-owner two-IDB closure and three-source-IDB chain (four lowered references including the inserted SEMIJOIN). It preserves conservative fallback outside that supported form and reuses #1965's round publication/rollback. This issue retains selection and paired pilot qualification; its CSPA actual-dispatch acceptance remains required. “Keep current conservative eligibility unchanged” applies to this selector's own scope: consume the supported capability from #1984 rather than bypassing existing safety checks here. Planner/fixture work can proceed while the capability is implemented; this pilot cannot close with CSPA still serial.

Active priority

Per the user's direction, prioritize TDD replacement over further K-Fusion preservation work. #1984 now records the Architect/Critic-agreed accelerated sequence: occurrence binding and independent input-coverage proof can proceed before #1965, followed by transactional runtime integration and this pilot's actual-dispatch/performance qualification. The 0.85 milestone is a completion target, not a reason to defer independent implementation. Existing conservative eligibility and strict performance acceptance remain required.

主要言語
C
スター
18
フォーク
2
平均マージ
9時間 44分
マージ済み PR(30日)
162

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

semantic-reasoning/wirelog のほかの issue

semantic-reasoning/wirelog の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。