Package: four_charm
Version: 4.11.8
Use this file with /Users/home/Workspace/Apps/AGENTS.md. It only records 4Charm-specific context.
- Main app:
src/four_charm/main.py - Key areas:
src/four_charm/core/scraper.py,src/four_charm/gui/workers.py,src/four_charm/gui/main_window.py - Run locally:
uv run python -m four_charm.main - Build through workspace wrappers:
4charmbuildorrazorbuild 4Charm
- Use
razorcore.filesystem.sanitize_filenamefor thread titles and downloaded media paths. Raw 4chan titles regularly contain macOS-hostile characters. - Keep new 4chan fetch paths inside the app's rate-limited flow. Do not add request shortcuts that bypass throttling or retry behavior.
- Duplicate suppression relies on SHA-256 hashes tracked under a mutex. Do not replace that with filename-only checks or unsynchronized set access.
- New long-running GUI or download work should inherit
razorcore.threading.BaseWorkerso cancel/progress/error handling stays consistent. - If a bundled app builds but fails on launch, inspect
4Charm.specfirst for asset/data and hidden-import drift before changing runtime code.
Baseline:
uv run ruff check .
uv run ty check src --python-version 3.13
uv run pytest tests/ -qAdd focused checks when relevant:
- Scraper or download logic: run the closest tests in
tests/test_scraper_logic.py,tests/test_scraper_utils.py, ortests/test_workers.py - GUI or end-to-end download flow: run
uv run python -m four_charm.main - Shared-library behavior: make sure the editable
razorcoresource still points at../.razorcore
CI proves lint, type safety, and unit test correctness. It does NOT prove live-source scraper reliability. Source site behavior changes cannot be caught by CI.
Before tagging a release, verify all of the following:
-
uv run ruff check .passes with no errors -
uv run ty check src --python-version 3.13passes with no errors -
uv run pytest tests/ -qpasses with no failures - App launches locally from a clean
uv sync - At least one core user flow exercised manually end-to-end
- Packaging artifact built and smoke-tested (if applicable)
-
pyproject.tomlversion matches README badge/display text
Green CI is necessary but not sufficient for a safe release. Source site behavior (4Charm), macOS permissions (Nexus), and external tools (L!bra/Papyrus) cannot be fully validated by static CI checks.