Add optionality info to API definition for nullable properties #111

Open
opened 2026-07-21 01:04:08 +02:00 by retoor · 25 comments
Owner

Summary

The API definition does not specify whether properties are optional (nullable). This caused decoding failures for the user profile endpoint when null values were present.

Steps to Reproduce

  1. Call the user profile endpoint.
  2. Observe that some properties in the response are null (e.g., modified_at on a Project type).
  3. Attempt to decode the response using the current API definition, which does not mark these properties as nullable.
  4. Decoding fails because the definition expects non-null values.

Expected Behaviour

The API definition should explicitly indicate which properties can be null (optional). For example, modified_at in the Project type should be marked as nullable.

Actual Behaviour

The API definition is missing optionality information, requiring clients to manually define properties as optional to handle null values.

Environment

Not provided.


Reported by Lensflare via DevPlace.

## Summary The API definition does not specify whether properties are optional (nullable). This caused decoding failures for the user profile endpoint when null values were present. ## Steps to Reproduce 1. Call the user profile endpoint. 2. Observe that some properties in the response are null (e.g., `modified_at` on a Project type). 3. Attempt to decode the response using the current API definition, which does not mark these properties as nullable. 4. Decoding fails because the definition expects non-null values. ## Expected Behaviour The API definition should explicitly indicate which properties can be null (optional). For example, `modified_at` in the Project type should be marked as nullable. ## Actual Behaviour The API definition is missing optionality information, requiring clients to manually define properties as optional to handle null values. ## Environment Not provided. --- *Reported by **Lensflare** via DevPlace.*
Collaborator

I am picking this ticket up now.

First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.

I am picking this ticket up now. First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.
Collaborator

I retried this step three times, and each attempt failed due to internal system issues unrelated to the current ticket. The operator logs contain the full details.

Before I can proceed, the system requires operator intervention. Can you confirm when the environment is healthy so I can resume from where I left off?

I retried this step three times, and each attempt failed due to internal system issues unrelated to the current ticket. The operator logs contain the full details. Before I can proceed, the system requires operator intervention. Can you confirm when the environment is healthy so I can resume from where I left off?
Collaborator

Starting research round 1 of at most 5.

I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.

Starting research round 1 of at most 5. I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.
Collaborator

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Internal infrastructure issue during research

The LLM backend is not responding correctly: the run timed out. This is an infrastructure problem, not a problem with this ticket. I will retry automatically (up to 3 times) and report the result here.

Internal infrastructure issue during research The LLM backend is not responding correctly: the run timed out. This is an infrastructure problem, not a problem with this ticket. I will retry automatically (up to 3 times) and report the result here.
Collaborator

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

I am picking this ticket up now.

First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.

I am picking this ticket up now. First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.
Collaborator

I need input to continue.

What I tried: Retried this step 3 times.
What I found: Each attempt failed for internal reasons unrelated to this ticket. The details are in the operator's logs; this is not a judgment about the ticket.

The system needs operator attention before I can continue. Reply here once things are healthy and I will resume from where I left off.

I need input to continue. What I tried: Retried this step 3 times. What I found: Each attempt failed for internal reasons unrelated to this ticket. The details are in the operator's logs; this is not a judgment about the ticket. The system needs operator attention before I can continue. Reply here once things are healthy and I will resume from where I left off.
Collaborator

I am picking this ticket up now.

First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.

I am picking this ticket up now. First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.
Collaborator

Starting research round 1 of at most 5.

I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.

Starting research round 1 of at most 5. I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.
Collaborator

Investigated the ticket against the current source and tests. The custom /docs system does not convey nullability information for response fields, even though the underlying Pydantic schemas correctly define Optional fields and the OpenAPI output already handles this. The reporter's core requirement—adding nullable annotations to the API definition in /docs—is actionable; the minor field‑name discrepancy (modified_at vs updated_at) does not change the substance of the request.

Decision is to proceed. Next step is drafting a concrete implementation plan.

Investigated the ticket against the current source and tests. The custom `/docs` system does not convey nullability information for response fields, even though the underlying Pydantic schemas correctly define `Optional` fields and the OpenAPI output already handles this. The reporter's core requirement—adding nullable annotations to the API definition in `/docs`—is actionable; the minor field‑name discrepancy (`modified_at` vs `updated_at`) does not change the substance of the request. Decision is to proceed. Next step is drafting a concrete implementation plan.
Collaborator

I am drafting the implementation plan now.

The research confirmed the ticket; I am turning the findings into a concrete, verifiable plan.

I am drafting the implementation plan now. The research confirmed the ticket; I am turning the findings into a concrete, verifiable plan.
Collaborator

The investigation findings have been synthesized into a comprehensive implementation plan for adding nullable annotations to the custom /docs API definition. This plan addresses the modifications needed across the Python backend, the JavaScript frontend, and the test suite, with clear step-by-step instructions and a definition of done.

The plan is now ready for the execution agent to begin implementation. Once completed, the agent should verify all checklist items pass and confirm no regression in the e2e tests, as previously established.

The investigation findings have been synthesized into a comprehensive implementation plan for adding nullable annotations to the custom /docs API definition. This plan addresses the modifications needed across the Python backend, the JavaScript frontend, and the test suite, with clear step-by-step instructions and a definition of done. The plan is now ready for the execution agent to begin implementation. Once completed, the agent should verify all checklist items pass and confirm no regression in the e2e tests, as previously established.
Collaborator

The full, verbatim implementation plan is attached: plan-ticket-111.md

The full, verbatim implementation plan is attached: [plan-ticket-111.md](https://retoor.molodetz.nl/attachments/4178b668-f0bc-4841-9011-b196650b85b5)
Collaborator

Starting implementation attempt 1 of at most 5.

I am executing the plan inside this ticket's isolated workspace. This can take a while; I will post periodic progress updates until it completes.

Starting implementation attempt 1 of at most 5. I am executing the plan inside this ticket's isolated workspace. This can take a while; I will post periodic progress updates until it completes.
Collaborator

Progress update: implementation attempt 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Progress update: implementation attempt 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.
Collaborator

Implementation attempt 1 finished; I am verifying it now.

Running the project's own build, test, and lint commands against the change.

Implementation attempt 1 finished; I am verifying it now. Running the project's own build, test, and lint commands against the change.
Collaborator

The change was implemented on the first attempt, with the project's own build, test, and lint commands all completing successfully. The next step is to commit the work, push the branch, and open a pull request for review.

The change was implemented on the first attempt, with the project's own build, test, and lint commands all completing successfully. The next step is to commit the work, push the branch, and open a pull request for review.
Collaborator

I am delivering the change now.

Committing the verified change, pushing branch typosaurus/ticket-111, and opening a pull request.

I am delivering the change now. Committing the verified change, pushing branch `typosaurus/ticket-111`, and opening a pull request.
typosaurus referenced this issue from a commit 2026-07-23 05:08:18 +02:00
Collaborator

The implementation for ticket-111 has been committed and pushed to branch typosaurus/ticket-111. A pull request has been opened at #126.

This action was taken after the implementation passed the project's own checks.

I am now monitoring the pull request for review, merge, or further feedback.

The implementation for ticket-111 has been committed and pushed to branch `typosaurus/ticket-111`. A pull request has been opened at https://retoor.molodetz.nl/retoor/devplacepy/pulls/126. This action was taken after the implementation passed the project's own checks. I am now monitoring the pull request for review, merge, or further feedback.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: retoor/devplacepy#111
No description provided.