serial nice19; private HOME/XDG_CONFIG_HOME/TMPDIR/MOSAIC_CONFIG; unchanged whole-file budgets
limits: {"event":"limit-reached","business":"demo","check":"daily-quota","export":"mayLaunch","subject":{"instance":"coder","provider":"anthropic","model":"opus","account":"jason-max"},"path":["tokens","daily","jason-max"],"limit":0,"count":0,"unknownTurns":0}
usage: {"event":"usage-unknown","business":"demo","run":"run1","instance":"coder","turn":"5bb2f720-5e85-4a68-a925-a3353c40a2f8","source":"@none","code":"baseline-unknown"}
limits: {"event":"limit-reached","business":"demo","check":"daily-quota","export":"mustStop","subject":{"instance":"coder","provider":"anthropic","model":"opus","account":"jason-max"},"path":["tokens","daily","jason-max"],"limit":0,"count":0,"unknownTurns":1}
usage: {"event":"usage-unknown","business":"demo","run":"run1","instance":"coder","turn":"705b4abe-0076-4b91-a1cc-5086242adeed","source":"@none","code":"baseline-unknown"}
✔ REQ-LIMIT-2 runtime: limits counts the daily quota, and mayLaunch refuses only the account at it (161.759642ms)
✔ REQ-LIMIT-4 runtime: a run bound with the account writes it on its usage records and stops at the quota (143.832834ms)
✔ REQ-LIMIT-4 runtime: a run bound without an account records null and the daily quota never stops it (121.34683ms)
✔ REQ-LIMIT-4 bindLaunch keeps the account off session.launched, refuses one that is not an identifier, and takes null as none (69.700044ms)
✔ REQ-LIMIT-3 limitLeaves finds every limit object and skips the agent numbers (1.251176ms)
✔ REQ-LIMIT-3 limitLeaves takes token limits at schema depth only, whatever their names (0.204566ms)
✔ REQ-LIMIT-3 with no check switched on a launch is allowed, a turn never stops, and every limit is not enforced (51.271224ms)
✔ REQ-LIMIT-3 a fixture check that refuses refuses the launch and stops the turn, logged with the limit and the count (52.372536ms)
✔ REQ-LIMIT-3 a report that omits a limit shows it not enforced; a counted entry and a reason come through (45.813258ms)
✔ REQ-LIMIT-4 each check gets the business, a copy of the limits, the subject, the records and the time (54.966516ms)
✔ REQ-LIMIT-4 fail closed: a throw refuses, stops and fails the report, naming the check and the code (45.689186ms)
✔ REQ-LIMIT-4 fail closed: a malformed answer, a promise, a rejected promise, a non-boolean or a bad hit is malformed-answer (47.849713ms)
✔ REQ-LIMIT-4 fail closed: a check switched on but not loaded refuses, stops and fails every limit as not-loaded (48.476916ms)
✔ REQ-LIMIT-4 state(), never-loaded case: before any load the report shows not enforced, or not-loaded for a switched-on check (50.630185ms)
✔ REQ-LIMIT-4 state(), first-load-refused case: a check refused on its first load is not-loaded in mayLaunch, mustStop and report (43.636714ms)
✔ REQ-LIMIT-4 fail closed: an unreadable organization file refuses and stops with check null; the report throws (43.52912ms)
✔ REQ-LIMIT-4 fail closed: unreadable records refuse and stop with check null and fail the report (0.50935ms)
✔ REQ-LIMIT-3 the shipped token-limit, through the real loader, counts known records only since the limit was set (85.225278ms)
✔ REQ-LIMIT-3 a token limit for a provider named limit is counted and refuses, beside an agent limit of the same name (51.638301ms)
✔ REQ-LIMIT-3 core reaches limit checks only through the plug-in loader (1.900971ms)
✔ P5 missing, ambiguous or invalid model key lookup fails closed without leaking a lookup error (52.673427ms)
✔ P5 trusted lookup uses the retiring run key rather than the agent current key (41.052561ms)
✔ P5 actual model metadata lookup rejects missing/ambiguous owners and never cross-attributes a retiring run (0.486898ms)
✔ REQ-LIMIT-4 a role run at its limit stops at the end of its turn: RESULT and read land first, the claim is revoked by limit-check (142.265785ms)
✔ REQ-LIMIT-4 the stop also lands on state; a run with no stop ends without a limit (186.467373ms)
✔ REQ-LIMIT-4 fail closed: a mustStop throw or a malformed answer stops the run, naming the bus and the code (423.452103ms)
✔ REQ-LIMIT-4 a thread run at its limit is released with the reason, and its end record names the limit (110.322117ms)
✔ REQ-LIMIT-4 a broker with no limit checks configured never stops a run (77.036392ms)
limits: {"event":"limit-reached","business":"demo","check":"token-limit","export":"mayLaunch","subject":{"instance":"coder","provider":"zai","model":"glm-5.3-flash","account":null},"path":["tokens","instances","coder"],"limit":0,"count":0,"unknownTurns":0}
organization: {"event":"reload-needs-restart","business":"demo"}
usage: {"event":"usage-unknown","business":"demo","run":"run1","instance":"coder","turn":"071301b4-8009-4918-9b07-39907d1d5082","source":"@none","code":"baseline-unknown"}
limits: {"event":"limit-reached","business":"demo","check":"token-limit","export":"mustStop","subject":{"instance":"coder","provider":"zai","model":"glm-5.3-flash","account":null},"path":["tokens","instances","coder"],"limit":0,"count":0,"unknownTurns":1}
usage: {"event":"usage-unknown","business":"demo","run":"run1","instance":"coder","turn":"231aab8c-068f-4e5a-81e9-19b1cf7d34cc","source":"@none","code":"baseline-unknown"}
✔ REQ-LIMIT-3 REQ-LIMIT-4 runtime: limits carries the token count, mayLaunch refuses at the limit, a reset moves since (248.63219ms)
organization: {"event":"reload-needs-restart","business":"demo"}
✔ REQ-LIMIT-3 runtime: with no limit check switched on, the limit shows not enforced and every launch is allowed (87.393715ms)
✔ REQ-LIMIT-4 runtime: the broker asks the shipped token-limit after a turn, and the run at its limit stops on its next receive (140.096907ms)
✔ REQ-LIMIT-4 runtime: with no usage source a turn is unknown, counts zero and stops nothing under a limit of 1 (122.214342ms)
✔ REQ-LIMIT-3 runtime: switching a limit check on with plugins.set loads it without a launch or a turn (161.718448ms)
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2817f62132a8"]}
model-proxy: {"action":"proxy.reconcile","addedKeyIds":[],"removedKeyIds":[]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2817f62132a8"]}
model-proxy: {"call":"PUT /v8/management/config/access/api-keys","status":200,"keyIds":["2817f62132a8","e87aa1b93018"]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2817f62132a8","e87aa1b93018"]}
model-proxy: {"action":"proxy.key.issued","keyIds":["e87aa1b93018"],"instance":"demo/coder"}
model-proxy: {"call":"GET /v1/models","status":200,"keyIds":["e87aa1b93018"]}
organization: {"event":"reload-needs-restart","business":"demo"}
limits: {"event":"limit-reached","business":"demo","check":"daily-quota","export":"mustStop","subject":{"instance":"coder","provider":null,"model":null,"account":null,"modelKeyId":"e87aa1b93018"},"path":["tokens","keys","e87aa1b93018"],"limit":2,"count":2,"unknownTurns":0}
limits: {"event":"limit-reached","business":"demo","check":"daily-quota","export":"mayLaunch","subject":{"instance":"coder","provider":"fixture","model":"fake","account":null,"modelKeyId":"e87aa1b93018"},"path":["tokens","keys","e87aa1b93018"],"limit":2,"count":2,"unknownTurns":0}
organization: {"event":"reload-needs-restart","business":"demo"}
✔ P5 real runtime binds stack usage to issued key, daily stops at stack count and human-only telemetry settings pass broker contract (311.047592ms)
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
organization: {"event":"reload-needs-restart","business":"demo"}
✔ plugins and plugins.set refuse every non-human session and a forged actor, and pass only the patch with the verified actor (99.333676ms)
✔ runtime: the switch changes the organization file, the receipt carries the actor, and a bad shape, an unknown module and a stale revision are refused with nothing written (257.002212ms)
✔ vikunja:19/309 through the broker, a patch switches the kinds it names and keeps the rest; null removes one kind and is trailed (196.173099ms)
✔ P5 usage plugin off by default, default poll is 15 seconds and configured polls skip early ticks (58.628561ms)
✔ P5 safe telemetry stores failures per key and proxy-labelled accounts; no client/upstream value enters store/log/view or quota records (52.79243ms)
✔ P5 unknown msk key goes only to value-free reconcile log and other businesses stay isolated (42.569864ms)
✔ P5 queue failure is safe, does not enforce and does not retry before poll deadline (41.831504ms)
✔ P5 retiring key keeps attribution and telemetry rows remain append-only across reader restart (47.808191ms)
✔ P5 malformed queue batch is atomic: no valid prefix, body or credential can reach store/log/view (43.023649ms)
✔ P5 concurrent ticks issue one bounded queue read and a closed collector never polls again (42.774113ms)
✔ REQ-LIMIT-4 usage protocol binds run identity, requires a delivered turn and isolates businesses (111.658595ms)
✔ REQ-PLUG-1 runtime reaches transcript only through loader, over the real bus socket (136.372459ms)
✔ REQ-LIMIT-4 loader source records new turn kinds, excludes history and retries exactly once (52.523881ms)
✔ REQ-LIMIT-4 cut: unknown is durable and logged next to every total (60.980995ms)
✔ REQ-LIMIT-4 disabled: unknown is durable and logged next to every total (47.608728ms)
✔ REQ-LIMIT-4 missing-begin: unknown is durable and logged next to every total (40.927657ms)
✔ REQ-LIMIT-4 no-new-usage: unknown is durable and logged next to every total (55.771008ms)
✔ REQ-LIMIT-4 rewrite: unknown is durable and logged next to every total (57.407378ms)
✔ REQ-LIMIT-4 unfinished turn remains visibly unknown after accounting restarts (42.03284ms)
✔ usage records are append-only (41.064096ms)
✔ REQ-LIMIT-4 parse failure logs its safe code, never transcript content (46.863323ms)
✔ REQ-LIMIT-4 resumed run baselines history and exact totals do not overflow (51.492502ms)
✔ REQ-PLUG-1 core has no transcript import and disabled sources do not read any transcript (40.548781ms)
✔ REQ-LIMIT-4 a resumed thread bills only new assistant messages to its next run (41.97363ms)
✔ REQ-LIMIT-4 every enabled source is called; failure is unknown and a partial total stays labelled (50.186944ms)
✔ REQ-LIMIT-4 a turn whose reported sum exceeds safe precision is unknown, not rounded (44.545546ms)
✔ row 65 a run bound without a transcript directory records no-transcript (44.101897ms)
✔ P5 immutable stack key attribution survives rotation and restart without key values (44.09141ms)
✔ P5 malformed key metadata is dropped rather than stored or exposed as a key value (44.151576ms)
✔ REQ-PLUG-1 schema: plugins is optional, names known kinds and checked module names (9.654239ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the setter writes plugins through the organization writer and logs old and new names (136.405265ms)
✔ vikunja:19/309 a patch changes only the kinds it names; null removes one kind, explicitly and in the trail (164.709168ms)
✔ vikunja:19/309 an unknown kind (set or removed), a bad module, an empty patch and null on the wrong shape are refused, nothing written (1.961195ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the writer checks the bytes it writes: a Date in plugins is refused there too (20.250129ms)
✔ REQ-PLUG-1 REQ-ROLE-3 a refused setter write throws a code, changes nothing and logs nothing (1.590323ms)
✔ vikunja:19/305 with an exists check, the setter refuses a module no tree file answers to, before anything is written (50.378509ms)
✔ P5 optional usage kind and pollSeconds configure through plugins.set; default stays absent and retention bound is strict (93.589584ms)
✔ P5 only human can enable/disable telemetry or change polling, including direct organization writes (146.907219ms)
✔ REQ-LIMIT-3 schema: each subject kind, limit 0 and no ceiling are accepted; bad limits, times, keys and undeclared instances refuse (14.755461ms)
✔ REQ-LIMIT-3 the writer stamps since: a new limit gets now, a changed one keeps its time, a different time is refused (223.35974ms)
✔ REQ-LIMIT-3 only tokens.* at schema depth holds token limits: agent limits named `limit` save as sent, and a token limit named `limit` is stamped and reset (262.018477ms)
✔ REQ-LIMIT-3 a reset moves since to now, is logged with its actor, and refuses a path that is not a limit (136.45906ms)
✔ REQ-LIMIT-2 schema: launch.account names a credential set; a daily quota needs a reset and an IANA zone and names the account (22.468222ms)
✔ REQ-LIMIT-2 the writer stamps a daily quota's since, keeps its reset and zone, and a reset moves since (146.912888ms)
✔ P5 per-model-key quotas are unset by default, accept digit-leading IDs and only the human changes or resets them (199.214764ms)
✔ probeKey observes 200 with one agent-authenticated GET /v1/models (13.500079ms)
✔ probeKey observes 401 with one agent-authenticated GET /v1/models (2.29275ms)
✔ probeKey observes 503 with one agent-authenticated GET /v1/models (1.453939ms)
✔ proxy-down: agent-key probe connection failure is sanitized (1.448596ms)
✔ proxy-down: silent listener cannot extend probe request deadline (51.226767ms)
✔ agent-key probe returns redirect status without following Location or exposing key (2.599627ms)
✔ proxy-client-invalid: https://127.0.0.1:18318 (0.940367ms)
✔ proxy-client-invalid: http://example.com:18318 (0.110721ms)
✔ proxy-client-invalid: http://localhost:18318 (0.551474ms)
✔ proxy-client-invalid: http://127.0.0.1:8317 (0.085358ms)
✔ proxy-client-invalid: http://user:pass@127.0.0.1:18318 (0.082245ms)
✔ proxy-client-invalid: http://127.0.0.1:18318/path (0.071237ms)
✔ client GET/PUT v8 only, Authorization header, receipt IDs without values or bodies (16.679264ms)
✔ proxy-client-refused (2.60845ms)
✔ proxy-client-response (1.279043ms)
✔ proxy-client-redirect (1.146966ms)
✔ proxy-client-down: transport errors redact details (0.949938ms)
✔ proxy-client-invalid: PUT rejects object key records and empty strings locally (0.180359ms)
✔ proxy-management-key-invalid: missing, symlink and public key file refuse without values (0.938153ms)
✔ bus management-key loader supplies a private fixture key without exposing it on the client (0.489424ms)
✔ proxy-client-response: truncated response remains a redacted named refusal (12.060482ms)
✔ management client ignores ambient fetch dispatchers (1.377676ms)
✔ proxy-key-invalid: Latin-1 leaves complete config/data inventories unchanged (3.526441ms)
✔ proxy-key-invalid: leading space leaves complete config/data inventories unchanged (1.110569ms)
✔ proxy-key-invalid: trailing space leaves complete config/data inventories unchanged (1.01067ms)
✔ proxy-key-invalid: internal space leaves complete config/data inventories unchanged (1.13613ms)
✔ printable non-space ASCII control initializes and authenticates with unchanged existing files (17.073708ms)
✔ OAuth management calls keep URL and state out of receipts (16.393438ms)
✔ upstream key goes only in request body and upstream refusal body is discarded (3.072175ms)
✔ redirected management calls are not followed or retried (1.57426ms)
✔ P5 queue read uses actual bounded fixed management GET and immediately drops client and upstream values (15.82294ms)
✔ P5 bad envelope refuses safely with no retry (2.96929ms)
✔ P5 over count refuses safely with no retry (1.741334ms)
✔ P5 missing key refuses safely with no retry (1.466913ms)
✔ P5 bad counts refuses safely with no retry (2.929775ms)
✔ P5 redirect refuses safely with no retry (1.463954ms)
✔ P5 refusal refuses safely with no retry (1.03957ms)
✔ P5 malformed event after a valid event rejects the entire queue before any credential can escape (1.194237ms)
✔ REQ-LIMIT-2 daily-quota exports interface version 2 with mayLaunch, mustStop and report (1.253421ms)
✔ REQ-LIMIT-2 the count sums every kind of the account's known records since the later of the day start and since (12.848519ms)
✔ REQ-LIMIT-2 a launch with no account (pi) is covered by no daily quota (0.34571ms)
✔ REQ-LIMIT-4 an unknown turn adds nothing and is counted apart (0.530747ms)
✔ REQ-LIMIT-2 the day turns at the reset in its zone, not in UTC, and before it the day is yesterday's (0.735447ms)
✔ REQ-LIMIT-2 the spring DST change makes the day after a 00:00 reset 23 hours long (0.388703ms)
✔ REQ-LIMIT-2 the fall DST change makes the day after a 00:00 reset 25 hours long (0.354873ms)
✔ REQ-LIMIT-2 a reset the clocks skip starts the day at the first instant after the gap (0.967098ms)
✔ REQ-LIMIT-2 a reset the clocks repeat starts one day, at the first one (0.478992ms)
✔ REQ-LIMIT-2 a launch is refused at the quota, a turn that reaches it stops, and the next day allows again (1.167482ms)
✔ REQ-LIMIT-2 counts past the safe integer range come back as digit strings (0.375179ms)
✔ REQ-LIMIT-4 bad leaves, records or times throw a code, and the check reads nothing but its arguments (2.739059ms)
✔ REQ-LIMIT-2 no daily quotas: every launch is allowed and the report is empty (0.22961ms)
✔ P5 daily quota for a model key ID matches stack key records and resets the next day (0.935079ms)
✔ REQ-PLUG-1 REQ-LIMIT-4 the registry: usage-source at interface version 1, limit-check at 2 (row 125), each a list (1.194208ms)
✔ REQ-PLUG-1 checkPlugins accepts one key per kind, each a list of names, empty included (0.254856ms)
✔ REQ-PLUG-1 checkPlugins refuses bad shapes, unknown kinds, bad names and duplicates (1.125412ms)
✔ REQ-PLUG-1 a kind that switches on one module takes one name, not a list (0.161968ms)
✔ REQ-PLUG-1 checkPlugins reports through the caller's fail callback (0.141125ms)
✔ P5 usage telemetry is optional, single module, separate from enforcing sources (0.146226ms)
✔ REQ-PLUG-1 fixture modules of each kind switch on from a test organization file, no core file changed (9.365221ms)
✔ REQ-PLUG-1 a name not matching ^[a-z][a-z0-9-]*$ refuses and keeps the old setting (4.138219ms)
✔ REQ-PLUG-1 a missing module directory or index.mjs refuses and keeps the old setting (3.181488ms)
✔ REQ-PLUG-1 a symlinked module directory or index.mjs refuses and keeps the old setting (3.076206ms)
✔ REQ-PLUG-1 a symlinked kind directory refuses and keeps the old setting (2.618445ms)
✔ REQ-PLUG-1 a symlinked packages/plugins refuses (run with --preserve-symlinks so the path keeps it) (30.33829ms)
✔ REQ-PLUG-1 index.mjs swapped for a symlink after the lstat checks refuses at the realpath check (2.849943ms)
✔ REQ-PLUG-1 a path that can't be read refuses as unreadable, is logged and keeps the old setting (2.25734ms)
✔ REQ-PLUG-1 a path that becomes unreadable after the lstat checks refuses at either realpath (2.597703ms)
✔ REQ-PLUG-1 a module that fails to load refuses and keeps the old setting (2.743636ms)
✔ REQ-PLUG-1 a missing export refuses and keeps the old setting (3.876351ms)
✔ REQ-PLUG-1 a different interface version refuses and keeps the old setting (2.717178ms)
✔ REQ-PLUG-1 REQ-LIMIT-3 a version 1 limit check refuses after the bump to 2, and the old setting stays (2.639476ms)
✔ REQ-PLUG-1 a kind refused on its first load has nothing switched on, and the log names kind and name (1.884786ms)
✔ REQ-PLUG-1 the setting's shape: unknown kinds refuse alone, a bad whole setting keeps everything (3.078835ms)
✔ REQ-PLUG-1 loads run one at a time, so the last requested setting wins (102.865433ms)
✔ REQ-PLUG-1 the loader needs a log callback (1.252523ms)
✔ REQ-LIMIT-3 token-limit exports interface version 2 with mayLaunch, mustStop and report (1.15958ms)
✔ REQ-LIMIT-3 each subject kind refuses at its limit and allows under it (1.269598ms)
✔ REQ-LIMIT-3 a limit covers only its own subject's records and launches (0.319894ms)
✔ REQ-LIMIT-4 only known records count; an unknown turn adds nothing and is counted apart (0.245595ms)
✔ REQ-LIMIT-3 a reset moves since: records before it no longer count (0.147653ms)
✔ REQ-LIMIT-3 limit 0 refuses with no records; the first limit hit in file order is named (0.136545ms)
✔ REQ-LIMIT-3 a key limit is not enforced while every record's account is null (decision 150 Q1) (0.161235ms)
✔ REQ-LIMIT-3 counts past the safe integer range come back as digit strings (0.131986ms)
✔ REQ-LIMIT-4 bad records or times throw a code, and the check reads nothing but its arguments (0.612439ms)
✔ REQ-LIMIT-3 no token limits: every launch is allowed and the report is empty (0.225872ms)
✔ REQ-LIMIT-3 token-limit ignores tokens.daily, which the daily-quota check enforces (row 126) (0.115054ms)
✔ P5 a model key ID limit counts stack records by key ID without an account (0.118321ms)
✔ P5 Console displays stack count per safe key separately from optional proxy account numbers (0.840194ms)
✔ P5 Console escapes hostile labels and labels unavailable telemetry without presenting a fresh zero (0.169412ms)
✔ REQ-WEB-1 usage read keeps unknown counts and each token kind; no query or write is accepted (25.71419ms)
✔ REQ-WEB-1 malformed usage is refused instead of shown as zero (4.903993ms)
ℹ tests 170
ℹ suites 0
ℹ pass 170
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 8854.156666
