Skip to content

fix: preserve Daybreak settings across scans and remediation - #1740

Merged
mldangelo-oai merged 9 commits into
mainfrom
mdangelo/codex/daybreak-config-compatibility
Oct 20, 2026
Merged

mldangelo-oai merged 9 commits into
mainfrom
mdangelo/codex/daybreak-config-compatibility

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Codex 0.163 defaults Daybreak to off, but scan configuration filtering, credential-home switches, and worker snapshots could discard the native settings. App-server commands also need an explicit per-turn access program, and standalone Deep Scan workers need the parent turn's effective selection. Preserve that behavior across CLI, SDK, and plugin execution.

Changes

  • Carry daybreak and its feature settings through preflight, saved recipes, concurrent scans, comparison helpers, Deep Scan workers, remediation with stored credentials, and scan --patch.
  • Resolve app-server turn programs from the selected model's advertised programs, preserving default-off behavior, explicit program choices, and the effective native cli_daybreak and api_key_cyber_access_programs features, including managed overrides. Read both flags across paginated native responses rather than inferring the API-key gate from raw configuration. Save the toggle so native Codex resumes retain it.
  • For plugin Deep Scan, use trusted thread/turn IDs to read the exact persisted parent turn through native Codex. Snapshot its effective Standard, Blue, or Red selection for discovery and reducer workers, including resumes. Retry transient lookup failures and retain configuration behavior when no persisted context is available. Enable the inherited program’s required API-key gate when no per-scan value is set; preserve explicit per-scan settings.
  • Accept daybreak=true|false through the existing --codex option on validation and remediation commands, and document CLI, SDK, project, and plugin configuration.
  • Forward ambient Daybreak settings for stored logins per launch, using native configuration layers to preserve higher-priority settings and avoid affecting concurrent scans.
  • Share preflight options across fresh and resumed workers and forward shared app-server options directly.
  • Extend configuration, native protocol, concurrent worker, retry, and MCP lifecycle regression coverage.

Testing

  • 104 affected CLI tests passed with 759 assertions, covering Daybreak selection, scan-to-patch settings, skill commands, and patch outcomes. The focused selection cases include contradictory raw/effective feature settings and a later-page API-key gate.
  • The complete parent-turn/permission-preflight module and the complete worker-executor, coordinator, and stdio-lifecycle modules passed locally, including inherited settings and resumed workers.
  • SDK build and typecheck, MCP typecheck, bundled plugin build, formatting, and Git diff checks passed.
  • Portable checks passed using pinned Ruff 0.17.0, SDK build:ci, the generated source-compatibility checker, and its nine tests. The earlier local dependency and bundled-native prerequisites are now resolved.
  • Hosted CI is still running for the updated head. Codex code/security reviews and Copilot review completed without new findings; no full current-head hosted CI pass is claimed.

Risk and rollout

Daybreak remains opt-in and requires compatible access. No new CLI flag or dependency upgrade is introduced. Explicit per-turn programs retain precedence, and CLI/SDK scans preserve their isolated settings.

Standalone plugin Deep Scan inherits the active program from a persistent Codex session, so a desktop or interactive selection reaches its workers without a separate configuration change. Hosts without a persisted parent turn, including ephemeral sessions, retain runner configuration behavior.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T23:14:05.146484Z 228da53 Manual request
🔒 Security Review ✅ Completed 2026-10-19T23:13:59.378350Z 228da53 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Oct 19, 2026

@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: 631dcb92d3

ℹ️ 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 sdk/typescript/src/cli-daybreak.ts

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for preserving Daybreak consistently across scans and remediation. No blocking findings in this owner-level merge-safety and simplification review of 631dcb92d3a00f6ac016b9809acdaa220b1bf4cc. Explicit per-turn selections retain precedence, and standalone Deep Scan workers inherit the exact persisted parent turn.

Validated 59 focused SDK/CLI cases on the pinned Bun version, the parent-turn/preflight suite, builds, types, formatting, portable source checks, and package contents. A real Codex 0.163.0 localhost-only smoke test confirmed active Blue/Standard/Red/absent parent selections, resume persistence, and ephemeral fallback. Broader local SDK/MCP suites could not complete because of this environment’s fixture ownership/Git constraints; the matching-head CI run is green. The resolved catalog-failure comment matches native Codex behavior.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the follow-up fixes. Owner-level merge-safety re-review of b113857f3d5f7b315081528c33d3f42a2aa9ebce: no material findings. I reviewed all 15 changed files and retained prior coverage only for unchanged bytes. Stored-login settings remain per launch, native project and explicit overrides retain precedence, and inherited worker programs preserve explicit per-scan feature choices.

