Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,982 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
c
Domain
backend

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C
Stars
18
Forks
2
Avg merge
8h
Merged PRs (30d)
287

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from semantic-reasoning/wirelog

All issues in semantic-reasoning/wirelog

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.