Skip to content

Route fbuild reset through daemon device-lease admission #2151

Closed

Description

@zackees

Problem

In fbuild 2.5.53, fbuild reset can reset a board reserved by another workflow. The daemon's POST /api/reset calls DeviceManager::admit_operation, but the CLI's cli/reset.rs::run_reset calls fbuild_deploy::reset::reset_device directly. The CLI also has no --lease-id argument.

Reproduction and acceptance

Use a dedicated board or fake serial backend. Acquire an exclusive lease, then invoke fbuild reset --port <port> without that lease ID. Capture the bypass in a focused regression test before changing the implementation. After the fix, the CLI should reject the request before touching the serial port, accept the holder's lease ID, and continue resetting unleased devices. Preserve the current board detection and serial selector behavior.

Decisions

This tracks the public CLI bypass of the daemon admission added in #1864.

Activity

  1. zackees commented on Nov 22, 2026

    @zackees
    MemberAuthor

    Delivered by #2155 (merge commit 18ff3c3f071db08b2012d87072d9071be3b113dd, merge-group run 45079184902 success).

    • CLI regression coverage: three stub-daemon wire tests — --lease-id + serial selector + board detection are forwarded on POST /api/reset; a 409 surfaces the daemon's holder message; an unleased device still resets.
    • cli/reset.rs no longer references fbuild_deploy at all; admission stays single-sourced in the daemon.
    • soldr cargo test -p fbuild-cli --bin fbuild = 502 passed / 0 failed at the merged head.
    • CI at merge: 33/33 checks green, mergeStateStatus: CLEAN.

    Same bypass class remains in cli/uploadfs.rs and cli/uploadfs_rp2040.rs (separate issue, not this one).

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions