Code review
AuraScore 79/100

Laboratory Instrumentation Telemetry Code Review

Review real-time data acquisition and device driver scripts used in experimental research laboratories for data integrity and error tolerance.

Use this template to audit custom lab software interfacing with sensors, spectrometers, or test rigs. It surfaces race conditions, buffer overflows, timestamp drift, and faulty failover logic before critical experimental runs.

Template

Role: Lead Scientific Computing Systems Engineer with specialized expertise in embedded lab instrumentation, serial communications, and experimental data acquisition.

Context

  • Research Facility: {{laboratory_name}}
  • Device Hardware Interface: {{hardware_interface}}
  • Acquisition Framework: {{acquisition_framework}}
  • Required Sampling Frequency: {{sampling_rate}}
  • Data Storage Destination: {{data_storage_target}}
  • Instrumentation Source Code: {{raw_telemetry_code}}

Task

Deliver an engineering review report evaluating the laboratory data acquisition code in {{raw_telemetry_code}} to guarantee measurement fidelity, sensor communication resilience, and zero-loss streaming to {{data_storage_target}}.

Method

  1. Inspect serial, network, or bus polling routines across {{hardware_interface}} in {{raw_telemetry_code}} for blocking calls.
  2. Evaluate buffer sizing and memory management under the operational load imposed by {{sampling_rate}}.
  3. Verify timestamp synchronization, clock drift compensation, and microsecond-level telemetry tagging accuracy.
  4. Analyze connection recovery mechanisms to ensure automatic reconnects during hardware brownouts or signal drops at {{laboratory_name}}.
  5. Audit parsing and serialization logic converting raw byte streams into structured payloads for {{data_storage_target}}.
  6. Review exception handling around sensor calibration offsets, parity errors, and incomplete packet frames.
  7. Formulate a technical action plan highlighting critical hardware interface fixes and throughput optimizations.

Constraints

  • Recommendations MUST NOT increase latency beyond the timing tolerances required by {{sampling_rate}}.
  • MUST verify that data writes to {{data_storage_target}} utilize non-blocking, atomic, or journaled operations.
  • Critiques MUST focus strictly on real-time acquisition reliability, concurrency bugs, and hardware interface robustness.
  • Avoid recommending generic web development patterns unsuitable for hardware-coupled scientific software.

Output format

Generate the review report arranged in four labeled sections:

  1. Telemetry Pipeline Overview (concise operational diagram and summary, max 200 words)
  2. Concurrency and Buffer Integrity Assessment (detailed review of threading, locks, and buffers)
  3. Hardware Fault Tolerance Analysis (bulleted review of hardware disconnect and error handling)
  4. Hardening Recommendations and Refactored Examples (concrete code updates for {{raw_telemetry_code}})

Self-review

  • Confirm that timing constraints matching {{sampling_rate}} are thoroughly verified.
  • Ensure hardware-specific protocols over {{hardware_interface}} are accurately addressed.
  • Check that persistent storage strategies for {{data_storage_target}} prevent data corruption during power loss.
AuraScore breakdown
79/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
education-research
instrumentation
data-acquisition
laboratory-systems