Skip to content

[codex] support typeid type syntax in mutations - #73

Merged
greenthree merged 1 commit into
mainfrom
codex/mutation-typeid-compat
Aug 11, 2026
Merged

[codex] support typeid type syntax in mutations#73
greenthree merged 1 commit into
mainfrom
codex/mutation-typeid-compat

Conversation

@greenthree

Copy link
Copy Markdown
Owner

Summary

  • recover mutation syntax locations for legal typeid(type-id) forms rejected by the pinned Tree-sitter C++ grammar
  • independently validate each affected argument as one C++ type-id, then reparse an offset-preserving repaired source
  • keep the complete typeid(...) operand excluded while preserving outer runtime candidates and existing mutation IDs
  • continue to fail closed for missing delimiters, statement injection, invalid type-ids, and unrelated syntax errors

Root cause

tree-sitter-cpp==0.23.4 parses typeid(expression) normally but represents several legal typeid(type-id) forms as call expressions containing ERROR nodes. The previous worker rejected the entire source whenever the root contained any parser error.

Impact

Mutation planning now supports primitive, qualified, pointer, array, function-pointer, elaborated, Unicode, and decltype(...) type-ids without weakening syntax failure handling. The locator and operator versions remain unchanged because previously supported sources retain identical locations and IDs.

Validation

  • python -m unittest tests.test_mutation_syntax tests.test_mutation -v (42 passed)
  • npm run check (713 passed, 30 skipped)
  • npm run pack:check (223/5 files)
  • python scripts/audit_python_dependencies.py (12 dependencies, 0 vulnerabilities)
  • python scripts/check_clean_install.py --json (full delivery workflow passed; equivalent rebuild)
  • Skill validation passed
  • phtest nine-problem lint passed with a clean worktree
  • git diff --check passed

@greenthree
greenthree marked this pull request as ready for review August 11, 2026 16:19
@greenthree
greenthree merged commit e81e792 into main Aug 11, 2026
11 checks passed
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