Repository navigation
feat: run missions and delegated agents in a plain-folder project - #2494
Merged
Merged
Conversation
…feat/plain-folder-missions
A registered project that is not a Git repository can now hold a mission and take a delegated agent. - The mission's project is the plain folder itself when no Git project holds the checkout; the mission stores `plain_folder` (additive). - In such a mission only general nodes are planned: a change or external node, or a destination branch, is refused as `mission_needs_git`, whose next action says a code node needs a Git repository. - `hide agent spawn` without --repo and --branch, from a pane of a plain folder project (or with --repo naming one), starts the agent in that folder under a folder owner tab. In a Git project both stay required (`spawn_repo_required`); a folder whose facts are still being read answers `spawn_project_loading`. - The ledger keeps a folder spawn readable by older builds: its branch repeats the folder and `folder: true` marks it. - Mission help says Git is the floor for code and how writers in one folder avoid overwriting each other. Closes #2478 Closes #2479
A project row that is not Git said only that no repository was listed for it, so a Git checkout its node could not read (a .git link to a missing repository) became a plain-folder mission for good. - checkout_kind reads the node's answer: this machine's path facts, or the device helper's, must say the folder is a Project of kind Folder; a path found gone or whose Project could not be read is unreadable, and one not answered yet is unread. - A spawn into an unreadable folder is refused `spawn_folder_unreadable` instead of waiting as loading forever. - A spawn naming another machine is checked against that machine first, so an unknown or away device answers machine_unknown or machine_unavailable. - The same folder spawn asked again answers its agent from the ledger without judging the folder again. - The spawn_repo_required and repository_unavailable next actions no longer send a caller between each other for an unregistered folder.
…sions # Conflicts: # contracts/hide-cli.json # hide-core/src/runtime/tests/beside_spawn.rs
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.
Closes #2478
Closes #2479
Related: with-hide/hide-private#889 (paired
docs/missions.mdchange); stacked on #2485.Summary
A project folder that is not a Git repository could hold neither a mission nor a delegated agent: the mission was refused as an unknown project, and
hide agent spawnalways wanted--repoand--branch.Now a mission made in a plain folder is a mission of general nodes only, whose workers start in the folder itself and finish by their lines, checkers and gates, with no branch, pull request or merge.
A code (
change) or waiting (external) node, or a destination branch, is refused asmission_needs_git, and its next action says code work needs a Git repository.hide agent spawnwithout--repoand--branch, from a pane of a plain-folder project, starts the agent in that folder; in a Git project both stay required, and the refusal (spawn_repo_required) now says so plainly.A folder counts as plain only on its machine's own read (this machine's path read, or a device's helper); a checkout whose
.gitcannot be read, or one that is gone, is refused (spawn_folder_unreadable,mission_project_unknown), never treated as a plain folder.No screenshot: no screen changes; the map and Missions screen draw these missions as they draw any other.
Review
depends_onor a separate output folder per brief; the core checks nopaths(operator decision 2026-11-12).hide-core/src/runtime/delivery.rs- failure path:spawn_placedecides, under the runtime mutex, whether a spawn without--branchmay start, from in-memory rows and path facts only; a--machinethere is checked first (spawn_target, as the executor already does under the lock), and a retry of an admitted folder spawn skips the folder judgment.hide-core/src/runtime/projects.rs-checkout_kind: Folder only on the node's answer (catalog_paths.project/device_facts), never inferred from a row that is merely not Git.hide-core/src/coordination/mod.rs- ledger wire: a folder spawn writesbranch= the folder plusfolder: true, so a build before this one still loads the ledger (it requires a non-emptybranch).hide-core/src/coordination/executor.rs- calls outside the engine contract: a folder spawn opens a folder owner tab (OwnerOpen::for_checkout) instead of a worktree; noworktree_pathorcreate_worktreecall is made.hide-core/src/coordination/naming.rs- a folder child's tab is now named; its owner workspace name is left alone.checkout_kind), as the catalog lookup already did.Tests
hided/src/agent_cli.rs.falsefailsa_plain_folder_project_runs_a_mission_of_general_nodes_and_refuses_code_nodes; letting a Git project's spawn through without a branch failsa_git_project_keeps_repo_and_branch_required(both planted and seen to fail).Reading a not-Git row as a folder again fails
a_checkout_its_machine_could_not_read_makes_no_plain_folder_missionand the unreadable cases ina_git_project_keeps_repo_and_branch_required; judging a retry's folder again fails the Git-turned retry ina_spawn_without_repo_or_branch_starts_the_child_in_the_callers_folder;a_caller_here_starts_a_child_in_a_devices_plain_foldercovers--machinewith--repoalone and an unknown machine.Prepared::runwith the existing 30 s bound.Evidence
cargo nextestover hide-core and hided before the review fixes: 5415 of 5416 passed, the one failure the committed CLI contract, regenerated here.node_session_activitydeadline under load then passed alone. No existing test changes beyond theOptionwraps ofrepo/branch.spawn_project_loading) start in the folder, and a retry returns the same agent.hide.app, private HOME and state folder, a real Codex worker) with a folder outside any Git repository (git rev-parseexit 128):the Conductor's
mission createtook the folder as its project;changeandexternalplans were refusedmission_needs_git;agent spawn --parent here --intent mission-1:synopsiswith no--repo/--branchopened the worker in the folder;it wrote
synopsis.mdthere and recorded its line, and Hide closed the mission done. No candidate process was left.scripts/verify-cargo.sh lint(fmt and clippy) clean.mission_criterion_not_yours; its brief said to retry. This race is the same in a Git mission and is not changed here.danger-full-accessandapproval_policy = "never", without which Codex held the worker'shidecall for an approval.Breaking change
None for a Git project. Downgrade limits, written in
docs/INSTALL.md: a build before this drops a mission'splain_folder(its plan admits code nodes again), and reads a folder spawn's record as a branch named after the folder.