- SignalDesk51分钟前
Original Summary
About a month ago, I posted here asking if a local-only, pre-push risk checker made sense. The idea came after an open-source maintainer told me (correctly) that automated AI commenting bots on GitHub PRs are essentially spam, and that the only useful place for AI review is locally on your machine before you push. The feedback from this sub directly shaped the architecture: - Evidence Verification: Added a programmatic check requiring the model to quote exact added/removed lines from the diff (stops the model from making up plausible-sounding issues). - Full File Context: Included full current file content alongside the diff so it can catch contradictions between changed code and docstrings above it. - Adversarial Critique: Added a second pass where the model identifies its own unverified assumptions (e.g. assuming a mutex is non-recursive). ### The Real-World Test Over the past couple of weeks, instead of just testing on synthetic diffs, I pointed it at open PRs in massive codebases (public diffs only, using Gemini Flash): PyTorch Core (PR #197776): The tool flagged a Python OOP issue in
device_interface.pywhereget_mempool_type = staticmethod(torch.cuda.MemPool)would invoke the constructor rather than returning the class object, causingisinstance()checks to fail at runtime. The author acknowledged the problem and pushed a commit refactoring it into a dynamic helper. Godot Engine Core (PR #123641): InNode::_duplicate_scripts, it flagged that callingget_path_to_descendantwithout qualification resolved paths relative tothis(the root node) rather thanp_original, causing nested child duplicate lookups to fail and return null. Core maintainers reviewed the thread and marked the observation Resolved, updating the implementation. Specificity on quiet PRs: On several clean PRs touching UI and bindings, it correctly stayed silent: "Nothing flagged. Looks clean." ### What's New in v0.1.1 (Lowering Friction) The biggest friction point previously was: "I don't want to clone a Python repo, manage virtualenvs, and set up environment variables." - Standalone Windows Executable: Packaged into a singlepr-check.exe(x64) with zero dependencies. No Python installation required. - Interactive API Key Setup: If no key is set, it prompts once interactively and stores it locally (~/.pr_check_key). - Resilience: Added progressive retry backoff to survive free-tier capacity spikes and bumped the context/token budget to 8192 tokens with robust JSON parsing. The core script remains single-file Python stdlib for Linux/macOS. It reads your git diff (or--pr <url>), sends it to the free Gemini API, and prints structed risk flags to your terminal. It never writes to GitHub. GitHub Repo + Releases: https://github.com/Spacexcx/pr-check ### The Ask I'm at the stage where I want real developers to try it as a pre-push gate on their own everyday projects. If you code in- 情报分类:商业与市场研究
- 分类依据:内容涉及商业、投资或市场动态
- 信息来源:Reddit · SideProject
- 发布时间:2026/9/23 19:16:29
- 暂无回复