init ExecutionId in DefaultOptions func#6598
Conversation
WalkthroughDefaultOptions now generates and embeds an ExecutionId; SDK constructors ( 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 | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
🚧 Files skipped from review as they are similar to previous 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)
Comment |
There was a problem hiding this comment.
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.
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
Proposed changes
closes #6594
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.