Skip to content

docs: Document named argument name/position assumption#17

Merged
rustyconover merged 2 commits into
mainfrom
docs/named-argument-ambiguity
Jan 5, 2026
Merged

docs: Document named argument name/position assumption#17
rustyconover merged 2 commits into
mainfrom
docs/named-argument-ambiguity

Conversation

@rustyconover

Copy link
Copy Markdown
Contributor

Summary

Investigates and documents the potential ambiguity between Python attribute names and SQL keys for named arguments.

Findings

  • For named arguments, the schema stores only the Python attribute name
  • If the attribute name differs from the SQL key, the position is lost during round-trip serialization
  • Example: output_format = Arg[str]("format") loses "format" after round-trip

Resolution

Documents this as a known limitation and recommends the standard convention of using matching names:

# Recommended
format = Arg[str]("format")

# Not recommended (position lost during serialization)
output_format = Arg[str]("format")

Test plan

  • All existing tests pass
  • Type checks pass

Closes vgi-python-j8a

🤖 Generated with Claude Code

rustyconover and others added 2 commits January 5, 2026 12:16
Investigates and documents the potential ambiguity between Python
attribute names and SQL keys for named arguments.

Findings:
- For named args, the schema stores only the Python attribute name
- If attr name differs from SQL key, position is lost during round-trip
- Example: output_format = Arg[str]("format") loses "format" after round-trip

Resolution: Documents this as a known limitation and recommends using
matching names (the standard convention).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rustyconover rustyconover merged commit 5e8f74c into main Jan 5, 2026
0 of 16 checks passed
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.

1 participant