Skip to content

test(treesitter): honor both supported parser fixtures - #35

Merged
metaphorics merged 2 commits into
stabilize/02-real-terminal-regressionsfrom
stabilize/03-parser-fixture-contract
Sep 21, 2026
Merged

metaphorics merged 2 commits into
stabilize/02-real-terminal-regressionsfrom
stabilize/03-parser-fixture-contract

Conversation

@metaphorics

Copy link
Copy Markdown
Collaborator

Parser fixture contract

This layer follows PR #34. It changes a test fixture, not the tree-sitter
implementation or its expected highlighting behavior.

The test helper accepts either a Lua or C parser. The highlight regression
nevertheless always parsed Lua source and queried Lua's number and chunk
nodes. With a real C parser, it failed before reaching any highlight assertion:
Invalid node type "number".

The fixture now selects valid source and node names for the selected grammar.
Both sources place value at columns 6 through 11 and span two rows. All
assertions remain: capture count, hidden-group filtering, buffer and namespace
IDs, exact coordinates, default priority, explicit priority, and root range.
An additional assertion rejects a syntax-error tree.

Validation used tree-sitter-c v0.24.2, built from the archive whose SHA-256 is
2eeb4db31f8fa0865e45488503d13403923bcb485a1bdb637abff8c42dd97364.
The complete workspace command was:

unset CARGO_BUILD_BUILD_DIR RUSTC_WRAPPER
export CARGO_TARGET_DIR="$PWD/target" CARGO_BUILD_JOBS=8
export OXVIM_TREE_SITTER_PARSER="$PWD/target/test-fixtures/c.so"
export OXVIM_TREE_SITTER_LANGUAGE=c
cargo nextest run --locked --release --workspace --no-fail-fast

Result: 3,470 tests ran; 3,469 passed and one failed. One further test was
skipped by the existing configuration. The failure is
differential::perf_contract::steady_state_workloads_are_state_neutral, whose
required .references/neovim/build/bin/nvim binary is absent. The test was
not bypassed or changed. This is not a passing full-workspace gate or a
completed performance comparison.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0e658819-594f-4b31-a73b-e40b06d84fc9

📥 Commits

Reviewing files that changed from the base of the PR and between c1152ae and 07cd127.

📒 Files selected for processing (2)
  • .outline/sdd/reports/2026-09-20-parser-fixture-contract.md
  • crates/ox-lua/tests/treesitter.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-20T21:05:15.886970Z 07cd127 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully updates the tree-sitter test fixture to support both Lua and C parsers. The implementation correctly selects language-specific source code and node types, and adds appropriate error checking with assert(not root:has_error()). All original assertions are preserved while fixing the C parser compatibility issue. The changes are well-structured and maintain test coverage.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@metaphorics
metaphorics added this pull request to stack #37 September 20, 2026 21:02
@metaphorics

Copy link
Copy Markdown
Collaborator Author

@codex review

@metaphorics

Copy link
Copy Markdown
Collaborator Author

/q review

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes correctly address the parser fixture contract issue by adding language-specific handling for both Lua and C parsers. The test now properly selects appropriate source code and node types based on the parser language, maintaining all original assertions while ensuring compatibility with both grammars.

Key improvements:

  • Conditional source and node type selection based on parser language
  • Added syntax error assertion to verify valid parse trees
  • Updated comment accuracy for multi-grammar support

The implementation is sound with no blocking defects identified.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 07cd127ff3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@metaphorics
metaphorics merged commit 78285c8 into main Sep 21, 2026
7 of 9 checks passed
@metaphorics
metaphorics deleted the stabilize/03-parser-fixture-contract branch September 21, 2026 14:24
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