Skip to content

Distinguish in-flight Node Detail finalization from a permanently frozen builder #452

Description

@vishaltandale00

Follow-up from the #404 review (merged as eb791a3).

Problem

beginNodeDetailAuthoringFinalization and the builder mutation guards in packages/graph-client/src/detail.ts throw the identical bare Error("Node Detail authoring is finalized and cannot be mutated") in two different situations:

  1. the builder is permanently frozen after a successful submit;
  2. a finalization is in flight (state.finalization set, cancellable) and another caller touches the builder.

A second RelayerGraphClient instance that submits the same NodeObject while the first client's finalization is still awaiting the resolver hits case 2 and is told the builder is "finalized" although nothing was finalized and a retry a moment later would succeed. setComponent/clear() during the window get the same message.

Fix

Give the in-flight case its own message and a machine-readable code (for example detail_finalization_in_progress), keep the permanent case as detail_finalized, and add a test with two client instances where the second submits while the first is gated on the resolver. All existing tests submit a node through one client instance only.

Evidence

Adversarial review of caacfca on #404, finding "F7 — PARTIALLY FIXED: the in-flight lock error is unchanged and indistinguishable".

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

    bugSomething isn't workingready-for-agentReady for an agent to implement or investigate

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions