Skip to content

bridge: naming-clarity refactor for broker/webhook payloads#132

Merged
benvinegar merged 1 commit into
mainfrom
refactor/naming-clarity-context
Feb 22, 2026
Merged

bridge: naming-clarity refactor for broker/webhook payloads#132
benvinegar merged 1 commit into
mainfrom
refactor/naming-clarity-context

Conversation

@benvinegar
Copy link
Copy Markdown
Member

@benvinegar benvinegar commented Feb 22, 2026

Summary

Naming-clarity-only refactor to make request/response/payload variable names explicit by domain/context across Slack bridge and broker registration code.

Before -> After highlights

  • payload -> registerRequestBody, brokerResponseBody, slackEventEnvelopePayload
  • body -> brokerRequestBody, rawApiRequestBody, apiRequestBody, brokerPubkeyResponseBody, registerResponseBody
  • response -> brokerHttpResponse, brokerPubkeyResponse, registerResponse
  • params -> sendRequestBody / reactRequestBody / slackApiRequestBody
  • sendViaBroker input body -> actionRequestBody
  • signProtocolRequest input payload -> protocolRequestPayload

Scope

  • bin/broker-register.mjs
  • slack-bridge/broker-bridge.mjs
  • slack-bridge/bridge.mjs
  • slack-bridge/security.mjs

Validation

  • npm run typecheck
  • npm test
  • npm run lint:js

Behavior

No business logic, endpoint behavior, DB/schema behavior, or API contract changes. This PR is naming/refactor-only.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 22, 2026

Greptile Summary

This PR performs a systematic naming-clarity refactor across broker registration and Slack bridge code. Variable names are made explicit by domain/context to improve code readability and maintainability.

Key changes:

  • Renamed generic response/body/payload/params variables to domain-specific names
  • bin/broker-register.mjs: payloadregisterRequestBody, responsebrokerPubkeyResponse/registerResponse, bodybrokerPubkeyResponseBody/registerResponseBody
  • slack-bridge/broker-bridge.mjs: payloadbrokerResponseBody/slackEventEnvelopePayload/protocolRequestPayload, bodybrokerRequestBody/actionRequestBody, responsebrokerHttpResponse, introduced responseHeaders local variable
  • slack-bridge/bridge.mjs: bodyrawApiRequestBody, paramsapiRequestBody
  • slack-bridge/security.mjs: paramssendRequestBody/reactRequestBody

All changes are mechanical renames with no functional, logic, or API contract modifications. The refactor improves code clarity by making request/response variable names explicit about their origin and purpose.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Pure naming refactor with zero functional changes. All modifications are mechanical variable renames that improve code clarity. No logic, API contracts, or behavior modified. Tests pass per PR description.
  • No files require special attention

Important Files Changed

Filename Overview
bin/broker-register.mjs Renamed variables for clarity: responsebrokerPubkeyResponse/registerResponse, bodybrokerPubkeyResponseBody/registerResponseBody, payloadregisterRequestBody. All changes are mechanical renames with no logic changes.
slack-bridge/bridge.mjs Renamed variables for clarity: bodyrawApiRequestBody, paramsapiRequestBody. Consistent renaming across all API endpoints (/send, /reply, /react). No behavior changes.
slack-bridge/broker-bridge.mjs Comprehensive naming refactor: payloadbrokerResponseBody/slackEventEnvelopePayload/protocolRequestPayload, bodybrokerRequestBody/actionRequestBody/apiRequestBody, responsebrokerHttpResponse, paramsslackApiRequestBody. Added responseHeaders local variable. All changes are mechanical renames.
slack-bridge/security.mjs Renamed function parameters: paramssendRequestBody/reactRequestBody in validation functions. Consistent with the naming convention across the codebase.

Last reviewed commit: cf5f17f

@benvinegar benvinegar merged commit c5fb6bc into main Feb 22, 2026
10 checks passed
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