Skip to content

A gate that cannot run spends an agent attempt before the driver halts on it #3568

Open

Description

@clabonte

Versions: specfuse-loop 0.31.1.

What happens

Reported in specfuse/internal-ideas#3. A gen-contract gate whose script could not find its engine, on a machine where specfuse run itself works:

  • The gate fails on every attempt, and the gates that need it report no_gate_marker.
  • The baseline probe finds the same failures on a clean tree, and the driver halts the gate as pre-existing debt.
  • By then the first work unit's attempt has been spent and reset. Reported cost: one attempt (about 0.41 USD) and a manual gate reopen.

I have not reproduced this or traced the driver's path; the account above is the reporter's measurement.

Expected

A gate that cannot run at all should not cost an agent attempt. No agent edit can fix a missing tool, so spending one only delays the halt.

Suggestion

Probe gates before the first attempt rather than after it, and halt there with the gate's own message. Some gates can tell "could not run" from "found violations": check-gen-contract.sh exits 2 for the first and 1 for the second. That convention is not general, so it would need a decision on how a gate declares it, or a baseline probe that runs ahead of the attempt regardless.

This applies to any gate with a missing tool, not just gen-contract. The script's own lookup is being fixed separately in specfuse/authoring#200 and specfuse/specfuse#245.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions