fix(ads): the draft pile is bounded — stock count spans draft through ready (#689) - #692
Merged
Merged
Conversation
…tCount, not the ready shelf alone With AutoApprove off (the shipped default) every generated spot waits in draft and the ready-only count never saw it, so the worker wrote one more draft — and spent one more LLM completion — every tick, forever. IAdSpotStore.CountReadyGeneratedAsync becomes CountStockGeneratedAsync: llm/pack spots in draft|approved|rendering|ready; failed and retired never count, owner spots stay excluded. - worker specs pin a waiting draft and a mid-render spot counting; failed and owner not - store spec pins the exact state set against real Postgres - help text (Settings page, DEPLOYMENT) says what the knob actually bounds Closes #689
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #689.
🐛 What was wrong
AdSpotWorker's refill pass comparedStation:Ads:TargetCountto the ready llm/pack count only. UnderAutoApprove=false(the shipped default, and the T409 posture) a generated spot waits indraftand never counted — one new draft and one LLM completion per tick, forever (144/day at defaults). Latent today only because the demo has zero briefs; it would start the tick after T407's pack installs.🔧 What changed
IAdSpotStore.CountReadyGeneratedAsync→CountStockGeneratedAsync: llm/pack spots indraft | approved | rendering | ready.failednever counts (an operator retry/discard is its exit and must not block refill);retiredis terminal; owner spots stay excluded.Station:Ads:TargetCount(Settings page + DEPLOYMENT) now says what the knob bounds.✅ Verified
dotnet build GenWave.sln: 0 warnings, 0 errors.dotnet test GenWave.sln: Ads 98/98, MediaLibrary 1242 passed, Architecture 135/135, Tts, Core, Context, Orchestration, Plugins all green. Host.Tests showed 8 failures on the parallel full-solution run (PostgresResource temporarily unavailablewhile the MediaLibrary fixture ran alongside); an isolated Host rerun passed 2566, skipped 368, failed 0.tools/check-doc-drift.shgreen.