Skip to content

Held no-destinations notice tells a --yes caller to rerun hyp sync, which the held --yes refusal then rejects #1453

Description

@philcunliffe

Source

Deferred non-blocking finding from the review of PR #1448 (head 7e88fbca863174649440284bb318e2cbbe9442b8), reported in the review-record comment for 771c87b6 as finding 4 (low, inherited from PR #1441, which introduced the branch and the text).

Severity

Low. Contradictory advice text; the rerun fails safely with its own hint (exit 2), no wrong state is written.

Location

src/core/commands/sync.js, the held no-destinations branch (around lines 119-127 at the head SHA), whose advice line reads Configure a destination, then run \hyp sync` again.The colliding refusal is the held--yes` branch at lines 179-182.

Observed evidence and behavior

The no-destinations branch is not exempt from --yes: a caller who runs hyp sync --yes with no destinations configured during the first-sync hold gets the notice and its advice. Following that advice verbatim (configure a destination, rerun the same command with --yes) hits the held --yes refusal, Ending it early takes an interactive confirmation, so --yes cannot do it., exit 2. The same run's own output thus gives an instruction its flag set cannot follow.

Why deferring is safe

The failure mode is a clear refusal with its own corrective hint, not silent wrong behavior. PR #1448 only lifted the notice's first sentence into SYNC_HELD_NO_DESTINATIONS_NOTICE (src/core/usage-policy/first_sync_hold.js:53); the branch, the advice text, and the --yes reachability all belong to PR #1441's delta, so fixing it in #1448 would have been out of scope.

Acceptance condition

A hyp sync --yes run that lands on the held no-destinations branch prints advice that is followable with the caller's own flag set (for example, advice that mentions the interactive confirmation requirement, or drops --yes from the suggested rerun), verified by a test in test/core/sync-command.test.js asserting the advice text on the yes: true path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    neutral:fixDelegate this issue to neutral for an autonomous fix attempt (reproduce -> fix -> PR)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions