Skip to content

Explorations: the answer to a creation carries its created event - #1119

Draft
frapercan wants to merge 7 commits into
developfrom
fix/exploration-create-answers-with-its-event
Draft

frapercan wants to merge 7 commits into
developfrom
fix/exploration-create-answers-with-its-event

Conversation

@frapercan

Copy link
Copy Markdown
Owner

Why

Exploration 1 was created on 2026-11-04. Its created event is in the database, but the answer to the POST that created it showed none.

PROTEA's sessions are built with autoflush=False. create() added its event after its last flush, so describe(), called in the same transaction by the route, read the log before the event reached it. Every other move already flushes after its event.

What

  • create() flushes after adding the created event.
  • A test runs creation and describe() on a session built without autoflush, as the platform builds them. It fails without the flush.

Checks

  • ruff
  • the explorations service tests: 32 passed

PROTEA's sessions are built with autoflush=False, and create() added its
created event after its last flush, so the route that answers with
describe() in the same transaction read the log before the event reached
it: exploration 1 was created on 2026-11-04 with its event in the
database and none in the answer. create() now flushes after the event,
as every other move already does, and a test runs on a session without
autoflush.
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.66%. Comparing base (8035fb7) to head (2430a93).

❌ Your project check has failed because the head coverage (83.92%) is below the target coverage (85.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1119   +/-   ##
========================================
  Coverage    85.66%   85.66%           
========================================
  Files          472      472           
  Lines        37463    37464    +1     
========================================
+ Hits         32091    32092    +1     
  Misses        5372     5372           
Files with missing lines Coverage Δ
protea/services/explorations_service.py 93.64% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

1 participant