feature(intermodal) INT-25 billingTimeLine #260 - #282
craig-o-curtis merged 5 commits into
Conversation
ReviewThe library side is clean. Two confirmed bugs in the Billing Deadlines widget, both from one root cause. I read Both findings are in 1. An annotated anchor loses its marker and a lane cell
Anchor plus three 30-day windows, through
The deadlines the widget prints are correct. Only the drawing is wrong, in three places:
An expanded year goes the other way, because 2. A null result can render with no reason
if (request < invoice) return { reason: "request-before-invoice" };With Suggested fixBoth go away if Smaller things
|
Add , the invoice, dispute and resolution deadlines around a demurrage or detention invoice. Every window length is the caller's number, with no defaults. - Day zero is the anchor and the deadline is anchor plus days on the ISO calendar. A date is by the deadline when it is on or before it. Thirty days across a DST change or a leap day is thirty dates. - The chain fills in as its dates exist. With only an anchor it is a forecast. A request without an invoice, or dated before it, returns null. - An agreed resolution date on or after the request replaces the computed one. - The two booleans compare dates and say nothing about liability. GMT tracks no law. The new code, docs and INT-12's shipped text now name no statute, regulation, agency or jurisdiction. Tariff facts stay, labelled as tariff terms. Docs site: a billing deadlines guide, three scenarios, seven mistakes, and the Billing Deadlines tool, which is also a Dox chat tool. The INT-12 guide now ends by linking forward to the new guide. Every accent colour used as text now uses its ink token, and the muted text colour was retuned, so all text clears 7:1 in both themes.
Keep regulated numbers out of the plan. Eight hours-of-work stories were one duty-log engine each carrying a regulator's numbers; they become CORE-76 (#283), with every limit a caller parameter. Advance filing folds into TRAN-10 and TRAN-57; length of stay into dwellTime and HLTH-38's guide. Twelve stories lose a default, a table or a regime enum; seven lose a citation or a jurisdiction label. Professional-body and treaty numbers are treated like law; bundled data is limited to standards-body data and operator calendars. The tracker is 66 stories and states the plan without a decision log.
Remove the last references to the deleted spike summary. Link the verification files under research/spike-2026-09/ instead, and state the findings and the Core primitives in the present tense.
0bf67f7 to
0632081
Compare
The Billing Deadlines widget compared the typed date text with < and >, while billingTimeline compares real dates and returns plain ISO. An annotated date such as 2026-03-01[u-ca=iso8601], or one with a leading +, lost its anchor mark and got the wrong number of lane cells. Its annotation reached the strip summary and the verdict line, which screen readers read aloud. A request dated before an invoice written with a leading + showed NO SIGNAL with no reason. - The strip, the summary and the verdict lines show the plain ISO date the library returns. The printed call keeps the text as typed, because it is the real call. - Every date comparison uses Temporal.PlainDate.compare. Plain ISO strings still sort wrongly past year 9999 and for negative years. - Nine new widget tests run against the real library. They cover annotations, a leading +, both sides of year 9999, negative years and both null reasons. - The BillingWindows doc now mentions the optional agreed resolution date.
|
@baldurpan Thanks. Both findings are confirmed and fixed. The raw-string split: yes. We kept Plain ISO alone wasn't enough. Plain ISO strings still sort wrongly outside years 0000–9999. New tests run against the real library for Smaller things. The |
…ng-timelines-46-cfr-541
Summary
Adds
billingTimeline, which works out the deadline chain around a demurrage or detention invoice: the last date to issue it, the last date to dispute it and the last date to resolve the dispute. Every window length is a caller parameter with no default. The PR also makes GMT track no law. It cleans the INT-12 text to match, adds the docs pages and the Billing Deadlines tool, and brings all accent text on the site up to 7:1 contrast.Closes #260.
What Changed
1.
billingTimeline(intermodal/calculate)billingTimeline(dates, windows)returnsinvoiceDeadline,issuedByDeadline,disputeDeadline,requestedByDeadlineandresolutionDeadline.null.null. A request without an invoice, or dated before it, returnsnull.agreedResolutionOn, when on or after the request, replaces the computed resolution deadline.BillingDates,BillingWindowsandBillingDeadlines.2. GMT tracks no law, and the INT-12 text is cleaned up
freeTimeExpiry,chargeableDays,demurrageClockandinternal/freeTimeLedger, the test labels, the guide, scenario and mistakes pages, the Free Time Ledger tool, both READMEs, the INT-12 changeset andpackages/gmt/skills. No behaviour changes, and no@examplechanges beyond one label.3. Docs site
guides/industries/intermodal-billing-deadlines.mdx.invoice-a-day-late,re-bill-anchored-on-the-wrong-dateanddispute-window-from-a-contract.mistakes/intermodal.mdx.tools/billing-deadlines.mdx): a day strip with three shaded windows, no default windows, and presets labelled by their numbers. It is also the chat toolshowBillingDeadlines, and its permalink carries every number as a string.4. Site-wide 7:1 text contrast
-inktheme-role token.--gmt-ice-dimwas retuned to at least 7:1 in both themes.--gmt-ice-dim-fillkeeps the old value for non-text fills.5. Context
Why
Validation
pnpm run validateexits 0. It runs deps check, test-markers, build, stats check, temporal-compat, upstream, api-surface, lint, typecheck and every test.packages/gmthas 36,975 tests in 674 files.apps/doxhas 4,617 tests in 83 files.gmt-oxlinthas 97 tests in 15 files. All pass.prefers-reduced-motioncheck pass.Risk / Impact
Low for the library. The new function is additive, and the INT-12 changes are to text only. Medium for the site: the contrast changes touch shared tokens on every page, and visual:diff reviewed them.
Release
.changeset/steady-ledgers-billing-deadlines.mdis aminorbump for@northguild/gmt. This PR also edits the text of the pending INT-12 changeset,.changeset/patient-gates-free-time.md. Merging publishes nothing; a release PR ships it.Staging note
gmt-tokens.css,gmt-globe.cssandgmt-a11y.css: those are contrast and forced-colours fixes, not globe shading.a05ddb0, which replaced the earlier0a8c4a4on this branch. It also carries the globe glow and haze tokens and INT-58'scontext/dox/built.mdlines.a05ddb0is not onmain, so this PR includes it unless it is split out.Checklist