Skip to content

fix: persist selected mod ID across Compat Kit audits - #84

Merged
swear01 merged 3 commits into
mainfrom
fix/compat-kit-selected-mod-id
Aug 3, 2026
Merged

fix: persist selected mod ID across Compat Kit audits#84
swear01 merged 3 commits into
mainfrom
fix/compat-kit-selected-mod-id

Conversation

@swear01

@swear01 swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Strict TDD

The original selected-mod regressions failed on pre-fix main because selection was not propagated through API/CLI, migration, diff, validation, or cache identity. A later review regression failed because malformed unselected metadata was silently ignored. A Codex review then required jar-backed diff to call _validate_audit(old) before reading the old audit mod ID, and authoritative cache docs to name jar SHA, scanner format, and resolved target mod ID together.

After the fixes and post-#82 rebase:

  • focused selected-ID + malformed-metadata + jar-backed-diff + cache-identity group: passed;
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover scripts: 582/582 passed;
  • ./gradlew build --console=plain --no-daemon via heavy_gradle.py: BUILD SUCCESSFUL;
  • py_compile, and git diff --check: passed.

Documentation

Remaining risk

@swear01

swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces support for multi-mod NeoForge jars in the compatibility kit by adding a --mod-id option to the scan command. This allows users to target a specific mod when multiple are declared, which is then persisted and used during validation, migration, and diffing. The selected mod ID is also incorporated into the cache identity to isolate audits. Feedback on the changes highlights a cache key mismatch issue where scanning a single-mod jar without an explicit --mod-id computes a different cache key than subsequent diff or migrate-audit operations (which pass the mod ID explicitly). This leads to unexpected cache misses, and it is recommended to always include the resolved mod ID in the cache identity calculation.

Comment thread tools/compat-kit/compat_kit.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: cb9294fbde

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

@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0244fa4d82

ℹ️ 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 docs/compat-kit.md
Comment thread tools/compat-kit/compat_kit.py
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: ce738e20d2

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

swear01 and others added 3 commits August 3, 2026 10:01
via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jar-backed diff was reading the old audit mod ID before schema validation, so malformed JSON threw KeyError instead of the normal exit-2 CLI error. Align the authoritative cache docs with resolved mod ID identity.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the fix/compat-kit-selected-mod-id branch from ce738e2 to c27eada Compare August 3, 2026 02:05
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

1 similar comment
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: c27eada494

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

@swear01
swear01 merged commit b067d66 into main Aug 3, 2026
1 check passed
@swear01
swear01 deleted the fix/compat-kit-selected-mod-id branch August 3, 2026 02:25
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.

Compat Kit: persist selected mod ID across audit operations

1 participant