feat(games): add report ingestion endpoint for choix-narratifs export (Phase 6)#97
Merged
Merged
Conversation
… (Phase 6) Implements T1+T2 of the Suddenly Phase 6 plan: - Defines the compte rendu blob schema (ReportIngestSerializer) with a §5 guard (resolved: true required) to ensure discovery is already lived - Adds POST /api/reports/ingest/ authenticated via X-Ingest-Token header - Creates Report with status=published; the existing pre_save/post_save signals automatically set published_at and broadcast the AP Article INGEST_TOKEN env var controls the shared secret (empty = endpoint disabled). https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
- Fix visibility leak: unauthenticated listing was exposing unlisted and followers-only reports; now restricted to visibility=public by default - Add optional query params: ?visibility=, ?game=<uuid>, ?language= (no new dependency — plain queryset filtering) https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
- GET /explore/ — public, no login required - Filterable by language and tag via HTMX (no page reload) - Full page + partial templates following the htmx_render() pattern - Reuses existing card/tag_filter components for visual consistency https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
- Show session_date and language badge in report header - Add cast_fallback: display ReportCast (new_character_name) entries when no CharacterAppearance exists — covers reports ingested via the ingest endpoint which bypass the normal publish flow https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
- Fix import ordering in ingest.py (auto-fixed by ruff) - Remove unused variables: obj_type (inbox.py), url (notification_signals.py), remote_user/all_args/existing_follow/character (test_federation_e2e.py) - Wrap long lines in test_federation_e2e.py to stay within 100-char limit https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
Fixes ruff format --check failures on federation_views.py, core/models.py, ingest.py, and test_federation_e2e.py. https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
Matches the pattern used throughout the codebase for Serializer/APIView subclasses. Also wraps the bool comparison in bool() to fix no-any-return. https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1
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.
https://claude.ai/code/session_01GPLJauoQrLkz1tif4L1aD1