fix(assembler): add prompt_version/agent_role to amortize SELECT; fix test mock

The amortize_research_costs() SELECT was missing prompt_version and agent_role —
the two fields added in the INSERT as part of the v0.19.4 pv/role fix. PHP 8.x
treats accessing an undefined property on stdClass as E_WARNING; PHPUnit
converts warnings to exceptions, which the reap() try/catch captures as
'DB error', leaving reaped=0 and breaking ResearchReaperTest on all 3 PHP versions.

Fix: extend the SELECT column list to include the two new fields so
$research_row has them populated. Update the ResearchReaperTest get_row mock
to return prompt_version and agent_role from fixtures (defaults null/'').

Agent-Session: engineer-prab-maint-fix-20260612
This commit is contained in:
peptiderepo
2026-06-12 14:05:09 +00:00
parent 02310e90d4
commit c0929be3ce
2 changed files with 3 additions and 1 deletions

View File

@@ -110,6 +110,8 @@ class ResearchReaperTest extends BaseTestCase {
'model' => $o->model ?? 'gemini-flash',
'prompt_tokens' => $o->prompt_tokens ?? 1000,
'completion_tokens' => $o->completion_tokens ?? 500,
'prompt_version' => $o->prompt_version ?? null,
'agent_role' => $o->agent_role ?? '',
];
}
}