Skip to content

fix(lara): respect falsy run() overrides in LaraDocumentTranslator - #4169

Merged
julian-risch merged 1 commit into
deepset-ai:mainfrom
muthukkumaranb:fix/lara-falsy-overrides
Oct 28, 2026
Merged

julian-risch merged 1 commit into
deepset-ai:mainfrom
muthukkumaranb:fix/lara-falsy-overrides

Conversation

@muthukkumaranb

Copy link
Copy Markdown
Contributor

Related Issues

Proposed Changes:

LaraDocumentTranslator.run() resolved run-time overrides with x or self.x, so falsy values such as reasoning=False, glossaries=[] and adapt_to=[] were silently replaced by the init values.

All run-time parameters now use x if x is not None else self.x, so only None falls back to the init value.

How did you test it?

Added test_run_falsy_overrides_from_init: it initializes the translator with reasoning=True, glossaries and adapt_to, calls run(reasoning=False, glossaries=[], adapt_to=[]) with a mocked Lara client, and checks that the falsy values reach translate(). The test fails before the change and passes after.

Ran hatch run test:unit locally (23 passed) and ruff check / ruff format.

Notes for the reviewer

Same pattern as #4084 and #4159.

Checklist

@muthukkumaranb
muthukkumaranb requested a review from a team as a code owner October 28, 2026 12:30
@muthukkumaranb
muthukkumaranb requested review from julian-risch and removed request for a team October 28, 2026 12:30
@github-actions

Copy link
Copy Markdown
Contributor

Heads-up for maintainers

This PR is from a fork and touches integrations whose integration tests require API keys.
Those tests are skipped in CI because fork PRs don't have access to repo secrets for security reasons.

Affected integrations:

  • lara

Please run the integration tests locally (hatch run test:integration inside each folder) before approving.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report (lara)

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  integrations/lara/src/haystack_integrations/components/translators/lara
  document_translator.py
Project Total  

This report was generated by python-coverage-comment-action

@HaystackBot

Copy link
Copy Markdown
Contributor

Hi @muthukkumaranb, thanks a lot for your contribution! 🙏

We noticed that the Contributor License Agreement (CLA) check (license/cla) hasn't passed yet, so we've temporarily moved this PR to draft and paused the review assignment.

To get your PR reviewed, please sign the CLA via the link in the license/cla check below (or in the CLA bot comment). As soon as the check turns green, this PR will automatically be marked ready for review again and a reviewer will be re-assigned.

@HaystackBot
HaystackBot removed the request for review from julian-risch October 28, 2026 13:51
@HaystackBot HaystackBot added the cla-pending PR is in draft until the contributor signs the CLA label Oct 28, 2026
@HaystackBot
HaystackBot marked this pull request as draft October 28, 2026 13:51
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@HaystackBot
HaystackBot marked this pull request as ready for review October 28, 2026 17:12
@HaystackBot HaystackBot removed the cla-pending PR is in draft until the contributor signs the CLA label Oct 28, 2026
@HaystackBot

Copy link
Copy Markdown
Contributor

Thanks for signing the CLA, @muthukkumaranb! 🎉 This PR is now ready for review again and the reviewer has been re-assigned.

@julian-risch julian-risch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @muthukkumaranb !

@julian-risch
julian-risch merged commit 8f4af5c into deepset-ai:main Oct 28, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LaraDocumentTranslator ignores falsy run() overrides (reasoning=False, glossaries=[])

4 participants