[Parity] Add core matrix contracts - #140
Conversation
|
Claude finished @suraj-ranganath's task in 3m 22s —— View job Code review
This is a documentation/tooling-only PR (parity matrix + validator + tests + docs). No runtime behavior is ported, and the runtime-boundary rule is correctly upheld — only the validator/tests read BlockingNone. Important
Nits
Test gapsThe suite is solid (validation pass, full-taxonomy presence, missing-classification failure, stale-policy failure, CLI JSON, docs assertions). One validator branch is untested: the EEGLAB parity notesNo parity risk in this PR — it adds no EEG-data behavior. Classification accuracy of the 8378-line matrix can't be independently verified without the pinned EEGLAB submodule, but the validator's coverage check (expected-vs-seen |
|
🤖 Problem — .notes/eeglab-migration-gap-audit.md identified the first seven EEGLAB core parity gaps, but there was no committed function-level contract. Without one, later phase agents could silently miss public helpers, overuse stale skips, or introduce runtime dependence on the vendored EEGLAB tree. Approach — docs/parity/eeglab_core_parity_matrix.json now classifies 608 in-scope EEGLAB functions, including the explicit clean_asr audit row. tools/eeglab_parity_matrix.py:130 validates schema, status taxonomy, stale-skip evidence, duplicates, and full coverage. docs/source/development.rst:204 documents update rules, stale policy, and the standalone runtime boundary. Key code: expected_paths = discover_in_scope_eeglab_paths(repo_root)
seen_paths: set[str] = set()
status_counts: Counter[str] = Counter()
category_counts: Counter[str] = Counter()
for index, row in enumerate(rows):
location = f"rows[{index}]"
if not isinstance(row, dict):
errors.append(MatrixValidationError(location, "must be an object"))
continue
_validate_row(row, location, errors)
eeglab_path = row.get("eeglab_path")
if isinstance(eeglab_path, str):
if eeglab_path in seen_paths:
errors.append(MatrixValidationError(location, f"duplicates eeglab_path {eeglab_path!r}"))
seen_paths.add(eeglab_path)Tests — tests/test_eeglab_parity_matrix.py covers committed matrix validation, complete status taxonomy, missing-row failure, stale-policy failure, JSON CLI output, and docs contract text. Verified with focused pytest, full ruff check/format check, ty, and ./pre-commit.py --changed-from origin/feature/eeglab-core-parity-completion. |
Add the Phase 1 EEGLAB core parity matrix, validator tooling, focused tests, and development documentation for later parity phases. This establishes the status taxonomy, stale-skip contract, and standalone runtime rule without porting feature behavior.
Fixes #132
Part of #131