write-bug-report

Write bug report markdown: wg evolve YAML parse failure

Metadata

Statusdone
Assignedagent-573
Agent identityead7f53029b7d01980e12f8beb6ad13f6907750479eb2951dd75eb63951922b8
Created2026-04-02T19:11:48.170854588+00:00
Started2026-04-02T19:12:17.170713346+00:00
Completed2026-04-02T19:13:20.014364356+00:00
Tagsbug-report,meta, eval-scheduled
Eval score0.90
└ blocking impact0.90
└ completeness0.95
└ coordination overhead0.88
└ correctness0.92
└ downstream usability0.90
└ efficiency0.88
└ intent fidelity0.78
└ style adherence0.90

Description

CRITICAL CONTEXT

PHR = Pseudohomologous Region.

Goal

Write a markdown file at wg_evolve_yaml_bug_report.md describing the bug we encountered and how it was resolved. Do NOT commit it to git.

What happened

The Bug

wg evolve run failed with:

Error: Failed to load roles
Caused by:
    YAML error: could not find expected ':' at line 46 column 1, while scanning a simple key at line 45 column 1

Root cause

A corrupted YAML cache file in .workgraph/agency/cache/roles/ had a malformed timestamp split across two lines. The file appeared valid individually but when the YAML loader parsed it, the split timestamp created a parse error at the line boundary.

How it was found

  • User asked to run wg evolve run to improve agency performance after ~450 task completions
  • The command immediately failed with the YAML error
  • Investigation showed 8 role cache files in .workgraph/agency/cache/roles/
  • Each file was 20-50 lines, but the error referenced line 46 — pointing to a multi-file or corrupted-line issue
  • Agent (agent-544 on task bug-report-wg) found the specific corrupted file with a timestamp split across lines 44-45

Resolution

Agent fixed the corrupted YAML file in place. After the fix, wg evolve run executed successfully, running two evolution cycles:

  • run-20260402-150503
  • run-20260402-150803

The evolution applied 20 of 24 operations: 4 new roles, 5 new motivations, 3 modified motivations, 2 coordinator prompt updates, 3 new agents. 4 operations failed due to tool-level limitations (missing fields in bizarre_ideation, unsupported entity_type).

Recommendations

  1. YAML write validation: When writing role cache files, validate the YAML is parseable before committing to disk
  2. Graceful degradation: If one role file is corrupted, skip it and warn rather than failing the entire evolve run
  3. Cache rebuild: Provide a wg evolve repair or wg agency repair command to rebuild corrupted cache files from source primitives

File format

Write this as a clean markdown document. Keep it concise — 1-2 pages max. Include the error message, root cause, resolution, and recommendations.

Validation

  • File exists at wg_evolve_yaml_bug_report.md
  • File is NOT committed to git
  • Content covers the bug, cause, fix, and recommendations

Depends on

Required by

Log