Skip to content

New-PfbNlmReclamation -Name is a mandatory dead selector: the endpoint declares no names parameter and the operation is array-wide #138

Description

New-PfbNlmReclamation makes -Name mandatory and sends it as a names query key. The endpoint declares no names parameter, and the operation it performs is array-wide.

Evidence

Public/FileSystem/New-PfbNlmReclamation.ps1:27-43POST /nlm-reclamations.

In every spec from tools/specs/fb2.8.json through fb2.28.json the operation declares no required query parameter and no request body, and no names parameter at all. The endpoint's own description treats reclamation as a system-wide operation rather than something addressed at a named object.

FlashBlade silently drops an undeclared query key rather than rejecting it, so the call succeeds and the value is discarded. There is no error to notice.

Why it matters twice over

The dead key itself is harmless — it goes nowhere. The mandatory parameter is the actual defect:

  1. It forces every caller to invent a value that is guaranteed to have no effect, which is the opposite of what a mandatory parameter communicates.
  2. It states, in the strongest form the language has, that this operation is scoped to one named thing. It is not. A caller reading only the signature would reasonably conclude they can reclaim locks for a single file system, and would be wrong in a way no runtime feedback corrects.

An optional parameter sending a dropped key would be untidy. A mandatory one is actively misleading about the operation's blast radius.

Scope

Reconcile the public interface with the operation the endpoint actually performs: drop the names query assignment, and decide whether -Name should be removed outright or retained as an optional, explicitly-documented no-op for backwards compatibility. Removing a mandatory parameter is a breaking change to any caller that supplies it positionally, so that call belongs to the maintainer.

Worth checking as part of the same pass whether the array offers any scoping mechanism for reclamation at all. If it does not, the cmdlet's help should say so — that is the part a caller cannot discover from the signature.

Relationship to other issues

This is a dead-key/misleading-interface concern, not a missing-required-input defect, so it is deliberately not part of #106 Part 2's required-field count.

It shares its shape with #124 (a declared query key whose response items carry no such field) but is a step further out: here the key is not declared at all. The dead-key report's committed ceiling covers keys it can see; this one is worth confirming appears there.

Found by the issue #106 Part 2 audit.

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

    area:wire-contractWhat a shipped cmdlet actually sends: dead keys, selectors, missing required keys, ID rules.needs:live-testCannot close on mocked tests alone. Requires live verification against an array.priority:P0Can damage a customer array or breaks the module outright. Drop other work.size:SOne sitting. Single file or a mechanical change.source:driftOpened from a drift-report finding, by tooling.status:design-approvedDesign reviewed and approved by the maintainer. Implementation may start.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions