fix memogen context skip and scope auto-push to upstream - #7419
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe memoization code generator template corrects its context parameter filtering logic to properly exclude ChangesMemoization Context Parameter Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
context.Contextfrom the hash key via a stale AST-string sentinel (&{context Context}). After an upstreammemoizebump, param types are now rendered ascontext.Context, so the skip stopped matching andfmt.Sprint(ctx)ended up in every hash, effectively killing memoization on the JS libs (redis, mysql, mssql, postgres, etc.). Updates the sentinel.Memoize Functionsworkflow runs on any push to a branch nameddev, including contributor forks where Actions are enabled by default. That had it auto-commit regenerated memo files into external PRs whose head branch happens to bedev. Adds agithub.repository == 'projectdiscovery/nuclei'guard.Test plan
make memogenafter the template fix produces zero diff against the committedpkg/js/libs/**/memo.*.gofiles ondevgo build ./...cleango vet ./...cleango test ./cmd/memogen/... ./pkg/js/libs/...passesSummary by CodeRabbit