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":"713a4859-153d-4efb-9e60-6abbd4549b0e","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":"6615caa1-e75d-463c-b6b8-789d6dc77e40","source":"@none","code":"baseline-unknown"}
✔ REQ-LIMIT-2 runtime: limits counts the daily quota, and mayLaunch refuses only the account at it (160.549327ms)
✔ REQ-LIMIT-4 runtime: a run bound with the account writes it on its usage records and stops at the quota (143.628999ms)
✔ REQ-LIMIT-4 runtime: a run bound without an account records null and the daily quota never stops it (123.342684ms)
✔ REQ-LIMIT-4 bindLaunch keeps the account off session.launched, refuses one that is not an identifier, and takes null as none (67.349794ms)
✔ REQ-LIMIT-3 limitLeaves finds every limit object and skips the agent numbers (1.271433ms)
✔ REQ-LIMIT-3 limitLeaves takes token limits at schema depth only, whatever their names (0.194636ms)
✔ REQ-LIMIT-3 with no check switched on a launch is allowed, a turn never stops, and every limit is not enforced (45.635942ms)
✔ REQ-LIMIT-3 a fixture check that refuses refuses the launch and stops the turn, logged with the limit and the count (46.176242ms)
✔ REQ-LIMIT-3 a report that omits a limit shows it not enforced; a counted entry and a reason come through (44.938267ms)
✔ REQ-LIMIT-4 each check gets the business, a copy of the limits, the subject, the records and the time (54.558566ms)
✔ REQ-LIMIT-4 fail closed: a throw refuses, stops and fails the report, naming the check and the code (46.342833ms)
✔ REQ-LIMIT-4 fail closed: a malformed answer, a promise, a rejected promise, a non-boolean or a bad hit is malformed-answer (47.766687ms)
✔ REQ-LIMIT-4 fail closed: a check switched on but not loaded refuses, stops and fails every limit as not-loaded (43.59231ms)
✔ REQ-LIMIT-4 state(), never-loaded case: before any load the report shows not enforced, or not-loaded for a switched-on check (48.104463ms)
✔ REQ-LIMIT-4 state(), first-load-refused case: a check refused on its first load is not-loaded in mayLaunch, mustStop and report (42.805959ms)
✔ REQ-LIMIT-4 fail closed: an unreadable organization file refuses and stops with check null; the report throws (43.597155ms)
✔ REQ-LIMIT-4 fail closed: unreadable records refuse and stop with check null and fail the report (0.492317ms)
✔ REQ-LIMIT-3 the shipped token-limit, through the real loader, counts known records only since the limit was set (91.037972ms)
✔ REQ-LIMIT-3 a token limit for a provider named limit is counted and refuses, beside an agent limit of the same name (50.368678ms)
✔ REQ-LIMIT-3 core reaches limit checks only through the plug-in loader (1.715607ms)
✔ P5 missing, ambiguous or invalid model key lookup fails closed without leaking a lookup error (40.810413ms)
✔ P5 trusted lookup uses the retiring run key rather than the agent current key (35.820247ms)
✔ P5 actual model metadata lookup rejects missing/ambiguous owners and never cross-attributes a retiring run (0.45891ms)
✔ 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 (121.318326ms)
✔ REQ-LIMIT-4 the stop also lands on state; a run with no stop ends without a limit (168.385765ms)
✔ REQ-LIMIT-4 fail closed: a mustStop throw or a malformed answer stops the run, naming the bus and the code (417.685568ms)
✔ REQ-LIMIT-4 a thread run at its limit is released with the reason, and its end record names the limit (114.909337ms)
✔ REQ-LIMIT-4 a broker with no limit checks configured never stops a run (77.129589ms)
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":"5c3d20b7-bbe0-44e1-876f-393c04bf33e3","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":"1ed92631-bf69-4279-8f2e-da5c8c2d9061","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 (242.78734ms)
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 (83.772136ms)
✔ 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 (135.822066ms)
✔ REQ-LIMIT-4 runtime: with no usage source a turn is unknown, counts zero and stops nothing under a limit of 1 (121.123659ms)
✔ REQ-LIMIT-3 runtime: switching a limit check on with plugins.set loads it without a launch or a turn (159.884938ms)
✔ P5 broker preserves original plugin subject and derives internal run context from authenticated native caller (89.685601ms)
✔ P5 configured key quotas never use a supplied safe-looking ID when trusted metadata lookup is missing (41.975207ms)
✔ P5 internal context resolves exactly current or retained generation; wrong business, instance, run and owner refuse (0.374876ms)
✔ P5 model-key mustStop without native run context fails closed even when the current key resolves (39.706143ms)
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2ab905e62cf4"]}
model-proxy: {"action":"proxy.reconcile","addedKeyIds":[],"removedKeyIds":[]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2ab905e62cf4"]}
model-proxy: {"call":"PUT /v8/management/config/access/api-keys","status":200,"keyIds":["2ab905e62cf4","f81b23885f0a"]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["2ab905e62cf4","f81b23885f0a"]}
model-proxy: {"action":"proxy.key.issued","keyIds":["f81b23885f0a"],"instance":"demo/coder"}
model-proxy: {"call":"GET /v1/models","status":200,"keyIds":["f81b23885f0a"]}
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":"f81b23885f0a"},"path":["tokens","keys","f81b23885f0a"],"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":"f81b23885f0a"},"path":["tokens","keys","f81b23885f0a"],"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 (319.346483ms)
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 (102.705755ms)
✔ 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 (258.622237ms)
✔ vikunja:19/309 through the broker, a patch switches the kinds it names and keeps the rest; null removes one kind and is trailed (194.943673ms)
✔ P5 usage plugin off by default, default poll is 15 seconds and configured polls skip early ticks (58.879723ms)
✔ P5 safe telemetry stores failures per key and proxy-labelled accounts; no client/upstream value enters store/log/view or quota records (51.610465ms)
✔ P5 unknown msk key goes only to value-free reconcile log and other businesses stay isolated (41.842706ms)
✔ P5 queue failure is safe, does not enforce and does not retry before poll deadline (43.265972ms)
✔ P5 retiring key keeps attribution and telemetry rows remain append-only across reader restart (45.846149ms)
✔ P5 malformed queue batch is atomic: no valid prefix, body or credential can reach store/log/view (42.767318ms)
✔ P5 concurrent ticks issue one bounded queue read and a closed collector never polls again (42.425739ms)
✔ REQ-LIMIT-4 usage protocol binds run identity, requires a delivered turn and isolates businesses (107.035274ms)
✔ REQ-PLUG-1 runtime reaches transcript only through loader, over the real bus socket (138.029928ms)
✔ REQ-LIMIT-4 loader source records new turn kinds, excludes history and retries exactly once (102.708913ms)
✔ REQ-LIMIT-4 cut: unknown is durable and logged next to every total (51.29996ms)
✔ REQ-LIMIT-4 disabled: unknown is durable and logged next to every total (44.547138ms)
✔ REQ-LIMIT-4 missing-begin: unknown is durable and logged next to every total (40.305662ms)
✔ REQ-LIMIT-4 no-new-usage: unknown is durable and logged next to every total (46.243747ms)
✔ REQ-LIMIT-4 rewrite: unknown is durable and logged next to every total (49.699154ms)
✔ REQ-LIMIT-4 unfinished turn remains visibly unknown after accounting restarts (41.750326ms)
✔ usage records are append-only (44.741061ms)
✔ REQ-LIMIT-4 parse failure logs its safe code, never transcript content (46.066508ms)
✔ REQ-LIMIT-4 resumed run baselines history and exact totals do not overflow (58.388899ms)
✔ REQ-PLUG-1 core has no transcript import and disabled sources do not read any transcript (45.643672ms)
✔ REQ-LIMIT-4 a resumed thread bills only new assistant messages to its next run (46.749719ms)
✔ REQ-LIMIT-4 every enabled source is called; failure is unknown and a partial total stays labelled (51.822533ms)
✔ REQ-LIMIT-4 a turn whose reported sum exceeds safe precision is unknown, not rounded (53.80965ms)
✔ row 65 a run bound without a transcript directory records no-transcript (57.433717ms)
✔ P5 immutable stack key attribution survives rotation and restart without key values (47.921754ms)
✔ P5 malformed key metadata is dropped rather than stored or exposed as a key value (48.881094ms)
✔ REQ-PLUG-1 schema: plugins is optional, names known kinds and checked module names (9.919614ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the setter writes plugins through the organization writer and logs old and new names (141.282316ms)
✔ vikunja:19/309 a patch changes only the kinds it names; null removes one kind, explicitly and in the trail (199.085632ms)
✔ 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 (5.994558ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the writer checks the bytes it writes: a Date in plugins is refused there too (29.095644ms)
✔ REQ-PLUG-1 REQ-ROLE-3 a refused setter write throws a code, changes nothing and logs nothing (2.986444ms)
✔ vikunja:19/305 with an exists check, the setter refuses a module no tree file answers to, before anything is written (64.912764ms)
✔ P5 optional usage kind and pollSeconds configure through plugins.set; default stays absent and retention bound is strict (124.041908ms)
✔ P5 only human can enable/disable telemetry or change polling, including direct organization writes (163.47796ms)
✔ REQ-LIMIT-3 schema: each subject kind, limit 0 and no ceiling are accepted; bad limits, times, keys and undeclared instances refuse (25.815386ms)
✔ REQ-LIMIT-3 the writer stamps since: a new limit gets now, a changed one keeps its time, a different time is refused (253.253525ms)
✔ 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 (294.58611ms)
✔ REQ-LIMIT-3 a reset moves since to now, is logged with its actor, and refuses a path that is not a limit (144.894737ms)
✔ REQ-LIMIT-2 schema: launch.account names a credential set; a daily quota needs a reset and an IANA zone and names the account (26.673634ms)
✔ REQ-LIMIT-2 the writer stamps a daily quota's since, keeps its reset and zone, and a reset moves since (173.373389ms)
✔ P5 per-model-key quotas are unset by default, accept digit-leading IDs and only the human changes or resets them (221.557913ms)
✔ probeKey observes 200 with one agent-authenticated GET /v1/models (13.906006ms)
✔ probeKey observes 401 with one agent-authenticated GET /v1/models (2.654873ms)
✔ probeKey observes 503 with one agent-authenticated GET /v1/models (1.465852ms)
✔ proxy-down: agent-key probe connection failure is sanitized (1.484469ms)
✔ proxy-down: silent listener cannot extend probe request deadline (52.146773ms)
✔ agent-key probe returns redirect status without following Location or exposing key (2.580254ms)
✔ proxy-client-invalid: https://127.0.0.1:18318 (0.937801ms)
✔ proxy-client-invalid: http://example.com:18318 (0.535029ms)
✔ proxy-client-invalid: http://localhost:18318 (0.087694ms)
✔ proxy-client-invalid: http://127.0.0.1:8317 (0.069318ms)
✔ proxy-client-invalid: http://user:pass@127.0.0.1:18318 (0.073249ms)
✔ proxy-client-invalid: http://127.0.0.1:18318/path (0.061539ms)
✔ client GET/PUT v8 only, Authorization header, receipt IDs without values or bodies (16.662783ms)
✔ proxy-client-refused (2.363491ms)
✔ proxy-client-response (1.26715ms)
✔ proxy-client-redirect (1.119781ms)
✔ proxy-client-down: transport errors redact details (0.943923ms)
✔ proxy-client-invalid: PUT rejects object key records and empty strings locally (0.172918ms)
✔ proxy-management-key-invalid: missing, symlink and public key file refuse without values (0.890633ms)
✔ bus management-key loader supplies a private fixture key without exposing it on the client (0.473687ms)
✔ proxy-client-response: truncated response remains a redacted named refusal (10.816438ms)
✔ management client ignores ambient fetch dispatchers (1.14023ms)
✔ proxy-key-invalid: Latin-1 leaves complete config/data inventories unchanged (3.507611ms)
✔ proxy-key-invalid: leading space leaves complete config/data inventories unchanged (1.092119ms)
✔ proxy-key-invalid: trailing space leaves complete config/data inventories unchanged (1.004054ms)
✔ proxy-key-invalid: internal space leaves complete config/data inventories unchanged (1.102862ms)
✔ printable non-space ASCII control initializes and authenticates with unchanged existing files (16.268442ms)
✔ OAuth management calls keep URL and state out of receipts (16.20323ms)
✔ upstream key goes only in request body and upstream refusal body is discarded (3.013252ms)
✔ redirected management calls are not followed or retried (1.543184ms)
✔ P5 queue read uses actual bounded fixed management GET and immediately drops client and upstream values (14.200284ms)
✔ P5 bad envelope refuses safely with no retry (2.700404ms)
✔ P5 over count refuses safely with no retry (1.604716ms)
✔ P5 missing key refuses safely with no retry (1.370666ms)
✔ P5 bad counts refuses safely with no retry (2.020663ms)
✔ P5 redirect refuses safely with no retry (1.338733ms)
✔ P5 refusal refuses safely with no retry (0.975888ms)
✔ P5 malformed event after a valid event rejects the entire queue before any credential can escape (1.062269ms)
✔ REQ-LIMIT-2 daily-quota exports interface version 2 with mayLaunch, mustStop and report (1.111774ms)
✔ REQ-LIMIT-2 the count sums every kind of the account's known records since the later of the day start and since (11.668338ms)
✔ REQ-LIMIT-2 a launch with no account (pi) is covered by no daily quota (0.297908ms)
✔ REQ-LIMIT-4 an unknown turn adds nothing and is counted apart (0.432147ms)
✔ REQ-LIMIT-2 the day turns at the reset in its zone, not in UTC, and before it the day is yesterday's (0.598992ms)
✔ REQ-LIMIT-2 the spring DST change makes the day after a 00:00 reset 23 hours long (0.356206ms)
✔ REQ-LIMIT-2 the fall DST change makes the day after a 00:00 reset 25 hours long (0.313154ms)
✔ REQ-LIMIT-2 a reset the clocks skip starts the day at the first instant after the gap (0.81377ms)
✔ REQ-LIMIT-2 a reset the clocks repeat starts one day, at the first one (0.455025ms)
✔ REQ-LIMIT-2 a launch is refused at the quota, a turn that reaches it stops, and the next day allows again (1.086843ms)
✔ REQ-LIMIT-2 counts past the safe integer range come back as digit strings (0.349512ms)
✔ REQ-LIMIT-4 bad leaves, records or times throw a code, and the check reads nothing but its arguments (2.388492ms)
✔ REQ-LIMIT-2 no daily quotas: every launch is allowed and the report is empty (0.195575ms)
✔ P5 daily quota for a model key ID matches stack key records and resets the next day (0.769635ms)
✔ REQ-PLUG-1 REQ-LIMIT-4 the registry: usage-source at interface version 1, limit-check at 2 (row 125), each a list (1.012155ms)
✔ REQ-PLUG-1 checkPlugins accepts one key per kind, each a list of names, empty included (0.250245ms)
✔ REQ-PLUG-1 checkPlugins refuses bad shapes, unknown kinds, bad names and duplicates (0.922679ms)
✔ REQ-PLUG-1 a kind that switches on one module takes one name, not a list (0.147977ms)
✔ REQ-PLUG-1 checkPlugins reports through the caller's fail callback (0.122575ms)
✔ P5 usage telemetry is optional, single module, separate from enforcing sources (0.132403ms)
✔ REQ-PLUG-1 fixture modules of each kind switch on from a test organization file, no core file changed (9.032509ms)
✔ REQ-PLUG-1 a name not matching ^[a-z][a-z0-9-]*$ refuses and keeps the old setting (3.876412ms)
✔ REQ-PLUG-1 a missing module directory or index.mjs refuses and keeps the old setting (2.975479ms)
✔ REQ-PLUG-1 a symlinked module directory or index.mjs refuses and keeps the old setting (2.818854ms)
✔ REQ-PLUG-1 a symlinked kind directory refuses and keeps the old setting (2.461598ms)
✔ REQ-PLUG-1 a symlinked packages/plugins refuses (run with --preserve-symlinks so the path keeps it) (30.463335ms)
✔ REQ-PLUG-1 index.mjs swapped for a symlink after the lstat checks refuses at the realpath check (2.687366ms)
✔ REQ-PLUG-1 a path that can't be read refuses as unreadable, is logged and keeps the old setting (2.214904ms)
✔ REQ-PLUG-1 a path that becomes unreadable after the lstat checks refuses at either realpath (2.519903ms)
✔ REQ-PLUG-1 a module that fails to load refuses and keeps the old setting (2.657821ms)
✔ REQ-PLUG-1 a missing export refuses and keeps the old setting (3.655045ms)
✔ REQ-PLUG-1 a different interface version refuses and keeps the old setting (2.640761ms)
✔ REQ-PLUG-1 REQ-LIMIT-3 a version 1 limit check refuses after the bump to 2, and the old setting stays (2.650255ms)
✔ REQ-PLUG-1 a kind refused on its first load has nothing switched on, and the log names kind and name (2.148582ms)
✔ REQ-PLUG-1 the setting's shape: unknown kinds refuse alone, a bad whole setting keeps everything (2.724542ms)
✔ REQ-PLUG-1 loads run one at a time, so the last requested setting wins (103.671706ms)
✔ REQ-PLUG-1 the loader needs a log callback (1.199165ms)
✔ REQ-LIMIT-3 token-limit exports interface version 2 with mayLaunch, mustStop and report (0.667098ms)
✔ REQ-LIMIT-3 each subject kind refuses at its limit and allows under it (1.777171ms)
✔ REQ-LIMIT-3 a limit covers only its own subject's records and launches (0.345096ms)
✔ REQ-LIMIT-4 only known records count; an unknown turn adds nothing and is counted apart (0.242181ms)
✔ REQ-LIMIT-3 a reset moves since: records before it no longer count (0.147915ms)
✔ REQ-LIMIT-3 limit 0 refuses with no records; the first limit hit in file order is named (0.129665ms)
✔ REQ-LIMIT-3 a key limit is not enforced while every record's account is null (decision 150 Q1) (0.156705ms)
✔ REQ-LIMIT-3 counts past the safe integer range come back as digit strings (0.145396ms)
✔ REQ-LIMIT-4 bad records or times throw a code, and the check reads nothing but its arguments (0.617108ms)
✔ REQ-LIMIT-3 no token limits: every launch is allowed and the report is empty (0.218957ms)
✔ REQ-LIMIT-3 token-limit ignores tokens.daily, which the daily-quota check enforces (row 126) (0.119273ms)
✔ P5 a model key ID limit counts stack records by key ID without an account (0.120965ms)
✔ P5 Console displays stack count per safe key separately from optional proxy account numbers (0.925558ms)
✔ P5 Console escapes hostile labels and labels unavailable telemetry without presenting a fresh zero (0.191209ms)
✔ REQ-WEB-1 usage read keeps unknown counts and each token kind; no query or write is accepted (27.325912ms)
✔ REQ-WEB-1 malformed usage is refused instead of shown as zero (5.087908ms)
ℹ tests 174
ℹ suites 0
ℹ pass 174
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 9323.231998
