Skip to content

feat: support candidate and accepted drift stores - #234

Merged
Pigbibi merged 21 commits into
mainfrom
codex/reusable-drift-atomic-publish
Jul 11, 2026
Merged

feat: support candidate and accepted drift stores#234
Pigbibi merged 21 commits into
mainfrom
codex/reusable-drift-atomic-publish

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Adds an optional baseline store to drift detection while preserving the default single-store behavior.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Review unavailable: Codex review quota or capacity is unavailable. No direct paid API fallback was used; required CI checks remain the merge gate.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04b8d201ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/cli.py Outdated
Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py
Comment thread src/quant_platform_kit/strategy_lifecycle/cli.py Outdated
@Pigbibi
Pigbibi force-pushed the codex/reusable-drift-atomic-publish branch from 8ca278b to c29b037 Compare July 10, 2026 22:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2033fe757d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py Outdated
@Pigbibi
Pigbibi force-pushed the codex/reusable-drift-atomic-publish branch from 5ebf192 to d76f061 Compare July 10, 2026 23:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d76f0611c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42f26c06dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/cli.py Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24a9fd2cdf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py Outdated
Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py Outdated
@Pigbibi
Pigbibi force-pushed the codex/reusable-drift-atomic-publish branch 2 times, most recently from 2925ffb to 2b626fd Compare July 11, 2026 08:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b626fd1f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/drift_detector.py
Comment thread src/quant_platform_kit/strategy_lifecycle/cli.py Outdated
@Pigbibi
Pigbibi enabled auto-merge (squash) July 11, 2026 09:15
Pigbibi and others added 18 commits July 11, 2026 17:16
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Pigbibi and others added 2 commits July 11, 2026 17:16
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi force-pushed the codex/reusable-drift-atomic-publish branch from ba5badf to c5556bf Compare July 11, 2026 09:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5556bf46e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/quant_platform_kit/strategy_lifecycle/cli.py Outdated
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit fdae666 into main Jul 11, 2026
3 checks passed
@Pigbibi
Pigbibi deleted the codex/reusable-drift-atomic-publish branch July 11, 2026 09:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a306ab9466

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return PerformanceStore(
cloud_bucket=bucket,
cloud_prefix=prefix,
local_root=Path(local_root) if local_root else None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent baseline buckets from reading candidate local data

When --baseline-bucket is used without --baseline-local-root, this passes local_root=None, but PerformanceStore interprets None as DEFAULT_LOCAL_ROOT and load_latest_backtest() merges cloud keys with local keys. In cloud candidate runs the active store also writes candidate backtests to that default local root, so the accepted-baseline store can select a local candidate backtest instead of the accepted bucket baseline, defeating the candidate-vs-accepted comparison. Use an isolated or disabled local root for bucket-only baselines.

Useful? React with 👍 / 👎.

dimensions=dimensions,
previous_status=DriftStatus(str(data["previous_status"])) if data.get("previous_status") else None,
baseline_param_set_id=str(data["baseline_param_set_id"]) if data.get("baseline_param_set_id") else None,
baseline_available=bool(data.get("baseline_available", True)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve suppression when reloading drift results

When the new missing-baseline paths persist a placeholder result, DriftResult.to_dict() writes alert_suppressed=True, but this deserializer only restores the new baseline fields and leaves alert_suppressed at its default False. After PerformanceStore.load_latest_drift() round-trips one of these REVIEW placeholders it looks alertable again to any caller that consumes persisted drift results rather than the immediate run_drift_detection() return value, so baseline outages can leak back into alert/issue flows. Restore the persisted suppression flag when reconstructing the result.

Useful? React with 👍 / 👎.

Comment on lines 405 to +406
drifts = run_drift_detection(domain, store=store)
alerts = [d for d in drifts if d.status != DriftStatus.HEALTHY]
alerts = [d for d in drifts if d.status != DriftStatus.HEALTHY and not d.alert_suppressed]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Thread accepted baselines through auto-pilot

When operators run quant-lifecycle autopilot or run_auto_pilot_cycle in a candidate/accepted-store rollout, this phase still invokes drift detection with only the candidate store, and I checked that neither the auto-pilot CLI nor run_auto_pilot_cycle accepts a baseline store or lineage policy. That means auto-pilot can optimize and create actions against candidate backtests while standalone drift/lifecycle compare to accepted baselines; thread the accepted baseline options through the auto-pilot drift and issue phases as well.

Useful? React with 👍 / 👎.

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.

1 participant