Fixed#
The weekly price check read a table OpenAI had reshaped as nine new models. The "Specialized models" table now prints a model priced by prompt length as two rows,
gpt-6-cyber (short context)andgpt-6-cyber (long context). Read literally, each was a model missing from the catalogue andgpt-5.6-cyber, which the catalogue prices, a model gone from the page, so the scheduled run onmainfailed for a week on findings that were mostly this. The script reads the two rows as one model's two bands, compares the table's cache-write columns, and for the first time compares the long-context cache writes every per-model table prints (each agreed with the catalogue). No OpenAI row was added: five ids on the page have no model page, so no context window, andgpt-6-cyberhas one but no published cache-write price over 272K input tokens, which a row would have to invent. Each is listed inDELIBERATELY_UNPRICEDwith its reason and reported on every run.A promotion in its last 45 days could not be answered.
pricing-review.test.jsfails a promotional price that ends inside the window this tool calls its table current, so that somebody asks the provider whether the rise still stands. It failed on 2026-11-16 for Gemini 3.6 and 3.8 Flash ($0.75/$3.75 through 2026-12-31); Google's page was read that day and says the same, and the only ways to pass were to delete a promotion that is still running or to stay red until January. A promotion now records the day its end was last confirmed (promo.confirmedOn), the check asks for a confirmation from inside the window, and a promotion whose window has closed is refused whatever it records.The MCP server and the local HTTP API read an agent's session as a broken log. An agent asked what its own work cost reaches for the session it is in;
profile_usageanswered that transcript with "No usage records in that log", every line unreadable, andplan_savings,verify_savingsandPOST /savings/planand/savings/verifywith "no readable usage records". They now say what the text is and point at what converts it:import_usagewith the rightformat,POST /usage/import, or the CLI'sfrom-command for a provider report. One verdict in@trazum/core,notAUsageLog, now decides it for the CLI, the MCP server and the HTTP API alike, and the log inputs' descriptions nameimport_usagebefore anyone has to be refused.billsent people to commands that do not exist. Explaining rows it left out of an Anthropic or OpenAI usage report, it built the command's name from the shape's,from-anthropic-usageorfrom-openai-usage, and both answer "Unknown command". It now namesfrom-anthropicandfrom-openai, which give the reasons, and names nothing for batch results, which no other command reads. A test runs every commandbillcan point at.A coding agent's session handed to
profileread as a broken file.profile,plan,receiptand the other commands that read one usage log answered a Claude Code session with "No usage records in that file, 84 lines could not be read", whilebillreads the same file as it is. They now recognise the shapesbillreads, and refuse by name: what the file is,trazum bill <file>to read it as it is, and thefrom-command that turns it into a usage log they read. A provider's cost report is pointed atreconcile, asbillpoints it. A usage log is read exactly as before, and pays one parsed line for the check.A folder of agent sessions answered "No usage logs" and no more. Handed
~/.claude/projects, which holds one folder per project,profile,planandverifynow say they do not go into folders and thattrazum billdoes.receipthanded a directory namesbilltoo, and its help no longer offers<usage.jsonl|dir>: it never read one. All found by running the CLI on real Claude Code sessions.Sign-out was the one API route with no rate limit. Every call looks up the hash of whatever cookie arrived, from a caller who need not be signed in, and nothing bounded how often. It now spends the session bucket (60 a minute per address), the same as a session check, which is the same work. A refused sign-out clears nothing, because clearing the cookie without deleting its row would leave a live session the browser had forgotten. Found while writing the threat model, whose own sentence said every route was limited;
apps/web/test/threat-model.test.mjsnow fails any API route that answers without a limit.A body of the wrong shape threw instead of being refused. A body of
nullthrew in seven of the nine handlers that read one (/api/optimize,/api/compare,/api/write, saving and renaming a library prompt, and creating a share link), each a 500 with a stack trace in the log;ttl: "toString"threw while creating a share link, because the lifetime was looked up within; andllm.apiKey: 5was sent to the provider as a key. Every one is now a400that names the field.apps/web/test/body-schemas.test.mjssends seven malformed bodies (null, a list, a string, a number,true, an own__proto__key, an undeclared field) to all nine and requires a 400 from each, and nine faults planted in the validator and the routes were each caught.The privacy probe could fail a clean page on a busy runner. It began reading the bill once the network had been idle for 500 ms, and a runner under load hydrated later than that, so the page's own start-up requests (the session check, the optimizer's settings, the writer's first question) went out after reading had begun and were counted against it. The same commit passed on one run and failed on the other. The app's last first-render effect now marks the page started, and the probe waits for that mark and then for quiet before it pastes anything. With the page's CPU six times slower, the old probe failed five runs out of five and the new one passed every run at one, six, twelve and twenty times slower; CI now runs it at six, so a probe that stops waiting fails every time rather than now and then.
test/privacy-probe.test.mjskeeps the mark the app's last effect, the wait before the read and the slowed run in CI.Saves arriving together could pass a per-account ceiling on Postgres, and two new versions of one prompt could collide. The ceilings (200 prompts, 100 links) were counted in one statement and written in the next, so six saves at once at 199 prompts left 204 or 205 on a real PostgreSQL (three runs), where it now leaves 200. Two new versions read the same newest number and both tried to be the next, and the second failed on the unique constraint as a 500. Each count that decides a write now runs in one transaction after locking the account's or the prompt's row, so the second save waits and counts again. A prompt and its first version also commit together now. The store contract fires six saves at once at each ceiling on a real PostgreSQL; the old code fails it every time, and removing either lock fails it too. The memory driver was never affected.
The web API read any body as JSON, whatever it said it was. Every route that reads a body now answers 415 unless it is sent as
application/json, before reading it. That is OWASP ASVS 13.1.5 and 13.2.5, and it refuses the three types a form on another site can send without asking the browser first. The account menu's Delete account sent no type at all and is fixed with it; a test now checks every request the app sends with a body.An API response opened in a tab rendered instead of downloading. API responses now carry
Content-Disposition: attachment(ASVS 14.4.2), except the GitHub sign-in hops, which people navigate and must be able to read, and the account export, which names its own file. Checked against the built server as well as in tests. The ASVS level 2 mapping has no gaps left.Deleting an account failed on Postgres for anybody who had saved a prompt. A prompt version names its author with
author_id references trazum_users (id)and noon delete, and Postgres checked that reference before the cascade throughtrazum_promptsreached the versions. Every deployment with a database answered Delete account with a 500 for every account with a library. The memory driver deletes by hand and never showed it. The versions an account wrote are now deleted in the same statement as the account; no migration is needed.Share links on Postgres replayed default settings instead of their author's. The driver passed
JSON.stringify(settings)into ajsonbcolumn, postgres.js serialised it a second time, and the share page readsettings.leveloff a string. The object is now passed as it is, and rows written the old way are read correctly, so existing links recover without a migration.The accounts guide said account deletion did not exist, in its list of what is not covered, months after it shipped. Corrected, and the guide now documents the export and the security log.
The web page asked for the share list on every visit, and logged a failed request when there was no account to ask about. The Compare tab fetched
/api/sharesas it mounted, which a deployment with no accounts can only answer with503and a signed-out visitor with401; the browser logged either as a failed resource on every load of the production page. A share link belongs to an account, so the tab now asks only when the page's one session check found somebody signed in. Found by the REA audit below.
Added#
A card for when the repository's link is shared.
docs/assets/social-preview.pngis the 1280 by 640 image GitHub shows on a timeline or in a chat: the first line of the README, the command, and the billtrazum billprints for the two example projects, marked as sample data. Only the owner can set it, in the repository's settings. It is a screenshot ofdocs/assets/social-preview.html, andpackages/cli/test/bill-image.test.jsholds that page to the CLI's output: the total, the number of calls, and each project's and model's figure and bar on the row of the same name. Six faults planted in the page were each caught.Claude Fable 5.2 and Claude Mythos 5.2 are priced. Released 2026-11-09 at $8/$40, cache reads at $0.20 (2.5% of input), writes at $10 and $16, the Batch API at $4/$20 and fast mode at $16/$80, each figure read from Anthropic's pricing page and the two model pages on 2026-11-16. Until now every call to either read as unpriced: on this repository's own Claude Code session, 2.7.7 billed $20.38 across 194 calls and left 71 Fable 5.2 calls out of the total, more than half the money.
scripts/price-drift.mjsfound both on the weekly run the day they were released. Fable 5.1 is still served at the same prices; its page now calls it legacy, and so does its note.Every read of a person's saved prompts or share links is recorded (OWASP ASVS 4.0.3 8.3.5). The library list, one prompt, a rename (which answers with the prompt's whole history) and the list of one's share links each write a
library.readline with the account and the kind of route, never the text, the name or the id; asking for an id that is not the caller's writes the same line withnot_found, which is what guessing ids looks like. A stolen session's reading can now be told from its owner's by when it happened. A share link's public page still records no view, by design.apps/web/test/security-log.test.mjsplants the prompt, its name, its id and the share token and searches every line for them, and fails any handler that answers with saved prompts and records no read; five faults planted in the routes were each caught.A threat model, a secure coding checklist and a procedure for rotating each secret (OWASP ASVS 4.0.3 1.1.5, 1.1.7, 1.6.3, 11.1.5), in
docs/compliance/. The threat model covers what a hosted Trazum is worth attacking for, who would try, where the boundaries run, twenty threats each with what answers it, what is accepted and why, and a table of every limit the server sets with its value and the risk that chose it. The checklist gives each rule for a route, a page, the packages and the workflows the test that holds it. The rotation page says, for the GitHub client secret, the database URL and each workflow secret, what depends on it, what breaks while it changes and how to tell it worked.apps/web/test/threat-model.test.mjskeeps them true: a limit added or changed without its row, a variable the app reads or a secret a workflow reads that the rotation page does not cover, a checklist item nothing holds, or a path that is gone, each fails the build. Thirteen faults planted in the code and the documents were each caught. They are drafts for the owner to approve.A method an API route does not serve is refused and recorded. Next answered a method a route does not export with a 405 of its own, before any of the app's code ran, so nothing recorded it, and a cross-origin preflight (
OPTIONS) was answered as though the app served one. The middleware now refuses both with 405, anAllowheader naming what the route does serve, and aninput.refusedline with the reasonmethod_not_allowedand the route with any id or token redacted (OWASP ASVS 14.5.1). HEAD passes wherever GET is served. The table the middleware reads (lib/api-methods.ts) is written by hand, sotest/api-methods.test.mjsimports every route module and holds the table to what each one exports: a route or a method added without its row fails CI instead of being refused in production. Seven planted faults were each caught, among them a method missing from the table, HEAD refused, and a parameter route chosen over a literal one. ASVS 14.5.1 moves to met (122).A line for every session cookie that opens nothing. A cookie whose session has expired, been revoked or never existed now writes an
auth.sessionfailure line,unknown_session, and one that policy ended writessession_endedwith the account (OWASP ASVS 7.2.1). A visitor with no cookie is not an authentication decision and writes nothing, and no line carries the token or its hash./api/auth/sessionnow clears such a cookie where sessions are durable, so a browser stops presenting it on every page load and the log records it once rather than once a page; not on the memory store, where another instance may still hold that session and clearing the cookie would sign its owner out of it. Six planted faults were each caught, from a visitor recorded to the hash written into the line. ASVS 7.2.1 moves to met (121).See where you are signed in, and end any one session. Your sessions in the account menu lists every live session the account has, with when it started, when it was last used (to within a few minutes) and which one is this device, and selecting another ends it (
GETandDELETE /api/auth/sessions). Ending another session, or all of them with Sign out everywhere, now needs a sign-in in the last fifteen minutes; otherwise the menu sends you through GitHub and back first. That is OWASP ASVS 3.3.4's re-authentication, and it means somebody holding only a copy of your cookie cannot sign you out of your other devices. Nothing identifies a device beyond those times: that would mean keeping a user agent or an address, and the app keeps neither. The page holds an id derived from each session's hash, never the token or the hash. Signing in again from a browser now replaces that browser's session instead of leaving the old row in the table until it expired. Tested on both store drivers and a real PostgreSQL; nine planted faults were each caught, among them an id cut from the hash, which the first version of the test let through. ASVS 3.3.4 moves to met (120), and the compliance pack's list of what code can still close now names every partial row a pull request could close, not three of them.A line for every request the web app refuses for what it sent. A body that does not say it is JSON, one that will not parse, and a value a route will not take each write an
input.refusedsecurity line with the reason (not_json,invalid_json,invalid_input), the route and, on a signed-in route, the account's internal id. Never the answer, which quotes the input so a person can see what to fix: an unknown rule's name or a prompt name would otherwise reach the log. Every route that reads a body exports its handlers through one wrapper that records any 400, 413, 415 or 422 it answers, so a refusal added later is recorded without anybody remembering to; a test holds every such route to the wrapper and every parse failure to its mark, and requires any other 400 (the GitHub callback's) to be a decision already written down. The account deletion answers a body that will not parse with its own message now, instead of asking for the login. Eight planted faults were each caught, from a wrapper that writes nothing to an answer copied into the line. OWASP ASVS 7.1.3 moves to met (119).Every GitHub release carries a bill of materials.
trazum-v<version>.cdx.jsonis a CycloneDX 1.5 document listing each workspace and every third-party package any of them needs at run time (150 today, 43 of them optional: platform binaries and peers used when present), with version, licence, purl, SHA-512 and tarball, and what depends on what.scripts/sbom.mjswrites it from the lockfile in the release job, before anything is uploaded, and checks it first, so a bill that fails stops the release while nothing is published; the dry run makes it too. It does not usenpm sbom --omit dev, which on this tree leaves out seven packages a runtime dependency needs whenever a development tool needs them as well (Next'spostcss, Radix'stslib, sharp'sdetect-libcamong them).test/sbom.test.mjs, now part ofnpm test, makes the same document on every pull request and requires it to hold everythingnpm ls --omit devfinds installed and everythingnpm sbomlists, with the same version, licence and hash; nine planted faults, from following development dependencies to a release step that attaches nothing, were each caught. OWASP ASVS 14.2.5 moves to met (118).A line for every error the web app did not catch.
onRequestErrorinapps/web/instrumentation.tswrites one structured line per uncaught error: the route's pattern (/api/prompts/[id], never the path requested, so no token in a URL reaches the log), the method, the kind and the digest the error page shows, so a person's report can be matched to its line. The error's message, its stack, the headers and the body are never written: a parser's or a driver's message can quote the input it failed on. Checked against the built server with the database unreachable, and by a test that plants secrets in the error and the request. OWASP ASVS 7.4.1 and 7.4.3.Every OWASP ASVS 4.0.3 level 2 requirement, mapped.
docs/compliance/asvs-l2.mdtakes all 259, V1 to V14, and says where the hosted web app stands on each: 111 met, 40 partly, 3 gaps, 16 for the owner, 89 that do not apply (most of V2, because there are no passwords). Each met or partial row names the files that show it.compliance.test.jsholds the page to the standard's own ID list, checks every cited path exists and every gap is listed as remaining work, and recounts the summary; six faults planted in the page were each caught. The gaps: JSON routes accept anyContent-Type, and API responses carry noContent-Disposition. The requirement text is paraphrased, not copied; the page links the standard.Sign-in, session and library rate limits counted across instances. They were counted in each server's memory, so a platform running several instances multiplied every limit by however many served a caller. With accounts and a database they are now counted in
trazum_rate_limits(migration004_rate_limits.sql, embedded inn0-app.jsontoo) in one atomic statement per request, by the clock's minute. The table never holds an address: the bucket is an HMAC of it under a key derived with HKDF from the GitHub client secret, which the database does not hold, and each row lives one window. The instance's own limiter still runs first, so once one instance alone is over the limit its further requests cost no database write, and it stands alone if the table is missing or the database unreachable, which the log says once. The anonymous tool routes stay per instance on purpose: they protect that instance's CPU.The web store's contract, run against a real PostgreSQL in CI.
apps/web/test/store-contract.test.mjschecks users, sessions and their expiry, prompts and versions, share links, the admin census and account deletion on the memory driver always, and on PostgreSQL whenTRAZUM_TEST_DATABASE_URLnames an empty database, after applying every migration indb/. CI starts the runner's own PostgreSQL, so no container image is pulled, and fails if the database is missing rather than skipping. It found both fixes above on its first run; each was proven by reverting it and watching the contract fail.A compliance readiness pack.
docs/compliance/says first that Trazum is not certified against SOC 2, ISO 27001 or any other standard, then prepares for an audit: what SOC 2, ISO 27001, OWASP ASVS and CASA each assess and who issues them, the system an auditor would scope (the hosted web app; the CLI, MCP server and libraries run on the user's machine and are out of scope by design), 23 controls with the files and tests that prove each and their SOC 2, ISO 27001 and ASVS references, what remains in code, and the organisational work only an owner can do.compliance.test.jsfails the build when an evidence path stops existing, a row loses a reference, or any page or web string claims a certification.A security event log for the web app. Sign-ins and every way one is refused, sign-outs, account exports and deletions, share links made and revoked, admin access, and every refusal of the library, shares or admin APIs now write one structured line to standard output, with the account's internal id and a reason code. Never a session token or its hash, an OAuth code or state, a GitHub login, name or avatar, an IP address, a share token or prompt text: the test plants each one in a request and searches every line for it, and capability tokens in a route are replaced with
:token.Download my data.
GET /api/account, and a link in the account menu, return everything an account holds as one JSON file: the profile, every saved prompt with every version, and every live share link with its text. Session hashes are left out, because they would open nothing and belong to nobody's export. An account could be deleted before; now it can also be taken away.Permissions-PolicyandCross-Origin-Opener-Policyon every page. Camera, microphone, geolocation, payment, USB and motion sensors are denied; the clipboard is left alone because the copy buttons use it. No other window keeps a handle on this one.The web audit runs on every pull request.
scripts/privacy-probe.mjsserves the standalone web build, pastes a log carrying marker strings into the Bill tab in Chrome, reads the bill, and fails CI if a marker appears in any request, a request goes to another origin, reading the bill asks the server for anything but the page's own code, or a same-origin request fails or is answered 400 or worse. The verdict is a pure function with its own tests; the probe was proven by planting afetchof the pasted log in the Bill tab, which it caught five ways.playwright-coreis installed at a pinned version with--ignore-scriptsoutside the workspace and drives the runner's Chrome, so nothing published depends on it.An independent audit with REA, written down.
docs/audit-rea-2026-11.mdrecords what REA 6.8.0 found reading the four 2.7.7 packages as npm serves them and the production web page while a log with marker strings was pasted into it: no marker in any of the 16 requests, every request to the page's own origin, and every network and process surface in the packages opt-in and guarded. It says what static analysis and one browser scenario do not establish, and how to reproduce it.SECURITY.mdlinks it.
Changed#
- The README opens on what the tool does for the person reading it. The
first line was "Understand your AI spend. Decide what to change."; it is now
"Know what your AI agents cost, per project, without your prompts leaving
the machine.", followed by what one command reads and prints. A new section,
Why the number holds up, says in four points what stands behind a figure:
the weekly comparison with each provider's pricing page, the billing rules
applied call by call, that a model with no published price is named rather
than counted as $0, and that the analysis runs on the reader's machine with
no third-party package installed by the CLI. Each point was checked against
the code before it was written. The header gains npm version and download
badges.
scripts/build-wiki.mjsfinds the introduction by its new heading. - Every body the web API accepts is checked against a declared schema,
and anything else is refused by name (OWASP ASVS 4.0.3 5.1.4, 13.2.2).
The nine bodies are listed in one file,
apps/web/lib/body-schemas.ts, written with a validator of under 250 lines and no dependency (apps/web/lib/schema.ts); a route keeps the parsed body asunknownand reads nothing from it but the language it asked for until its schema has passed it. This is stricter than before, on purpose: a field an endpoint does not take, such as a misspeltdisable_rules, was dropped and its default used, and is now a400;reorder,suggest,applySuggestionsandoptimizeBothwere honoured only on a literaltrueand anything else read asfalse, and a value that is nottrueorfalseis now a400;levelother thansafeoraggressiveread assafeand is now a400, in a share link's settings too;llm.providermust beopenaioranthropic; andcallsPerMonthoravgOutputTokensthat are not numbers in range are refused by/api/writerather than ignored. The app's own pages send none of these, and the messages it already had are kept where it had them (a missing prompt, an unknown rule or model, everyusagefield), in English and Spanish. A test holds each route to the schema the file lists for its route and method, and to reading its body in no other way. - A web session now ends after a day without use, as well as thirty days
after sign-in. Until now a session lasted thirty days however long it sat
unused, the most OWASP ASVS 4.0.3 V3.3.2 accepts at level 1. Each request
moves its end one idle window on, never past the lifetime, and writes at
most once every five minutes rather than on every request. Both are
configurable:
TRAZUM_SESSION_IDLE_MINUTES(5 to the lifetime, default 1440) andTRAZUM_SESSION_MAX_HOURS(1 to 720, default 720);12and30are ASVS level 2. A value out of range turns sign-in off and names the variable, rather than running on the default. No migration: the session's existing end column now holds the idle end. Every session issued before this change ends at its next use, because how long it sat unused was never recorded; signing in again is one click. Lowering either setting later ends the sessions it no longer allows, the same way.