Skip to content

Add Pro-orchestrated Goals with persistent execution - #92

Draft
gptmasterxd wants to merge 8 commits into
rebel0789:mainfrom
gptmasterxd:agent/pro-orchestrated-goals
Draft

Add Pro-orchestrated Goals with persistent execution#92
gptmasterxd wants to merge 8 commits into
rebel0789:mainfrom
gptmasterxd:agent/pro-orchestrated-goals

Conversation

@gptmasterxd

@gptmasterxd gptmasterxd commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • add durable, fingerprint-bound Goal proposals, approvals, Blackboard records, and Goal-owned CodingTasks
  • add supervised Isolated execution, reviewed Live projection/revert, and source-safe final application
  • add a detached Persistent scheduler with dependency-aware workers, pause/resume/cancel, crash recovery, and final-only private integration
  • add 1–4 approval-time semantic turns and 0–2 bounded fresh infrastructure retries with fixed 1s/5s backoff
  • add v17 ChatGPT Goal cards plus bounded, privacy-safe public Goal projections

Why

CodexPro previously supported direct coding and standalone CodingTasks but did not provide the accepted end-to-end product flow where ChatGPT Pro can plan, approve, supervise, recover, review, and safely apply multi-worker Goals. This PR delivers that complete local orchestration architecture while keeping Pro as semantic authority and the local engine as execution/storage authority.

User and developer impact

  • users can run supervised or persistent multi-worker Goals from the existing MCP/ChatGPT entry point
  • Persistent work continues through connector disconnects, but stops at semantic review and never mutates source
  • continuation turns, retries, and same-operation recovery are separate immutable authorities
  • Live source effects remain separately confirmed and preserve unrelated dirty, staged, and untracked work
  • public Goal responses omit raw errors, secrets, and private absolute paths while retaining status and SHA-256 evidence
  • Windows keeps Direct and standalone CodingTask support; Goal orchestration remains intentionally hidden until a crash-safe Goal lock contract exists

Notable fixes discovered during implementation

  • fenced terminal publication, cancel, pause/resume, scheduler ownership, and runner handoff races
  • prevented duplicate semantic turn IDs and ambiguous response-loss retries
  • made changed-file counts derive from the authoritative base-to-integration diff
  • versioned widget resource updates through v17 to avoid stale ChatGPT template caches
  • removed raw persisted errors and source/private-worktree roots from public Goal projections

Verification

  • npm run smoke
  • npm audit --audit-level=high — 0 vulnerabilities
  • npm pack --dry-run — 154 files, 2.8 MB
  • git diff --check
  • deterministic built HTTP/MCP Goal, Persistent, multi-turn, retry, privacy, lifecycle, and source-authority regressions
  • installed real Codex Persistent, multi-turn, and retry flows
  • representative ordinary ChatGPT Pro Isolated, Live, Persistent, multi-turn, and bounded-retry flows with authoritative source/state readback

Remaining platform limit

Goal orchestration is intentionally unsupported and hidden on Windows in this release; native Windows Goal execution was not tested.

Copy link
Copy Markdown
Author

Verification verdict for head fb74775c745cf1293dfc98e07e24b17e2d77fc2c: PASS on the submitted implementation. npm run smoke completed end-to-end; npm audit --audit-level=high reported 0 vulnerabilities; npm pack --dry-run produced 150 files / 2.8 MB; git diff --check, secret/private-path scan, authoritative source/state readback, and fixture-process cleanup passed. Representative installed-real-Codex and ordinary ChatGPT Pro flows are recorded in the PR docs. Remaining platform limit: Goal orchestration is intentionally unsupported/hidden on Windows. GitHub currently reports the draft PR as conflicting with the latest base; I am resolving that separately and will post the updated-head verdict.

…d-goals

# Conflicts:
#	CHANGELOG.md
#	README.md
#	README_ZH.md
#	SECURITY.md
#	config.example.env
#	package-lock.json
#	package.json
#	scripts/smoke.mjs
#	src/bashOps.ts
#	src/server.ts
@gptmasterxd

Copy link
Copy Markdown
Author

