43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
# Reflection: Formatting is not business state
|
|
|
|
## Trigger
|
|
|
|
An early Booking parser interpretation treated a yellow source row as cancellation. The supplied real workbook showed
|
|
that a fully yellow row can still be the authoritative active Tour Code row, and the user confirmed that only explicit
|
|
source cancellation text should cancel it.
|
|
|
|
## Expected Behavior
|
|
|
|
The parser should derive replacement/cancellation from explicit business content and documented row order, not from
|
|
presentation-only cell formatting.
|
|
|
|
## Actual Behavior
|
|
|
|
A visual formatting heuristic could have removed a valid final Tour Code allocation.
|
|
|
|
## Root Cause
|
|
|
|
- Weak gate: a spreadsheet style was promoted to business meaning without an explicit contract or counterexample test.
|
|
|
|
## Evidence
|
|
|
|
- Files: `booking_ingestion/excel.py`, `tests/test_booking_excel_ingestion.py`
|
|
- Command output: the supplied workbook retains its yellow final row; the regression test
|
|
`test_yellow_formatting_alone_does_not_cancel_a_tour` passes.
|
|
- Docs involved: `.project-docs/40-domain/business-rules.md`
|
|
|
|
## Lesson
|
|
|
|
Spreadsheet color, font, border and other presentation metadata must remain non-authoritative unless the user explicitly
|
|
defines that formatting as a business field. When row state matters, prefer text/column contracts and add a real-style
|
|
counterexample before accepting the rule.
|
|
|
|
## Action
|
|
|
|
- Add check/eval: retain a yellow-row regression fixture and keep cancellation text-based.
|
|
- Update docs: promote the rule to durable Booking business rules.
|
|
|
|
## Promotion
|
|
|
|
Business rule plus parser regression test.
|