fix: harden state/cache identity, asset paths, provider routing and add bounded image concurrency - #11
Merged
Merged
Conversation
…dd bounded image concurrency - fingerprint resume state by source, style, provider/model, continuity and L3 so an edited text or changed backend cannot silently reuse stale assets (closes the regression where a fixed safe chapter was permanently skipped after a prior rejection) - use pipeline-owned (chunk, panel) state keys and hash all model-controlled asset filenames to prevent path traversal, windows reserved-name failures and collisions when chapters reuse the same model panel_id; keep the model id as display metadata - classify content-policy rejections only from explicit provider evidence instead of any HTTP 400, so malformed requests no longer become permanent silent skips - resolve provider credentials only after selecting the provider so openai_compat endpoints never receive the agnes key; validate provider config for the web ui - write state atomically and guard a project with a posix/windows lock; reconcile missing or escaped persisted assets before trusting them - preserve storyboard order and dialogue; webtoon and page layouts expand for long or explicitly wrapped dialogue instead of clipping - run independent portraits and panels under a bounded asyncio semaphore (default 3, configurable via INKSTONE_IMAGE_CONCURRENCY) and checkpoint successful assets in a batch before propagating an operational error - harden web file routes with real path containment instead of shared-prefix strings - add regression tests for cache invalidation, path containment, concurrency, repeated model ids, long dialogue and compatible-provider configuration
3 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Hardens the creative-comic pipeline against silent data loss, unsafe file writes, provider misconfiguration, and slow generation.
web/server.pynow accepts compatible-only configurations instead of requiringAGNES_API_KEY.asyncio.Semaphore(default 3, configurable viaINKSTONE_IMAGE_CONCURRENCY); successful work is checkpointed before a sibling operational error propagates.Test plan
pytestpasses (1 skipped) andruff check .is clean in theinkstoneconda env.🤖 Generated with CodeBuddy