ARCHITECTURE

Engine architecture

Polling, validation, locking, scoring, decisions, and heartbeat.

#Polling loop

The PM2 worker enforces a minimum 15-second interval, requests the fixed built-in symbol set, validates current quotes, and writes unique observations.

#Single writer

A BEGIN IMMEDIATE transaction checks the singleton lease. Another owner with an unexpired lease prevents the cycle.

#Scoring

Each agent reads its latest required rows by symbol and calls the canonical V0.1 function with its policies.

#Heartbeat

Start time, latest success/failure, error, observation count, decision count, and source are stored in a singleton row read by /status.