Skip to content

SettleAsError never stamps FailedBuildInputs, so every adopt-only refusal burns one needless automatic re-drive #2264

Closed

Description

@rbuergi

What

NodeTypeCompilationHelpers' SettleAsError — the compile watcher's re-settle of a Pending flip it
refuses to dispatch — writes CompilationStatus = Error and CompilationError, but never stamps
FailedBuildInputs.

ApplyCompileFailure (a real compile's failure write-back) does stamp it. SettleAsError is the
other way a NodeType reaches a terminal Error, and it is the ONLY way a type reaches Error under
the adopt-only gate (Modules:RequirePrebuilt, #2193 §A) — which never runs a compile at all.

Why it matters

HasStaleFailureVerdict reads FailedBuildInputs to answer "has this type already had its attempt
under these compile inputs?". An unstamped verdict differs from every live token, so it always reads
"never attempted". Consequence: the adopt-only gate's refusal is followed, on every refused type,
by one automatic failed-verdict re-drive (#1793) — a Pending flip, a second trip through the gate,
a second refusal — that was never needed. It burns one of the five automatic re-drives, and it puts
a needless round on the per-NodeType hub's single-threaded action block.

With the maintainer's direction on #2193 to set Modules:RequirePrebuilt for "all which we mark as
such — should be almost all"
, that is one spurious round per refused type.

It converges (the re-drive's own write stamps the token, and the stamp is persisted on the node), so
it is bounded and once-per-node, not a storm.

Not the same as #2260

#2260 was the un-park inside that re-drive; that is fixed (#2262) and this is deliberately not
folded into it. Two reasons to keep them apart:

Where

  • src/MeshWeaver.Graph/Configuration/NodeTypeCompilationHelpers.cs — SettleAsError inside
    InstallCompileWatcher, and its two call sites.
  • src/MeshWeaver.Graph/Configuration/NodeTypeCompilationHelpers.cs — HasStaleFailureVerdict /
    BuildInputsToken for the semantics.

Acceptance

A require-prebuilt-refused type settles at Error with FailedBuildInputs recording the inputs the
refusal was formed under, and GetFailureRedriveCount for it stays at 0 — no automatic re-drive
where none was warranted. The parked short-circuit's re-settle must still leave the stamp alone, and
NeverCompiledFailureRedriveTest must stay green (it pins that a genuinely stale verdict IS
re-driven, exactly once).

Activity

  1. added a commit that references this issue on Aug 26, 2026
  2. rbuergi commented on Aug 26, 2026

    @rbuergi
    ContributorAuthor

    Fixed by #2318, merged as 187f91048.

    SettleAsError — the only path to CompilationStatus.Error under the Modules:RequirePrebuilt adopt-only gate — never stamped FailedBuildInputs, so HasStaleFailureVerdict read every refusal as "never attempted" and drove one needless automatic re-drive per refused type, exactly as reported.

    The fix extracts ApplyGateSettle, which deliberately gives the two call sites opposite treatment:

    • the gate's own refusal stamps the live inputs;
    • the parked short-circuit re-serving an already-settled verdict leaves the existing stamp untouched.

    Verified on main: NodeTypeCompilationHelpers.cs carries ApplyGateSettle and the FailedBuildInputs handling.

    Tests: GateSettleFailedBuildInputsTest + FailedVerdictRedriveTest 24/24, RequirePrebuiltParkTest (integration) 1/1, NeverCompiledFailureRedriveTest + NodeTypeCompileParkTest + RedriveObservation* 18/18.

    (Closing by hand — #2318's body omitted the closing keyword, so the auto-close never fired.)

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions