Skip to content

test(core): add isolated unit tests and CI gate - #168

Merged
aoirint merged 3 commits into
mainfrom
test/core-unit-tests-51
Nov 7, 2026
Merged

aoirint merged 3 commits into
mainfrom
test/core-unit-tests-51

Conversation

@aoirint

@aoirint aoirint commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Warning

This pull request was created with assistance from LLMs.

Summary

  • Add a separate net10.0 xUnit.net v3 test project referencing the production assembly, with hand-written fakes and 44 tests for Core authorization, save/load outcomes, input suppression, magnet feedback, and result presentation.
  • Run the solution tests after the CI build, include both lockfiles in the SDK cache, and reserve both projects' build state.
  • Provide a self-contained test runbook with .NET 10 prerequisites, verification commands, test scope, and dependency-update steps. Use compatibility-level versions in the guide and keep exact package resolution in the build configuration. Keep the plugin on netstandard2.1 and preserve its dependency graph.

Related Issues

Notes for reviewers

Internal production types remain internal; only the test assembly receives friend access. Tests exercise Core through its ports and do not establish Unity, Harmony, or multiplayer runtime compatibility.

Attribution: the implemented issue author and PR creator are both @aoirint; no additional human co-author trailer is proposed for that same primary-author role. Material AI implementation is attributed with Co-authored-by: Codex <noreply@openai.com>.

AI disclosure

The user asked Codex to implement Issue #51, prepare a draft PR, and address automated review. Codex wrote the tests, CI integration, lockfile, and documentation, inspected the diff and dependencies, and ran the checks below. The maintainer confirmed the CLA in the PR checklist and authorized merging.

Testing

Automated checks

  • Passed with SDK 10.0.302: dotnet restore --locked-mode -m:1, dotnet build --no-restore -m:1, and dotnet test --no-restore --no-build -m:1 (44 passed, 0 failed, 0 skipped).
  • Confirmed a temporary failing test returns exit code 1; removed the probe and reran the passing suite.
  • Passed: test-project folder whitespace verification, Markdown lint using the AGENTS.md-pinned command, actionlint, ShellCheck, modified action YAML/inline-shell checks, documentation link checks, and git diff --check.
  • Passed signature verification for the 21 newly resolved test packages; reviewed sources, licenses, release age, and lock hashes.
  • Local full dotnet format --no-restore --verify-no-changes and parallel solution builds are blocked by IPC socket permission errors. Single-node build/test succeeds; the full formatter, standard build/test commands, and pin validation all passed in the latest-head Check run (44 tests passed).
  • Local pinact run --check --min-age 7 failed because GitHub's API returned HTTP 504 while checking the existing checkout pin. No external action pin was changed.
  • In-game checks and release packaging were not run: this change targets isolated Core unit tests.

AI-assisted inspections

  • Request: verify the current Core contracts and keep test dependencies outside the player package.

    • AI-assisted result: tests use the current IPluginLogger and IValidationLogger ports; packaging still copies only the production plugin DLL, and the production lockfile is unchanged.
  • Request: obtain automated reviews for the published head.

  • Request: make the test runbook self-contained for human readers.

    • AI-assisted result: the runbook states .NET 10 prerequisites directly, places execution steps before scope/framework details, and uses lockfile review only in the dependency-update procedure. The README prerequisite matches the guide. Compatibility-level versions remain visible; project constraints and lockfiles are unchanged.

Checklist

As the pull request author, I have checked all required items:

  • I have read CONTRIBUTING.md and agree to the Contribution License Agreement.

Add xUnit.net v3 tests for Core use cases and frame input handling, with
locked test dependencies and contributor verification instructions.

Co-authored-by: Codex <noreply@openai.com>

aoirint commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Warning

This comment was created with assistance from LLMs.

@codex review

Please review the Core unit-test setup, behavioral assertions, deterministic NuGet restore, and CI integration for Issue #51. The PR remains a draft for maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T03:54:18.690986Z c741017 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-07T03:58:02.524977Z c741017 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 4f7e9cf4ce

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4f7e9cf4ce

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Describe compatibility in the unit-test guide and link to the SDK selection,
package constraints, and lockfile instead of duplicating patch versions.

Co-authored-by: Codex <noreply@openai.com>

aoirint commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Warning

This comment was created with assistance from LLMs.

@codex review

Please review the latest documentation-only commit: keep compatibility identifiers in the unit-test guide and delegate exact SDK/package selection to the build configuration and lockfile. No dependency or runtime behavior was changed.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 708c206f36

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 708c206f36

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

State the .NET 10 prerequisites directly, put execution steps before scope
and framework details, and reserve lockfile review for dependency updates.
Align the README prerequisite with the supported SDK line.

Co-authored-by: Codex <noreply@openai.com>

aoirint commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Warning

This comment was created with assistance from LLMs.

@codex review

Please review the latest documentation commit for a self-contained test runbook: .NET 10 prerequisites are stated directly, execution steps precede scope details, and lockfile review is part of the intentional dependency-update procedure. Check the related README prerequisite for consistency. The change is limited to these two documents.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: c741017898

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c741017898

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@aoirint
aoirint marked this pull request as ready for review November 7, 2026 03:52
@aoirint
aoirint merged commit 9019e8b into main Nov 7, 2026
1 check passed
@aoirint
aoirint deleted the test/core-unit-tests-51 branch November 7, 2026 03:58
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.

survey: C# unit test strategy for core use cases

1 participant