Skip to content

fix: handle nested classes under anonymous owners - #82

Merged
swear01 merged 14 commits into
mainfrom
fix/compat-kit-anonymous-owner-nested-class
Aug 3, 2026
Merged

fix: handle nested classes under anonymous owners#82
swear01 merged 14 commits into
mainfrom
fix/compat-kit-anonymous-owner-nested-class

Conversation

@swear01

@swear01 swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Strict TDD

RED on current main:

PYTHONDONTWRITEBYTECODE=1 python3 -m unittest \
  scripts.test_compat_kit.CompatKitAuditTests.test_named_nested_class_under_anonymous_owner_is_handled_without_invented_source_name

ValueError: named nested class owner is unresolved: samplemod.client.ModelConveyor$1$Key

GREEN after the fix:

  • focused regression: 1/1 passed;
  • nested-class/cache group: 4/4 passed;
  • ./gradlew stageAe2CompatAuditAncestry + python3 -m unittest scripts.test_compat_kit: 211/211 passed;
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover scripts: 566/566 passed;
  • ./gradlew build --console=plain --no-daemon: BUILD SUCCESSFUL;
  • git diff --check: clean.

Documentation

  • Updates docs/compat-kit.md and docs/addon-development.md with the owner-chain/source-addressability rule and classifier version.

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 updates the compatibility kit scanner to exclude named nested classes whose ownership chain passes through an excluded class (such as anonymous, local, or synthetic classes). This is implemented in tools/compat-kit/compat_kit.py by recursively checking the outer class ancestry in _is_inspectable_class and bumping the CANDIDATE_CLASSIFIER_VERSION to 3. The documentation in docs/addon-development.md and docs/compat-kit.md has been updated to reflect this change, and a new unit test has been added to scripts/test_compat_kit.py to verify the behavior. There are no review comments, and I have no feedback to provide.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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: eba4ddce36

ℹ️ 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 tools/compat-kit/compat_kit.py Outdated
Comment thread tools/compat-kit/compat_kit.py Outdated
@swear01
swear01 force-pushed the fix/compat-kit-anonymous-owner-nested-class branch from eba4ddc to 9e8e9c3 Compare August 2, 2026 22:24
@swear01

swear01 commented Aug 2, 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: 9e8e9c35f0

ℹ️ 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 tools/compat-kit/compat_kit.py Outdated
Comment thread docs/compat-kit.md Outdated
swear01 and others added 2 commits August 3, 2026 07:00
Persist classifier semantics as scanner format 17 so format-16 evidence cannot be reused as current. Resolve nested ownership iteratively with per-archive memoization and an explicit 1,024-level bound.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fail closed when a named nested class references an owner outside its own archive, preventing excluded owner chains from being reconstructed differently across classpath jars. Update current format documentation and add the split-archive regression.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01

swear01 commented Aug 2, 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: 082a557bbc

ℹ️ 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/ae2-compatibility.md
Capture the persisted-format, bounded traversal, and same-archive fail-closed lessons from the latest Compat Kit review.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01

swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Keep the repository overview and structure map consistent with the migrated format-17 AE2 evidence.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01

swear01 commented Aug 2, 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: b8ec682937

ℹ️ 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 tools/compat-kit/compat_kit.py
swear01 and others added 8 commits August 3, 2026 08:06
via [HAPI](https://hapi.run)

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Classify abstract BlockEntity descendants before name terms, invalidate the prior classifier cache, and make committed complete-contract audits fail when they remain on a legacy scanner format.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Validate legacy audit structure and artifact identity without applying the current classifier before the exact current-format rescan.

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>
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>
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>
@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: 00ff21c2f9

ℹ️ 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 tools/compat-kit/compat_kit.py
Derive deeply nested source classes iteratively and reject ownership chains beyond the scanner limit.

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@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. Nice work!

Reviewed commit: de347c69e5

ℹ️ 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 5d757d7 into main Aug 3, 2026
1 check passed
@swear01
swear01 deleted the fix/compat-kit-anonymous-owner-nested-class branch August 3, 2026 01:59
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: exclude named nested classes under anonymous owners

1 participant