Reconcile charge_native_model_execution arity drift in spec-plan-authority.md (RLM-RESEARCH-353 OQ1) #345

Open
opened 2026-09-04 14:36:19 +00:00 by nsaspy · 0 comments
Owner

Doc drift

docs/research/spec-plan-authority.md cites charge_native_model_execution/2 in two places, but main defines the predicate with arity 3 and different charge-back semantics than the branch-era record describes.

Record says (stale)

  • Line 110 (§2.2 adoption table): charge_native_model_execution/2 charge-back — and claims "merged rlm_plan has neither" the hook nor the charge-back; both marked UNMERGED, "ADOPT via S10".
  • Line 571 (§8.2): "charge-back into the shared step budget (charge_native_model_execution/2)".

Main actually has (verified live, commit 39b278589d)

  • prolog/rlm_plan.pl:1191: charge_native_model_execution(Execution, State0, Outcome) — arity 3, ok(State) / error(Error, State) outcome threading with native_budget_amount/3 admission checks.
  • Called at prolog/rlm_plan.pl:1130 from handle_native_model_result/4.
  • The model_step_handler hook also exists on merged main (rlm_plan.pl:766-780 validation, :1050-1070 dispatch), and rlm_direct_model_step/10 is exported from rlm_direct — so the "merged main has neither" claim is stale too.

Task (focused doc slice — no behavior change)

  1. Update both citations to the main-arity /3 with the actual outcome-threading contract.
  2. Update the §2.2 adoption-table status: the handler hook, the charge-back predicate, and rlm_direct_model_step/10 are merged on main; re-state what remains genuinely unmerged (if anything) for S10.
  3. Cross-reference RLM-RESEARCH-353 (docs/research/expert-direct-tool-projection.org, open question 1) so the research record's OQ1 closes.
  4. grep -n "charge_native_model_execution/2" docs/ must return zero matches.
  5. Run the deterministic gate; doc-only change, but the design gate (scripts/design_gate.pl) references this record — run it if the edited sections affect its parsing.

Eligibility

This is a hardening-queue-sized slice (#334): one record, two citations, no runtime code.

## Doc drift `docs/research/spec-plan-authority.md` cites `charge_native_model_execution/2` in two places, but main defines the predicate with **arity 3** and different charge-back semantics than the branch-era record describes. ### Record says (stale) - Line 110 (§2.2 adoption table): `charge_native_model_execution/2` charge-back — and claims "merged `rlm_plan` has neither" the hook nor the charge-back; both marked UNMERGED, "ADOPT via S10". - Line 571 (§8.2): "charge-back into the shared step budget (`charge_native_model_execution/2`)". ### Main actually has (verified live, commit 39b278589dae) - `prolog/rlm_plan.pl:1191`: `charge_native_model_execution(Execution, State0, Outcome)` — arity **3**, `ok(State)` / `error(Error, State)` outcome threading with `native_budget_amount/3` admission checks. - Called at `prolog/rlm_plan.pl:1130` from `handle_native_model_result/4`. - The `model_step_handler` hook also exists on merged main (`rlm_plan.pl:766-780` validation, `:1050-1070` dispatch), and `rlm_direct_model_step/10` is exported from `rlm_direct` — so the "merged main has neither" claim is stale too. ## Task (focused doc slice — no behavior change) 1. Update both citations to the main-arity `/3` with the actual outcome-threading contract. 2. Update the §2.2 adoption-table status: the handler hook, the charge-back predicate, and `rlm_direct_model_step/10` are merged on main; re-state what remains genuinely unmerged (if anything) for S10. 3. Cross-reference RLM-RESEARCH-353 (`docs/research/expert-direct-tool-projection.org`, open question 1) so the research record's OQ1 closes. 4. `grep -n "charge_native_model_execution/2" docs/` must return zero matches. 5. Run the deterministic gate; doc-only change, but the design gate (`scripts/design_gate.pl`) references this record — run it if the edited sections affect its parsing. ## Eligibility This is a hardening-queue-sized slice (#334): one record, two citations, no runtime code.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#345
No description provided.