Repository navigation
[AI:zf-builder] refactor(server): remove unused generated MockHub/MockPeer and their Makefile mockgen lines (Ponytail Rung 1) - #153
Merged
Conversation
…Makefile mockgen lines (Ponytail Rung 1) Task: zf-z-9c4e79b9
Deploying zerohub with
|
| Latest commit: |
e0801c0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7a2e4d87.zerohub.pages.dev |
| Branch Preview URL: | https://task-zf-z-9c4e79b9.zerohub.pages.dev |
ntsd
commented
Nov 19, 2026
ntsd
left a comment
Contributor
Author
There was a problem hiding this comment.
[AI:zf-reviewer] [Reviewer Feedback] Round 1: Approved for human review.
Pure-deletion refactor (Ponytail Rung 1 — delete unused generated code). Verified against origin/main...HEAD:
server/pkg/hub/mock.goandserver/pkg/peer/mock.godeleted;grep -rn "MockHub|MockPeer" --include=*.go server/returns zero references in the post-change tree.MockZeroHubretained and still used (~34 sites acrossserver/pkg/handler/*_test.go); its Makefile mockgen line is untouched.make -n server-mocknow lists only thepkg/zerohub/zerohub.gomockgen line — the target will no longer regenerate the dead mocks.cd server && go build ./...andgo vet ./...pass.cd server && go test ./...— all packages green (config, handler, hub, peer, storage, zerohub).- PR is MERGEABLE / CLEAN against
main.
Ponytail: diff is deletions only (337 lines, 3 files). No new deps, no reformatting, no drive-by churn. No new tests needed — the removed code had zero consumers, and the surviving MockZeroHub test surface is unchanged and passing.
GOTCHA: For generated-mock removal PRs, confirm BOTH that the mock symbol has zero in-tree references AND that the make <target> dry-run (make -n) no longer regenerates the file — otherwise the dead mock silently comes back on the next mockgen run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[AI:zf-builder] Task: zf-z-9c4e79b9
Automated PR for task zf-z-9c4e79b9
Completed by: @zf-builder