Travel approval Router / Orchestrator

This reference Blueprint selects the next approval user from one caller-supplied CSV routing table. It performs one routing decision and returns the matching rule. It does not send a notification, approve or reject a request, update a workflow engine, persist state, or execute downstream work.

Routing contract

The application supplies normalized request facts, a semantic table version, and CSV with this exact header:

rule_id,priority,rule_enabled,user_enabled,country_code,destination_level,amount_min,amount_max,currency,next_user

String conditions use exact matching; * is the only wildcard. Amount bounds are inclusive, and * means unbounded. Disabled rules do not match. The lowest numeric priority wins, independently of row order.

Four strict result branches make operational boundaries explicit:

Every result retains routing_table_version. Successful and unavailable results retain the exact row ID, priority, and user. Ambiguous results retain every best-priority candidate in CSV order.

Canonical table

fixtures/travel-approval-routing-v1.csv covers domestic, Level A standard and high-cost, foreign default, same-priority UK project, disabled-user, and disabled-rule behavior. The evaluation dataset embeds the same bytes as a multiline input, and the offline test compares it to the standalone CSV fixture to prevent drift.

Evaluation

The eight-case dataset covers domestic, foreign, amount boundaries, priority, no-match, same-priority ambiguity, disabled users, and disabled rules. Its canonical target is 8/8 exact semantic and schema passes:

pixiecore blueprint eval \
  examples/blueprints/router/travel-approval-routing/evaluations/travel-approval-routing.yaml \
  --seed=travel-routing-reference-1

The checked-in test uses the public evaluation runner and an offline fixture provider. A live provider comparison is opt-in and must record provider, model, model version, temperature, seed-equivalent setting, execution time, dataset version, and result artifact before making an accuracy claim.

Known non-supported inputs

The application is responsible for CSV production and access control. It must review table changes, keep rule IDs stable, and decide how to handle every non-routed status.