Skip to content

fix(app-server): align configWarning notification nullability#165

Open
andrei-hasna wants to merge 1 commit into
mainfrom
openloops/open-codewith/f99c6654-c6a9-4999-9579-3427e35fd5aa-74d203be
Open

fix(app-server): align configWarning notification nullability#165
andrei-hasna wants to merge 1 commit into
mainfrom
openloops/open-codewith/f99c6654-c6a9-4999-9579-3427e35fd5aa-74d203be

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

Aligns the v2 configWarning notification wire shape with the app-server explicit-null payload contract. ConfigWarningNotification.path and .range were using #[serde(skip_serializing_if = "Option::is_none")] + #[ts(optional)], so they were omitted when absent — contrary to the repo rule that active v2 notification payload fields serialize nullable fields as present null, not omission.

Changes

  • app-server-protocol/src/protocol/v2/config.rs: Remove skip_serializing_if + #[ts(optional)] from path and range so serde always emits them. Add a RequiredNullable<T> schemars wrapper (#[schemars(with = "...", required)]) so both fields are represented as present-nullable and listed in the schema required set while remaining nullable.
  • app-server/src/outgoing_message.rs: verify_config_warning_notification_serialization now asserts path: null and range: null for the no-path/no-range case.
  • app-server/README.md: configWarning documented as { summary, details, path, range } with nullable fields present as null (no longer details?, path?, range?).
  • Regenerated fixtures (just write-app-server-schema): JSON schema (ServerNotification.json, codex_app_server_protocol.schemas.json, codex_app_server_protocol.v2.schemas.json, v2/ConfigWarningNotification.json) now list path/range in required as present-nullable; TypeScript fixture shows path: string | null and range: TextRange | null.

Scope is limited to ConfigWarningNotification; no unrelated warning/config/thread-item/skills cleanup.

Validation

  • just write-app-server-schema — no diff (fixtures already regenerated)
  • just test-fast -p codex-app-server-protocol — 256 passed
  • just test-fast -p codex-app-server verify_config_warning_notification_serialization — 1 passed
  • just fmt — clean
  • just fix -p codex-app-server-protocol / just fix -p codex-app-server — clippy clean
  • Independent adversarial verification: CONFIRMED (schema keeps path/range required-present-nullable, no out-of-scope changes)

Task: f99c6654-c6a9-4999-9579-3427e35fd5aa

🤖 Generated with Claude Code

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