Preserve authoritative nested model trajectory events #139
No reviewers
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!139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/45-authoritative-nested-model-events"
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?
Closes #45.
Summary
Preserves every executed plan-model event from the authoritative execution state instead of reconstructing completion trajectories from final lexical vars.
Runtime invariant
One append-only execution record now drives both nested model accounting and trajectory projection. Lexical scope restoration may hide child vars, but it cannot erase executed provider observations or rewrite their true depth.
Implementation
rlm_planexecution state with an append-onlymodel_eventsledger alongside the existing #43model_responsesledger;plan_model_N) and preserve parent lineage, depth, reason, provider and raw response at call time;rlm, parallel branches and retries, restoring lexical/trace scope without restoring either append-only ledger;rlm_completionproject authoritative recorded events first, retaining the legacy final-vars reconstruction only for older result shapes withoutmodel_events;model_eventterms;TODO.mdwith merged #42/#44/#46/#67 state and this #45 slice.TDD / verification
Regression coverage proves:
Result.vars;Exact-head GitHub Actions remains authoritative. Deterministic PlUnit, benchmark/deep-recursion, CLI/trace, persistence/restart, REAL OpenRouter and Tree-sitter gates must all pass before merge.
Non-goals