Skip to content

fix(self-check): preserve custom task routing#1

Merged
RobGeada merged 8 commits into
RobGeada:MultipleSelfChecksfrom
Pouyanpi:pr-1874-first-class-self-check-tasks
Jun 26, 2026
Merged

fix(self-check): preserve custom task routing#1
RobGeada merged 8 commits into
RobGeada:MultipleSelfChecksfrom
Pouyanpi:pr-1874-first-class-self-check-tasks

Conversation

@Pouyanpi

@Pouyanpi Pouyanpi commented Jun 5, 2026

Copy link
Copy Markdown

This is a follow-up to NVIDIA-NeMo#1874 with targeted fixes for the custom self-check task routing regressions.

What changed:

  • Adds regression coverage for mixed custom/default self-check input and output rails.
  • Resolves Colang v1 self-check tasks from the current rail invocation instead of reusing shared context variables.
  • Preserves the configured custom output self-check task in streaming mode via generic action parameter placeholder resolution.
  • Adds focused helper-level coverage for self-check task resolution and model fallback behavior.

Validation:

  • poetry run pytest tests/test_multiple_self_check_rails.py tests/integrations/langchain/test_streaming.py tests/test_parallel_rails.py -q

@Pouyanpi Pouyanpi marked this pull request as ready for review June 22, 2026 17:05
Pouyanpi added 3 commits June 22, 2026 19:32
Strip section-divider, inline, and numbered-step comments added to the
new multiple-self-check-rails test file to comply with the no-comments
convention. Behavior is unchanged; all 30 tests still pass.
The tail of resolve_self_check_task was only reachable when task is
falsy or $-prefixed, so both branches always returned default_task.
Collapse them into a single return default_task.
@Pouyanpi Pouyanpi force-pushed the pr-1874-first-class-self-check-tasks branch from 0139dc4 to 2895b99 Compare June 23, 2026 08:04
default_task=DEFAULT_TASK,
main_llm=llm,
llm_task_manager=llm_task_manager,
lowest_temperature=config.lowest_temperature,

@RobGeada RobGeada Jun 26, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowest_temperature=config.lowest_temperature

This is probably better suited for a separate PR, but I think should be this configurable from the task, not from a global config setting

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pre-existing, see https://github.com/RobGeada/NeMo-Guardrails/pull/1/changes#r3480276378 . I don't have full context right now but seems hacky. I'll create an issue to track this

prompt,
stop=stop,
llm_params={
"temperature": config.lowest_temperature,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was used here

@RobGeada RobGeada merged commit ef295b4 into RobGeada:MultipleSelfChecks Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants