Skip to content

[codex] Rename raw signal API to anomalies#5171

Draft
createMonster wants to merge 1 commit into
masterfrom
codex-anomaly-raw-data-api
Draft

[codex] Rename raw signal API to anomalies#5171
createMonster wants to merge 1 commit into
masterfrom
codex-anomaly-raw-data-api

Conversation

@createMonster
Copy link
Copy Markdown

@createMonster createMonster commented May 20, 2026

Summary

  • Replace the top-level getRawSignals GraphQL field with getAnomalies.
  • Return anomaly rows with an anomaly field and expose the selector input as AnomalyTargetSelectorInputObject.
  • Remove the previous top-level signal query fields (getSignal, getAvailableSignals) and their GraphQL data/metadata tests.
  • Keep the implementation backed by the existing Sanbase.Signal storage layer.

Example

{
  getAnomalies(
    anomalies: ["anomaly_mvrv_usd"]
    from: "2019-01-01T00:00:00Z"
    to: "2019-01-02T00:00:00Z"
  ) {
    datetime
    anomaly
    slug
    value
    metadata
    isHidden
  }
}

Validation

  • git diff --check

Local verification blockers

  • mix test test/sanbase_web/graphql/signal/api_anomaly_raw_data_test.exs could not run because mix is not installed in this local shell.
  • Docker-based verification could not run because the local Docker daemon is not available.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aa70b646-f758-4b0b-abcd-3cb621e5194e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex-anomaly-raw-data-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@createMonster createMonster force-pushed the codex-anomaly-raw-data-api branch from df5992b to 576f80e Compare May 20, 2026 10:10
@createMonster createMonster changed the title [codex] Add anomaly raw data API [codex] Rename raw signal API to anomalies May 20, 2026
Copy link
Copy Markdown
Member

@IvanIvanoff IvanIvanoff left a comment

Choose a reason for hiding this comment

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

We cannot rename APIs.
We should introduce a new API with the new name.

This PR also inexplicably changes too much internals - not sure why.

I'll submit a new PR with the required changes.

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.

2 participants