Repository navigation
Close #622: strict tests for prism's real per-family comment stripping - #627
Merged
Merged
Conversation
Fills the remaining gaps #622 called out, on top of what #625 already covered for the standard_block split: - block_exclusive (xml) and non_lexical (plaintext) now have a dedicated real-config test, not just the existing mock-based bypass test. Also added a test documenting a latent (not live) gap: neither family has an entry in _compile_regex_matrix()'s branch list, so a FUTURE language assigned either family without also being added to split_streams()'s hardcoded "prose bypass" list would silently get zero comment stripping -- same failure shape as #386/#621, just not triggered by anything in the real config today. - ReDoS immunity tests against the REAL compiled patterns for standard_block/multi_style_dash/embedded_syntax/line_exclusive/ recursive_block_haskell (previously only the mock-config branch-selection logic and the unrelated suppression-tag regex had pathological-payload coverage). - String-literal shielding tests for haskell and powershell, extending the one #621 added for lua to the other two new families. Full suite (920 tests), ruff audit, mypy audit, and both golden-crucible modes pass. No source changes -- test-only, so the golden master fixtures are untouched. Closes #622. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fills the remaining gaps in #622, on top of what #625 already covered when it split
standard_blockinto sub-families:block_exclusive(xml) andnon_lexical(plaintext) now have a dedicated real-config test (previously only covered by a mock-based bypass test). Also added a test that documents a latent, not live gap: neither family has a branch in_compile_regex_matrix(), so a future language assigned either family without also being added tosplit_streams()'s hardcoded "prose bypass" list would silently get zero comment stripping -- the same failure shape as [BUG/CORE-ENGINE] Comment/code separation is completely broken for all 58 languages -- prism.py's family dispatch never matches the real taxonomy #386/[BUG/CORE-ENGINE] standard_block comment stripping only covers C-style delimiters -- sqlite, lua, haskell, powershell, perl get zero comment/code separation #621, just not triggered by anything in the real config today.standard_block,multi_style_dash,embedded_syntax,line_exclusive, andrecursive_block_haskell. Previously only the mock-config branch-selection logic (test_prism_regex_matrix_calibration_edge_cases) and the unrelated suppression-tag regex (test_prism_suppression_regex_bomb) had pathological-payload coverage -- nothing exercised the actual compiled family patterns themselves.No source changes -- test-only, so the golden master fixtures are untouched (confirmed:
pytest -m golden_cruciblestill passes unchanged in both modes).Test plan
pytest tests/-- 920 passedpython tests/ruff_audit.py --ci-- cleanpython tests/mypy_audit.py --ci-- cleanpytest -m golden_crucible-- passes unchanged (no source touched)Closes #622.
🤖 Generated with Claude Code