Swap late-window entry gate to the TFCE-passing set + wire Snakefile dependency
- Dominant language
- Jupyter Notebook
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Parent
Plan: `docs/superpowers/plans/2026-07-20-causal46-late-perceptual-significance.md` (Step 4 + Step 5 wiring).
## What to build
Replace the manual entry gate in `notebooks/causal46_joined/behavioral_discriminative_windows.py` with the automated TFCE gate, so the downstream late-window cascade regenerates its input set from data instead of from the 84-cell manual manifest. Only the gate moves — window-finding is unchanged.
- Replace the manual-manifest filter (currently `filtered_manifest.csv`, lines ~91-118) with a join to `site_results.parquet` filtered on `tfce_gate_pass` (uncorrected TFCE p<0.05, D5).
- Add a `late_significance_path` notebook param, declared in the Snakefile `run_notebook(parameters=...)` (notebook params must match the Snakefile).
- Make `site_results.parquet` an input of the `behavioral_discriminative_windows` rule; rule inputs reference `outputs/...` (not `outputs_prod/...`).
- Leave `_find_maximal_runs`, `_fallback_run`, decoder placement, the `b_windows`/`b_windows_bootstrap` schema, and the `manual_override_path` hook untouched.
The cascade's input set changes from the manual 84 to the TFCE-passing set (expected below 84) — intended, matches ADR-0001.
## Acceptance criteria
- [ ] Entry gate reads the TFCE-passing set from `site_results.parquet`; manual-manifest filter removed.
- [ ] `late_significance_path` param present and matching between notebook and Snakefile.
- [ ] `behavioral_discriminative_windows` rule takes `site_results.parquet` as an input; `snakemake -n` dry-run clean.
- [ ] `_find_maximal_runs`, `_fallback_run`, decoder placement, `b_windows` schema, and `manual_override_path` unchanged.
- [ ] Smoke run passes at the expected check count (`CONFIG_FILE=config.smoke.yaml uv run snakemake --configfile config.smoke.yaml -j1`); cascade regenerates from the new gate.
## Blocked by
- #10 (produces `site_results.parquet` with `tfce_gate_pass`)
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the linked plan, then inspect notebooks/causal46_joined/behavioral_discriminative_windows.py around the manual-manifest filter and the behavioral_discriminative_windows rule in the Snakefile. First verify the site_results.parquet output and tfce_gate_pass field from #10, then run snakemake -n. Done means the dry-run and smoke command pass while the listed unchanged hooks and schemas remain intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- build-system, data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100