Skip to content

Instantly share code, notes, and snippets.

View rahul-holocene's full-sized avatar

rahul-holocene

View GitHub Profile
@rahul-holocene
rahul-holocene / freight-quote-revamp.md
Created May 1, 2026 12:20
Freight Quote Revamp — Technical Proposal (companion to web-backend#3201)

Freight Quote Revamp — Technical Proposal

Companion to web-backend#3201, which scopes the gaps. This doc proposes the broad direction; component-level design and sub-issues will follow.

A. Quote ingestion overhaul

Today, freight-quote documents are not associated with the LSP that issued them, and their extracted content is never surfaced to the user — they only feed freight-invoice extraction context. This needs to change at ingestion time.

LSP attribution. When a freight-quote document or quote-bearing email arrives, the system needs to identify which LSP it came from. The sender's email address is the primary signal — most LSPs are configured with one or more contact emails already. If the sender doesn't resolve to a known LSP, we fall back to LLM-based matching against the customer's available LSPs (using sender, subject, and content signals). If that also fails, the quote is captured as unassigned and surfaced for user selection.

@rahul-holocene
rahul-holocene / freight-audit-agentic-gist.md
Last active May 1, 2026 04:56
Freight Audit — Agentic Document Comparison (requirement + acceptance criteria, references feat/document-versioning)

Freight Audit — Improve Packing List Consumption

Problem

Freight Audit's document-comparison layer is built on brittle, identifier-based heuristics. It does not survive contact with real supplier documents and is the single biggest source of 3 AM pages for the ops team.

Three concrete failure modes from production:

  1. Duplicate Packing Lists slip through (or worse, get silently merged). Suppliers reuse PL numbers, omit them, restamp them on rescans, or mint a fresh one for what is logically the same shipment with corrections. Identifier-only dedup either creates noisy duplicate partitions ops have to manually reconcile, or — when the supplier reuses a number — silently drops a real second shipment.