Repository navigation
feat: add typed prompt output models - #3371
Conversation
…ests - Cache key is now 'related_tickets_<md5(pr_url)>' instead of global 'related_tickets', preventing stale tickets leaking between unrelated PRs - Added cache_tickets=true config flag under [pr_reviewer] to allow disabling - Fixed Dynaconf merge_enabled=True list append bug in both production code (env_bridge.py uses case-insensitive pop before set) and test helpers (restore_settings now calls _remove_key before every set) - Added azure-identity dependency for Azure DevOps provider availability - 1043 tests pass, 0 failures
…aks in tests" This reverts commit 7f0d154.
PR Summary by QodoAdd typed Pydantic models for prompt outputs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit 03f2606 |
|
Code review by qodo was updated up to the latest commit c12aa5e |
|
Code review by qodo was updated up to the latest commit a9ef8c7 |
|
Code review by qodo was updated up to the latest commit 681306a |
|
Code review by qodo was updated up to the latest commit 2701800 |
|
Code review by qodo was updated up to the latest commit 9cf870b |
|
Code review by qodo was updated up to the latest commit 6aa533d |
|
@IsmaelMartinez all requested fixes are done and pushed. The output models, prompt contracts, and tests are updated. Validation is green. |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks for turning this round in two hours, and for taking every Qodo thread to a commit.
One ask, inline: the system example was switched to a bare No, which PyYAML reads as the boolean False, so the shape the prompt now teaches fails the model's own Literal["Yes","No"]. The block scalar the user example still uses is the safe form.
Everything else held: fixtures validate, the guard goes red on a renamed or retyped field, nested classes included, and it merges cleanly with #3366.
Worth a follow-up, not a blocker: the guard is one-directional and the enum values are pinned by hand rather than parsed.
| {%- endif %} | ||
| relevant_tests: | | ||
| No | ||
| relevant_tests: No |
There was a problem hiding this comment.
load_yaml is PyYAML 1.1, so a bare No is the boolean False (load_yaml('review:\n relevant_tests: No') gives False), and the example fails Literal["Yes","No"] under every require_* toggle. The block scalar validates everywhere; applied, 30 passed.
| relevant_tests: No | |
| relevant_tests: | | |
| No |
|
Code review by qodo was updated up to the latest commit 0d522fc |
|
Code review by qodo was updated up to the latest commit c9b5627 |
|
Done. All requested collaborator and review fixes are applied, and the checks are passing. |
IsmaelMartinez
left a comment
There was a problem hiding this comment.
Thanks for switching the example back to the block scalar within five minutes, and for picking up Qodo's duplicate-example point yourself in the next push rather than waiting on #3366; approving.
On today's main, with #3366 in, the branch merges clean and the two agree on every example line. The suite is main plus your tests, the drift guard goes red with the prompt files restored, and CI is green. The evaluate example edit is inert for now: that prompt file is not registered in config_loader.py, so nothing loads it.
Fixes #3354.
Adds Pydantic models for the structured output schemas declared in the prompt templates. Conditional fields are optional, and prompt names that are not valid Python identifiers use aliases.
Adds complete validation fixtures and a drift test that checks prompt fields remain represented by the models.
Tests: 337 related unit tests passed. Ruff and pre-commit passed.