fix(cola-avatar-pack): degraded mode consistency and data integrity#22
Merged
fix(cola-avatar-pack): degraded mode consistency and data integrity#22
Conversation
- Add base_image existence check before Phase 5 — redirect to full flow (Phase 1) if self-portrait was never generated - Rewrite prerequisites with proper check chain: ColaOS env → python3 → Pillow → rembg (optional). Each step lets Cola attempt installation and verifies before proceeding - Add degraded mode for when python3/Pillow unavailable: skip process_avatar.py, save listenhub raw images as static PNGs - Define degraded output contract: no GIF animation, no profile card, no dual sizes, adjusted user-facing copy and avatar.json schema Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s, avatar.json, and curl handling - Add normal/degraded conditional branches to strict output rules (GIF vs PNG, profile_card vs base_image) - Split Phase 4 initial avatar.json into two templates — degraded omits avatar@2x and profile_card - Phase 7 now rebuilds files field instead of appending, preventing stale keys - Add test -s validation + retry to degraded curl commands in Phase 4 and Phase 6 - Relabel rembg from "可选增强" to "可选依赖" to reflect its actual importance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sed file checks, rarity fallback - Add complete degraded single-expression regen steps with curl example and avatar.json update rule (was one-line summary) - Replace hardcoded .gif terminology in SKILL.md with avatar.json-driven file lookup (prevents dead loop in degraded mode) - Default rarity to 'common' when python3 unavailable in degraded mode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n name regex - Phase 7 files rebuild now requires test -f before writing each key, preventing avatar.json from claiming files that failed to generate - Name validation regex: \s → literal space to reject tab/newline chars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0xFANGO
approved these changes
Apr 8, 2026
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
avatar@2xandprofile_cardtest -f, preventing avatar.json from claiming non-existent filestest -svalidation + auto-retry in Phase 4 and Phase 6.gifextension with avatar.jsonfilesfield lookup (fixes dead loop in degraded mode)commonwhen python3 unavailable in degraded mode\s→ literal space to reject tab/newline charactersTest plan
🤖 Generated with Claude Code