Skip to content

[codex] Add failsafe-driven compatibility harness#451

Merged
bertysentry merged 15 commits intomainfrom
450-gawk-compatibility-it-harness-for-jawk
Apr 23, 2026
Merged

[codex] Add failsafe-driven compatibility harness#451
bertysentry merged 15 commits intomainfrom
450-gawk-compatibility-it-harness-for-jawk

Conversation

@bertysentry
Copy link
Copy Markdown
Contributor

Summary

Add a Failsafe-driven compatibility harness for BWK and gawk tests.

This change:

  • moves compatibility suites and vendored resources from src/test to src/it
  • adds a Maketests parser and a parameterized GawkCompatibilityIT suite
  • runs portable gawk cases in-process through AwkTestSupport instead of shelling out to gawk
  • records explicit skips for unsupported shell-heavy and gawk-only cases
  • hardens compatibility execution by capping captured output and emitting lighter failure messages
  • updates Maven wiring and compatibility docs for the new integration-test layout

Why

The previous layout treated compatibility suites like ordinary unit tests and relied on ad hoc discovery. The new harness makes gawk compatibility metadata-driven, keeps the portable subset inside Maven Failsafe, and avoids the runaway output and fork instability that showed up during mvn verify and mvn site.

Impact

  • mvn test stays focused on unit tests.
  • mvn verify and mvn verify site run the compatibility suites under Failsafe.
  • gawk compatibility coverage is now sourced from vendored Maketests metadata instead of scanning scripts.
  • failing compatibility cases still produce reports, but they no longer crash the forked JVM when output explodes.

Validation

  • mvn formatter:format
  • mvn license:update-file-header
  • mvn test
  • mvn verify site
  • mvn clean verify site

@bertysentry bertysentry linked an issue Apr 21, 2026 that may be closed by this pull request
@bertysentry bertysentry requested a review from Copilot April 21, 2026 14:11
@bertysentry
Copy link
Copy Markdown
Contributor Author

Fixes #450

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a Failsafe-backed integration-test harness for BWK and gawk compatibility suites, shifting them out of unit tests and into metadata-driven, parameterized ITs.

Changes:

  • Introduces a Maketests parser and a parameterized GawkCompatibilityIT suite that executes portable cases in-process.
  • Renames/migrates BWK compatibility suites to *IT integration tests under src/it.
  • Updates Maven wiring to compile/run src/it tests/resources under Failsafe.

Reviewed changes

Copilot reviewed 6 out of 1939 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/it/java/io/jawk/GawkMaketestsParser.java Adds parser and case model for gawk Maketests metadata.
src/it/java/io/jawk/GawkCompatibilityIT.java Adds parameterized Failsafe IT suite that stages resources, runs cases, and diffs output.
src/it/java/io/jawk/BwkTIT.java Renames and updates BWK.t suite to run as integration tests.
src/it/java/io/jawk/BwkPIT.java Renames and updates BWK.p suite to run as integration tests.
src/it/java/io/jawk/BwkMiscIT.java Renames and updates BWK.misc suite to run as integration tests.
pom.xml Adds src/it to test sources/resources and runs *IT tests via Failsafe.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread pom.xml Outdated
@bertysentry bertysentry marked this pull request as ready for review April 21, 2026 14:38
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8dc67d9c5a

ℹ️ 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".

Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
@bertysentry bertysentry requested a review from Copilot April 21, 2026 15:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 1939 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/BwkPIT.java Outdated
Comment thread pom.xml Outdated
@bertysentry bertysentry requested a review from Copilot April 21, 2026 17:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 1939 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/BwkTIT.java
Comment thread src/it/java/io/jawk/BwkPIT.java
Comment thread src/it/java/io/jawk/BwkMiscIT.java
Comment thread pom.xml
@bertysentry bertysentry requested a review from Copilot April 22, 2026 12:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 1940 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkManualIT.java Outdated
Comment thread src/it/java/io/jawk/GawkManualIT.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread pom.xml
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/BwkTIT.java
@bertysentry bertysentry requested a review from Copilot April 22, 2026 16:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 1940 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
Comment thread src/it/java/io/jawk/GawkCompatibilityIT.java Outdated
Comment thread src/it/java/io/jawk/GawkMaketestsParser.java Outdated
@bertysentry bertysentry requested a review from Copilot April 23, 2026 18:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 1943 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AGENTS.md Outdated
Comment on lines 58 to 59
@BeforeClass
public static void beforeAll() throws Exception {}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

These lifecycle hooks are empty; they add noise and can confuse readers about required setup/teardown. Consider removing them entirely, or (if you want to keep the structure) at least drop throws Exception and add a short comment explaining why the hooks are intentionally present and empty.

Copilot uses AI. Check for mistakes.
Comment on lines 146 to 147
@AfterClass
public static void afterAll() throws Exception {}
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

These lifecycle hooks are empty; they add noise and can confuse readers about required setup/teardown. Consider removing them entirely, or (if you want to keep the structure) at least drop throws Exception and add a short comment explaining why the hooks are intentionally present and empty.

Copilot uses AI. Check for mistakes.
.stream(scriptsDirectory.toFile().listFiles())
.filter(sf -> sf.getName().startsWith("t."))
.stream(scriptFiles)
.filter(scriptFile -> scriptFile.getName().startsWith("t."))
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

The script discovery does not ensure entries are regular files. If a directory (or other non-file entry) matches the prefix, it will be included and later fail when used as a script path. Filter with scriptFile.isFile() (or equivalent) during discovery.

Suggested change
.filter(scriptFile -> scriptFile.getName().startsWith("t."))
.filter(scriptFile -> scriptFile.isFile() && scriptFile.getName().startsWith("t."))

Copilot uses AI. Check for mistakes.
Comment on lines 81 to 86
return Arrays
.stream(scriptsDirectory.toFile().listFiles())
.filter(sf -> sf.getName().startsWith("p."))
.stream(scriptFiles)
.filter(scriptFile -> scriptFile.getName().startsWith("p."))
.map(File::getName)
.sorted()
.collect(Collectors.toList());
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

As with the BWK.t suite, script discovery should exclude non-files. Add a scriptFile.isFile() filter to avoid accidentally parameterizing directories or other filesystem entries.

Copilot uses AI. Check for mistakes.
.stream(scriptsDirectory.listFiles())
.filter(sf -> sf.getName().endsWith(".awk"))
.stream(scriptFiles)
.filter(scriptFile -> scriptFile.getName().endsWith(".awk"))
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

Script discovery should filter to regular files (e.g., scriptFile.isFile()) in addition to checking the .awk suffix, to prevent directories or unexpected entries from being included and causing downstream failures.

Suggested change
.filter(scriptFile -> scriptFile.getName().endsWith(".awk"))
.filter(scriptFile -> scriptFile.isFile() && scriptFile.getName().endsWith(".awk"))

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bertysentry bertysentry merged commit e20a48d into main Apr 23, 2026
2 checks passed
@bertysentry bertysentry deleted the 450-gawk-compatibility-it-harness-for-jawk branch April 23, 2026 18:07
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.

Gawk Compatibility IT Harness for Jawk

2 participants