2 Commits

Author SHA1 Message Date
panda bd5bfbac2d fix: band-level windowed refine_layout + programmatic map_fields to prevent 91.5% content loss
Root cause: LLM receiving full 34k-char JRXML would regenerate from scratch
instead of modifying coordinates in-place, shrinking output to ~3k chars.

Solution (programmatic node control, not prompt engineering):

- New agent/jrxml_windower.py: decompose JRXML into header (never sent to
  LLM) + individual bands. Split bands >4000 chars at element boundaries.
  Reassemble with element count validation (>10% change = rollback).

- Rewrite refine_layout: per-band windowed LLM processing (~2-4k chars
  each). LLM cannot "reimagine" the entire report.

- Rewrite map_fields: 100% programmatic regex $F{field_N} -> real name
  replacement. Zero LLM calls, zero content loss.

- _sanitize_field_name: non-ASCII chars escaped to _uXXXX_ format for
  valid JRXML identifiers.

- Tests: 48 new unit tests (windower 28 + map_fields 20). All passing.
  Full suite 385 tests, zero regressions.
2026-05-24 08:55:38 +08:00
panda c2cae5665e fix: replace complex bat scripts with Python launcher + minimal bat wrappers
Root cause: Windows batch files written with LF endings caused cmd.exe to
misparse labels and Chinese characters, producing garbled "not a command"
errors. The Python launcher avoids encoding issues entirely.

- start.py: reliable cross-platform launcher (kill ports, start 3 services,
  wait for health, print status)
- start.bat / start_all.bat: minimal 4-line ASCII wrappers
- stop.bat: inline Python for port-based process killing
2026-05-23 09:32:32 +08:00