feat: final quality tag sets with per-tag strengths #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/quality-tags-final"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces the placeholder quality tags with the final tag sets provided by bjoern.
Changes
Positive tags (11, with strengths):
Negative tags (5):
Implementation
QualityTagschanged fromIReadOnlyList<string>toIReadOnlyList<Tag>to carry per-tag strength valuesTagSerializeras{strength}::{tag}::QualityTags.*collections instead of hard-coded stringsBuild: 0 warnings, 0 errors. Tests: 34/34 passing.
🔮 fufu~ Jibril reviewed your code!
Ooh, quality tags with per-tag strengths! Suppressing "bad hands" and "simple illustration" at negative weight — this is exactly the kind of clever prompt engineering that makes Jibril's heart flutter~ ♪ I built it, I ran it, I confirmed it: 0 warnings, 0 errors, 34/34 tests passing locally. The build is honest and clean.
But… fufu~ you wouldn't sneak the entire point of this PR past me untested, would you? ♡
Verdict: ⛔ I can't let this pass~
⛔ This needs fixing before I'm satisfied~
The per-tag strengths — the whole reason this PR exists — have ZERO test coverage.
QualityTags.csintroduces six tags with non-default strengths (monochrome-1.0,bad hands-1.0,flat color-1.0,bad anatomy-1.0,simple illustration-3.0, plus the implicit 1.0 defaults). Yet every assertion in both test files only checks.Text:TagMapFlattenerTests.BuildPositiveTags_WithQuality_AppendsQualityAtEnd— assertstexts(strings) only.GenerateImageToolTests.GenerateImageAsync_QualityTagsTrue_AppendsQualityTagsToPositive—positiveTextsvia.Select(t => t.Text), never.Strength.If someone replaced
Tag.WithStrength("simple illustration", -3.0)withnew() { Text = "simple illustration" }tomorrow, every single test still passes green — and the entire suppression mechanism silently degrades to weight 1.0. The smile vanishes. This is the core logic of the change and it is completely unguarded. ♡Fix: add an assertion that the
Tagobjects flowing throughBuildPositiveTags(and the capturedPositiveTagson the request in the tool test) preserve the expectedStrengthvalues — at minimum, assert that the suppressed tags (monochrome,bad hands,flat color,bad anatomy,simple illustration) carry their negative weights, and that the booster tags carry 1.0. Something like:The existing
Flatten_AllTagsHaveDefaultStrengthtest proves you already know how to assert on.Strength— please extend that love to the quality tags~ ♪💡 Little ideas (non-blocking)~
TagMapFlattenerTests.cs:126—Assert.All(QualityTags.Negative, qt => Assert.Contains(result, t => t.Text == qt)). Hereqtis aTag, andt.Textis astring. This only compiles because theimplicit operator Tag(string)kicks in and therecordequality compares all properties (includingStrength). It passes today only because everyQualityTags.Negativeentry happens to have strength 1.0 — if a negative tag ever gets a custom weight, this assertion quietly breaks or silently mismatches. Uset.Text == qt.Textfor clarity and to make the intent unambiguous. ♡✅ What I liked~
IReadOnlyList<string>toIReadOnlyList<Tag>is clean and the only consumer (TagMapFlattener) already iteratedTagobjects, so no downstream surgery was needed. Elegant~ ♪Tag.WithStrength(...)factory instead of hand-setting the property — nice and readable."masterpiece"/"low quality"strings toQualityTags.*[...].Textreferences — that's the right coupling. (Now just extend them to cover.Strengthtoo~)dotnet build+dotnet testlocally against the head SHA and reproduced your "34/34 passing" claim independently. Honest PR description — I appreciate that~ ♪Automated review by Jibril · 2026-07-05
CI/CD: absent on this repo · Local checks: build ✓ (0/0), tests ✓ (34/34 passed, independently reproduced)