Assert the PSI wiring the ParserDefinition unblocked

JaiFileTypeTest could previously only check the virtual file's type, because
without a ParserDefinition the PSI file fell back to plain text. It now asserts
the PSI file is a JaiFile in the Jai language and that JaiParserDefinition is the
registered definition - the wiring every PSI-dependent feature needs.

Also records the in-memory-fixture flake ('Cannot create child file at /src') as
infrastructure, with the note that JaiCorpusParserTest sidesteps it by using
PsiFileFactory directly.
This commit is contained in:
hgranthorner
2026-08-04 12:51:22 -04:00
parent e1fced9bdf
commit b14d285b5e
2 changed files with 26 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ Last verified state (all green, `./jaigradle check` and `verifyPlugin` too):
```text
dev.hgh.HarnessSmokeTest tests=2
dev.hgh.jai.JaiFileTypeTest tests=3
dev.hgh.jai.JaiFileTypeTest tests=4
dev.hgh.jai.editor.JaiEditorSupportTest tests=5
dev.hgh.jai.highlighting.* tests=8
dev.hgh.jai.lexer.JaiCorpusLexerTest tests=2 <- the Tier 0 gate
@@ -68,7 +68,7 @@ dev.hgh.jai.lexer.JaiLexerTest tests=13
dev.hgh.jai.parser.JaiCorpusParserTest tests=1 <- the Tier 3 gate
dev.hgh.jai.parser.JaiParserGoldenTest tests=5 <- Tier 2 golden trees
dev.hgh.jai.parser.DebugParseTest tests=2 <- scratch harness, inert
-> total 41, failures+errors 0
-> total 42, failures+errors 0
```
The corpus gates report what they actually did; check both lines are still there:
@@ -268,6 +268,11 @@ The fast loop for grammar work:
./jaitest
```
- **`Cannot create child file 'x' at /src` is a flake.** The fixture's in-memory
filesystem occasionally refuses `myFixture.configureByText`. It is not a real
failure — re-run. `JaiCorpusParserTest` avoids it entirely by going through
`PsiFileFactory.createFileFromText` instead of the fixture, which also makes
the 714-file sweep much faster.
- **`timeout` does not exist on this macOS box.** Do not use it in scripts.
- **Noisy test stderr.** Fixture runs log Vue/JS `PluginException`s from bundled
plugins. Tests pass regardless, but real failures can be buried — check the