Initial M1 push used bash-mount file read which produced a 146-line
truncated version, losing the get_avg_tokens_for_stages() method
(lines 145-203 in main). This broke 4 pre-existing CostTracker tests.
Restored from main with M1 SQL bug fix applied: phpcs:ignore comments
now on separate PHP lines above prepare() calls, not embedded inside
the SQL string literals.
Agent-Session: phase2-admin-m1-engineer