Skip to content

Smartstack: e2e tests, remove realtime containers - #476

Open
timbeccue wants to merge 7 commits into
feature/smartstack-pr6-workerfrom
feature/smartstack-pr7-e2e
Open

Smartstack: e2e tests, remove realtime containers#476
timbeccue wants to merge 7 commits into
feature/smartstack-pr6-workerfrom
feature/smartstack-pr7-e2e

Conversation

@timbeccue

Copy link
Copy Markdown
Contributor

Summary

This is PR 7 of 8 completing the v1 banzai implementation of Smartstacking at site.

PR1 (#469): combine math
PR2 (#470): JPEG utilities
PR3 (#471): DB updates
PR4 (#473): shipper contract
PR5 (#474): smartstack data products
PR6 (#475): stack worker polling
PR7 (#476): e2e tests, compose cleanup      <-- you are here
PR8 (#477): logging

PR1 combine math ───────┐
PR2 JPEG utilities ─────┤
PR3 DB updates ─────────┼──> PR5 data products --> PR6 stack workers --> PR7 E2E --> PR8 logs/docs
PR4 shipper contract ───┘

PRs 1–4 provide the independent foundations for combining images, rendering JPEGs, storing stack state, and shipper integration (this PR). PR5 builds the data products, this PR adds the polling worker, crash-only supervisor, and site deployment configuration. PR7 adds cross-service E2E and recovery proof; PR8 adds structured lifecycle telemetry and final documentation.

What's here

This branch has two changes: removing the realtime mode from the smartstack deployment (docker-compose-site.yml), and update the e2e tests to verify the behavior that was implemented works as intended.

Remove realtime mode

docker-compose-site.yml becomes Smartstack-only:

  • Removes the realtime banzai-worker, banzai-large-worker, and banzai-listener services.
  • Removes their queue settings from the site defaults and E2E environment.
  • Retains cache initialization, calibration download, stackframe ingress/reduction, and the stacking supervisor.

The realtime entry point and docker-compose-local.yml are unchanged. This changes only which pipeline the site deployment launches.

End-to-end coverage

The site E2E suite now covers these concrete scenarios:

  • Single-frame smoke test: Sends one raw stackframe through the site services and verifies that its reduced e09 file is written and the stack reaches its expected terminal database state.

  • Cached calibration check: Opens the reduced e09 files and checks the calibration filenames recorded in their L1IDBIAS, L1IDDARK, and L1IDFLAT headers. Each referenced calibration must exist in the local cache, and its database record must point into that cache.

  • Normal three-frame stack: Sends three raw stackframes and waits for previews after the first and second members. After the third member arrives, the test verifies:

    • one final e45 FITS file and both JPEG sizes are written;
    • the previews and final product reuse the same first-frame-based paths;
    • NCOMBINE=3 and IMCOM001IMCOM003 identify the three reduced inputs in order;
    • preview messages contain fits: null and the required thumbnail metadata; and
    • exactly one final shipper message contains the e45 path.
  • Bad input does not block other stacks: Corrupts one stack’s reduced e09 file so final product generation repeatedly fails. That stack eventually reaches error after exhausting its retry attempts, while a healthy stack for the same camera still completes.

  • Worker restart recovery: Force-kills the per-camera worker processes and verifies that the supervisor exits, Docker restarts the service, and a newly submitted stack completes successfully afterward.

The fixture uses isolated Smartstack queues and creates a dedicated shipper probe queue before sending any frames. This lets the tests inspect the actual RabbitMQ messages without interfering with another local deployment.

Supporting changes

  • FINALIZE_BACKOFF_SECONDS can be overridden for E2E while retaining the production default.
  • Retention cleanup runs on the first worker tick and remains hourly afterward.
  • The architecture guide is updated to describe the integrated PR1–PR6 behavior.

Focused combine, schema, product, publisher, and worker behavior remains owned by the earlier PRs; this PR proves those layers work together.

@timbeccue
timbeccue force-pushed the feature/smartstack-pr7-e2e branch from 462544a to 78f2fd0 Compare August 7, 2026 07:15
@timbeccue
timbeccue requested a review from cmccully August 7, 2026 15:45
@timbeccue timbeccue changed the title Smartstack: add site E2E proof and make the deployment Smartstack-only Smartstack: e2e tests, remove realtime containers Aug 7, 2026
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