Skip to content

docs: document four undocumented parameters in pipeline internals - #12295

Merged
anakin87 merged 2 commits into
deepset-ai:mainfrom
iridescentWen:fix/docstring-missing-params
Aug 11, 2026
Merged

docs: document four undocumented parameters in pipeline internals#12295
anakin87 merged 2 commits into
deepset-ai:mainfrom
iridescentWen:fix/docstring-missing-params

Conversation

@iridescentWen

Copy link
Copy Markdown
Contributor

Follow-up to #12204 (merged), same defect class, different four sites.

What changed

Four functions each document every parameter except one. Added the missing :param: entry in
each case — docstrings only, no behavior change.

Location Missing Why it reads as an oversight, not a style choice
haystack/components/preprocessors/document_cleaner.py:262 text The other three params (n_chars, n_first_pages_to_ignore, n_last_pages_to_ignore) are all documented, and the prose above already explains that pages in text must be form-feed separated — so the constraint was known, it just never became a param entry.
haystack/core/pipeline/base.py:1220 is_resume component_name, component, inputs all documented. is_resume is load-bearing: at base.py:1241 it takes a different branch that returns the first available socket value instead of consuming inputs.
haystack/core/pipeline/draw.py:247 super_component_mapping graph, server_url, params, timeout documented, plus both :raises: entries — only the last parameter is missing.
haystack/core/pipeline/pipeline.py:126 break_point First five params documented plus :raises: and :return:. break_point is keyword-only, which is likely why it was missed when added.

How these were found

An ast pass comparing each function's signature against the names its docstring documents,
reporting only where the docstring is mostly complete (≥70% of params documented, ≤2 missing).
That threshold is the point: a function documenting nothing is a style choice, one or two
stragglers in an otherwise-complete list is an oversight.

Same method as #12204, which sjrl merged. Recall-checked before use: rolled the repo back to
5add74ec (the parent of #12204) and confirmed the scanner re-finds
LinkContentFetcher.__init__ missing ['request_headers'], one of the defects that PR fixed.

Scanning current main (5b791afa) reports exactly these four and nothing else; after this
change it reports zero.

Accuracy note

I verified each parameter's behavior in the function body rather than paraphrasing its name. One
draft was wrong and got corrected: I first wrote that break_point "saves a snapshot and raises",
but pipeline.py:150-154 only raises BreakpointException.from_triggered_breakpoint(...) before
the component runs — no snapshot is written there. The committed text says what the code does.

I also avoided putting a literal "\f" in the document_cleaner docstring: that docstring is not
raw, so the escape would embed an actual form-feed control character. The added line refers to the
form feed described in the prose above instead.

Validation

$ hatch run fmt
All checks passed!
549 files left unchanged

$ hatch run test:types
Success: no issues found in 408 source files

$ hatch run test:unit -k "document_cleaner or pipeline or draw"
540 passed, 5843 deselected, 3 warnings in 19.96s

No release note: the commit is prefixed docs:, which release_notes.yml exempts via its
git log --pretty=%s origin/main..HEAD | grep -E '^(ci:|docs:|test:)' check.

All four are private methods, so no public API surface changes.


🤖 Written with Claude Code. Every site was opened and read
individually; the commands above were run locally with the output shown.

Each of these functions documents every other parameter and silently omits
one, so the omission reads as an oversight rather than a style choice:

- DocumentCleaner._find_and_remove_header_footer: text
- PipelineBase._consume_component_inputs: is_resume
- _to_mermaid_image: super_component_mapping
- Pipeline._run_component: break_point

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@iridescentWen
iridescentWen requested a review from a team as a code owner August 11, 2026 07:18
@iridescentWen
iridescentWen requested review from anakin87 and removed request for a team August 11, 2026 07:18
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@iridescentWen is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added topic:core type:documentation Improvements on the docs labels Aug 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/core/pipeline
  base.py
Project Total  

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

@anakin87 anakin87 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!

@anakin87
anakin87 enabled auto-merge (squash) August 11, 2026 07:59
@anakin87
anakin87 merged commit 0a09321 into deepset-ai:main Aug 11, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:core type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants