Skip to content

fix(goals): bound worker completion to assigned phase criteria - #1411

Merged
eunsoogi merged 1 commit into
mainfrom
eunsoogi/issue-1398-finite-phase-goals
Oct 25, 2026
Merged

eunsoogi merged 1 commit into
mainfrom
eunsoogi/issue-1398-finite-phase-goals

Conversation

@eunsoogi

@eunsoogi eunsoogi commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Worker goals now bind to an explicitly assigned executable phase, with completion requiring all of that phase's criteria, proof, and handoff delivery. A completed phase leaves the task idle without waiting for parent acknowledgement or merge.

Rationale

The previous assignment rule could bind a Worker to the overall issue while idle guidance referred to a finite phase. Lack of immediate work could then be confused with completion, or a completed phase could remain active waiting on its parent. Goal creation must also respect the host's actual authority rules.

Changed Areas

  • plugins/codexy/skills/goal-lifecycle/SKILL.md: separate phase objective from overall outcome; respect host goal authority; preserve broader active objectives; define proof-based phase completion and same-owner follow-up.
  • plugins/codexy/skills/orchestration/references/runtime-heartbeats.md: align active, idle, external-wait, follow-up, and automation cleanup instructions with that boundary.
  • No executable, validator, release metadata, installation, or heartbeat changes.

Verification

  • git diff --check passed.
  • dprint check plugins/codexy/skills/goal-lifecycle/SKILL.md plugins/codexy/skills/orchestration/references/runtime-heartbeats.md passed with the repository formatter.
  • Changed-document existence and all 10 relative Markdown link targets passed.
  • scripts/validate-plugin-config.sh --check passed.
  • scripts/validate-plugin-config.sh --check-touched-loc --base-ref origin/main passed; files are 243 and 204 physical lines.
  • Instruction readback covers preparation, implementation, verification, external waiting, unfinished phases, and follow-up fixes: unmet assigned criteria retain active state; satisfied phase criteria permit only phase completion; subsequent work reads native state and preserves ownership.
  • Standard profile: the selected codexy-inspector returned PASS with no in-scope blockers on 34d7d591b5a4ca0fa0a6f910e81c4b6cc0fa8a60. Its bounded source review does not prove runtime behavior.
  • All 39 authentic PR checks passed on the exact head: Rust tests, Language lint, Touched LOC, selected runtime packages, and bootstrap lifecycle including native Windows activation.

Evidence

Base: e97040911cbaaa05b2f65d5b4395f8de2e2b0809.
Head: 34d7d591b5a4ca0fa0a6f910e81c4b6cc0fa8a60.
Local source checks ran in the macOS issue worktree at the base revision with this two-file candidate diff, then that exact content was committed as the head above. The current diff confirms source, dependencies, configuration, fixtures, generated inputs, and environment relevant to those checks are unchanged; this is applicability evidence, not a claim that each local check ran again after commit. The Inspector independently reran base-to-head diff checking on the frozen head.

Native startup in this assigned task returned goal=null, accepted the exact authorized objective, and read back active before task work. This proves this task's startup only; the scenario readback above is source inspection, not host execution proof.

Not Run

  • No fabricated RED/GREEN tests: both changed boundaries are instruction-only.
  • No synthetic host goals, fork/recovery campaign, installation, or runtime-monitor experiment. Live idle/wake, absent-authority rejection, broader-active mismatch, and blocked recovery behavior remain unverified by this change.
  • Full local Rust suite not run for this prose-only change; authentic PR CI will report its own coverage.
  • No measured latency or token savings are claimed.

Follow-ups

Current-head review and all 39 checks are clean; this PR is ready for the parent-owned merge decision. Parent owns merge and final milestone acceptance; phase completion does not close the issue or prove release acceptance.

Fixes #1398

@eunsoogi eunsoogi added type/fix Bug fix or correctness repair area/agents Agent roles, handoffs, child threads, or multi-agent policy area/skills status/review Pull request is open or review gate is active priority/high High priority or blocking work labels Oct 25, 2026
@eunsoogi
eunsoogi marked this pull request as ready for review October 25, 2026 12:00
@eunsoogi
eunsoogi merged commit 8e31f13 into main Oct 25, 2026
39 checks passed
@eunsoogi
eunsoogi deleted the eunsoogi/issue-1398-finite-phase-goals branch October 25, 2026 12:11
eunsoogi added a commit that referenced this pull request Oct 25, 2026
## Summary
A completed worker phase now submits one handoff and finishes without waiting for a parent reply. Delivery confirmation means task-message transport acceptance; absent message permission uses an explicitly unconfirmed host terminal result.

## Rationale
The old pre-delivery, post-result, and terminal reports overlapped and could keep a satisfied finite phase active while the parent was silent. This applies #1398's accepted finite-phase contract while preserving blocked recovery.

## Changed Areas
- Align the terminal reporting reference with one normal completed-phase flow.
- Extend the existing validator for satisfied-phase receipts, local native goal outcomes, honest host-result fallback, parent-wait rejection, and persistent event deduplication.
- Add regressions for success without a parent response, failed transitions, undelivered results, duplicate events, unfinished objectives, missing outcomes, and status-form completion.
- Keep changes within the four #1401-owned files.

