fix: ground task workers in the assigned project and preserve terminal plan state - #1562
Closed
santoshkumarradha wants to merge 8 commits into
Closed
santoshkumarradha wants to merge 8 commits into
santoshkumarradha wants to merge 8 commits into
Conversation
…earch guidance In Store.Done(), check if task is already terminal before checking requireOwner(). When a task is cancelled upstream, ClaimedBy is cleared or empty, which previously caused Done to fail obscurely with 'task is not claimed'. Checking terminal status first reports an explicit and actionable error: 'task is already terminal (cancelled)'. Also update bashworker prompt guidance to prune heavy directories when running find, preventing workers from freezing across deep trees. Fixes #1561 Assisted-by: CodeAF (gemini-3.8-flash-high) Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
…epository When a session operates with workspace outside a repository (e.g. user home folder ~ in a team manager session), task ground derivation would fall through to taskGroundNothing at dir: ~, leading spawned tasks to inherit ~ as ground. Workers looking for repository docs like docs/design/plandb-cli/ would then fail to locate them and launch unpruned find commands across the entire home drive. Fall back to a.config.Place.Workspace when workspace has no repository root, preserving taskGroundStandingIn on the intended project repository. Fixes #1561 Assisted-by: CodeAF (gemini-3.8-flash-high) Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (gemini-3.8-flash-high) Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Assisted-by: CodeAF (gemini-3.8-flash-high) Co-Authored-By: CodeAF <267109073+agentfield-bot@users.noreply.github.com>
Member
Author
Two-Pass Quality ReviewPass 1: Defects & Contracts
Pass 2: Architecture & Clean Code
— |
santoshkumarradha
marked this pull request as ready for review
September 27, 2026 02:55
Member
Author
|
@AbirAbbas this is review ready |
This was referenced Sep 27, 2026
Member
Author
|
Superseded by aggregate PR #1627: #1627 . The exact reviewed green head is verified as an ancestor of published Santosh/dev; its issue details, validation, direct GitHub media attachments and limitations are preserved in the aggregate. Closing this source PR under the approved batch-1 workflow. Source branch retained; no merge into dev/main is implied. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Real terminal workflow evidence
Goal and result: starting chat from home, build and actually use a maintenance CLI in a named project. Natural follow-ups add in-progress chores, JSON output and exact-title completion. The task worker/checker used the assigned project copy; the finished CLI persists the completed dryer chore and correctly shows the two remaining chores. 25 tests pass; all five local PlanDB tasks are done; 87/87 completed calls used OpenRouter
deepseek/deepseek-v4.1-flash.Watch the clean live follow-up MP4 · Completed-result GIF
Tested at combined
41cf9cd0f, including #1562/#1603/#1604 and #1610. Original individual-head grounding evidence and CI are separate below. The clean video shows the final home-directory use; the source cast contains the full build/correction/task/landing-recovery sequence. The retained task branch required a natural follow-up to integrate earlier uncommitted changes; the files were manually copied and committed, then the task branch deleted; the retained-copy hint remains because this was not a successful engine landing receipt. An unnecessary cache deletion was denied in the actual approval UI before read-only use succeeded.Fixes #1561.
A task started from a home-directory conversation could still run outside its project: the default bash run door bypassed the ground resolver entirely. It now uses the same resolver as proposed and legacy tasks, including a repository named in the brief or configured project fallback. Children retain their parent folder. Every plan worker and checker receives its actual assigned working directory before the work order, while the original request and unrelated reference paths remain unchanged.
Bash guidance now uses project-scoped discovery and
plandb --helpfor missing plan documentation. A late completion of a cancelled task reports its terminal state before ownership or review validation, preserves the stored result, and retains the existing composite-placeholder completion behavior. The manual and change entry describe the resulting behavior.Validation:
make test-quickpassed, and fresh e2e, plandb, and run package suites passed. An initial full session run exposed existing fixture races and a heartbeat compiler timeout (also reproduced on original PR revision f6aca9b); cleanup now waits for full run closure and heartbeat checks use a deterministic failure→repair fixture. All four initially failing tests passed 10 repetitions in 21.825 seconds.Live verification changed
task.max_loadonly inside its disposable profile because shared-host load otherwise held the task before any model call. Personal configuration and credentials were not published.Review media below are direct PR attachments. Repository-hosted evidence links have been removed. Exact revisions, validation results and limitations remain in this description; original source recordings and generated examples are retained locally.