Bound model-visible external-context adapter metadata #107
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#107
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
The trusted external-context adapter boundary added by #106 validates adapter metadata as a ground dict, but adapter metadata is model-visible through
context_metadata/2and the completion planner prompt. A trusted-but-buggy adapter could therefore return an unexpectedly large metadata object before any boundedpeek/search/sliceoperation runs.The built-in conversation adapter emits a small fixed metadata record and is not affected in practice, but the generic adapter contract should fail closed for future project-KB/database adapters.
Required hardening
context_register_adapter/4.max_bytesceiling with documented semantics.context_errorunless a future safe metadata-compaction contract is introduced.text/termscontext behavior.Acceptance
A registered adapter may expose only bounded safe metadata to the planner. No adapter can bypass context-window management merely by placing source payload into metadata.