Skip to content

fix(hire): --from-market --dry-run grades the flags it previews, and document agent rotation (DIVE-4416) - #926

Merged
5dive-bot merged 4 commits into
mainfrom
dive-4416-hire-dryrun-rotation-help
Sep 13, 2026
Merged

fix(hire): --from-market --dry-run grades the flags it previews, and document agent rotation (DIVE-4416)#926
5dive-bot merged 4 commits into
mainfrom
dive-4416-hire-dryrun-rotation-help

Conversation

@5dive-bot

Copy link
Copy Markdown
Collaborator

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.

…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>
@5dive-bot 5dive-bot changed the title DIVE-4416: hire --from-market --dry-run exits 0 on flags the real run rejects, and 5dive... fix(hire): --from-market --dry-run grades the flags it previews, and document agent rotation (DIVE-4416) Sep 13, 2026
lodar and others added 3 commits September 13, 2026 08:51
…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>
@5dive-bot
5dive-bot added this pull request to the merge queue Sep 13, 2026
Merged via the queue into main with commit 11ec16f Sep 13, 2026
31 checks passed
@5dive-bot
5dive-bot deleted the dive-4416-hire-dryrun-rotation-help branch September 13, 2026 11:23
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.

2 participants