-
Notifications
You must be signed in to change notification settings - Fork 3k
init ExecutionId in DefaultOptions func
#6598
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: dev
Are you sure you want to change the base?
Conversation
WalkthroughExecutionId generation was moved: Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Types as pkg/types.DefaultOptions
participant SDK as lib.NewNucleiEngineCtx
Dev->>Types: call DefaultOptions()
activate Types
Types-->>Dev: returns Options { ExecutionId = xid.New().String(), ... }
deactivate Types
Dev->>SDK: call NewNucleiEngineCtx(ctx, WithOptions(Options?))
activate SDK
SDK-->>SDK: does not set ExecutionId (uses provided Options)
SDK-->>Dev: returns NucleiEngine (ExecutionId present if provided by Options)
deactivate SDK
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
lib/sdk.go(0 hunks)pkg/types/types.go(2 hunks)
💤 Files with no reviewable changes (1)
- lib/sdk.go
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.go: Format Go code using go fmt
Run static analysis with go vet
Files:
pkg/types/types.go
🧬 Code graph analysis (1)
pkg/types/types.go (1)
pkg/reporting/reporting.go (1)
New(79-203)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Lint
🔇 Additional comments (1)
pkg/types/types.go (1)
21-21: LGTM: Import addition is appropriate.The xid import supports the ExecutionId auto-generation in
DefaultOptions()and represents the shift of responsibility from the SDK initialization to the types package default constructor.
Mzack9999
left a comment
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.
This looks like a good approach, but we need to ensure that the executionId is generated and persisted properly for the execution duration. For example NewThreadSafeNucleiEngineCtx requires a new ExecutionId as well, which is overwritten after DefaultOptions() is called, making the instruction apparently redundant at
Line 89 in e70044a
| defaultOptions.ExecutionId = xid.New().String() |
Proposed changes
closes #6594
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.