Skip to content

feat(rules): populate Signal bars on 8 remaining cost detectors#44

Open
abhinav-1504 wants to merge 5 commits into
optiqor:mainfrom
abhinav-1504:feat/signal-bars-remaining-detectors
Open

feat(rules): populate Signal bars on 8 remaining cost detectors#44
abhinav-1504 wants to merge 5 commits into
optiqor:mainfrom
abhinav-1504:feat/signal-bars-remaining-detectors

Conversation

@abhinav-1504
Copy link
Copy Markdown

What

Populates the Signal field on 8 cost detectors that previously
returned an empty Signal{}, enabling the inline ratio bars in the
ASCII report.

Why

Fixes #13

How

  • oversized_limits.go — CPU/memory request vs limit ratio with
    "limit > 4 vCPU / limit > 16 GiB" note
  • excessive_replicas.go — threshold (20) vs actual replica count
  • tiny_request.go — actual request vs 10m/32Mi sentinel values
  • incomplete_request.goHaveDisplay: "unset",
    WantDisplay: "required" for the missing-dimension case; numeric
    bar is skipped when Have/Want are both 0, showing only the label text

Testing

  • go test ./pkg/rules/... -v — all PASS
  • go build ./... — clean
  • optiqor demo shows ratio bars for:
    • megabox → CPU limit > 4 vCPU bar, memory limit > 16 GiB bar,
      replica count bar
    • incomplete → CPU sentinel bar, memory unset label
    • memhog → CPU unset label, memory sentinel bar

Checklist

  • PR title follows Conventional Commits
  • All commits are DCO-signed
  • No unrelated changes pulled in
  • No LLM calls or telemetry introduced
  • No proprietary backend imports

Signed-off-by: Abhinav Singh Chauhan <abhinavsinghc48@gmail.com>
@abhinav-1504 abhinav-1504 requested a review from btwshivam as a code owner May 29, 2026 09:01
@github-actions
Copy link
Copy Markdown

First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint on Ubuntu and macOS. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:. git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(analyze): new rule or fix(cli): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

@github-actions github-actions Bot added area/rules Cost / security rules engine size/M 51–200 lines labels May 29, 2026
Signed-off-by: Abhinav Singh Chauhan <abhinavsinghc48@gmail.com>
@github-actions github-actions Bot added the testing Test coverage and golden fixtures label May 29, 2026
Signed-off-by: Abhinav Singh Chauhan <abhinavsinghc48@gmail.com>
@github-actions github-actions Bot added the area/cli Cobra CLI commands and UX label May 29, 2026
@abhinav-1504
Copy link
Copy Markdown
Author

Hello @btwshivam,
Populated the Signal field on 8 cost detectors that previously returned an empty Signal{}, enabling the inline ratio bars in the ASCII report.

Waiting for your review!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli Cobra CLI commands and UX area/rules Cost / security rules engine size/M 51–200 lines testing Test coverage and golden fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Populate Signal bars on 8 remaining cost detectors

1 participant