Skip to content

feat(cli)!: expose durable goals in TUI and headless commands - #331

Merged
lg2m merged 87 commits into
feat/eng-1063-goal-completionfrom
feat/eng-1064-goal-surfaces
Oct 17, 2026
Merged

lg2m merged 87 commits into
feat/eng-1063-goal-completionfrom
feat/eng-1064-goal-surfaces

Conversation

@lg2m

@lg2m lg2m commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

QQ users can create, inspect and control durable goals through TUI forms, the authenticated server CLI and foreground qq run --goal, with ordered direct-run and final JSONL records. G4 targets #330. Linear: ENG-1064. Spec: docs/plans/goals.md.

Behavior

  • TUI forms capture goal identity/revision and explicit once/repeated check consent. Stale refreshes release pending forms safely.
  • qq goal uses the existing server; semantic argument errors exit2. Replacement requires an existing goal. Forbidden or policy-refused explicit check consent is setup error2, grants no authority and leaves a new goal approval-paused. New invocations validate before session creation; existing-session preflight precedes persisted model/profile/approval changes.
  • Foreground adoption permits owned compaction and rejects preempting prompts. Observed same-goal revisions update action and cleanup authority before fallible event output, so output failure on an active edit still pauses/drains the edited goal.
  • Every stopped goal drains its exact paid family before final output. Recoverable errors preserve stopped reasons, wait for accepted children, replay missing direct-run metadata and report final durable counters.
  • Final text/JSONL stdout is flushed before optional trace writes; failed traces detach. Uncertain stdout writes are never retried. Trace/close errors preserve an already-flushed final result and selected exit.
  • Owner close fences new autonomous admission while accepted runs and children settle naturally. Fresh Ctrl-C may cancel them; ordinary goal-less scheduling takes no new drain lock. A durable pause that wins the interrupt race retains its reason, revision and natural exit6; only this invocation’s committed active-to-user pause selects130.

Verification

cargo xtask check

Head e84e3552ad56 vs origin/main; 0 changed file(s); scope: full workspace.

Gate Result Tests Time Command
fmt pass 1.6s cargo fmt --all -- --check
lint pass 2.1s cargo xtask lint
clippy pass 6.5s cargo clippy --color never --workspace --all-targets --all-features -- -D warnings
test pass 2775/2775 passed, 15 skipped 46.7s cargo nextest run --color never --profile default --workspace
doctest pass 1.7s cargo test --color never --workspace --doc
minimal-clippy pass 0.1s cargo clippy --color never -p qq-provider --no-default-features --features test-support --all-targets -- -D warnings
minimal-test pass 211/211 passed, 0 skipped 1.4s cargo nextest run --color never --profile default -p qq-provider --no-default-features --features test-support

All gates passed in 60.1s.

Final source e84e355: 2775/2775 workspace tests,15 deliberate skips, minimal-provider211/211, focused foreground/close27/27, real-binary smoke8/8 and ordinary-request byte parity8/8 against main3e34eea2. Independent source review approves. The new edit-event writer regression reproduces exit4 with a still-active revision2 on the old code, then verifies the repaired owner pauses and fully drains that goal.

The smoke harness ran from the stacked documentation worktree with identical Rust source, against the binary built from this G4 head, preserving the live G5 trial's pinned executable. Private receipts/logs remain under /tmp/qq-goal-delivery-20261015/. The guide/site exported from this head passes15pages/550links/0diagnostics; hosted checks remain separate.

Compatibility and qualification

Protocol34→35; schema58 and descriptor15 unchanged relative to #330. Upgrade protocol clients/servers together. Current main auth/fixture changes remain; removed PR319 provenance is absent. No final-head H0/tail performance qualification or native macOS execution claimed.

G5 is qualified on final runtime e84e3552 in #332: the ninth subscription-only trial settles after 8,744.546 durable goal-event seconds, with four compactions, all 14 checklist identities retained and exact terminal usage reconciled. All 25 checked-in audit checks pass. Earlier trials remain historical; they do not supply final-runtime acceptance. Separate ENG-1058/resource/performance/H0 work remains unqualified. No paid API fallback. Do not merge this stack.

New red/green rows reproduce the same-revision authentication pause losing to Ctrl-C (130 rather than6) and forbidden/managed consent returning4. Authentication/configuration/achievement race rows now preserve the exact durable status and revision; both consent refusal sources return2 with pending authority and zero model/check execution. No new wire/schema/API surface.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T11:47:44.973141Z e84e355 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 marked this pull request as draft October 16, 2026 06:28

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

ℹ️ 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/main.rs Resolved
Comment thread src/headless.rs Resolved
Comment thread src/headless.rs Resolved
Comment thread src/cli.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: 07aab1d15b

ℹ️ 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/headless.rs Resolved
Comment thread src/headless.rs Resolved
Comment thread crates/qq-tui/src/app.rs Resolved
Comment thread src/headless.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: f0fff5aa68

ℹ️ 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/main.rs Resolved
lg2m added a commit that referenced this pull request Oct 16, 2026
@lg2m
lg2m force-pushed the feat/eng-1064-goal-surfaces branch from f0fff5a to 27bdd77 Compare October 16, 2026 08:40
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 4. Built-in run help distinguishes goal outcomes.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 7. Stale snapshots release the retained form without rebinding its goal identity.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 8. Rejected check arguments cannot pause active work.
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 1. Exercise final ownership close after the foreground goal returns.
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 1. Goal exit waits for natural settlement instead of globally cancelling recovered work.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 2. Determine ownership from run origin, not the captured paid goal snapshot.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 3. Durable terminal outcomes win over a late Ctrl-C.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 5. Retain the accepted identity and sink across failure cleanup; use fresh durable state when readable, otherwise the last observed snapshot.
lg2m added a commit that referenced this pull request Oct 16, 2026
lg2m added a commit that referenced this pull request Oct 16, 2026
G4/#331 finding 6. Match direct work by goal ID; derive goal_run identity from the durable run snapshot. Focused adoption regression is green.

lg2m commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head27bdd77f2c6b2e5a13e186e4d285645a4f7ba931, based on #330 e86fb41. All nine prior findings have published fixes, regressions and per-thread evidence. Final full workspace2759/2759+15intentional skips, minimal-provider211/211, doctests/Clippy, smoke8/8 and website550links pass. Final-head goal-less request parity is8/8 against main3e34eea2. Hosted Linux/Windows/wasm and website checks pass. The separate G5 evidence PR remains explicitly unqualified.

@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: 27bdd77f2c

ℹ️ 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/headless.rs Resolved
Comment thread src/headless.rs Resolved
Comment thread src/main.rs Resolved
Comment thread src/headless.rs Resolved
@lg2m
lg2m force-pushed the feat/eng-1064-goal-surfaces branch from c22de4d to 4851fc2 Compare October 16, 2026 11:00

lg2m commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review published head 4851fc2. The three latest findings have tested published fixes and per-thread evidence; all three threads are resolved. Final-head full workspace gates, real-binary smoke and8/8 ordinary-request byte parity pass, with independent source review approved. PR body carries current evidence. No merge 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: 4851fc2e75

ℹ️ 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/headless.rs Resolved

lg2m commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review published f04d9e7. The sole latest finding is repaired with a red/green event-write failure regression, independent approval, full2774/2774+minimal211, smoke8/8 and goal-less request byte parity8/8. Its thread is resolved with evidence. #330 remains clean at725dabe8; no new changes there. No merge 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: f04d9e71be

ℹ️ 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/headless.rs Resolved
Comment thread src/headless.rs Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant