Skip to content

fix(engine): include async, type annotations, and class methods in Python public surface hashes (#76) - #82

Closed
Cid-oe wants to merge 1 commit into
aoto-tech:mainfrom
Cid-oe:fix/issue-76-python-surface-hashes
Closed

Cid-oe wants to merge 1 commit into
aoto-tech:mainfrom
Cid-oe:fix/issue-76-python-surface-hashes

Conversation

@Cid-oe

@Cid-oe Cid-oe commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #76 by ensuring Python public API surface serialization preserves async vs sync distinctions, argument type annotations, return types, and class method signatures.

Changes

  • Updated argument formatting to include type annotations (:type) alongside default values in function_signature.
  • Distinguished async functions with py:async_function: prefix (and included return annotations :return_type).
  • Included public class methods (and __init__) in class surface representations as py:class_member:<class>.<method|async_method>:<name>(<signature>):<returns>.
  • Updated surface_part_name to resolve top-level names for py:async_function: and py:class_member:.
  • Updated existing test expectation in tests/module-resolution.test.mjs and added regression test for bug bug: [P2] Python public API surface hashes ignore async, type annotation, and method changes #76 in tests/review-regressions.test.mjs.

Closes #76

…thon public surface hashes (aoto-tech#76)

- Format Python argument type annotations and function return types in surface parts
- Prefix async functions with py:async_function:
- Extract public class methods and async methods into py:class_member parts
- Support surface_part_name resolution for py:async_function: and py:class_member:
- Add comprehensive regression test suite for bug aoto-tech#76

@premiuslol premiuslol 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.

Reviewed exact head 8acf87c09cfb0c14ac7cb8c980060539a0a41de5 against #76. The implementation preserves async/sync distinctions, argument and return annotations, and public class method signatures in the Python surface while keeping body-only changes out of the hash. Local validation on this exact head: npm run build passed; the combined module-resolution/review-regression run passed 89/91 with 1 skip, including the new bug #76 regression and the existing Python public-surface test. The sole failure was the known Windows interpreter-alias case in bug #54 (python resolving to the Microsoft Store stub), not a failure of this patch. I did not find a correctness issue within the requested scope.

@Cid-oe

Cid-oe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of the updated, signed-off revision in #83.

@Cid-oe Cid-oe closed this Oct 14, 2026
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.

bug: [P2] Python public API surface hashes ignore async, type annotation, and method changes

2 participants