Skip to content

[Parity] Add final standalone audit matrix - #166

Merged
suraj-ranganath merged 1 commit into
feature/eeglab-full-standalone-completionfrom
phase/158-final-parity-audit
Jun 7, 2026
Merged

suraj-ranganath merged 1 commit into
feature/eeglab-full-standalone-completionfrom
phase/158-final-parity-audit

Conversation

@suraj-ranganath

Copy link
Copy Markdown
Member

Add the final epic parity matrix, validator, audit notes, and focused tests for issue #158. The matrix assigns Phase 2-8 ownership across bundled plugins, object/storage, optional-toolbox, and docs surfaces while preserving standalone runtime boundaries.

Closes #158

@claude

claude Bot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

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


Code review

  • Overall assessment: Safe to merge.
  • Highest-risk area: runamica.py AMICA-binary discovery (only runtime code change).
  • Merge recommendation: Safe to merge.

This PR is almost entirely an audit artifact (parity matrix JSON + validator tool + notes/docs) plus one small, well-justified runtime change. I focused review on the runtime change and the validator/tests, since the matrix data and prose are non-runtime.

Blocking

None.

Important

None.

Nits

  • tests/test_eeglab_final_parity_matrix.py:28-29 — counts are pinned to the vendored EEGLAB snapshot. row_count == 31 and expected_eeglab_count == 180 will break if the bundled src/eegprep/eeglab reference is ever refreshed (e.g. a new .m file lands in plugins/clean_rawdata). This coupling is intentional for a parity audit (the matrix should be updated alongside the reference), so this is just a heads-up for whoever bumps the vendored tree, not a fix request.

Test gaps

None that matter. The validator tests are mutation-based negative cases (unclassified path, duplicate path, missing optional-dependency contract, bad phase ownership, skip-row phase, missing docs section) rather than tautological assertions — good coverage for the validator's contract.

EEGLAB parity notes

  • src/eegprep/functions/sigprocfunc/runamica.py:196-254 — removing the EEGLAB-submodule fallback is correct. Dropping discovery step 4 (scanning <PACKAGE_ROOT>/eeglab/plugins/amica*) is the right call: AGENTS.md requires that "runtime code in the installed eegprep package must work without src/eegprep/eeglab/ present" and must not "read from … the EEGLAB checkout in package runtime paths." This change is what makes the package pass the new test_runtime_eeglab_independence guard. I verified:

    • No test depended on the removed fallback (tests/test_runamica.py references neither eeglab nor the plugin path).
    • The docstring was updated consistently (steps renumbered 4→4, old 4/5 collapsed), and PACKAGE_ROOT is still used (line 241), so no dead code.
    • No other package .py file trips the new forbidden-pattern scan.

    Behavioral note for users: a user who previously relied on an EEGLAB checkout's bundled AMICA binary will now need AMICA_BINARY, the vendored src/eegprep/bin/, or PATH — which is the intended standalone contract.

Areas checked

Correctness/regressions in the runamica change, the validator logic and its negative-path tests, the runtime-independence guard, and CLAUDE.md/AGENTS.md standalone-boundary compliance. Looks good.
· phase/158-final-parity-audit

@suraj-ranganath

Copy link
Copy Markdown
Member Author

🤖 Specification

Problem: Epic #157 needed a final source-of-truth audit beyond docs/parity/eeglab_core_parity_matrix.json. Bundled plugin depth, functions/@eegobj, functions/@memmapdata, functions/@mmo, optional-toolbox workflows, and EEGLAB tutorial/docs coverage did not have enforceable status or phase ownership, and the standalone runtime boundary was documented but not tested.

Approach: Added docs/parity/eeglab_final_parity_matrix.json and tools/eeglab_final_parity_matrix.py. The validator discovers final-epic EEGLAB plugin/object/tutorial paths, excludes third-party MatConvNet and Manopt internals, flattens grouped workflow rows, and fails missing/duplicated source coverage, optional-dependency contract gaps, stale-skip policy errors, docs architecture gaps, and inconsistent phase ownership. Added .notes/eeglab-final-parity-audit.md plus development docs updates for phase workers. Removed the AMICA fallback that searched the vendored EEGLAB plugin tree.

Key code: tools/eeglab_final_parity_matrix.py::discover_final_eeglab_paths defines the reference surface. validate_matrix_payload checks every discovered path is classified exactly once. _validate_row enforces status, phase issue, optional_dependency, docs_gap, and stale_policy rules. tests/test_runtime_eeglab_independence.py scans installed package Python files for vendored src/eegprep/eeglab dependency patterns.

Tests: uv run --no-sync pytest tests/test_eeglab_final_parity_matrix.py tests/test_runtime_eeglab_independence.py tests/test_runamica.py::TestFindAmicaBinary. Both matrix CLIs pass, including uv run --no-sync python -m tools.eeglab_parity_matrix --json and uv run --no-sync python -m tools.eeglab_final_parity_matrix --json. Ruff check, ruff format --check, ty check, staged pre-commit, and PR-scope pre-commit pass.

@suraj-ranganath

Copy link
Copy Markdown
Member Author

🤖 Acknowledged. No code change here: the pinned row and discovered-path counts are intentional snapshot tripwires for the final parity audit. Whoever refreshes the vendored EEGLAB tree should update the final matrix and these expected counts in the same change.

@suraj-ranganath
suraj-ranganath merged commit a2cf79e into feature/eeglab-full-standalone-completion Jun 7, 2026
1 check passed
@suraj-ranganath
suraj-ranganath deleted the phase/158-final-parity-audit branch June 7, 2026 07:56
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