Skip to content
Trazum

1.55.0

More than one machine

The arc closes on a format and a merge, not a service. Everything in this repository assumed one operator with the files on disk. Four people who each measured their own traffic had no way to combine what they measured without one of them gathering files by hand — and the tool whose whole argument is that it reads your bill without uploading it could not be the place everybody's bill got uploaded either. So the answer is a document and an arithmetic: each contributor runs profile --json where their traffic already is, and trazum rollup merges what comes back.

1.54.0 is not skipped by accident, and the number is not reused. The arc it names — the counter, per family — needs provider API keys this work did not have, and inventing a band is exactly the estimating-and-measuring merge this project spent 1.36–1.40 removing. The hole in the sequence is the record that an arc was jumped rather than dropped, and renumbering the plan to hide it would rewrite a document whose whole value is having been written before the code.

Added#

trazum rollup — several people's bills, one roll-up. Everything here assumed one operator with the files on disk: --by-source and owners divide a bill somebody already collected, and nothing combined bills nobody collected together. Each contributor now runs profile --json where their traffic already is and hands over the document; rollup merges them. A directory argument rolls up every .json inside it, so a shared folder people drop a document into is a roll-up without a shell loop.

A format and a merge, not a service. Nothing is uploaded and there is no account. That is the constraint the arc was written under: a tool whose argument is that it reads your bill without uploading it cannot also be the place everybody's bill is uploaded.

Four refusals, because most of a profile does not merge. Findings computed from individual calls — percentile shapes, conversation growth, repeated turns, truncation retries — are named in notMerged with the contributors that have them, rather than dropped. A day drawn from two contributors has no dearest label: the merged answer needs per-label-per-day spend no document carries, and taking the larger of two answers is wrong whenever a runner-up in both adds up to more than either winner. A contribution that does not conform is rejected by name and exits 1, because a machine that contributed nothing must not read like a machine that spent nothing. And the largest single call is a maximum, never a sum — four machines' largest calls added together is a call that never happened, in the direction that makes a context window look tight.

Each contributor's gaps stay with that contributor. Unreadable lines, unpriced calls, no clock, a partial clock, no sessions, no labels, duplicate lines: each listed under the machine that has it. Summed, they would say "3% of this roll-up is unpriced" when the truth is "one of your four machines is 90% unpriced and the other three are clean", which is the averaging-away the arc exists to refuse.

The one thing it cannot do, said every time. Overlap between contributors is unmeasurable: two people exporting the same traffic double the bill, and a merge of summaries cannot see it, because the raw lines a duplicate check needs are in no document. Every roll-up of more than one contributor carries overlap-invisible in cannotSay — and conform fails a roll-up that does not, along with one that rejected a contribution and does not say so. A format that carried the fields and lost those refusals would hand somebody a doubled total that looks audited.

roll-up is the tenth --contract name. Detection tests it before profile on purpose: a roll-up carries byLabelAndModel too, so testing the profile first would accept every roll-up as a profile and never apply the two refusals only a roll-up has to carry.

A roll-up can now contribute to another roll-up. Three teams roll up their own machines and the organisation rolls up the three. rollup accepts a roll-up document wherever it accepts a profile: every summable part carries the same field names, which is what makes the arithmetic free.

What is not summable is carried through deliberately, because each piece is a refusal that has to survive nesting or the format is worse than no format. Contributors are flattened, never collapsed — twelve machines stay twelve machines with twelve sets of gaps, each carrying via, the roll-up it arrived through. Rejections travel, with their via, so a machine whose document did not conform cannot be made to disappear by adding a layer. Caveats are unioned, so an inner roll-up that could not see overlap does not become an outer one that could. And a finding an inner roll-up refused to merge does not become mergeable by being handed on — the same finding from two roll-ups is one entry naming both sets of machines.

And the double count nesting makes possible is named. Handing over both a roll-up and one of the machines inside it counts that machine's money twice; the documents differ, so the identical-document check is blind to it and the name is what sees it. repeatedContributors states it and subtracts nothing — two teams genuinely running api.json is possible, and deciding between them by removing money is the repair this tool does not make.

A span is not a period, and the roll-up now knows the difference. A log whose latest record is the 5th may be a log of a quiet week or a log that stopped being written on the 5th — the records cannot tell those apart, and the first version read every contributor's span as its period. A profile run with --since/--until already carried the window it asked for; the roll-up carries it through as claimed, keeps claimedSpan apart from the observed span, and names every day inside a bounded claim that recorded nothing. Contiguous runs rather than a list of dates, so a year-long claim with three days of traffic is a handful of entries instead of three hundred and sixty-two strings.

A contributor that claimed nothing gets no-claimed-period rather than having its span quietly promoted to one; a claim with a single end gets claim-not-bounded; and a claim longer than ten years is kept and not walked, because these documents come from elsewhere and untilMs: 1e15 is a malformed document rather than a team with a long memory.

undatedExcluded travels too — the records a contributor's own window could not place — and is null when there was no window, never 0, because zero would say a window excluded nothing.

Fixed#

--help retyped the list of contracts, and it stopped at cost-answer. Two releases each added one and the help text named neither, one section below the USAGE block that a whole test suite exists to keep provider names out of. The list is now interpolated from CONTRACT_NAMES, and a test reads the names out of the CLI's own refusal and asserts every one appears.

The README said Trazum emits ten documents; the format page said eleven and twelve. Two pages, three numbers, one table. Both now derive from the same count, and the guard that checks the format page's ordinal derives it from the row count instead of matching the literal twelfth — the guard against a stale count had itself gone stale.

The roll-up statted a target before reading it. stat, branch on isDirectory(), then read the path — a check-then-act, and CodeQL reported it as a file-system race on the pull request that introduced the command. It asks once now: attempt the directory listing, read the error code, and let ENOTDIR mean this is a file. There is no window between two operations when there is only one. Guarded at the source rather than by behaviour, because both shapes behave identically on a filesystem nobody is racing — which is every filesystem a test runs on.

Five copies of the help-screen defaults lived in one test file. Adding a field to HelpDefaults made every one of them throw at the first .join: five failures, one cause. The help screen is rendered from data precisely so its enumerations cannot go stale, and a test that retypes that data is the staleness one layer down.