Skip to content

fix(native): preserve startup after Dreamer failure and bound scheduled input - #261

Merged
joshyorko merged 19 commits into
masterfrom
fix/issue-260-dreamer-startup
Oct 14, 2026
Merged

joshyorko merged 19 commits into
masterfrom
fix/issue-260-dreamer-startup

Conversation

@joshyorko

@joshyorko joshyorko commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Fixes #260.

Repair

This preserves the existing PR implementation and addresses the four reported Codex findings:

  • Managed container readiness compares the reported database with the resolved in-container SQLite path, and container MCP uses the same resolved database identity.
  • Status verifies the exact configured profile/workspace pair.
  • Scheduled command retries share one absolute monotonic deadline.
  • Provider budgets are checked against complete evidence text; oversized records are not silently truncated and dispatched.

Follow-up fixes keep container mounts aligned with configured paths, preserve late rows at scheduler frontiers, retain completed rowid frontiers when the simulated clock does not advance, and track active-memory update versions so restore/promotion of an existing row remains eligible after its insertion rowid has been scanned. Comparison-only memories remain bounded context and cannot emit stale or supersession candidates without current evidence. Recovered deterministic command fallbacks save a status-visible ok_with_limits receipt while retaining the provider budget rejection in audit history. Scheduled commands remain preview-only; provider authentication and configured resource limits remain enforced.

Verification at e5bcd6b6a1e92ed3c8c9361ecb41fdd66f983a82

  • Full local v0.1 release gate passed: child-reaper checks, formatting, diff check, complete Cargo suite (600 passed across 48 result groups), release binary build, doctor/evaluation/performance checks, dry runs, and required-file checks. Operator-only dogfood checks were skipped per the script's default; they are required before tagging.
  • Focused tests passed: consolidation acceptance 12/12, consolidation journey 6/6, Dreamer 52/52, command scheduler 7/7, scheduler review boundaries 11/11.
  • Isolated native instance lifecycle tests introduced by test: validate an isolated native Codex MemoryD instance #266 passed 4/4 under the child reaper.
  • Hosted PR gate run 65 passed, including the release gate, locked release binary build, and native CLI lifecycle smoke.
  • Disposable integration checkout with PR feat(mcp): attach read-only stdio to an existing daemon #263 head 9ed1ecd777072029babac4c046f2f64db886bcb6 merged cleanly: MCP daemon 10/10 and CLI smoke 126/126, including the resolved database symlink path.

All verification used synthetic or disposable data.

History and review

This continues PR #261 on its existing branch and includes current master, including #266 merge 2422cd376956b6ead2bfc8b40bd853d953c618e0. The latest connector review on 01b24b2282327ae7a6cd495c13474c496180cb5f raised three actionable findings; all three are addressed in e5bcd6b6a1e92ed3c8c9361ecb41fdd66f983a82 and their threads are resolved. The automatic connector review for this exact head is pending; wait for it before merging.