Validation: 59 focused SDK/CLI tests, the parent preflight module, 60 worker-setting launches, builds, types, formatting and portable checks passed. A real Codex 0.163.0 localhost probe confirmed effective features, program selection, resume persistence and ephemeral fallback; five native configuration-origin cases validated override selection.

Limits: 21 stored-login integration fixtures stop at an existing trusted-ancestor check, and the broader executor suite stops later at that fixture constraint; those suites are not counted as passing. The current CI run is incomplete and has a finalizer source-size failure also present in its main merge parent. No live account entitlements or Desktop UI were exercised.

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the merge follow-up. Owner-level merge-safety re-review of 229d24f9435bd9566ea7a9564057f9c6b0b9ece1 against 5df9b7793a5bb3fea4443719b90c8e71dc5a2ab3: no actionable findings. All previously reviewed Daybreak files are unchanged; the additional fixture simplification preserves both path assertions and restores the source-size check.

The full finalizer suite passed (179 tests, 148 subtests; two platform skips), along with 52 focused SDK/CLI tests, parent-turn preflight, builds and portable checks. A fresh real Codex 0.163.0 localhost smoke passed effective feature/program selection, native request propagation, resume persistence and ephemeral fallback. The inherited SDK contract fixtures remain blocked locally by the existing trusted-owner environment restriction. Current CI has passed source-contract and package checks but is still running; no full CI pass or live account/Desktop test is claimed.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review integration head 4135f2eb83de99b697cf97c8b7df059f1b069493, including native configuration pass-through and exact parent-turn inheritance for fresh/resumed discovery and reducer workers. Current local validation: 14 Daybreak-selection tests, the complete parent-turn/permission-preflight module, changed-source formatting, direct source compatibility, and diff checks pass. Full worker/SDK suites and pinned portable checks need hosted CI because local locked dependencies/Ruff are unavailable. The PR description records these limits.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 4135f2eb83

ℹ️ 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".

Copilot AI 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.

🔵 Needs a closer look

Cross-process authentication, configuration precedence, and worker-resume changes need human review backed by complete current-head regression results.

No open issues 🎉

What changed in this PR

Preserves Daybreak settings across CLI and SDK scans, remediation, and plugin Deep Scan workers while retaining configuration precedence and per-scan isolation.

Changes:

  • Forward Daybreak settings through saved recipes, stored-login launches, and resumed workers.
  • Resolve app-server access programs and inherit the exact parent turn’s selection.
  • Expand regression coverage and document configuration options.
File Description
sdk/​typescript/​tests-ts/​scan-resume.test.ts Check resumed scan settings.
sdk/​typescript/​tests-ts/​scan-comparison.test.ts Check comparison feature precedence.
sdk/​typescript/​tests-ts/​fixtures/​stored-daybreak-workers.mjs Capture native worker settings.
sdk/​typescript/​tests-ts/​fixtures/​skill-provider-auth.mjs Mock native feature discovery.
sdk/​typescript/​tests-ts/​fixtures/​skill-native-config.mjs Report effective Daybreak configuration.
sdk/​typescript/​tests-ts/​fixtures/​skill-auth.mjs Support configuration and feature queries.
sdk/​typescript/​tests-ts/​fixtures/​inherited-codex-pipes.mjs Handle configuration reads.
sdk/​typescript/​tests-ts/​cli-skills.test.ts Cover overrides and app-server propagation.
sdk/​typescript/​tests-ts/​cli-skill-native-config.test.ts Cover stored-login precedence and isolation.
sdk/​typescript/​tests-ts/​cli-scan-patch-settings.test.ts Verify patch settings across process boundaries.
sdk/​typescript/​tests-ts/​cli-patch.test.ts Check Daybreak override forwarding.
sdk/​typescript/​tests-ts/​cli-patch-results.test.ts Update protocol fixtures.
sdk/​typescript/​tests-ts/​cli-daybreak.test.ts Test access-program resolution.
sdk/​typescript/​tests-ts/​cli-authentication.test.ts Update expected authentication request sequence.
sdk/​typescript/​tests-ts/​api-cyber-access.test.ts Verify configuration and recipe preservation.
sdk/​typescript/​tests-ts/​api-attribution-concurrency.test.ts Check concurrent scan isolation.
sdk/​typescript/​src/​scan-comparison.ts Preserve the Daybreak feature gate.
sdk/​typescript/​src/​cli.ts Forward settings through remediation launches.
sdk/​typescript/​src/​cli-daybreak.ts Resolve advertised access programs.
sdk/​typescript/​src/​api.ts Retain Daybreak in preflight configuration.
sdk/​typescript/​scripts/​package-dist-files.mjs Package the new resolver module.
sdk/​typescript/​README.md Document SDK configuration.
sdk/​typescript/​docs/​cli.md Explain opt-in behavior and precedence.
README.md Link Daybreak usage guidance.
plugins/​codex-security/​mcp-app/​tests/​test_deep_scan_stdio_lifecycle.ts Verify parent-program inheritance.
plugins/​codex-security/​mcp-app/​tests/​test_deep_scan_permission_profile_preflight.ts Test exact-turn lookup and failures.
plugins/​codex-security/​mcp-app/​tests/​test_deep_scan_executor.ts Integrate expanded worker settings tests.
plugins/​codex-security/​mcp-app/​tests/​support/​fake-codex-source.ts Simulate parent reads and transient failures.
plugins/​codex-security/​mcp-app/​tests/​deep_scan_worker_settings_cases.ts Cover worker inheritance, retries, and resumes.
plugins/​codex-security/​mcp-app/​src/​deep-scan/​permission-profile-preflight.ts Read native origins and persisted parent programs.
plugins/​codex-security/​mcp-app/​src/​deep-scan/​executor.ts Snapshot and forward inherited programs.
plugins/​codex-security/​mcp-app/​src/​deep-scan/​engine.ts Pass parent context to workers.
plugins/​codex-security/​mcp-app/​server.ts Extract parent thread and turn identifiers.
docs/​project-configuration.md Document project-level Daybreak settings.

