Skip to content

Preserve annotated dataclass metadata - #2

Merged
trissim merged 1 commit into
mainfrom
agent/preserve-dataclass-annotated-metadata
Jul 30, 2026
Merged

Preserve annotated dataclass metadata#2
trissim merged 1 commit into
mainfrom
agent/preserve-dataclass-annotated-metadata

Conversation

@trissim

@trissim trissim commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Preserves Annotated metadata at the dataclass signature-analysis authority so downstream form projections receive the declared nominal type. Includes the 0.1.8 package bump and focused regression coverage.\n\nVerification: 100 tests passed; wheel and sdist pass twine check.

Copilot AI review requested due to automatic review settings July 30, 2026 21:39
@trissim
trissim merged commit 161a4ca into main Jul 30, 2026
11 checks passed

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim deleted the agent/preserve-dataclass-annotated-metadata branch July 30, 2026 21:39
@augmentcode

augmentcode Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Risk Analyzer Agent🛡️

👀 Human Input Needed
A pair-review briefing is ready for you.

→ Pair Review Briefing

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

Deep Code Review Agent🐛

Review completed with 1 suggestions.

Fix in Cosmos

# Try to get type hints, fall back to __annotations__ if resolution fails
try:
type_hints = get_type_hints(dataclass_type)
type_hints = get_type_hints(dataclass_type, include_extras=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With include_extras=True, ParameterInfo.param_type becomes Annotated[NestedDataclass, ...] for annotated nested fields, so UnifiedParameterAnalyzer.analyze_nested() no longer recognizes it with dataclasses.is_dataclass(param_info.param_type). That regresses nested dataclass source tagging for fields that worked before this change because get_type_hints() stripped the wrapper.

Severity: medium


🤖 Was this useful? React with 👍 or 👎

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.

2 participants