Skip to content

Conversation

@mdlinville
Copy link
Contributor

@mdlinville mdlinville commented Feb 3, 2026

Description

Fix duplicate modules in generated Weave refs

The problem

The duplication was caused by module-level aliases in the Weave source code, not a bug in the documentation generation script. In weave/trace/util.py, the library exports convenience aliases:
ThreadPoolExecutor = ContextAwareThreadPoolExecutorThread = ContextAwareThread
This means both the original class names and their shorter aliases were being documented separately, even though they're the same Python objects.
(Slack thread)

The fix:

Tracks each object's identity as it's processed
Skips any object that's already been documented (detecting aliases)
Works for any module with similar alias patterns

Validation

Regenerated the Weave refs using the updated script, in a separate commit.

Testing

  • Regenerate Weave refs using the updated script (added to this PR)
  • Local build succeeds without errors (mint dev)
  • Local link check succeeds without errors (mint broken-links)
  • PR tests succeed

This was caused by module-level aliases. The
fix is to track modules by ID and skip aliases.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (2 total)

📄 Pages (2)

File Preview
weave/reference/python-sdk.mdx Python Sdk
weave/reference/python-sdk/trace/util.mdx Util

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: c1faf3c at 2026-02-03 20:12:50 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-weave-doubled-ref-contents.mintlify.app

@mdlinville mdlinville force-pushed the weave_doubled_ref_contents branch from 7689ed7 to c1faf3c Compare February 3, 2026 20:11
@mdlinville mdlinville marked this pull request as ready for review February 3, 2026 20:12
@mdlinville mdlinville requested a review from a team as a code owner February 3, 2026 20:12
@mdlinville mdlinville requested a review from dbrian57 February 3, 2026 20:12
@mdlinville mdlinville merged commit 708d9a9 into main Feb 3, 2026
10 checks passed
@mdlinville mdlinville deleted the weave_doubled_ref_contents branch February 3, 2026 20:38
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.

2 participants