Skip to content

🐛 Bug: Inconsistent Response Type Between Miner and LLM Branch in validator/forward.py #67

Description

@mltrev23

🐛 Inconsistent Return Type Between Miner and Validator

Related files:


Description

The validator expects a GameSynapse response from miners, which contains a nested GameSynapseOutput object (synapse.output).
However, in the validator’s else branch, the LLM path directly returns a GameSynapseOutput — not wrapped in a GameSynapse — causing a type inconsistency.


Code References

Miner:

# neurons/miner.py (line 217)
synapse.output = GameSynapseOutput(
    clue_text=clue,
    number=number,
    reasoning=reasoning,
    guesses=guesses,
    clue_validity=valid,
)
return synapse

Validator:

# game/validator/forward.py (line 537)
if is_miner_turn:
    response = await self.dendrite(
        axons=axon,
        synapse=synapse,
        deserialize=True,
        timeout=30,
    )
else:
    response = await get_llm_response(synapse)

In this setup:

  • Miner returns a full GameSynapse with .output inside.
  • LLM returns only a GameSynapseOutput directly.

Expected Behavior

Both branches should return the same type — ideally a GameSynapse with response.output: GameSynapseOutput — to maintain type consistency and prevent attribute errors ('GameSynapseOutput' object has no attribute 'output').


My Question

Should this be fixed in the miner, making it return a plain GameSynapseOutput object instead of a full GameSynapse?
Or does the validator normalize this on its end (wrapping the LLM’s response into a GameSynapse for consistency)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions