Skip to content

feat: separate bounded preview delivery from scientific processing #151

Description

@pecomyint

Priority P1; F5/F6. Bound the entire path, including queued Qt notifications, instead of only the native object queue.

Implement explicit preview/scientific delivery contracts with byte, count and age budgets. Preview owns one latest pending item and a coalesced wakeup; science owns ordered work and completeness accounting. They must not compete to pop one queue. Decode obsolete previews only when needed; cap drain work. Handle stop/reconnect and delivery-mode transitions without old callbacks or retained buffers.

Budget configuration belongs in settings.py and DB-profile defaults/seed scripts, with TOML compatibility. Separate intentional preview skips, source-ID gaps, transport rejection, decode errors, science rejection and recording failure. Monitoring cannot promise lossless acquisition; required records need sustainable storage/replay and explicit incomplete status.

Acceptance: sustained overload bounds both native and GUI-retained memory and preview age; no silent scientific drop; byte accounting includes backing storage; worker shutdown releases monitors/buffers; restarting does not accept old epochs. Depends on #150 and uses #149's instrumentation.

Work already implemented

Local preview queue selection, bounded drain-pass logic and intentional-skip counters already exist. They need native queue validation and an end-to-end delivery contract, especially downstream Qt retention.

The local performance implementation passed 14 focused tests and Ruff during the 8 September review; this is not proof of complete issue acceptance. No code from those uncommitted changes has been published as part of this planning batch.

Completion policy

Use Refs for partial PRs. Close only when all acceptance criteria have linked merged code and verification; keep hardware-dependent criteria open until exact-SHA results exist. Retain the closed issue history.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions