Describe the bug
When injecting historical telemetry with packet.stored = True and a past received_time, the log writer still compares the packet's timestamp against previous_time_nsec_since_epoch and logs an error:
Log writer out of order time detected (increase buffer depth?): 1970-01-01 00:46:34
Actual behavior: The stored flag is written as a bitmask to the log file but is never checked in the time order enforcement logic in log_writer.py. This means any live telemetry packet received between two historical injections will trigger the error.
Suggested fix: In prepare_write inside log_writer.py, skip the time order check when the packet has stored=True:
if not packet.stored and self.enforce_time_order and ...:
Logger.error("Log writer out of order time detected ...")
To Reproduce
Inject historical telemetry with stored=true with a received_time in the past and then inject one with stored=false with a modern received_time and see the error.
Expected behavior
Packets with stored=True are intentionally historical and should bypass the enforce_time_order check entirely, since interleaving live and stored packets will always produce out-of-order timestamps by design.
Screenshots
No response
OS
windows 10
OpenC3 COSMOS Version
7.1.0
Browser
Chrome
Describe the bug
When injecting historical telemetry with packet.stored = True and a past received_time, the log writer still compares the packet's timestamp against previous_time_nsec_since_epoch and logs an error:
Log writer out of order time detected (increase buffer depth?): 1970-01-01 00:46:34
Actual behavior: The stored flag is written as a bitmask to the log file but is never checked in the time order enforcement logic in log_writer.py. This means any live telemetry packet received between two historical injections will trigger the error.
Suggested fix: In prepare_write inside log_writer.py, skip the time order check when the packet has stored=True:
if not packet.stored and self.enforce_time_order and ...:
Logger.error("Log writer out of order time detected ...")
To Reproduce
Inject historical telemetry with stored=true with a received_time in the past and then inject one with stored=false with a modern received_time and see the error.
Expected behavior
Packets with stored=True are intentionally historical and should bypass the enforce_time_order check entirely, since interleaving live and stored packets will always produce out-of-order timestamps by design.
Screenshots
No response
OS
windows 10
OpenC3 COSMOS Version
7.1.0
Browser
Chrome