Skip to content

feat: experimentation engine#1446

Merged
dipratap merged 28 commits intomainfrom
expe
Apr 1, 2026
Merged

feat: experimentation engine#1446
dipratap merged 28 commits intomainfrom
expe

Conversation

@dipratap
Copy link
Copy Markdown
Contributor

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

@github-actions
Copy link
Copy Markdown

This PR will trigger a patch release when merged.

const DEFAULT_EXPERIMENT_PLATFORMS = ['chatgpt_free', 'perplexity'];
const PRE_PHASE_CRON_EXPRESSION = '0 * * * *';
const POST_PHASE_CRON_EXPRESSION = '0 0 * * *';
const PRE_PHASE_EXPIRY_MS = 10 * 60 * 60 * 1000; // 10 hours
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.

14 hours - to make sure we have 14 runs each for pre and post phase.

submitScrapeJob(params: ScrapeJobParams): Promise<DrsJobResult>;
lookupScrapeResults(params: ScrapeLookupParams): Promise<ScrapeLookupResponse | null>;
triggerBrandDetection(siteId: string, options?: BrandDetectionOptions): Promise<Record<string, unknown> | null>;
submitExperiment(params: SubmitExperimentParams): Promise<ExperimentSubmitResult>;
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.

submitExperiment and getExperimentStatus are not required now


/**
* Creates an experiment schedule in DRS and optionally triggers it immediately.
* Uses the schedules API instead of legacy experiments API.
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.

there is no legacy experiments API

throw new Error('scheduleId is required');
}

this.log.info('Getting DRS schedule status', { siteId, scheduleId });
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.

this also requires ?include_jobs=true query param

Copy link
Copy Markdown
Contributor

@nit23uec nit23uec left a comment

Choose a reason for hiding this comment

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

inline comments.

default: 0,
validate: (value) => isInteger(value) && value >= 0,
})
.addAttribute('baselineDate', {
Copy link
Copy Markdown
Contributor

@nit23uec nit23uec Mar 31, 2026

Choose a reason for hiding this comment

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

startTime is more standard term.
Pre period is before startTime and post period is after startTime

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

getSuggestionIds(): string[];
getName(): string;
getPromptsCount(): number;
getBaselineDate(): string | undefined;
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.

getStartTime()

setSuggestionIds(suggestionIds: string[]): GeoExperiment;
setName(name: string): GeoExperiment;
setPromptsCount(promptsCount: number): GeoExperiment;
setBaselineDate(baselineDate?: string): GeoExperiment;
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.

setStartTime

@adobe-kodiak
Copy link
Copy Markdown

adobe-kodiak bot commented Apr 1, 2026

Kodiak: Security Findings Summary

No new findings introduced in this PR

High priority issues identified within this repository

CVE-2026-25896 (1 finding(s))
Code Path Lines Dashboard (Needs VPN) Direct Dependency CVE Advisory Info
package-lock.json 1 Manage finding False CVE-2026-25896: GHSA, NVD

See all 1 findings for CVE-2026-25896 in Kodiak Dashboard


Quick links: Dashboard Branch Violation Page, Dashboard Home, How does Kodiak track findings and violations?

This kodiak comment is based on the following commits

Note: This comment will be updated as new commits are pushed to the branch. If finding status changes a new comment will be published. For questions and answers please review Kodiak FAQ or reach out to #kodiak-support on Slack.

Have any feedback for us? Kodiak is always looking to improve our user experience - Let us know how we're doing!

getStatus(): string;
getSuggestionIds(): string[];
getName(): string;
getPromptsCount(): number;
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.

getPromptsLocation() is missing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added

@dipratap dipratap merged commit 44bff63 into main Apr 1, 2026
5 checks passed
@dipratap dipratap deleted the expe branch April 1, 2026 12:21
solaris007 pushed a commit that referenced this pull request Apr 1, 2026
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v3.37.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

solaris007 pushed a commit that referenced this pull request Apr 1, 2026
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version @adobe/spacecat-shared-drs-client-v1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

solaris007 pushed a commit that referenced this pull request Apr 1, 2026
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version @adobe/spacecat-shared-tokowaka-client-v1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants