-
Notifications
You must be signed in to change notification settings - Fork 271
feat(cli): add fine-grained validation logging to debug.log for fern docs dev #11364
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?
feat(cli): add fine-grained validation logging to debug.log for fern docs dev #11364
Conversation
Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
… name property) Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
…on metrics - Remove PostHog event logging from validateWorkspaces.ts - Add ValidationMetrics interface to validateDocsWorkspaceAndLogIssues.ts - Update validateDocsWorkspaceWithoutExiting to return detailed validation metrics - Enhance DebugLogger.logCliValidation to accept detailed metrics - Update runAppPreviewServer.ts to pass validation metrics to debug logger - Update devDocsWorkspace.ts validateProject callback to return metrics Validation metrics now include: errorCount, warningCount, totalViolationCount, and violationsBySeverity breakdown. These are logged to ~/.fern/logs/debug.log during fern docs dev. Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
| ); | ||
|
|
||
| // Print the aggregated report (using runTask to get a proper TaskContext) | ||
| // Print the aggregated report(using runTask to get a proper TaskContext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's with this diff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! That was an accidental removal of the space when I was editing nearby code. Fixed in 9ef812a.
Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
Description
Refs: Slack request from Catherine Deskur
Adds fine-grained validation event logging to the
~/.fern/logs/debug.logfile duringfern docs devto track validation metrics and help improve the validation experience.Link to Devin run: https://app.devin.ai/sessions/73d527a31cf549c08d91bf67b55f8d6d
Requested by: Catherine Deskur (catherine@buildwithfern.com)
Updates Since Last Revision
Based on feedback, the implementation was changed from PostHog event logging to file-based debug logging:
validateWorkspaces.tsDebugLoggerclassfern checktofern docs devcodepaths onlyChanges Made
ValidationMetricsinterface tovalidateDocsWorkspaceAndLogIssues.tsandrunAppPreviewServer.tsvalidateDocsWorkspaceWithoutExitingto return detailed validation metricsDebugLogger.logCliValidationto accept optional detailed metricsrunAppPreviewServer.tsto pass validation metrics to the debug loggerdevDocsWorkspace.tsvalidateProject callback to return metricserrorCount/warningCount/totalViolationCountsuccess- boolean indicating if validation passedviolationsBySeverity- count of violations grouped by severity (fatal/error/warning)elapsedMillis- validation durationTesting
Human Review Checklist
ValidationMetricsinterface duplication (in two files) is acceptable