Updated-head verification for af29cbca921d041aeec629f77c433f31f0459adc: PASS. The branch now includes upstream main at 587f7fd3a4644a847bba13aeb49336056052e1f6; merge conflicts were resolved by preserving both the Goal orchestration surface and upstream 0.30.0 attachment-import/Windows environment changes. GitHub reports the PR MERGEABLE.

Evidence on the merged head:

  • npm run smoke passed end-to-end, including import_file, CodingTask, supervised Goal, Persistent DAG, multi-turn, retry, widget, HTTP, and release-guard suites
  • npm audit --audit-level=high: 0 vulnerabilities
  • npm pack --dry-run --json: 154 files, 2.8 MB
  • git diff --check: clean
  • no test-owned Goal scheduler/CodingTask runner processes remained

The only observed CodexPro process after the suite was the user's pre-existing server for a different workspace; it was not touched. Remaining product limit is unchanged: Goal orchestration is intentionally unsupported/hidden on Windows.

@gptmasterxd

Copy link
Copy Markdown
Author

Follow-up on the runner check: an unintended extra suite invocation during PR-comment formatting hit the early live-lock metadata assertion once. The canonical full suite had already passed. I reran node scripts/coding-task-runner-smoke.mjs three times sequentially on the same merged head; all three passed and cleanup left no test-owned runner process. No code change was required.

@gptmasterxd

Copy link
Copy Markdown
Author

Re-review remediation PASS at e040927.

Resolved:

  • Goal source-mutation failures no longer expose raw local error text or absolute source/data/worktree/CODEX_HOME paths. Public MCP results retain a generic actionable recovery state plus error presence/SHA-256 only. The intended HTTP regression now forces a real private projection-artifact permission failure and asserts the full SDK result omits the artifact, data-root, and source-root paths.
  • The runner liveness smoke now waits for one consistent authoritative task/run observation instead of sampling the task-active write and passive lock metadata in separate race-prone steps.
  • English and Chinese README merge duplication/misplaced HTTPS, safety, App setup, and feature sections were consolidated without removing the Goal/CodingTask operating contract.
  • The PR-wide trailing whitespace failure in PRODUCT_DIRECTION.md is fixed.

Verification:

  • npm run release:check — PASS (release guard, build, full smoke, stress, audit, release pack)
  • npm run smoke — PASS across App Server, CodingTask, Goal core/execution/HTTP, Persistent DAG, multi-turn, retry, widget, and release guard
  • runner smoke — 10 consecutive PASS runs
  • npm audit --audit-level=high — 0 vulnerabilities
  • package dry run / release pack — PASS, 154 files, about 2.8 MB
  • git diff --check origin/main — PASS
  • post-suite scheduler/runner fixture process scan — empty

Limits: the new privacy regression uses the built HTTP/MCP intended entry point with a deterministic worker App Server. Ordinary Chat was not rerun for this response-only privacy/doc/test remediation. Native Windows Goal orchestration remains intentionally unsupported/hidden.

@gptmasterxd

Copy link
Copy Markdown
Author

Verification PASS

Commit: 1bf78531adf44e5be981f22924043bc0143a152c

Intended and reachable flow: MCP list_goals and list_coding_tasks now pass configured allowed roots into the bounded store scan, so unrelated newer state cannot consume the caller limit before authorization filtering. General smoke state is isolated under dedicated temporary task/job stores.

Authoritative readback: the fork branch and this PR head both resolve to the commit above.

Checks passed:

  • npm run build
  • node scripts/smoke.mjs
  • node scripts/coding-task-core-smoke.mjs
  • node scripts/coding-task-http-smoke.mjs
  • node scripts/goal-core-smoke.mjs
  • node scripts/goal-http-smoke.mjs

Regression coverage explicitly creates newer disallowed Goal/CodingTask state and confirms an allowed older item remains reachable with limit: 1. No authority drift or remaining verification limitation observed for this change.

@gptmasterxd

Copy link
Copy Markdown
Author

Fork repository renamed from gptmasterxd/codexpro to gptmasterxd/codex-with-gpt. The PR remains open and its head is unchanged at 1bf78531adf44e5be981f22924043bc0143a152c; the local fork remote now points to the renamed repository.

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