Skip to content

fix: AttributeError in EnrichPotentialLevers error handler (lever.id → lever.lever_id) - #130

Merged
neoneye merged 1 commit into
PlanExeOrg:mainfrom
VoynichLabs:fix/enrich-levers-attribute-error
Mar 4, 2026
Merged

fix: AttributeError in EnrichPotentialLevers error handler (lever.id → lever.lever_id)#130
neoneye merged 1 commit into
PlanExeOrg:mainfrom
VoynichLabs:fix/enrich-levers-attribute-error

Conversation

@82deutschmark

Copy link
Copy Markdown
Collaborator

Bug

enrich_potential_levers.py line 155 references lever.id in the error handler, but the InputLever Pydantic model defines the field as lever_id (line 34). This causes an AttributeError that crashes the error handler itself, which:

  1. Masks the actual LLM failure message
  2. Prevents proper fallback to the next model in the LLMExecutor chain
  3. Makes debugging structured output failures much harder

Fix

One-line change: lever.idlever.lever_id on line 155.

How Found

Discovered during local model testing (Qwen 3.5-35B + GLM 4.6v Flash on Mac Mini M4 Pro, 64GB). When Qwen failed to produce valid JSON for EnrichLeversTask, the error handler crashed with AttributeError: 'InputLever' object has no attribute 'id' before the fallback model (GLM) could be properly evaluated.

Testing

  • Verified InputLever class defines lever_id (not id) on line 34
  • Confirmed all other references in the file correctly use lever.lever_id (lines 99, 101, 115)
  • Only line 155 had the incorrect reference

…→ lever.lever_id)
The error logging on line 155 referenced 'lever.id' but InputLever defines
the field as 'lever_id'. This caused an AttributeError that crashed the
error handler itself, masking the actual LLM failure and preventing proper
fallback to the next model in the LLMExecutor chain.
Found during local model testing with Qwen 3.5-35B + GLM 4.6v Flash on
Mac Mini (M4 Pro, 64GB). The bug exists in both VoynichLabs/PlanExe2026
and upstream PlanExeOrg/PlanExe.
@neoneye
neoneye merged commit abc8e16 into PlanExeOrg:mainMar 4, 2026
3 checks passed
@neoneye
neoneye deleted the fix/enrich-levers-attribute-error branch March 4, 2026 22:05
@neoneye

Copy link
Copy Markdown
Member

Excellent PR. Thank you.

82deutschmark added a commit to VoynichLabs/PlanExe2026 that referenced this pull request Mar 6, 2026
- CreateScheduleTask: handle both 'server_iso_utc' (web) and 'timestamp' (CLI)
keys in start_time.json with clear error if neither present
- EnrichLeversTask: fix lever.id -> lever.lever_id in error handler
(same class of bug as PR PlanExeOrg#130)
- Add CLI pipeline guide (docs/cli_pipeline_guide.md)
- Add Gemini 3.1 Flash Lite Preview config for OpenRouter
82deutschmark added a commit to VoynichLabs/PlanExe2026 that referenced this pull request Mar 6, 2026
- CreateScheduleTask: handle both 'server_iso_utc' (web) and 'timestamp' (CLI)
keys in start_time.json with clear error if neither present
- EnrichLeversTask: fix lever.id -> lever.lever_id in error handler
(same class of bug as PR PlanExeOrg#130)
- Add CLI pipeline guide (docs/cli_pipeline_guide.md)
- Add Gemini 3.1 Flash Lite Preview config for OpenRouter
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@82deutschmark@neoneye