# RDF Export Plugin – Bugfix Report (Flowchart Tweaked metadata regression) ## Summary - Investigated pytest failure triggered by `test_generated_metadata_fixtures_round_trip` where Flowchart fixtures caused `ArrowWithoutIndividualAsSourceException`. - Determined root cause: legacy DrawIO fixtures still using `` metadata envelope were ignored by `_extract_drawio_metadata`, so the `kb` prefix never reached the classifier, leaving decision nodes treated as literals. Metadata patcher also overwrote legacy prefixes when injecting modern metadata. - Added a new override (`legacy/overrides/metadata_extraction.py`) so `_extract_drawio_metadata` recognises both `` and legacy `` wrappers and harvests existing preamble entries. - Updated `tests/utils/patchDrawioWithMetadata.ts` to merge any pre-existing preamble entries into the generated metadata, preserving legacy prefixes when the fixture already declared them. - Regenerated the parser via `python -m meta_builder -o legacy/draw_io_parser.py` and reformatted with Ruff & Prettier. ## Commands Executed - Environment prep: `bun install`, `bun run setup:uv`, `bun run setup:pyodide`, `bun run test`, `bun run check` (with supporting lint/format subtasks), plus targeted `pytest legacy/tests/test_patched_parser.py::test_generated_metadata_fixtures_round_trip` during diagnosis. - Formatting: `ruff format`, `prettier --write .` (with CI log-level guard) to satisfy repository style gates. ## Testing - Targeted pytest run for `legacy/tests/test_patched_parser.py::test_generated_metadata_fixtures_round_trip` confirmed the regression fix locally before rerunning the full suite. - `bun run test` (legacy + TypeScript + Pyodide integration) and `bun run check` executed cleanly with all existing skips unchanged. ## Notes - No CHANGELOG entry provided for this focused bugfix per existing project cadence. - Flowchart fixtures continue to be skipped in baseline regeneration until dedicated `.nt` fixtures exist; behaviour unchanged by this patch.