-
Notifications
You must be signed in to change notification settings - Fork 432
[feat] Add CI checks for OSS license compliance and telemetry tree-shaking #6777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…aking Implements automated verification to ensure the OSS distribution: 1. Only includes open-source licensed dependencies 2. Properly tree-shakes proprietary fonts (ABCROM) 3. Removes telemetry code (Mixpanel) from OSS builds New scripts: - scripts/verify-licenses.js - Validates production dependency licenses - scripts/verify-oss-build.js - Checks dist/ for violations New CI workflow: - .github/workflows/ci-oss-compliance.yaml - Runs compliance checks New npm scripts: - pnpm verify:licenses - Check dependency licenses - pnpm verify:oss - Verify OSS build compliance - pnpm verify:compliance - Run all checks - pnpm build:oss - Build OSS distribution Documentation: - docs/OSS_COMPLIANCE.md - Complete guide for compliance checks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/03/2025, 10:45:51 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/03/2025, 10:55:35 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.2 MB (baseline 3.2 MB) • ⚪ 0 BMain entry bundles and manifests
Graph Workspace — 971 kB (baseline 971 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
UI Components — 169 kB (baseline 169 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 BBundles that do not match a named category
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
- Make telemetry detection patterns more specific - Target actual Mixpanel API calls instead of generic patterns - Avoid flagging benign code like `.track()` from other libraries - Focus on MixpanelTelemetryProvider and actual tracking methods This reduces false positives while maintaining security. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Post informative comment when OSS compliance checks fail - Include links to workflow logs and documentation - Guide developers on how to fix issues - Only comment on pull requests, not pushes Helps PR authors quickly understand and fix compliance issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
📝 PR Review Summary✅ Changes Reviewed
🔍 Current CI StatusFailing Check: OSS Build Verification Root Causes:
🛠️ Recent ImprovementsI've made two commits to improve this PR:
🎯 Remaining IssuesThe fundamental issue is that tree-shaking isn't fully working for cloud-specific code: Problem in src/router.ts:19: import { cloudOnboardingRoutes } from './platform/cloud/onboarding/onboardingCloudRoutes'This import happens unconditionally, causing Vite to include the cloud routes module and its dependencies (including fonts) even when Why it happens:
💡 Recommended SolutionsOption 1: Dynamic Import (Best) const routes = [
...(isCloud ? (await import('./platform/cloud/onboarding/onboardingCloudRoutes')).cloudOnboardingRoutes : []),
// ... other routes
]Option 2: Vite Plugin Option 3: Separate Entry Points Option 4: Accept Current Behavior
📊 Impact Assessment
The code is secure (cloud paths never execute), but not ideal for distribution hygiene. 🎬 Next Steps@snomiao - Please review the architectural options above and decide on the preferred approach. I recommend Option 1 (Dynamic Import) as it's the cleanest solution. Would you like me to implement one of these solutions? 🤖 Generated with Claude Code |
Summary
Implements automated verification to ensure the OSS distribution complies with licensing requirements and properly removes proprietary/telemetry code.
This PR addresses the requirements from the Notion task:
Changes
New Verification Scripts
scripts/verify-licenses.jsscripts/verify-oss-build.jsdist/directory for violationsCI Workflow
.github/workflows/ci-oss-compliance.yamllicense-check: Verifies dependency licensesoss-build-check: Builds OSS distribution and verifies complianceNPM Scripts
Documentation
docs/OSS_COMPLIANCE.mdHow It Works
Tree-Shaking Mechanism
The build uses compile-time constants for dead code elimination:
When building with
DISTRIBUTION=localhost:isCloudevaluates tofalseVerification Patterns
The OSS build verifier checks for:
Proprietary Fonts:
.woff,.woff2,.ttf,.otffiles containing "ABCROM"Telemetry Code:
mixpanel/MixpanelTelemetryProvidertrackWorkflow,trackEvent,.track(mp.comfy.orgTest Plan
Testing Locally
Notes
🤖 Generated with Claude Code
Fixes #10204
┆Issue is synchronized with this Notion page by Unito