Skip to content

feat(games): add report ingestion endpoint for choix-narratifs export (Phase 6)#97

Merged
RebelliousSmile merged 8 commits into
mainfrom
claude/blissful-archimedes-8l285
Jun 3, 2026
Merged

feat(games): add report ingestion endpoint for choix-narratifs export (Phase 6)#97
RebelliousSmile merged 8 commits into
mainfrom
claude/blissful-archimedes-8l285

Conversation

@RebelliousSmile

Copy link
Copy Markdown
Owner

claude added 8 commits June 3, 2026 09:42
… (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
@RebelliousSmile RebelliousSmile merged commit 7db97b9 into main Jun 3, 2026
0 of 2 checks passed
@RebelliousSmile RebelliousSmile deleted the claude/blissful-archimedes-8l285 branch June 3, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants