Singleton-variable warnings on every library(rlm) load (a3628d3): rlm_skill.pl:881, rlm_prompt_compiler.pl:1941 #301

Open
opened 2026-09-02 17:25:36 +00:00 by nsaspy · 0 comments
Owner

Summary

a3628d3 ("fix(runtime): propagate wall-time limits through skill compilation") added exception-propagation clauses with an unused first argument, which makes every use_module(library(rlm)) print singleton-variable warnings:

Warning: .../prolog/rlm_skill.pl:881:
Warning:    Singleton variables: [Phase]
Warning: .../prolog/rlm_prompt_compiler.pl:1941:
Warning:    Singleton variables: [Phase]

Affected clauses

% prolog/rlm_skill.pl:881
skill_exception(Phase, Exception, _) :-
    time_limit_exception(Exception),
    !,
    throw(Exception).

% prolog/rlm_prompt_compiler.pl:1941
compiler_exception(Phase, Exception, _) :-
    time_limit_exception(Exception),
    !,
    throw(Exception).

Impact

Hosts that load the pack (CI logs, embedders, the Agent Zero runtime worker) get warning noise on every load; it also hides genuine future warnings in the same output. Not present at b891c27, so it regressed with a3628d3.

Fix

Rename the unused head argument to _Phase (or _) in both clauses.

## Summary a3628d3 ("fix(runtime): propagate wall-time limits through skill compilation") added exception-propagation clauses with an unused first argument, which makes every `use_module(library(rlm))` print singleton-variable warnings: ``` Warning: .../prolog/rlm_skill.pl:881: Warning: Singleton variables: [Phase] Warning: .../prolog/rlm_prompt_compiler.pl:1941: Warning: Singleton variables: [Phase] ``` ## Affected clauses ```prolog % prolog/rlm_skill.pl:881 skill_exception(Phase, Exception, _) :- time_limit_exception(Exception), !, throw(Exception). % prolog/rlm_prompt_compiler.pl:1941 compiler_exception(Phase, Exception, _) :- time_limit_exception(Exception), !, throw(Exception). ``` ## Impact Hosts that load the pack (CI logs, embedders, the Agent Zero runtime worker) get warning noise on every load; it also hides genuine future warnings in the same output. Not present at b891c27, so it regressed with a3628d3. ## Fix Rename the unused head argument to `_Phase` (or `_`) in both clauses.
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#301
No description provided.