Skip to content

feat: add IME OaS phases - #1965

Open
dipratap wants to merge 3 commits into
mainfrom
oas
Open

dipratap wants to merge 3 commits into
mainfrom
oas

Conversation

@dipratap

@dipratap dipratap commented Oct 1, 2026

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!

@dipratap
dipratap requested a review from MysticatBot October 1, 2026 14:58

@MysticatBot MysticatBot 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.

Hey @dipratap,

⚠ Degraded review - no spec document was found for this change (searched the PR links, the touched repos' docs, the architecture/guidelines docs, and linked Jira). This review covers code-level quality but could not validate the change against an agreed design, so confidence is reduced. Add a spec link (PR template section 4) and re-request review for a full-confidence pass.

Verdict: Request changes - the new metadata keys break an existing unit test, so CI is red.
Complexity: LOW - small additive change to a shared data-model contract.
Changes: adds the optimize-at-source experiment type, its OAS phases, and four OAS metadata keys to the GeoExperiment model (1 file).
Note: CI checks are currently failing - resolve before merge.

Must fix before merge

  1. [Important] METADATA_KEYS test still deep-equals the old 6 keys, and the new type and phases are untested - packages/spacecat-shared-data-access/test/unit/models/geo-experiment/geo-experiment.model.test.js:78 (caused by packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.model.js:95) (details inline)
Non-blocking (2): minor issues and suggestions
  • nit: the @type JSDoc for METADATA_KEYS still lists only the original 6 keys - add DEPLOYED_URLS, PUBLISH_CHECK, POST_WINDOW, SNAPSHOTS_LOCATION - packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.model.js:75
  • suggestion: deployedUrls (URLs from an external UI that a worker will later fetch) and snapshotsLocation (an S3 key) are only checked by isObject(metadata). Consider a small exported validator, like the existing .. / :// guard on insights locations. - packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.model.js:97
Open design questions (1): not blocking
  • allActive() filters on status only, so OAS experiments will reach any consumer that does not yet route on type. Is the rollout planned as engine first, then the API writer? Or should allActive() accept a type filter? - packages/spacecat-shared-data-access/src/models/geo-experiment/geo-experiment.collection.js:50

Skill: pr-review | Model: us.anthropic.claude-opus-5-5[1m] | Duration: 0m 50s | Cost: $3.45 | Commit: 5dac752f909e6500ec5f500b6a0d903fbb048e77
If this code review was useful, please react with 👍. Otherwise, react with 👎.

OAE_VALIDATION_JOBS: 'oaeValidationJobs',
// Baseline (window 0) measurement bookkeeping, e.g. { taskId, startedAt, retryCount }.
BASELINE_MEASUREMENT: 'baselineMeasurement',
// optimize-at-source bookkeeping.

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.

issue (blocking): These four new METADATA_KEYS break exposes METADATA_KEYS constant (test/unit/models/geo-experiment/geo-experiment.model.test.js:78-87). That test deep-equals the old 6-key object, so the Test job fails with expected { ...(10) } to deeply equal { ...(6) }. No test covers the other new values either:

  • TYPES.OPTIMIZE_AT_SOURCE (line 25) is the only runtime behavior change here. geo-experiment.schema.js builds the type enum from Object.values(GeoExperiment.TYPES), so the model now accepts optimize_at_source on create.
  • The seven OAS_* phases (lines 52-58) have no assertions.

These strings become a persisted contract between services, and the file already pins the existing phase literals (lines 140-152) to protect them.

Fix:

  • add the four new key/value pairs to the expected object at lines 79-86
  • add a setType(GeoExperiment.TYPES.OPTIMIZE_AT_SOURCE) round-trip to gets and sets type
  • add an exposes the optimize-at-source phases test that asserts each OAS_* literal

@MysticatBot MysticatBot added ai-reviewed Reviewed by AI complexity:low AI-assessed PR complexity: LOW labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

This PR will trigger a minor release when merged.

This branch has not been deployed

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

Labels

ai-reviewed Reviewed by AI complexity:low AI-assessed PR complexity: LOW

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants