Skip to content

DS-3987 add new experimental tasks - #23620

Merged
akuzni2 merged 22 commits into
developfrom
feature/new-pipeline-tasks-statistical-calcs
Sep 3, 2026
Merged

akuzni2 merged 22 commits into
developfrom
feature/new-pipeline-tasks-statistical-calcs

Conversation

@akuzni2

@akuzni2 akuzni2 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Adding in new statistical tasks - tagged as experimental as:

  • Have not been used in any production instances
  • Additional use cases may encounter their need and require altered interfaces

@akuzni2 akuzni2 added the build-publish Build and Publish image to SDLC label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@trunk-io

trunk-io Bot commented Sep 1, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Numeric precision, input validation, negative-weight handling, and nondeterministic tests can currently produce incorrect results or flaky CI.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Risk Rating: HIGH

Adds experimental sampling, unit normalization, staleness decay, and weighted-mean pipeline tasks.

Changes:

  • Introduces Sample and normalization workflows.
  • Adds configurable staleness decay and weighted aggregation.
  • Registers task types and improves bridge database mappings.

Scrupulous human review: Numeric validation, precision preservation, decay boundaries, and weighted aggregation require close review.

File summaries
File Description
core/services/pipeline/task.sample.go Implements sample extraction and parsing.
core/services/pipeline/task.sample_test.go Tests sample creation.
core/services/pipeline/task.normalize.go Implements unit normalization.
core/services/pipeline/task.normalize_test.go Tests normalization behavior.
core/services/pipeline/task.staleness.go Implements staleness decay.
core/services/pipeline/task.staleness_test.go Tests decay methods and boundaries.
core/services/pipeline/task.weighted_mean.go Implements weighted and winsorized means.
core/services/pipeline/task.weighted_mean_test.go Tests weighted aggregation.
core/services/pipeline/task_params.go Adds sample support to slice parameters.
core/services/pipeline/common.go Registers the new task types.
core/bridges/bridge_type.go Adds explicit database column mappings.
Review details

Suppressed comments (2)

core/services/pipeline/task.sample.go:318

  • Any tsUnit other than s is silently interpreted as milliseconds, so a typo such as seconds produces a timestamp off by 1000 without an error. Validate the supported enum explicitly.
	if strings.EqualFold(string(tsUnit), "s") {
		tsMs *= 1000
	}

core/services/pipeline/task.weighted_mean.go:136

  • An explicit reference also accepts negative weights. With winsorRef=weighted_median, cumulative mass is then non-monotonic and the selected reference value is invalid. Apply the same non-negative-weight validation used for aggregation samples.
			for _, s := range refSamples {
				if !s.Weight.IsZero() {
					ref = append(ref, s)
				}
			}
  • Files reviewed: 12/12 changed files
  • Comments generated: 9
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/services/pipeline/task.sample.go Resolved
Comment thread core/services/pipeline/task.sample.go Resolved
@akuzni2 akuzni2 changed the title add new statistical tasks DS-3987 add new experimental tasks Sep 3, 2026
@akuzni2
akuzni2 marked this pull request as ready for review September 3, 2026 03:56
@akuzni2
akuzni2 requested review from a team as code owners September 3, 2026 03:56
@akuzni2
akuzni2 enabled auto-merge September 3, 2026 06:19
calvwang9
calvwang9 previously approved these changes Sep 3, 2026
nik-chainlink
nik-chainlink previously approved these changes Sep 3, 2026
@akuzni2
akuzni2 requested a review from jmank88 September 3, 2026 20:29
@cl-sonarqube-production

Copy link
Copy Markdown

@akuzni2
akuzni2 added this pull request to the merge queue Sep 3, 2026
Merged via the queue into develop with commit c7a3dc3 Sep 3, 2026
236 of 237 checks passed
@akuzni2
akuzni2 deleted the feature/new-pipeline-tasks-statistical-calcs branch September 3, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants