Skip to content

[Parity] Close Phase 8 core parity evidence - #151

Merged
suraj-ranganath merged 4 commits into
feature/eeglab-core-parity-completionfrom
phase/8-epic-closeout
Jun 6, 2026
Merged

suraj-ranganath merged 4 commits into
feature/eeglab-core-parity-completionfrom
phase/8-epic-closeout

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

Close Phase 8 by hardening the parity matrix follow-up contract, adding missing STUDY pophelp resources, and fixing closeout defects in STUDY measure/filter behavior. Evidence: matrix, ruff, format, ty, non-slow pytest, changed-file pre-commit, sample-console smoke, visual parity tests, and clean autoreview passed; MATLAB marker run was attempted but local engine unavailable/stalled.

After merge, open the final epic PR from feature/eeglab-core-parity-completion to develop, summarize PRs #140-#145/#150 plus this PR, and carry follow-ups #146-#149.

Fixes #139
Part of #131

@claude

claude Bot commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @suraj-ranganath's task in 2m 51s —— View job


Code review — PR #151: Close Phase 8 core parity evidence

  • Gather context (read changed files, diff vs base)
  • Review STUDY measure/filter fixes (std_readdata, std_apcluster, pop_addindepvar)
  • Review parity matrix follow-up contract changes
  • Review new pophelp resources and tests
  • Post review feedback

  • Overall assessment: Safe to merge.
  • Highest-risk area: std_readdata._subject_filter now raising instead of silently passing through (intended defect fix).
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits / observations

  • tools/eeglab_parity_matrix.py:242-249 + matrix JSON — The new validator only searches rationale/test_notes free text for #NNN, even though every actionable row already carries a structured follow_up_issue URL field (e.g. …/issues/146). Because URLs contain no #, this forced editing all 89 rows to duplicate the issue number into prose. Not a bug, but accepting a match from the follow_up_issue field too would have avoided the prose duplication and kept the issue reference in one canonical place. Minor — fine to leave as-is for closeout.

Test gaps

  • std_readdata._subject_filter (std_readdata.py:342-343) now raises "subject filter requires a dataset-axis cache" on a shape mismatch where it previously returned data unfiltered. The child-cluster path is well covered by the new test_child_cluster_measure_reads_slice_parent_component_cache case (via the earlier guard at std_readdata.py:53), but the channel path (std_readdata.py:37) reaching this raise on a non-dataset-axis cache isn't directly exercised. Low risk since the non-slow suite passes (1746 passing), but a one-line pytest.raises(ValueError, match="dataset-axis") on a channel-measure read with a subject= filter and a non-dataset-axis cache would lock in the hardened behavior.

EEGLAB parity notes

  • Verified the three code fixes are correct:
    • std_apcluster._assign_exemplars — raw.astype(int) + 1 is exactly equivalent to the removed remap dict (enumerate(range(n)) yields position == index, so remap[item] == item + 1). Behavior-preserving simplification. ✅
    • pop_addindepvar._factor_lists — removed loop was a genuine no-op (_ = label); study remains defined via ensure_study(varlist) at line 61 and is still used at line 65. Safe. ✅
    • std_readpac — new components is not None guard raises before the cache check, matching the new match="component selection" test; the existing NotImplementedError("…PAC…") path is preserved. ✅
  • pop_listfactors help md accurately matches the implementation: gui="on" raises NotImplementedError (pop_listfactors.py:25-26) and splitreg/contrast/interaction are popped as non-GUI no-ops (:20-22), which the new test_study_metadata assertion confirms.
  • Replacing the silent subject-filter no-op with a clear ValueError is the right call for EEGLAB parity — silently ignoring a subject= filter would surprise users expecting filtered output.

Checked correctness, EEGLAB parity, data-structure handling, changed-behavior tests, and AGENTS.md/CLAUDE.md adherence. Nice, tightly-scoped closeout.

@suraj-ranganath
suraj-ranganath merged commit 74ab705 into feature/eeglab-core-parity-completion Jun 6, 2026
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.

1 participant