[EPIC] Real constraint-solving RLM benchmark + durable context mounts #453
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#453
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?
Goal
Turn the current live deep experiment into a real end-to-end reasoning benchmark that exercises planning, recursive RLM execution, constraint solving, and trusted verification, then immediately add a first-class durable context-mount abstraction without bloating the core model prompt.
This epic is intentionally ordered:
The architectural rule is:
Slice 1 — Replace token-echo depth test with a real constraint-solving benchmark
Problem
benchmark/rlm_live_deep_experiment.plcurrently injects a fixed typed plan and asks nested model calls to returnLIVE_DEEP_OK.That is useful for provider/recursion plumbing, but it does not prove:
The benchmark must stop treating a magic token as correctness.
Benchmark contract
Create a deterministic, hard, uniquely-solvable finite-domain constraint problem tailored to the runtime.
Target properties:
Prefer a structured logic-grid/scheduling/resource-assignment CSP whose entire instance can be generated/represented declaratively and checked with
clpfdor equivalent trusted Prolog constraints.Required execution lanes
A.
core-minimalThe authoritative architecture test.
The benchmark supplies only the actual task and normal runtime metadata/capabilities. It must not inject an exact plan or a giant benchmark-specific planner prompt.
Core should continue to provide only the minimal typed-plan runtime contract already owned by
rlm_completion.This lane tells us whether core prompting/runtime semantics are sufficient.
B.
harness-guidedA comparison lane owned by benchmark/CLI/downstream code.
It may add task-specific planning guidance, decomposition advice, output-shape reminders, or other scaffolding.
This lane must not change trusted verification.
The delta between A and B is diagnostic:
Do not silently move harness guidance into the core just to make the benchmark green.
Depth / RLM comparison
Run meaningful depth variants where supported, at minimum depth 0/1/2.
Depth must not simply add identical echo calls. The selected/generated plan must actually use recursion/decomposition for the deeper lanes when RLM is selected.
Record at least:
core-minimalvsharness-guided).Trusted verification
Correctness must be decided by Prolog, not by substring matching and not by the LLM saying "verified".
Implement a verifier that:
Prefer reusing the existing Spec/Verify semantic split where practical:
Do not create executable authority from model-generated Prolog.
TDD / deterministic tests
Before relying on real provider runs, add deterministic tests proving:
core-minimaldoes not install benchmark-specific exact-plan instructions;harness-guidedguidance remains downstream-only;Existing provider/plumbing benchmark
Do not lose the current useful provider/recursion smoke coverage. Either:
The main
deep-integrationreasoning benchmark should become the real CSP test.CLI / benchmark runner
Update
benchmark/run.plas needed so users can explicitly run the real benchmark and compare lanes. Keep existing deterministic/integration behavior backwards-compatible where reasonable.Suggested modes may include:
Exact naming can follow existing conventions; avoid redundant aliases.
Slice 2 — Durable context mounts / lifetime + visibility
Begin immediately after the benchmark slice is landed/working.
Current behavior
rlm_contextcurrently supports process-local context records. Caller-ownedcontext_ref/context_handlevalues can survive multiplerlm_completion/4calls because completion does not delete caller-owned handles.However the built-in memory backend is explicitly non-persistent, so handles do not survive a process restart.
Design principle
Do not add only
permanent(true).Separate two independent semantic axes:
Lifetime
Model visibility
At minimum:
Default persistent context visibility must be
opaque.Persistent does not mean inject into every prompt forever.
The planner should receive bounded metadata / mount identity and use normal context operations when content is required.
Proposed host-facing abstraction
Conceptually:
Exact names are open to implementation review, but preserve the separation of lifetime, scope, visibility and source identity.
Persistence model
Persist the mount/source identity and policy, not a magical serialized live handle.
Conceptually:
Adapters remain trusted host boundaries. Model-generated data must not register executable adapter callbacks.
Scope
Support explicit scope so durable context does not become accidental global ambient state.
Initial scope vocabulary can be small, e.g.:
Avoid user-global implicit injection as a default.
Required tests
visibility(prompt)is opt-in and bounded;Prompt ownership / benchmark interpretation
Keep the library core intentionally minimal.
rlm_completionmay describe:It should not grow benchmark-specific chain-of-thought coaching, exact plans, or domain-specific CSP tutorials just to improve benchmark results.
CLI, benchmark harnesses, applications and downstream agents may add richer guidance deliberately and observably.
The real benchmark must report both minimal and guided behavior so prompt changes can be evaluated instead of guessed.
Implementation order
mainand existing live benchmark/test APIs.rlm_contextadapters and existing artifact/storage abstractions.Acceptance gate
The epic is complete only when:
rlm_completion;Start implementation with Slice 1 immediately.
nsaspy referenced this issue2026-09-10 21:20:53 +00:00
Duplicate of #223 (pre-existing Forgejo mirror). Closing this accidental duplicate created by today's open-state sync; #223 stays canonical on Forgejo.