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":"4fe53301-641b-494d-a461-847c03170e3f","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":"797da8e3-f04c-4e40-b8e1-bfb60b07c554","source":"@none","code":"baseline-unknown"}
✔ REQ-LIMIT-2 runtime: limits counts the daily quota, and mayLaunch refuses only the account at it (158.160821ms)
✔ REQ-LIMIT-4 runtime: a run bound with the account writes it on its usage records and stops at the quota (143.809206ms)
✔ REQ-LIMIT-4 runtime: a run bound without an account records null and the daily quota never stops it (121.006833ms)
✔ REQ-LIMIT-4 bindLaunch keeps the account off session.launched, refuses one that is not an identifier, and takes null as none (64.961645ms)
✔ REQ-LIMIT-3 limitLeaves finds every limit object and skips the agent numbers (1.220027ms)
✔ REQ-LIMIT-3 limitLeaves takes token limits at schema depth only, whatever their names (0.214936ms)
✔ REQ-LIMIT-3 with no check switched on a launch is allowed, a turn never stops, and every limit is not enforced (44.021673ms)
✔ REQ-LIMIT-3 a fixture check that refuses refuses the launch and stops the turn, logged with the limit and the count (43.052934ms)
✔ REQ-LIMIT-3 a report that omits a limit shows it not enforced; a counted entry and a reason come through (40.139268ms)
✔ REQ-LIMIT-4 each check gets the business, a copy of the limits, the subject, the records and the time (52.680831ms)
✔ REQ-LIMIT-4 fail closed: a throw refuses, stops and fails the report, naming the check and the code (47.313105ms)
✔ REQ-LIMIT-4 fail closed: a malformed answer, a promise, a rejected promise, a non-boolean or a bad hit is malformed-answer (46.754294ms)
✔ REQ-LIMIT-4 fail closed: a check switched on but not loaded refuses, stops and fails every limit as not-loaded (42.493056ms)
✔ REQ-LIMIT-4 state(), never-loaded case: before any load the report shows not enforced, or not-loaded for a switched-on check (41.402846ms)
✔ REQ-LIMIT-4 state(), first-load-refused case: a check refused on its first load is not-loaded in mayLaunch, mustStop and report (41.969573ms)
✔ REQ-LIMIT-4 fail closed: an unreadable organization file refuses and stops with check null; the report throws (41.694193ms)
✔ REQ-LIMIT-4 fail closed: unreadable records refuse and stop with check null and fail the report (0.52246ms)
✔ REQ-LIMIT-3 the shipped token-limit, through the real loader, counts known records only since the limit was set (83.096899ms)
✔ REQ-LIMIT-3 a token limit for a provider named limit is counted and refuses, beside an agent limit of the same name (50.535823ms)
✔ REQ-LIMIT-3 core reaches limit checks only through the plug-in loader (1.710249ms)
✔ P5 missing, ambiguous or invalid model key lookup fails closed without leaking a lookup error (41.544044ms)
✔ P5 trusted lookup uses the retiring run key rather than the agent current key (39.590387ms)
✔ P5 actual model metadata lookup rejects missing/ambiguous owners and never cross-attributes a retiring run (0.460753ms)
✔ 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 (132.493862ms)
✔ REQ-LIMIT-4 the stop also lands on state; a run with no stop ends without a limit (177.559162ms)
✔ REQ-LIMIT-4 fail closed: a mustStop throw or a malformed answer stops the run, naming the bus and the code (440.047034ms)
✔ REQ-LIMIT-4 a thread run at its limit is released with the reason, and its end record names the limit (109.873105ms)
✔ REQ-LIMIT-4 a broker with no limit checks configured never stops a run (77.150566ms)
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":"b338e07c-04c8-4942-902f-484f07e73153","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":"fd7f45ea-e03c-49dd-a53c-e385fdd5acbf","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 (245.80231ms)
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 (84.052026ms)
✔ 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 (136.937413ms)
✔ REQ-LIMIT-4 runtime: with no usage source a turn is unknown, counts zero and stops nothing under a limit of 1 (118.705264ms)
✔ REQ-LIMIT-3 runtime: switching a limit check on with plugins.set loads it without a launch or a turn (165.970294ms)
✔ P5 broker preserves original plugin subject and derives internal run context from authenticated native caller (90.023506ms)
✔ P5 configured key quotas never use a supplied safe-looking ID when trusted metadata lookup is missing (42.127316ms)
✔ P5 internal context resolves exactly current or retained generation; wrong business, instance, run and owner refuse (0.383979ms)
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["59bfaebcb056"]}
model-proxy: {"action":"proxy.reconcile","addedKeyIds":[],"removedKeyIds":[]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["59bfaebcb056"]}
model-proxy: {"call":"PUT /v8/management/config/access/api-keys","status":200,"keyIds":["59bfaebcb056","fa6669b39602"]}
model-proxy: {"call":"GET /v8/management/config/access/api-keys","status":200,"keyIds":["59bfaebcb056","fa6669b39602"]}
model-proxy: {"action":"proxy.key.issued","keyIds":["fa6669b39602"],"instance":"demo/coder"}
model-proxy: {"call":"GET /v1/models","status":200,"keyIds":["fa6669b39602"]}
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":"fa6669b39602"},"path":["tokens","keys","fa6669b39602"],"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":"fa6669b39602"},"path":["tokens","keys","fa6669b39602"],"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 (325.548897ms)
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 (104.870501ms)
✔ 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 (268.507544ms)
✔ vikunja:19/309 through the broker, a patch switches the kinds it names and keeps the rest; null removes one kind and is trailed (215.488037ms)
✔ P5 usage plugin off by default, default poll is 15 seconds and configured polls skip early ticks (60.18695ms)
✔ P5 safe telemetry stores failures per key and proxy-labelled accounts; no client/upstream value enters store/log/view or quota records (56.879533ms)
✔ P5 unknown msk key goes only to value-free reconcile log and other businesses stay isolated (46.789381ms)
✔ P5 queue failure is safe, does not enforce and does not retry before poll deadline (43.152978ms)
✔ P5 retiring key keeps attribution and telemetry rows remain append-only across reader restart (49.497425ms)
✔ P5 malformed queue batch is atomic: no valid prefix, body or credential can reach store/log/view (46.179514ms)
✔ P5 concurrent ticks issue one bounded queue read and a closed collector never polls again (46.481349ms)
✔ REQ-LIMIT-4 usage protocol binds run identity, requires a delivered turn and isolates businesses (113.617169ms)
✔ REQ-PLUG-1 runtime reaches transcript only through loader, over the real bus socket (154.197141ms)
✔ REQ-LIMIT-4 loader source records new turn kinds, excludes history and retries exactly once (55.1487ms)
✔ REQ-LIMIT-4 cut: unknown is durable and logged next to every total (48.001192ms)
✔ REQ-LIMIT-4 disabled: unknown is durable and logged next to every total (52.699151ms)
✔ REQ-LIMIT-4 missing-begin: unknown is durable and logged next to every total (43.859028ms)
✔ REQ-LIMIT-4 no-new-usage: unknown is durable and logged next to every total (49.684957ms)
✔ REQ-LIMIT-4 rewrite: unknown is durable and logged next to every total (48.842941ms)
✔ REQ-LIMIT-4 unfinished turn remains visibly unknown after accounting restarts (46.725304ms)
✔ usage records are append-only (43.666526ms)
✔ REQ-LIMIT-4 parse failure logs its safe code, never transcript content (50.791657ms)
✔ REQ-LIMIT-4 resumed run baselines history and exact totals do not overflow (67.235771ms)
✔ REQ-PLUG-1 core has no transcript import and disabled sources do not read any transcript (50.444244ms)
✔ REQ-LIMIT-4 a resumed thread bills only new assistant messages to its next run (48.518074ms)
✔ REQ-LIMIT-4 every enabled source is called; failure is unknown and a partial total stays labelled (52.596237ms)
✔ REQ-LIMIT-4 a turn whose reported sum exceeds safe precision is unknown, not rounded (48.989984ms)
✔ row 65 a run bound without a transcript directory records no-transcript (47.601985ms)
✔ P5 immutable stack key attribution survives rotation and restart without key values (58.908338ms)
✔ P5 malformed key metadata is dropped rather than stored or exposed as a key value (48.622269ms)
✔ REQ-PLUG-1 schema: plugins is optional, names known kinds and checked module names (11.123203ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the setter writes plugins through the organization writer and logs old and new names (144.541984ms)
✔ vikunja:19/309 a patch changes only the kinds it names; null removes one kind, explicitly and in the trail (186.444017ms)
✔ 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 (2.070716ms)
✔ REQ-PLUG-1 REQ-ROLE-3 the writer checks the bytes it writes: a Date in plugins is refused there too (24.002633ms)
✔ REQ-PLUG-1 REQ-ROLE-3 a refused setter write throws a code, changes nothing and logs nothing (1.819444ms)
✔ vikunja:19/305 with an exists check, the setter refuses a module no tree file answers to, before anything is written (53.502998ms)
✔ P5 optional usage kind and pollSeconds configure through plugins.set; default stays absent and retention bound is strict (102.914554ms)
✔ P5 only human can enable/disable telemetry or change polling, including direct organization writes (153.795381ms)
✔ REQ-LIMIT-3 schema: each subject kind, limit 0 and no ceiling are accepted; bad limits, times, keys and undeclared instances refuse (12.633498ms)
✔ REQ-LIMIT-3 the writer stamps since: a new limit gets now, a changed one keeps its time, a different time is refused (250.719331ms)
✔ 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 (279.391871ms)
✔ REQ-LIMIT-3 a reset moves since to now, is logged with its actor, and refuses a path that is not a limit (143.161688ms)
✔ 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.600091ms)
✔ REQ-LIMIT-2 the writer stamps a daily quota's since, keeps its reset and zone, and a reset moves since (147.449414ms)
✔ P5 per-model-key quotas are unset by default, accept digit-leading IDs and only the human changes or resets them (211.379051ms)
✔ probeKey observes 200 with one agent-authenticated GET /v1/models (13.650453ms)
✔ probeKey observes 401 with one agent-authenticated GET /v1/models (2.452411ms)
✔ probeKey observes 503 with one agent-authenticated GET /v1/models (1.454096ms)
✔ proxy-down: agent-key probe connection failure is sanitized (1.507584ms)
✔ proxy-down: silent listener cannot extend probe request deadline (51.18593ms)
✔ agent-key probe returns redirect status without following Location or exposing key (2.629896ms)
✔ proxy-client-invalid: https://127.0.0.1:18318 (0.940604ms)
✔ proxy-client-invalid: http://example.com:18318 (0.620294ms)
✔ proxy-client-invalid: http://localhost:18318 (0.082993ms)
✔ proxy-client-invalid: http://127.0.0.1:8317 (0.075406ms)
✔ proxy-client-invalid: http://user:pass@127.0.0.1:18318 (0.082019ms)
✔ proxy-client-invalid: http://127.0.0.1:18318/path (0.077949ms)
✔ client GET/PUT v8 only, Authorization header, receipt IDs without values or bodies (16.759591ms)
✔ proxy-client-refused (2.644555ms)
✔ proxy-client-response (1.257544ms)
✔ proxy-client-redirect (1.116738ms)
✔ proxy-client-down: transport errors redact details (0.932782ms)
✔ proxy-client-invalid: PUT rejects object key records and empty strings locally (0.174045ms)
✔ proxy-management-key-invalid: missing, symlink and public key file refuse without values (0.93563ms)
✔ bus management-key loader supplies a private fixture key without exposing it on the client (0.481342ms)
✔ proxy-client-response: truncated response remains a redacted named refusal (11.038179ms)
✔ management client ignores ambient fetch dispatchers (1.371561ms)
✔ proxy-key-invalid: Latin-1 leaves complete config/data inventories unchanged (3.426795ms)
✔ proxy-key-invalid: leading space leaves complete config/data inventories unchanged (1.114261ms)
✔ proxy-key-invalid: trailing space leaves complete config/data inventories unchanged (1.011023ms)
✔ proxy-key-invalid: internal space leaves complete config/data inventories unchanged (1.128478ms)
✔ printable non-space ASCII control initializes and authenticates with unchanged existing files (16.93766ms)
✔ OAuth management calls keep URL and state out of receipts (16.303618ms)
✔ upstream key goes only in request body and upstream refusal body is discarded (3.098596ms)
✔ redirected management calls are not followed or retried (1.618972ms)
✔ P5 queue read uses actual bounded fixed management GET and immediately drops client and upstream values (14.682335ms)
✔ P5 bad envelope refuses safely with no retry (2.770996ms)
✔ P5 over count refuses safely with no retry (1.619582ms)
✔ P5 missing key refuses safely with no retry (2.024573ms)
✔ P5 bad counts refuses safely with no retry (1.40751ms)
✔ P5 redirect refuses safely with no retry (1.380605ms)
✔ P5 refusal refuses safely with no retry (0.992984ms)
✔ P5 malformed event after a valid event rejects the entire queue before any credential can escape (1.079984ms)
✔ REQ-LIMIT-2 daily-quota exports interface version 2 with mayLaunch, mustStop and report (1.195525ms)
✔ REQ-LIMIT-2 the count sums every kind of the account's known records since the later of the day start and since (12.385039ms)
✔ REQ-LIMIT-2 a launch with no account (pi) is covered by no daily quota (0.294446ms)
✔ REQ-LIMIT-4 an unknown turn adds nothing and is counted apart (0.448244ms)
✔ REQ-LIMIT-2 the day turns at the reset in its zone, not in UTC, and before it the day is yesterday's (0.585636ms)
✔ REQ-LIMIT-2 the spring DST change makes the day after a 00:00 reset 23 hours long (0.344176ms)
✔ REQ-LIMIT-2 the fall DST change makes the day after a 00:00 reset 25 hours long (0.309404ms)
✔ REQ-LIMIT-2 a reset the clocks skip starts the day at the first instant after the gap (0.823288ms)
✔ REQ-LIMIT-2 a reset the clocks repeat starts one day, at the first one (0.462864ms)
✔ REQ-LIMIT-2 a launch is refused at the quota, a turn that reaches it stops, and the next day allows again (1.053193ms)
✔ REQ-LIMIT-2 counts past the safe integer range come back as digit strings (0.384911ms)
✔ REQ-LIMIT-4 bad leaves, records or times throw a code, and the check reads nothing but its arguments (2.335648ms)
✔ REQ-LIMIT-2 no daily quotas: every launch is allowed and the report is empty (0.194429ms)
✔ P5 daily quota for a model key ID matches stack key records and resets the next day (0.764141ms)
✔ REQ-PLUG-1 REQ-LIMIT-4 the registry: usage-source at interface version 1, limit-check at 2 (row 125), each a list (1.078533ms)
✔ REQ-PLUG-1 checkPlugins accepts one key per kind, each a list of names, empty included (0.243968ms)
✔ REQ-PLUG-1 checkPlugins refuses bad shapes, unknown kinds, bad names and duplicates (0.928754ms)
✔ REQ-PLUG-1 a kind that switches on one module takes one name, not a list (0.133743ms)
✔ REQ-PLUG-1 checkPlugins reports through the caller's fail callback (0.128969ms)
✔ P5 usage telemetry is optional, single module, separate from enforcing sources (0.180465ms)
✔ REQ-PLUG-1 fixture modules of each kind switch on from a test organization file, no core file changed (9.158842ms)
✔ REQ-PLUG-1 a name not matching ^[a-z][a-z0-9-]*$ refuses and keeps the old setting (4.034236ms)
✔ REQ-PLUG-1 a missing module directory or index.mjs refuses and keeps the old setting (3.123767ms)
✔ REQ-PLUG-1 a symlinked module directory or index.mjs refuses and keeps the old setting (2.857748ms)
✔ REQ-PLUG-1 a symlinked kind directory refuses and keeps the old setting (2.422702ms)
✔ REQ-PLUG-1 a symlinked packages/plugins refuses (run with --preserve-symlinks so the path keeps it) (27.290401ms)
✔ REQ-PLUG-1 index.mjs swapped for a symlink after the lstat checks refuses at the realpath check (2.752498ms)
✔ REQ-PLUG-1 a path that can't be read refuses as unreadable, is logged and keeps the old setting (2.289418ms)
✔ REQ-PLUG-1 a path that becomes unreadable after the lstat checks refuses at either realpath (2.561921ms)
✔ REQ-PLUG-1 a module that fails to load refuses and keeps the old setting (2.761977ms)
✔ REQ-PLUG-1 a missing export refuses and keeps the old setting (3.894842ms)
✔ REQ-PLUG-1 a different interface version refuses and keeps the old setting (2.759495ms)
✔ REQ-PLUG-1 REQ-LIMIT-3 a version 1 limit check refuses after the bump to 2, and the old setting stays (2.719036ms)
✔ REQ-PLUG-1 a kind refused on its first load has nothing switched on, and the log names kind and name (2.205867ms)
✔ REQ-PLUG-1 the setting's shape: unknown kinds refuse alone, a bad whole setting keeps everything (3.120271ms)
✔ REQ-PLUG-1 loads run one at a time, so the last requested setting wins (103.864421ms)
✔ REQ-PLUG-1 the loader needs a log callback (1.369307ms)
✔ REQ-LIMIT-3 token-limit exports interface version 2 with mayLaunch, mustStop and report (1.204087ms)
✔ REQ-LIMIT-3 each subject kind refuses at its limit and allows under it (1.293377ms)
✔ REQ-LIMIT-3 a limit covers only its own subject's records and launches (0.332255ms)
✔ REQ-LIMIT-4 only known records count; an unknown turn adds nothing and is counted apart (0.241481ms)
✔ REQ-LIMIT-3 a reset moves since: records before it no longer count (0.148082ms)
✔ REQ-LIMIT-3 limit 0 refuses with no records; the first limit hit in file order is named (0.130431ms)
✔ REQ-LIMIT-3 a key limit is not enforced while every record's account is null (decision 150 Q1) (0.168183ms)
✔ REQ-LIMIT-3 counts past the safe integer range come back as digit strings (0.134841ms)
✔ REQ-LIMIT-4 bad records or times throw a code, and the check reads nothing but its arguments (0.611062ms)
✔ REQ-LIMIT-3 no token limits: every launch is allowed and the report is empty (0.218561ms)
✔ REQ-LIMIT-3 token-limit ignores tokens.daily, which the daily-quota check enforces (row 126) (0.116475ms)
✔ P5 a model key ID limit counts stack records by key ID without an account (0.113961ms)
✔ P5 Console displays stack count per safe key separately from optional proxy account numbers (0.908576ms)
✔ P5 Console escapes hostile labels and labels unavailable telemetry without presenting a fresh zero (0.662967ms)
✔ REQ-WEB-1 usage read keeps unknown counts and each token kind; no query or write is accepted (26.726073ms)
✔ REQ-WEB-1 malformed usage is refused instead of shown as zero (5.304556ms)
ℹ tests 173
ℹ suites 0
ℹ pass 173
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 9284.877315
