feat: Jadlog quotes by the larger of the real and the cubed weight
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 3m5s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m1s

The client's box is 56 x 14 x 14 cm and weighs 0.30 kg; the film is 0.075 kg
per metre. Jadlog charges the larger of the real and the cubed weight, and this
box is large for its weight, so quoting the real weight alone would price
below what Jadlog charges. JADLOG_CAIXA_CM and JADLOG_CUBAGEM_KG_M3 (both or
neither) give the cubed weight; the quote sends the larger. Until the
contract's factor is set, the Kanban's Frete card says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-01 16:20:44 -03:00
parent b9ebdc0fdb
commit 26c46ccc1d
7 changed files with 89 additions and 7 deletions

View File

@@ -274,6 +274,13 @@ From the report already sent. These are dated promises, not backlog.
production stack now takes the Jadlog settings, so the probe runs from the
worker's console. Cubed weight is not computed: the client's box sizes will
tell whether it is needed.
**Packaging received (2026-10-01):** one box, 56 × 14 × 14 cm, 0.30 kg; film
1.50 kg per 20 m (0.075 kg/m); shipped with Jadlog's own insurance, which is
what `tpseguro: "N"` (normal) already quotes on the order's value. The box is
large for its weight, so the cubed weight matters: `JADLOG_CAIXA_CM` and
`JADLOG_CUBAGEM_KG_M3` make the quote send the larger of the real and the
cubed weight. The contract's factor is still unknown; until it is set the
Kanban's Frete card says the quote uses the real weight only.
- `[~]` 1.3 — Idempotent Tiny/Olist order creation with order-number traceability.
Confirm endpoints, tag behaviour and rate limits first.
**Groundwork (2026-09-24), API v3 by decision:** OAuth2 against Tiny's