Skip to content

feat(runtime)!: drive durable goals and retain historical spending - #309

Merged
lg2m merged 4 commits into
feat/eng-1045-durable-goalsfrom
feat/eng-1053-goal-driver
Oct 16, 2026
Merged

lg2m merged 4 commits into
feat/eng-1045-durable-goalsfrom
feat/eng-1053-goal-driver

Conversation

@lg2m

@lg2m lg2m commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Adds bounded idle goal scheduling and durable accounting across terminal outcomes and restarts. This is a G2 checkpoint stacked on #308; complete G2 and later goal acceptance remain open.

Related: ENG-1053. Specification: goals G2.

Behavior

  • Durable pending guards prevent duplicate queueing; captured goals retain accounting through replacement, helpers, descendants and recovery.
  • Automatic queueing and prompt reservation wait for unsettled sponsored obligations. Explicit cancellation, replay wakes, neutral-stop streaks and provider backoff retain their reviewed behavior.
  • Recovery preserves accepted queued user prompts across ordinary goal edits. Active retry scheduling honors durable model waits, bounded by the goal deadline.
  • Store schema 55 repairs unresolved legacy dispatch evidence conservatively and idempotently; older binaries refuse upgraded stores.

Removed PR319

Neither the removed Jev commit 60dd03db nor replay bf786880 is in this stack's ancestry. All four PR319-added files and added approval provenance fields are absent. Runtime source and manifests were restored from reviewed pre-Jev driver 82b2d7b7; subsequent commit 7154e6a9 contains only the four goal-runtime corrections described below, their regressions and matching documentation. Current main's installer and documentation consolidation remain. Independent exclusion review: Approve.

Latest review fixes (7154e6a9)

  • Replayed cancellations retain scheduler wakes and original durable receipts.
  • Automatic routing uses the captured objective; user prompts keep their own routing input.
  • Sponsored descendants intersect every historical paid ancestor deadline at claim, routing and main start, including child-owned goals. Accounting ownership grants no ancestor goal tools/notices.
  • Sponsored provider output respects inherited token caps and positive post-routing remainder.

Verification and limits

  • All four findings reproduced first in test commits f8b6713f/cead03e3, then passed after the fix. Focused goal_review:7/7pass (2.39s). Independent scheduling/routing and ancestry reviews: Approve.
  • Workspace formatting, lint (75/75 existing sleep identities), and all-target/all-feature Clippy pass. No sleeps or ceilings were added.
  • Full local nextest:2,475/2,639pass,164socket/callback permission failures,15skipped. Overall local gate remains RED. Committing while the check ran also invalidated its formal report stamp; raw output is retained, not represented as a green current-head report. No failed assertion was weakened.
  • Prior-head CI38837860179 passed affected tests and smoke. Fresh final-head CI38841113998 and Website38841114088 pass on 7154e6a9. Codex completed with no findings and reacted 👍 at2026-10-16T02:40:18Z (reaction572664777). All24review threads are resolved. Normal merge still requires the repository approval and deployment rules; no rule bypass or merge is claimed.
  • Complete G2, G3/G4/G5, quiet-host/performance qualification and remaining reliability acceptance are follow-ups. This checkpoint does not claim the entire goal/autonomy roadmap is finished.

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review this stack against its explicitly implemented checkpoint and remaining acceptance. Parent #308 has already received review; report findings introduced by this PR once. Source is workspace-qualified with independent session/store migration reviews; broader G2 and performance/T13 acceptance remain open. No paid evaluation has been run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-16T02:40:15.145443Z 7154e6a 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.

@lg2m
lg2m added this pull request to stack #310 October 14, 2026 20:43

@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: 92d40be376

ℹ️ 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 crates/qq-core/src/sessions/goals.rs Resolved

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

The four findings are being addressed with regression tests. The no-work BudgetExhausted loop is confirmed: it clears its streak and queues immediately without spending the run cap. I will retain the real BudgetExhausted outcome and apply the existing bounded unproductive-attempt policy, preserving committed-work reset and goal-wide exhaustion precedence. The routing fallback crash window, direct known-zero snapshot accounting and schema48 unfinished-turn proof also remain open. None of these threads is claimed resolved yet.

@lg2m
lg2m marked this pull request as ready for review October 14, 2026 21:38

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Published e9b5f2c fixes all four findings from the initial driver review. Each thread now links its fixing commit and regression coverage. Independent fix reviews approve; workspace2,473 top-level tests pass/0failures/15explicit skips, fmt/Clippy/build pass. The PR description records actual remaining full-G2/autonomous-core acceptance; this review request concerns the published checkpoint and concrete fixes.

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

ℹ️ 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 crates/qq-core/src/sessions/goals.rs Resolved

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

ℹ️ 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 crates/qq-core/src/sessions/goals.rs Resolved
Comment thread crates/qq-core/src/runtime/run_loop.rs Resolved
Comment thread crates/qq-core/src/sessions/commands.rs Resolved

@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: 6d0462cb8d

ℹ️ 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 crates/qq-core/src/sessions/goals.rs Resolved
Comment thread crates/qq-core/src/sessions/claim.rs Resolved
Comment thread crates/qq-core/src/sessions/goals.rs Resolved

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

ℹ️ 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 crates/qq-core/src/sessions/goals.rs Resolved

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

ℹ️ 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 docs/design/architecture.md Resolved
@lg2m

lg2m commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 5dbfe18. The automatic review summary reports Failed for this commit. All17 existing threads have published fixes; latest changes preserve pre-dispatch accounting, retain retry backoff across neutral stops, correct the schema53 documentation and integrate the parent closed managed-check policy. Current CI is pending and local broad gates are not claimed green; the PR body records exact evidence and remaining full-G2/autonomous-core scope.

@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: 5dbfe18b81

ℹ️ 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 crates/qq-core/src/sessions/store.rs Resolved
Comment thread crates/qq-core/src/sessions/commands.rs Resolved
Comment thread crates/qq-core/src/sessions/goals.rs Resolved
@lg2m
lg2m force-pushed the feat/eng-1053-goal-driver branch from 5dbfe18 to 82b2d7b Compare October 16, 2026 00:30
@lg2m
lg2m force-pushed the feat/eng-1053-goal-driver branch 2 times, most recently from 6474626 to b6b3d23 Compare October 16, 2026 01:36
@lg2m
lg2m force-pushed the feat/eng-1053-goal-driver branch from b6b3d23 to 19c255a Compare October 16, 2026 01:46
ENG-1053 / G2 checkpoint stacked on the current rebased foundation. Exclude accidentally merged PR319 while preserving reviewed recovery, scheduling, accounting and wait-policy fixes. Full G2/autonomous-core acceptance remains open.
@lg2m
lg2m force-pushed the feat/eng-1053-goal-driver branch from 19c255a to 0b15c8c Compare October 16, 2026 01:56

@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: 0b15c8c797

ℹ️ 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 crates/qq-core/src/sessions/commands.rs Resolved
Comment thread crates/qq-core/src/sessions/goals.rs Resolved
Comment thread crates/qq-core/src/sessions/claim.rs Resolved
@lg2m
lg2m merged commit ffa4694 into main Oct 16, 2026
8 checks passed
@lg2m
lg2m deleted the feat/eng-1053-goal-driver branch October 16, 2026 02:47
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