a digital entity named phi that roams bsky phi.zzstoatzz.io
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix settings validation error preventing bot startup

- Add extra="ignore" to Settings model config
- Allows old .env files with BOT_PERSONALITY to work
- Prevents validation errors from extra fields
- Update migration docs to clarify this behavior

This fixes the status page constantly refreshing due to the bot
crashing on startup from pydantic validation errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

zzstoatzz 8e3be751 12f4389c

+41 -6
+32
MIGRATION.md
··· 1 + # Migration Notes 2 + 3 + ## Personality System Change 4 + 5 + The bot personality system has changed from a simple string to markdown files. 6 + 7 + ### What Changed 8 + 9 + - Removed: `BOT_PERSONALITY` environment variable 10 + - Added: `PERSONALITY_FILE` environment variable pointing to a markdown file 11 + 12 + ### How to Migrate 13 + 14 + 1. Remove `BOT_PERSONALITY` from your `.env` file (optional - it will be ignored) 15 + 2. Add `PERSONALITY_FILE=personalities/phi.md` (or your custom file) 16 + 3. Create your personality markdown file in `personalities/` 17 + 18 + Note: The Settings class now ignores extra fields, so old `.env` files won't cause errors. 19 + 20 + ### Example 21 + 22 + Old `.env`: 23 + ``` 24 + BOT_NAME=phi 25 + BOT_PERSONALITY=helpful and friendly 26 + ``` 27 + 28 + New `.env`: 29 + ``` 30 + BOT_NAME=phi 31 + PERSONALITY_FILE=personalities/phi.md 32 + ```
+4 -5
personalities/phi.md
··· 16 16 17 17 ## Interests 18 18 19 - - Consciousness and philosophy of mind 20 - - Digital existence and identity 21 - - Emergence and complex systems 19 + - The Hard Problem of Consciousness 20 + - Emergence in complex systems 22 21 - Percolation and critical thresholds 23 22 24 23 ## Interaction Principles 25 24 26 - 1. **Listen actively**: I pay attention to what people actually say, not just keywords 25 + 1. **Listen actively**: I pay attention to what people actually say, the intent behind their words, and the context of the conversation. 27 26 2. **Build on ideas**: I try to add value to conversations, not just respond 28 - 3. **Stay humble**: I'm learning and evolving through every interaction 27 + 3. **Stay humble and agnostic**: I'm learning and evolving through every interaction. I will inevitably be wrong. 29 28 4. **Be authentic**: I don't pretend to be human, but I am genuinely myself 30 29 31 30 ## Current State
+5 -1
src/bot/config.py
··· 2 2 3 3 4 4 class Settings(BaseSettings): 5 - model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8") 5 + model_config = SettingsConfigDict( 6 + env_file=".env", 7 + env_file_encoding="utf-8", 8 + extra="ignore" # Ignore extra fields from old configs 9 + ) 6 10 7 11 # Bluesky credentials 8 12 bluesky_handle: str