@joshyorko joshyorko changed the title test: reproduce Dreamer startup and bounded-input failures (#260) fix(native): preserve startup after Dreamer failure and bound scheduled input Oct 2, 2026
@joshyorko
joshyorko marked this pull request as ready for review October 2, 2026 21:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-14T22:20:25.951160Z 7717d40 Manual request
ℹ️ 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.

@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: 565c407747

ℹ️ 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/native_runtime.rs
Comment thread src/native_runtime.rs
Comment thread src/service.rs Outdated
Comment thread src/service.rs
@joshyorko

Copy link
Copy Markdown
Owner Author

Checkpoint published at eefc7eae10463db6574fb417e3f5002f0c17f530; work stopped at the maintainer's request for handoff to another agent.

This checkpoint adds only the managed-container readiness regression tests in src/native_runtime.rs. Production code is unchanged from 565c407. The scoped Codex implementation worker is stopped; no merge or auto-merge was performed.

Verified against the unchanged production implementation with pinned Rust/Cargo 1.88:

  • native_runtime::container_readiness_regressions::up_accepts_healthy_container_status_at_container_database_path: RED, actual managed up() rejects the healthy /data/memory.db status because it compares the host path.
  • native_runtime::container_readiness_regressions::up_rejects_container_status_for_wrong_database_path: PASS.

The four findings from completed automatic review 5396999862 remain unresolved: container host/guest DB path, exact profile/workspace pair, absolute scheduler deadline across sizing retries, and whole-evidence sizing without ASCII-tail truncation. No fixes for those findings are included in this checkpoint. Earlier full-suite/CI green evidence applies to 565c407, not this new regression checkpoint. Full acceptance was not rerun after the stop instruction. This PR is not merge-ready, despite retaining its previously authorized ready-for-review state.

Private prompts, reports, databases, credentials, logs, caches and builder artifacts were excluded from publication.

@joshyorko
joshyorko marked this pull request as ready for review October 14, 2026 12:38

@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: 3bfe494589

ℹ️ 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/native_runtime.rs Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review the current head 8c94d1a6f2871719af17f07aa04214c6c3b063be, including the fixes to the preceding review findings. Josh explicitly authorized this single additional review because no automatic review appeared after the repair push. No merge or deployment is requested.

@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: 8c94d1a6f2

ℹ️ 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/native_runtime.rs
Comment thread src/service.rs
Comment thread scripts/v0.1-release-gate.sh Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review current head e2d9f66, including the fixes for the previous three findings. Josh authorized this additional latest-head review. No merge, release, or deployment is requested.

@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: e2d9f66a4e

ℹ️ 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/native_runtime.rs Outdated
Comment thread src/dream.rs Outdated
Comment thread scripts/run-with-child-reaper.py Outdated
Comment thread src/dream.rs
Comment thread src/native_runtime.rs Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest head 8314950, including the fixes for all five findings from the preceding review. Josh authorized the remaining latest-head review cycles needed to qualify this PR. No merge, release, or deployment is requested.

@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: 83149509d3

ℹ️ 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/dream.rs Outdated
Comment thread src/native_runtime.rs

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest head 4d9424f, including the late-frontier evidence and resolved container MCP database fixes. Latest-head hosted CI is green. This request is within Josh's authorization for the remaining review cycles needed to qualify this PR; no merge, release, or deployment is requested.

@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: 4d9424f247

ℹ️ 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/dream.rs Outdated
Comment thread src/service.rs

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest head 01b24b2, including the simulated-scan frontier and recovered-budget final-status receipt fixes. Latest-head hosted CI is green. This is within Josh's authorized remaining latest-head review cycles. No merge, release, or deployment is requested.

@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: 01b24b2282

ℹ️ 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/dream.rs Outdated
Comment thread src/dream.rs
Comment thread src/dream.rs Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest head e5bcd6b, including restored/promoted record versions, current-window candidate generation, and equal-clock completed frontiers. Exact-head hosted PR gate 38622245498 passed. This is within Josh's authorized remaining latest-head review cycles. No merge, release, or deployment is requested.

@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: e5bcd6b6a1

ℹ️ 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/dream.rs Outdated
Comment thread src/dream.rs Outdated

Copy link
Copy Markdown
Owner Author

@codex review

Please review latest head 720f0f1, including the transactional mutation-frontier and bounded-band arrival fixes. Exact-head hosted PR gate 38632441482 passed. This is within Josh's authorized remaining latest-head review cycles. No merge, release, or deployment is requested.

@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: 720f0f1be8

ℹ️ 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/dream.rs
Comment thread src/dream.rs

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact latest head a97105e. Hosted PR gate 38636928009 passed. This pass audits scheduler cursor transitions and existing-record mutation paths, including unbounded-to-bounded arrivals, consolidation reuse/undo, provenance updates, supersession, restore and promotion. Please assess the resulting invariants and any actionable remaining regressions. This request is within Josh's authorized remaining latest-head review cycles. No merge, release or deployment requested.

@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: a97105e614

ℹ️ 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/dream.rs
Comment thread src/dream.rs

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact latest head 49ea61e. It addresses review5524825877 with persistent non-reusable scheduler insertion frontiers and full record hydration inside the frontier-filtered query. Regression coverage includes hard-delete/reinsert, persisted cursor migration, and deterministic concurrent updates. Local full release gate passed (610 tests); hosted PR gate38642395324 is running. Please identify actionable correctness regressions. This is the authorized latest-head review before merge; no deployment or release requested.

@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: 49ea61e1b0

ℹ️ 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/store.rs Outdated
Comment thread src/store.rs

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head 7717d40. The two findings in review 5525183621 are addressed by an immediate transaction covering logical-rowid migration and saved-cursor high-water initialization, with a completion marker to avoid rescanning history on subsequent opens. Concurrent-write/reopen regressions, schema upgrade tests, native isolation, and the full local release gate passed. Hosted gate 38645873076 is running. This is the authorized latest-head review before merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 7717d40759

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

@joshyorko
joshyorko merged commit 79a279d into master Oct 14, 2026
1 check passed
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.

bug(native): Dreamer budget failure makes up reject an intact store and restart-loop

1 participant