Review effort: Balanced

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for preserving Daybreak across scans and remediation. Owner-level merge-safety and simplification re-review of 4135f2eb83de99b697cf97c8b7df059f1b069493 against 26e53dc18451c7a791f889fdd0ece85556282b9f: no actionable findings. The integration retains native configuration precedence, per-scan isolation, and exact parent-turn selection for fresh and resumed discovery/reducer workers.

Validated 63 focused SDK/CLI cases, parent-turn preflight, builds, types, formatting and portable checks. Real Codex 0.163.0 localhost probes passed program selection, native configuration precedence, resume persistence and ephemeral fallback. Broader local fixtures hit existing filesystem-environment restrictions; current-head CI passes all Linux SDK shards and the full MCP suite, including stored-login and worker lifecycle coverage. macOS/Windows SDK jobs remain in progress; no full CI or live entitlement check is claimed.

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed all 34 changed files at 4135f2eb83de99b697cf97c8b7df059f1b069493 against 26e53dc18451c7a791f889fdd0ece85556282b9f. One P2 compatibility issue is noted inline; no P0/P1 findings.

Validation: required portable checks, builds, types, formatting, package contents, parent-turn preflight, and synthetic settings checks passed. The broader local SDK run had 344 passes, 3 skips, and 151 failures, mostly from fixture ownership and Git discovery errors. Local worker lifecycle and installed-package smoke also failed. I checked this head's successful Linux SDK and full MCP CI logs, including stored-login and worker lifecycle coverage. The latest CI snapshot has 48 successful jobs and 2 skipped.

Approval candidate for interactive review with the P2 finding and these testing limits disclosed. Approval remains pending.

Comment thread sdk/typescript/src/cli-daybreak.ts Outdated

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review 228da53, including the effective native API-key feature gate and pagination regression coverage. This addresses the latest managed-requirements finding.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 228da532e6

ℹ️ 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".

Copilot AI 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.

🔵 Needs a closer look

Cross-process authentication and resumed-worker changes need human validation, with full worker and MCP lifecycle checks still pending.

No open issues 🎉

Review effort: Balanced

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing the managed API-key feature selection. Owner-level merge-safety and simplification re-review of 228da532e65b9d96081f77840a051b7834203cb7: the effective-gate finding is addressed, with no remaining actionable findings. Both native flags are read across pages; raw configuration no longer controls automatic Standard selection.

Fresh validation passed 68 focused SDK/CLI cases, parent-turn preflight, builds, types, formatting and all portable checks. Actual Codex 0.163.0 localhost probes confirmed contradictory raw/effective API-gate settings and native pagination, plus parent-program inheritance and resume behavior. Prior green CI supports verified unchanged paths only; current-head CI remains in progress. Full local suites remain limited by existing fixture filesystem constraints; live managed policies and entitlements were not exercised.

@mldangelo-oai
mldangelo-oai merged commit 04df406 into main Oct 20, 2026
88 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/daybreak-config-compatibility branch October 20, 2026 01:12
@github-actions github-actions Bot mentioned this pull request Oct 20, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants