Skip to content

test(skillscan): pin tuple-unpacking instance-client false negative - #4708

Open
icn5381 wants to merge 1 commit into
bytedance:mainfrom
icn5381:test/skillscan-tuple-unpacking-followup-4644
Open

test(skillscan): pin tuple-unpacking instance-client false negative#4708
icn5381 wants to merge 1 commit into
bytedance:mainfrom
icn5381:test/skillscan-tuple-unpacking-followup-4644

Conversation

@icn5381

@icn5381 icn5381 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

References #4644

Why

PR #4644 documented the instance-client false negatives the narrowed SkillScan model deliberately gives up (issue #4296). Its reviewer noted tuple-unpacking assignment (s, other = requests.Session(), 1) is another false negative in the same class but was left out to keep that PR's scope. This pins it alongside the rest so any future model-widening or -narrowing has to touch this test rather than change behavior silently.

What changed

Add one parametrized case to test_python_declared_false_negatives_stay_unreported covering tuple-unpacking binding of a requests.Session handle. Pure test addition; zero runtime change.

Surface area

  • Docs / tests / CI only

Validation

  • cd backend && PYTHONPATH=. uv run pytest tests/test_skillscan_native.py -q → 141 passed
  • cd backend && make lint && make format → clean

AI assistance

  • Tool(s) used: Claude Code
  • How you used it: AI 辅助定位参数化测试位置、起草该 case;由人类逐行审阅与定稿。
  • 人类验证: 读并理解了改动;跑了 skillscan 全量测试(141 passed)与 ruff lint/format;核对改动仅在该 review follow-up 范围内、无运行时变化;对本次提交负全部责任。
  • I've read and understand every line of this change and take responsibility for it.

Add tuple-unpacking assignment (`s, other = requests.Session(), 1`) to the
declared false-negative parametrization. The multi-target binding is outside
the simple-name evidence chain the one-level scanner follows, so the scanner
stays silent while the runtime still calls the client.

Suggested in the bytedance#4644 review; also a case bytedance#4296 enumerates.

References bytedance#4644
@github-actions github-actions Bot added risk:medium Medium risk: regular code changes size/XS PR changes < 20 lines labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:medium Medium risk: regular code changes size/XS PR changes < 20 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant