Rebase adaptive topN changes onto latest master and retrigger Actions#35
Rebase adaptive topN changes onto latest master and retrigger Actions#35
Conversation
Co-authored-by: yanyiwu <2162645+yanyiwu@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d6faa2d61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| bool make(const string& text, uint64_t& v64) const | ||
| { | ||
| return make(text, getTopN(text), v64); |
There was a problem hiding this comment.
Avoid a two-argument overload that collides with
size_t
On the repo's supported Linux/macOS targets, size_t and uint64_t are the same underlying type, so this new Simhasher::make(const string&, uint64_t&) overload also accepts a size_t lvalue. That turns calls like size_t topN = Simhasher::getTopN(text); shash.make(text, topN); from a compile-time error into a silent runtime bug that overwrites topN with the hash value. Because this is a public header, that source-compatibility change is easy for downstream callers to trip over when refactoring toward the new adaptive API.
Useful? React with 👍 / 👎.
This updates the adaptive
topNwork from PR #32 onto the currentmasterso it can be evaluated against the latest repository state. The branch carries the same feature changes on top of the updated base and retriggers the existing GitHub Actions workflow.Rebase onto current base
topNchanges after the latestmasterupdatestopNselection based on document length #32 feature set:README.mdinclude/simhash/Simhasher.hpptest/unittest/TSimhash.cppFeature payload preserved
Simhasher::getTopN(text)to recommend keyword counts from document lengthmake(text, v64)overload to use the adaptive recommendation automaticallyActions retrigger
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.