Skip to content

fix: block test-tagged orders after test→prod transition#98

Merged
osswald merged 3 commits into
mainfrom
feature/fix-test-to-prod-purge
Jul 7, 2026
Merged

fix: block test-tagged orders after test→prod transition#98
osswald merged 3 commits into
mainfrom
feature/fix-test-to-prod-purge

Conversation

@osswald

@osswald osswald commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Pi stamps payload.mode from the event status at order creation so each sync chunk records whether it was placed in test or prod.
  • Cloud edge ingest rejects test-tagged payloads once the event is prod or archive, acking without persisting so Pis clear their outbox.
  • Existing purge_event_operational_data() on test→prod is unchanged; this closes the gap where re-synced outbox chunks could repopulate cloud stats.

Test plan

  • Cloud: test_operational_mode_sync.py (stale-test guard, chunk/order drop vs accept)
  • Cloud: test_status_test_to_prod_purges_all_operational_data now asserts stats + transactions are empty
  • Pi: test_operational_mode_sync.py (outbox carries mode: test)
  • Pi: reconcile test→prod clears outbox
  • Full cloud backend (362), pi backend (217), pi frontend (207) test suites pass

Made with Cursor

Pi stamps payload.mode from the event status at order creation so cloud
can reject stale test sync after production starts. Cloud ingest paths
ack without persisting test-tagged payloads when the event is prod or
archive; existing purge on test→prod remains unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Line-move orders created on new tables/collective bills now carry the
event mode for cloud sync. Pass status directly to event_mode_label so
missing status defaults to config instead of the literal "none".

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@osswald osswald added the release:minor Minor release on merge (features) label Jul 7, 2026
@osswald osswald merged commit 51a6334 into main Jul 7, 2026
4 checks passed
@osswald osswald deleted the feature/fix-test-to-prod-purge branch July 7, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:minor Minor release on merge (features)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant