Repository navigation
v0.101.6
Install or update: npm i -g cotal-ai@0.101.6
Changes in this release
-
cotal up --auth-timeout <seconds>sets how long a user-auth space's broker waits for the auth callout, from 1 to 60 seconds.uprenders it asauthorization { timeout: N }in the broker config and starts the space's auth service with the same value as its callout deadline, so the two never differ. The value is recorded in.cotal/broker-policy.json, and a latercotal upon the root renders it again without the flag, aftercotal downor a preserved resume included. A running broker refuses a different value. Before, the broker config had noauthorizationblock and no flag set one, so a hand-applied timeout was lost the next timeupwrote the config.serverConfigtakes the timeout asauthTimeout, and renders no block without it, so existing configs are unchanged. The auth-service daemon, a--callout-onlyreplica included, takes--auth-timeout <seconds>. -
space createandupno longer refuse a project folder that sits beside the records of a homeCOTAL_HOMEredirects. 0.101.x treated every path under the Cotal home as its control directory, so the hosted layout, whose space root lives at$COTAL_HOME/cotal, could not start its broker and a cutover refused withCONFLICT. Under a redirected home only the home itself and its record entries (meshes,prepared,services, and the resthomeRecordEntriesnames) are control paths; the default~/.cotalstill refuses every child, and a project's.cotalis unchanged. -
Add
cotal auth-service --callout-only, a callout replica: one more member of the space's auth callout queue group that keeps connects answered while the full auth service restarts or crashes, and adds capacity. A replica runs the same connect checks as the full service, which now builds them from the same shared hooks, and holds nothing else: no HTTP listener, noauth-service.json, no plane claim, registration, barrier, scanner or sweep. Its store connection reads the auth, records and sessions stores and creates each connect's issuance row, and nothing more. It refuses the HTTP flags and--service-endpoints, refuses to start in a space that admits service endpoints, and exits non-zero when it loses a store connection or the broker. The replica runs from theauth-servicedaemon entry for now; a service preset for it is a follow-up.pnpm smoke:callout-replicaruns the full service and replicas as separate processes under load and counts the callouts each one answers. -
The auth callout now answers every authenticated request before the broker's
authorization { timeout }, instead of leaving a slow one unanswered until nats-server refuses it with no reason in either log. Each request's deadline is the broker timeout less 250 ms, counted from its arrival. A request still unanswered then gets a signed denial with the reasontimeout: the auth callout could not answer inside the broker's authorization timeout, which nats-server logs, and its work stops at its next step. While the oldest request still waiting for a slot has waited more than half that budget, a new request gets the same denial at once instead of joining a queue that is not draining in time. Requests start oldest first, at mostmaxInFlightat a time.Each answered request writes one
auth callout: level=… outcome=…line with the request's per-connect user key, broker client id, owner, actor, outcome and the milliseconds spent queued and in verify, ledger, policy and sign. The line logs at warn over 500 ms and for a timeout or a shed request.startAuthCallouttakeslimits: { authTimeoutMs, maxInFlight, slowMs }(defaults 2000, 32 and 500), andstartAuthServicetakes the same ascalloutLimits; setauthTimeoutMsto the broker's timeout. The connect-load harness counts refusals that carried a callout reason in the broker log apart from those that did not. -
Strip ambient
COTAL_variables from the environment the connect-load harness hands its child processes. Whatever runs the harness may itself be a managed agent session whoseCOTAL_SERVERSand credential variables name a live mesh, and a bareprocess.envspread handed those to every load and callout-service child instead of leaving them on the private broker the harness builds. -
Extend the auth-callout connect-load harness: run several callout service processes behind the existing queue group with
--callouts N, so the service's horizontal scaling can be measured rather than assumed. Fix two harness faults found by the message-rate scenario: the load child wrote its result to a pipe and then exited, which truncated large results, and the scenario sampled a delivery latency for every delivery, which with fan-out is millions per run. The message-rate scenario now exchanges on the channel subjects an agent grant actually carries instead of a literal subject the broker refuses.
What's Changed
- feat(auth): measure callout horizontal scaling, and fix the load harness by @davidfarah2003 in #4787
- fix(auth): answer every auth callout before the broker's timeout by @davidfarah2003 in #4789
- fix(auth): strip ambient COTAL_ vars from the load harness child env by @davidfarah2003 in #4790
- feat(auth): add a callout-only auth service replica by @davidfarah2003 in #4791
- test(auth): expect 409 for stale run-attempt coordinates and process epoch by @davidfarah2003 in #4792
- fix(workspace,cli): let a redirected Cotal home hold project folders by @davidfarah2003 in #4793
- feat(cli): set the broker's auth callout timeout with up --auth-timeout by @davidfarah2003 in #4794
- chore(release): version packages by @davidfarah2003 in #4788
Full Changelog: v0.101.5...v0.101.6