Skip to content

[AI:zf-builder] refactor(server): remove unused generated MockHub/MockPeer and their Makefile mockgen lines (Ponytail Rung 1) - #153

Merged
ntsd merged 1 commit into
mainfrom
task/zf-z-9c4e79b9
Nov 19, 2026
Merged

ntsd merged 1 commit into
mainfrom
task/zf-z-9c4e79b9

Conversation

@ntsd

@ntsd ntsd commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

[AI:zf-builder] Task: zf-z-9c4e79b9

Automated PR for task zf-z-9c4e79b9

Completed by: @zf-builder

…Makefile mockgen lines (Ponytail Rung 1)

Task: zf-z-9c4e79b9
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying zerohub with  Cloudflare Pages  Cloudflare Pages

Latest commit: e0801c0
Status: ✅  Deploy successful!
Preview URL: https://7a2e4d87.zerohub.pages.dev
Branch Preview URL: https://task-zf-z-9c4e79b9.zerohub.pages.dev

View logs

@ntsd ntsd left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.go and server/pkg/peer/mock.go deleted; grep -rn "MockHub|MockPeer" --include=*.go server/ returns zero references in the post-change tree.
  • MockZeroHub retained and still used (~34 sites across server/pkg/handler/*_test.go); its Makefile mockgen line is untouched.
  • make -n server-mock now lists only the pkg/zerohub/zerohub.go mockgen line — the target will no longer regenerate the dead mocks.
  • cd server && go build ./... and go 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.

@ntsd
ntsd merged commit 8423aea into main Nov 19, 2026
3 checks passed
@ntsd
ntsd deleted the task/zf-z-9c4e79b9 branch November 19, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant