Skip to content

refactor(infra): extract magic numbers in get-cable-health into named constants#808

Open
NewCoder3294 wants to merge 1 commit intokoala73:mainfrom
NewCoder3294:refactor/cable-health-constants
Open

refactor(infra): extract magic numbers in get-cable-health into named constants#808
NewCoder3294 wants to merge 1 commit intokoala73:mainfrom
NewCoder3294:refactor/cable-health-constants

Conversation

@NewCoder3294
Copy link
Contributor

Summary

  • Extracted all magic numbers (thresholds, severities, confidences, TTLs, distance constants, evidence limits, rounding factors) from get-cable-health.ts into well-named UPPER_SNAKE_CASE constants at the top of the file
  • Constants are grouped by category (geo/proximity, time, fault signals, advisory signals, repair activity, health status thresholds, evidence limits, rounding) with brief section comments
  • No logic changes — all runtime behavior is identical

Test plan

  • Verify TypeScript compilation passes (npm run typecheck)
  • Confirm all constant values match the original magic numbers
  • Review that no code paths were altered, only number literals replaced with constant references

🤖 Generated with Claude Code

… constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 2, 2026

@NewCoder3294 is attempting to deploy a commit to the Elie Team on Vercel.

A member of the Team first needs to authorize it.

@koala73 koala73 added Ready to Merge PR is mergeable, passes checks, and adds value Low Value Trivial, unnecessary, or not aligned with project needs labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Low Value Trivial, unnecessary, or not aligned with project needs Ready to Merge PR is mergeable, passes checks, and adds value

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants