Repository navigation
fix(ppt-engine): keep a deck's no-quality file name stable - #1155
Conversation
An empty Settings quality now resolves to None instead of "", so a deck regenerated after the upgrade stopped overwriting the file its page names: the digest formatted the two spellings differently even though both send no quality. Normalize the digest to the empty spelling, which is what the picker-saved section used before the fix, and pin it with a test that drives both spellings through the generator. Co-Authored-By: Claude Code <noreply@anthropic.com>
The old sentence called the fallback the provider default. The resolver sends the request's value for the gpt-image family, keeps gpt-image-2's medium default when the request names none, and sends nothing for the other models, so state exactly that. Co-Authored-By: Claude Code <noreply@anthropic.com>
The report's provider is a custom OpenAI-compatible base, whose /images/generations route is a different quality-injection site from OpenRouter's /images. Read the section live from a config file, as the agent does, and check the call's quality reaches that request. Co-Authored-By: Claude Code <noreply@anthropic.com>
The gpt-image-2.5 case was labelled a family without the knob, but it is the same family and takes a quality; what it lacks is the exact-id medium default. Parametrize both section shapes so the "resolves like unset" claim is actually compared. Co-Authored-By: Claude Code <noreply@anthropic.com>
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the refreshed github/main...HEAD diff, the image-generation caller and request paths, the filename-key history, PR #1137's merged behavior, and the relevant AGENTS.md, CLAUDE.md, and CONTEXT-MAP.md constraints. I also checked backward compatibility, test strength, and the plugin/runtime boundary. The normalization preserves the picker-saved deck filename while keeping every explicit quality value distinct, and I found no plain error or architecture violation.
Verification: after uv sync --all-packages, uv run pytest tests/test_media_gen_tool.py tests/test_ppt_engine_generate_image_tool.py -q passed with 184 tests. uv run ruff check passed, uv run ruff format --check reported all 4 changed files formatted, and git diff --check github/main...HEAD passed. Before the workspace sync, test collection/execution failed because the fresh default environment lacked raven_ppt and raven_everos; those were environment setup errors, not skipped tests.
|
Windows compatibility review — PR #1155 @ Scope: the PR's own diff is Windows angle: none. The change is digest/string formatting on top of the existing Verification (native Windows 11; detached worktrees
Coverage gaps: no live deck generation with image references was run (the tests stop at name/request assembly); the full suite was not rerun. No Windows-specific issue found. |
The name test only proved the two no-quality spellings agree, so a digest that normalized to the None spelling still passed while renaming every picker-saved deck. Assert the empty spelling's historical name instead: that is the file a picker-saved section's page already carries.
Only a picker-saved section whose call still sends no quality keeps its file name. An exact gpt-image-2 section now resolves its empty quality to medium, so its name moves once; the comment claimed every such deck keeps its name.
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
I reviewed the 5d600eebe4e4..ecd42c3c7c2b delta and rechecked it against the previously reviewed caller behavior, backward-compatibility claim, test intent, and repository comment/test rules. The revision only corrects the documented scope of filename stability and pins the canonical empty-spelling digest, preventing the regression test from passing if both calls were normalized to the wrong historical name. The exact gpt-image-2 exception agrees with effective_quality, and the digest input is platform-independent. No tests were weakened and no architecture constraint changed.
Verification: uv run pytest tests/test_media_gen_tool.py tests/test_ppt_engine_generate_image_tool.py -q passed with 184 tests; Ruff check and format check passed; git diff --check github/main...HEAD passed.
|
Windows compatibility re-review — PR #1155 @ Scope: the delta since the previously reviewed head Windows angle: none. The digest is a SHA-256 over an f-string and Verification (native Windows 11; detached worktrees
Coverage gaps: no live deck generation with image references; the full suite was not rerun. No Windows-specific issue found. |
ZuyiZhou
left a comment
There was a problem hiding this comment.
One-line digest change (sent_quality or '') makes both spellings of no quality name the same deck file, and the tests pin it to the empty spelling's historical name so normalizing the other way would fail. The remaining rename cases (unset or non-gpt-image sections, exact gpt-image-2) are disclosed under Risk. The docstring now matches effective_quality. CI green at ecd42c3.
Summary
Follow-up to #1137. This branch carries the review findings that could not be pushed into the contributor's fork branch: the fork is no longer writable.
plugins-dist/ppt-enginekeyed its generated file name on the effective quality. fix(agent): an empty settings quality no longer pins image calls #1137 makes an empty Settings quality resolve toNonewhere it used to resolve to"", and the digest formatted those two spellings differently even though both send no quality. A deck regenerated after the upgrade therefore stopped overwriting the file its page names. The digest now maps both spellings to the empty spelling's key, so a picker-saved section's deck keeps its name while the call still sends no quality; the exactgpt-image-2case is the exception under Risk.MediaToolConfig's docstring now states the actual resolution rule: the request's value applies for the gpt-image family; with nothing on the request either, exactgpt-image-2sendsmediumand other models send nothing./images/generationsroute.Type
Verification
Relevant tests pass locally
Relevant lint / type checks pass locally
User-facing docs or screenshots are updated when needed
RED at fix(agent): an empty settings quality no longer pins image calls #1137's base: the picker-saved-empty cases and the custom-route e2e fail, and the deck-name test produces two different file names for the same no-quality request (the two unset-section controls pass).
GREEN:
pytest tests/test_media_gen_tool.py tests/test_ppt_engine_generate_image_tool.py tests/test_config_self_surface.py tests/test_raven_config_tool.py -q-> 455 passed.The no-quality name is pinned to the empty spelling: normalizing the digest to the
Nonespelling instead makestest_both_spellings_of_no_quality_name_the_same_filefail on the historical name (lantern-b384de827020.png), where the real tree passes.ruff checkandruff format --checkon the changed files -> clean.commitlint on the six commits -> 0 problems.
Risk
One compatibility note: before #1137 the digest had two spellings for "no quality" (
""for an explicitly empty gpt-image section,Nonefor an unset or non-gpt-image one). This PR keeps the""spelling, which is what the WebUI picker's implicit empty value used; decks whose old name usedNonestill move once. There is no key that preserves both. One class of picker-saved deck is not preserved: an exactgpt-image-2section's empty quality now resolves tomedium(the id's documented default, from #1137), so its name follows themediumspelling and moves once on the first regeneration after the upgrade. Revert this PR to restore the previous digest formatting.Related Issues
Part of #1106. Follow-up to #1137.