fix(hire): --from-market --dry-run grades the flags it previews, and document agent rotation (DIVE-4416) - #926
Merged
Conversation
…document agent rotation (DIVE-4416) Two customer-reported CLI defects (report 2026-09-13), one PR. ITEM 1 — a dry run that could not fail. `hire <role> --from-market --dry-run` collected every flag it does not own into import_args, which were only ever parsed by cmd_import on the REAL run; the --dry-run branch returned right after the disclosure. So the one command whose job is "tell me whether this will work" graded nothing and answered yes to an argv that cannot start: `--heartbeat-every=30m` previewed clean and then failed for real. The flag tables in cmd_pack.sh are now one source of truth for two readers. _import_parse_args walks an import argv and fails with cmd_import's own "unknown flag: <flag>", creating nothing and needing no root; cmd_hire_market calls it BEFORE it resolves the market, so the preview and the real run cannot disagree and the real run stops spending a registry fetch on a doomed argv. Value flags stay `=`-only, matching cmd_import's `--flag=*)` arms exactly, so the space form is rejected by the preview because the real run rejects it too. ITEM 1b — the flags the usage promised. hire's usage reads "+ any 'agent import' flag" and an operator reads that as "any create flag". cmd_import now forwards the create-only flags that do not collide with something it computes itself (--heartbeat-every= --inherit-memory= --no-heartbeat --no-team-bot --can-push --can-deploy --base-url= --telegram-home-channel= --telegram-allowed-users= --telegram-cos= --telegram-cos-avatar=) verbatim into the cmd_create argv it already builds, appended last. Fixing only the preview would have made both halves fail consistently; forwarding is what makes the reported command run. ITEM 2 — `agent rotation get|set|rotate|cooldown|clear-cooldown` is dispatched in main.sh and appeared in no help page (verified on installed 0.35.1 and on origin/main). The verbs now sit in the agent help block next to auth-profile. tests/hire_dryrun_flag_validation_unit.sh: 21 assertions, no root, no network. Non-vacuity: 6 fail on an origin/main archive, 0 fail here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…nd the hire dry-run wiring (DIVE-4416) ITEM 3 of the row, plus the wiring arm quinn's iteration-1 grading asked for. The task usage string, the heartbeat /goal nudge and the headless-picker hook all advertised `--options=A|B` / `--recommend=<A>`. The parser never cared, so the placeholder was the only thing steering filers to bare letters — and a gate recording "recommend: A" records nothing about what A was once the ask is forwarded, quoted or screenshotted. Both spellings are now the choice itself on all three surfaces, with one sentence in the help saying why long options are not the mistype risk they look like: a --recommend that does not match an --options entry hard-fails at the keyboard, a letter never fails. `task need` now warns (never fails) when EVERY --options entry is a single character — that is the old placeholder copied, not a choice. Fixtures and scripted callers legitimately pass letters, so it stays a warning. tests/hire_dryrun_flag_validation_unit.sh gets the missing wiring arm: every existing arm called _import_parse_args directly, so neutering the one line that connects it to the dry-run branch left the harness green while the customer's exact command went back to rc=0. The new arms build a throwaway bundle and run the real argv through it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…416) tests/task_need_options_placeholder_unit.sh loads cmd_push.sh, a broker consumer, without lib/broker.sh — which tests/broker_surface_unit.sh arm 7 catches as a corpus contract violation (a harness that loads a consumer without the broker fails closed at runtime). Add it to the same source list the green peer tests/gate_pfr_autoclear_unit.sh already carries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Delivers DIVE-4416.
Opened by
5dive push --open-pr(DIVE-2605): the branch and this pull request went out on the same root-side rail, as 5dive-bot. The authoring agent holds no GitHub credential.