## Verification
- Rust `suite_child`: 55 passed; pre-fix targeted run reproduced three expected failures.
- Plugin `--check` and `--check-touched-loc --base-ref bfc83fa`: passed.
- `git diff --check`, Rust formatting, pinned dprint 0.55.2, changed-document existence and four relative links: passed.
- Strict current-head review: PASS on `824401d3f8c592a637c4446b148bb4c531893242`, no unresolved findings. The same reviewer replayed 19 actual validator CLI cases and reran seven focused tests; all expectations passed.
- Completion handoff validator: passed against fresh PR, review-thread pagination, label, review, and local/remote head evidence.
- Current-head GitHub CI: 39/39 checks passed on `824401d3f8c592a637c4446b148bb4c531893242`, including pinned Rust 1.95 lint, all Ubuntu/Windows Rust suites, selected runtime packages, and package lifecycle checks.

## Evidence
Base includes accepted prerequisite #1398 through PR #1411 (`8e31f138b104ac4cfead8be83e45d956621c02f8`). Local behavioral proof observes the validator CLI only. Governed files: validator 249 lines, top-level tests 235, record fixtures/tests 180, reporting reference 249.

## Not Run
Authentic host idle without a parent reply belongs to #1405 and is unverified here. No installation or release changes. Local Clippy used available Rust 1.98 and hit a pre-existing `chunks_exact_to_as_chunks` error outside scope; GitHub Language lint uses the repository's pinned Rust 1.95.

## Follow-ups
Parent owns acceptance and merge after current-head checks and review. This assignment stops before merge. #1405 owns authentic idle proof.

Separate dogfood follow-up for parent allocation: PreToolUse rejected read-only `gh pr checks 1415 --watch --interval 30` with output redirected to a temporary CI log as `CODEXY_DESTRUCTIVE_COMMAND_DESTRUCTIVE_EFFECT` (`rule=destructive-effect`). No command ran; bounded read-only check snapshots succeeded. A later read-only shell snapshot command with file redirection was rejected by the same rule; stdout-only GraphQL and connected GitHub metadata, review, thread, and comment reads succeeded. The hook is outside the four-file issue scope and was not changed.

Fixes #1401
eunsoogi added a commit that referenced this pull request Oct 25, 2026
…ority (#1418)

## Summary
Ready independent Workers continue through implementation, verification, selected review, and handoff within their initial assignment. A short setup phase is used when parent environment validation is required.

## Rationale
Routine read-only, plan-approval, and code-only prompts add parent round trips after execution has already been authorized. The initial assignment now carries finite-phase criteria, terminal submission, and supervised-slot reservations together.

## Changed Areas
- Orchestration entry point: explicit setup release and independent execution boundaries.
- Execution loop: preserve shared migration/Simulator, safety, authority, review, and capacity gates; consolidate duplicate dispatch/handoff templates.
- Token-efficient coordination: consume compact actionable results first and use the accepted terminal-submission contract.

## Verification
- Direct file and relative-link existence checks: PASS.
- `git diff --check`: PASS.
- Pinned dprint 0.55.2 check of all three changed Markdown files: PASS.
- `scripts/validate-plugin-config.sh --check`: PASS.
- `scripts/validate-plugin-config.sh --check-touched-loc --base-ref d14a9c0`: PASS (227/238/249 physical lines).
- One standard-profile Codexy Inspector review: PASS on `fd5dc5dc28c8d0e075db44861c3b3cbeae5f4c9d`; no blocking or non-blocking findings.
- Full PR CI: all 39 checks passed on `fd5dc5dc28c8d0e075db44861c3b3cbeae5f4c9d` (Rust tests, Language lint, package lifecycle, selected marketplace runtime packages, and touched LOC).

## Evidence
Base: `d14a9c08af3548b013b45a1b714ee96754ad1e2f` (accepted #1398/#1399/#1401 artifacts via PR #1411/#1413/#1415).
Head: `fd5dc5dc28c8d0e075db44861c3b3cbeae5f4c9d`.
Source readback preserves setup/authority/conflict/review/slot gates and prevents capacity expansion through batched waits. Source scenario review: normal independent execution proceeds within authority; required setup stops until parent release; shared migration/Simulator conflicts stop affected work; capacity exhaustion stays in the parent backlog without child/goal activation. These are instruction-level findings, not runtime scenario results. Codegraph was callable and used before repository exploration.

## Not Run
No installed-plugin update or real host collision/capacity scenario was run. Instruction and validator checks do not prove those runtime outcomes; no latency or token savings are claimed. No executable boundary changed, so prose RED/GREEN was not manufactured.

## Follow-ups
Parent owns final acceptance and any merge. This lane stops with a verified PR and does not merge, release, archive, delete its branch, or update installed plugins. Runtime phase-idle proof remains separate under #1405.

Fixes #1402
@eunsoogi eunsoogi added this to the 2.0.1 milestone Oct 30, 2026 — with ChatGPT Codex Connector
@eunsoogi eunsoogi added status/merged Pull request has been merged and removed status/review Pull request is open or review gate is active labels Oct 30, 2026 — with ChatGPT Codex Connector
@eunsoogi eunsoogi self-assigned this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agents Agent roles, handoffs, child threads, or multi-agent policy area/skills priority/high High priority or blocking work status/merged Pull request has been merged type/fix Bug fix or correctness repair

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bound worker goals to executable phases

1 participant