Skip to content

fix(columnar): restore delta_seeded on the TDD worker sub-pass success path - #2059

Open
justinjoy wants to merge 1 commit into
mainfrom
claude/1977-delta-seeded-restore
Open

justinjoy wants to merge 1 commit into
mainfrom
claude/1977-delta-seeded-restore

Conversation

@justinjoy

Copy link
Copy Markdown
Collaborator

Summary

tdd_worker_subpass_fn's success fall-through restored three of the four saved session flags and skipped delta_seeded. A worker that took the seeding branch (force_diff && outbound_only && eff_iter > 0) and completed normally kept the flag set on its clone into the next sub-pass. The function now ends with TDD_WORKER_RETURN(), the same restore its early exits after the save use.

This is latent today. Worker clones are rebuilt at every stratum init, and the setter's condition does not change between sub-passes, so the stale value was always set again. The fix keeps it from becoming under-derivation if force_diff or outbound_only ever vary per sub-pass.

Tests

run_delta_seeded_restore_probe in tests/test_tdd_inline_workers.c wraps every TDD sub-pass submitted through the test submission hook. It fails if a successful seeding sub-pass changed delta_seeded, or if no seeding sub-pass ran, so it cannot pass vacuously. Its program joins reach on both columns, which puts the stratum in global-read mode, the only mode that sets both force_diff and outbound_only. Before the fix it observed 800 seeding sub-passes and 8 leaks (one per worker); after the fix, none.

Validation

  • meson test: 416 OK, 0 failed, 14 skipped.
  • --suite tidy: 4/4 OK. uncrustify is clean on both touched files.
  • Peer review: approved. Its three non-blocking nits are applied.

Fixes #1977

…s path

tdd_worker_subpass_fn saves four session flags and restores them through
TDD_WORKER_RETURN() at its early exits after the save, but its fall-through
exit restored
only tdd_subpass_active, tdd_outbound_only_active and diff_operators_active.
A worker that took the seeding branch (force_diff, outbound_only and
eff_iter > 0) and completed normally left delta_seeded set on its clone,
which survives into the next sub-pass. The setter's condition does not
change between sub-passes today, so the stale value was immediately set
again, but letting force_diff or outbound_only vary per sub-pass would make
the stale flag select a delta where the full relation was meant, which can
under-derive.

End the function with TDD_WORKER_RETURN() so the fall-through takes the
same restore as those early exits.

The test wraps every TDD sub-pass submitted through the test submission
hook and fails if a seeding sub-pass that returned successfully changed
delta_seeded on its worker, or if no seeding sub-pass ran. Its program, a
transitive closure that joins reach on both columns, puts the stratum in
global-read mode, the mode that sets both force_diff and outbound_only.
Before the fix it observed 800 seeding sub-passes and 8 leaks, one per
worker.

Fixes #1977

This branch has not been deployed

No deployments
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.

tdd_worker_subpass_fn does not restore delta_seeded on its success path

1 participant