Skip to content

test: rebind live tool imports in smoke contract after module clear - #317

Merged
EricNGOntos merged 1 commit into
mainfrom
fix/wuchengke/contract-tool-import-rebind
Aug 23, 2026
Merged

test: rebind live tool imports in smoke contract after module clear#317
EricNGOntos merged 1 commit into
mainfrom
fix/wuchengke/contract-tool-import-rebind

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Add autouse rebind for grep_text / PageTextBands / strip_* / REGISTRY in the tool-registry smoke contract, matching the anchoring contract pattern.
  • Prevents PageTextBands class-identity mismatch (hit_count 2 vs 1) when other contract fixtures clear app.* mid-suite.
  • Replaces the one-off inline reimport in test_strip_footer_updates_search_view_for_grep with file-level live rebinding.

Test plan

  • uv run pytest apps/worker/tests/contract/test_tool_registry_smoke_contract.py -q
  • Run bootstrap contracts (module clear) then test_strip_footer_updates_search_view_for_grep
  • Confirm PR CI (Lint / Typecheck / Test / Secret Scan) is green

Made with Cursor

Avoid PageTextBands/grep_text class-identity mismatch when other contract
fixtures clear app.* mid-suite, matching the anchoring contract pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EricNGOntos
EricNGOntos merged commit ee9c00c into main Aug 23, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the fix/wuchengke/contract-tool-import-rebind branch August 23, 2026 10:17
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.

1 participant