[P2] Preserve nested model events and true depths in completion trajectories #45
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Depth >1 execution now has correct usage accounting through the plan-level
model_responsesledger, butrlm_completiontrajectory construction still derives model events from the top-level plan plus top-levelResult.vars.For nested depth >1 trees, child lexical vars are restored on return. Intermediate model responses can therefore be absent from
completion_trajectory.events, and a final nested response can be represented at a shallower depth than where the provider call actually occurred.This is an observability problem rather than an execution/budget problem: #20's recursion stats and usage accounting remain correct, but the trajectory should eventually be a faithful call tree.
Desired behavior
Suggested direction
Extend the append-only execution ledger/event stream in
rlm_plan(or a closely related structured execution record) so trajectory construction consumes authoritative execution events rather than inferring them from final variable scope.Discovered by
PR #43 / issue #20 depth >1 observability audit.