Skip to content

fix: guard section params before validator setup#1544

Merged
liudger merged 1 commit into
liudger:mainfrom
gaoflow:fix-1521-section-params-uninitialized
Jun 27, 2026
Merged

fix: guard section params before validator setup#1544
liudger merged 1 commit into
liudger:mainfrom
gaoflow:fix-1521-section-params-uninitialized

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • raise BSBLANError(API_VALIDATOR_NOT_INITIALIZED) when SectionValidator.get_section_params() is called before setup
  • add regression coverage for the uninitialized lookup path

Fixes #1521.

Tests

  • uv run pytest --no-cov tests/test_api_validation.py -k 'get_section_params_no_validator or validate_api_section_no_validator'\n- uv run pytest --no-cov tests/test_api_validation.py\n- uv run prek run --all-files

@gaoflow

gaoflow commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

Correction: the missing required label is bugfix. I do not have permission to add labels from the fork; could a maintainer please add it?

@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Jun 27, 2026
@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (59b5311) to head (5cbbd88).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1544   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines         1233      1235    +2     
  Branches       141       142    +1     
=========================================
+ Hits          1233      1235    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liudger liudger left a comment

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.

LGTM thanks for the pull request

@liudger liudger merged commit 5c1d604 into liudger:main Jun 27, 2026
14 of 15 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SectionValidator.get_section_params() raises AttributeError instead of BSBLANError

2 participants