Skip to content

fix: resilience for local LLM structured output truncation - #153

Merged
neoneye merged 1 commit into
PlanExeOrg:mainfrom
VoynichLabs:fix/structured-output-resilience
Mar 7, 2026
Merged

fix: resilience for local LLM structured output truncation#153
neoneye merged 1 commit into
PlanExeOrg:mainfrom
VoynichLabs:fix/structured-output-resilience

Conversation

@82deutschmark

Copy link
Copy Markdown
Collaborator

Problem

Two bugs found during local model QA on Mac Mini M4 Pro 64GB with Qwen 3.5-35B-A3B via LM Studio.

1. SelectScenarioTask — missing holistic_profile_of_the_plan

holistic_profile_of_the_plan is the last field in PlanCharacteristics. Local LLMs with constrained output budgets close the nested JSON object before generating it, causing a Pydantic validation error and pipeline failure.

Fix:default='' — pipeline continues with an empty field rather than failing. Downstream scenarios_markdown.py uses f-string interpolation, so empty string renders cleanly.

2. CreateScheduleTaskKeyError: 'server_iso_utc'

Hard dict access fails on CLI runs where the key may be absent from start_time JSON.

Fix: Safe .get() with fallback key.

Changes

  • worker_plan/worker_plan_internal/lever/select_scenario.py — 1 line
  • worker_plan/worker_plan_internal/plan/run_plan_pipeline.py — 1 line

- select_scenario.py: add default='' to holistic_profile_of_the_plan
in PlanCharacteristics. Local LLMs with constrained output budgets
close nested JSON objects before reaching the last required field,
causing Pydantic validation failure. Empty default lets the pipeline
continue; downstream f-string interpolation renders cleanly.
- run_plan_pipeline.py: safe dict access for server_iso_utc key in
CreateScheduleTask. Fixes KeyError on CLI runs where the key may
be absent from start_time JSON.
Confirmed on Mac Mini M4 Pro 64GB, LM Studio + Qwen 3.5-35B-A3B.
@neoneye
neoneye merged commit c6459b7 into PlanExeOrg:mainMar 7, 2026
3 checks passed
@neoneye
neoneye deleted the fix/structured-output-resilience branch March 7, 2026 02:11
82deutschmark added a commit to VoynichLabs/PlanExe2026 that referenced this pull request Mar 7, 2026
…tTask
combined_summary and go_no_go_recommendation are the last two required
fields in ExpertDetails. Local LLMs with constrained output budgets
consistently omit trailing fields in nested JSON objects.
Adding default='' follows the same pattern as the SelectScenarioTask
fix (PR PlanExeOrg#153) and unblocks the pipeline from failing at this gate.
Confirmed failure: PreProjectAssessmentTask failed 2026-03-06 20:42 EST
on Mac Mini M4 Pro 64GB with Qwen 3.5-35B-A3B at num_output=8192.
82deutschmark added a commit to VoynichLabs/PlanExe2026 that referenced this pull request Mar 7, 2026
feedback_root_cause is the last field in NegativeFeedbackItem.
Local LLMs consistently omit trailing required fields in nested
JSON list items, causing 3 validation errors for ExpertConsultation
in ExpertReviewTask.
Confirmed failure: ExpertReviewTask failed 2026-03-06 22:57 EST
on Mac Mini M4 Pro 64GB with Qwen 3.5-35B-A3B (num_output=8192).
Same truncation pattern as SelectScenarioTask (PlanExeOrg#153) and
PreProjectAssessmentTask (PlanExeOrg#155, PlanExeOrg#156).
huangyingting pushed a commit to repomesh/PlanExe that referenced this pull request Jun 26, 2026
Resolves Dependabot security alerts in worker_plan/pyproject.toml by bumping to the first stable patched release of each package:
- aiohttp 3.13.5 -> 3.14.1 (alerts PlanExeOrg#152,PlanExeOrg#153,PlanExeOrg#156-PlanExeOrg#164)
- tornado 6.5.4 -> 6.5.7 (alerts PlanExeOrg#113,PlanExeOrg#114,PlanExeOrg#136,PlanExeOrg#155,PlanExeOrg#165,PlanExeOrg#166,PlanExeOrg#171)
- python-multipart 0.0.22 -> 0.0.32 (alerts PlanExeOrg#142,PlanExeOrg#149,PlanExeOrg#167-PlanExeOrg#170)
- urllib3 2.6.3 -> 2.7.0 (alerts PlanExeOrg#150,PlanExeOrg#151)
- marshmallow 3.24.2 -> 3.26.2 (alert PlanExeOrg#81), staying on 3.x to avoid the breaking 4.x major
transformers alert PlanExeOrg#137 is excluded: its only fix is the 5.x major line and the vulnerable Trainer class is never imported by PlanExe (handled separately).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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