Skip to content

v0.113.0

Choose a tag to compare

@davidfarah-dev davidfarah-dev released this 28 Oct 00:44
1d2877b

Install or update: npm i -g cotal-ai@0.113.0

Changes in this release

  • cotal up --recreate-issued-stores <backup-dir> lets a mesh that ran 0.110.x or earlier start on 0.111.0 and later. Those releases refuse a space's KV_cotal_issued_<space> and KV_cotal_accepted_<space> created before bounded retention, and the remedy they named, nats stream backup and nats stream rm, needed authority no stock credential holds. On the broker that start launches, before any issuer of the space runs, the flag backs up each store created before bounded retention into a new private directory in the layout nats stream backup writes (0700 directories, 0600 files, readable by nats stream restore). It checks every backup against its stream's message count and last sequence, deletes those stores only after every check passes, and the start then creates both again in the current shape. It touches no other stream. It refuses USAGE_INVALID for a backup directory that exists or has no parent and with -f or --restore, LIFECYCLE_BLOCKED while the stack runs, and CONFLICT when neither store predates bounded retention. It works on static-auth, user-auth and open spaces, legacy and controller-owned stacks alike.

    The step is core's removeIssuedStoresBeforeRetention(nc, { space, backupDir, inboxPrefix }), on a connection that holds the new one-shot issued-store-recreate profile (mintCreds, 30 minutes): STREAM.INFO, STREAM.SNAPSHOT and STREAM.DELETE on those two streams, its own inbox, and a one-use response permission per snapshot chunk. An embedder whose spaces cotal up does not start runs it per space with the space's issuers stopped. cotal auth mint still exposes only agent, observer and admin, and teardown keeps its scope.

    cotal up on such a store now refuses CONFLICT (exit 2) instead of reporting OPERATION_UNKNOWN (exit 3); the broker it started is stopped again either way. The store check throws IssuedStoreBeforeRetentionError, and its remedy, shared by every binder, names the flag. docs/UPGRADING.md gains the operator sections for 0.111.0 (with what a rollback can and cannot do) and for the two 0.112.0 changes to multi-space hosts.

    The deliver --spaces ready line no longer prints an empty list as 0 space(s): ;; it reads 0 space(s); retrying <s>.

  • Stop writing a process-CPU timing note to the embedder's stderr when a contract compiles. The number sums every thread in the process, so it does not measure the compile, and the structural registration bounds are what admit a schema. A schema that does not compile is still refused as contract-invalid.

  • A manager stop that retires many seats at once no longer leaves their membership rows behind. The delivery daemon answers the lifecycleMemberships inventory without holding it behind its other admin commands, so a retirement's inventory no longer waits behind every other seat's eviction and misses its 5 s deadline. Inventories that arrive together share one read of the members bucket, and each read begins after its request arrived, so every answer stays complete and lifecycle-exact. A read that fails refuses every request that waited on it. The manager now runs at most 8 retirements at a time, so a stop no longer opens dozens of broker connections together and trips the broker's 2 s authentication timeout, which had also left rows behind. A seat's inventory is still requested only after its own eviction has returned.

  • A records-KV value that is not JSON is refused as internal and names its key from every reader of that bucket. decodeRecordJson is that decoder. The goal, checkpoint, service, lease, answer, notice, migration, lifecycle and issued-authority readers use it, and the private copies are gone, so a caller that classifies EpEnvelopeError no longer sees a bare SyntaxError for the same corruption.

    Presence readers share isPresenceRow. A row needs a non-empty card.id equal to its key, a string card.name, a known status, a finite ts, string display fields, and a condition that is either absent or an object with a string code. The core observer, the runtime and the CLI inventory call that guard.

  • A retiring agent no longer keeps a membership row written after its inventory. Once the delivery daemon is asked for a lifecycle's membership inventory, it refuses that lifecycle's durable joins and leaves, and it reads only after the ones already running have finished. A manager's chat-session and static reconcile retirements now take the same 8 retirement slots as its seats.

  • The user-mode control connect decides its --creds and non-user-mode refusals once. connectUserControlOrExit prints that sentence and exits, so it can no longer drop the recovery clause or skip the --creds refusal.

  • A multi-name cotal down that names the broker as broker or stack-broker now gets the refusal nats gets: TARGET_NOT_FOUND, one message for each of the three names, and a bare cotal down as the next step, in a dry run, a stop and --json. On a controller stack those two names reached the saved stack-broker and refused UNSUPPORTED in stop-policy terms, with <name> and <full-id> placeholders. A saved service of your own named nats or broker still resolves as that service. A set that names another saved service running a broker still refuses UNSUPPORTED, now in plain words with that service's own stop filled in.

  • Wait for broker restore evidence before the up command gives up, and stage a new extension until its add is accepted.

What's Changed

  • fix(core): refuse a non-JSON record as internal and share the presence row guard by @davidfarah2003 in #4976
  • fix(core,manager): retire a mass stop's seats without retaining their membership rows by @davidfarah2003 in #4978
  • fix(connectors): read model catalogs from the harness binary boot resolved by @davidfarah2003 in #4979
  • fix(core,manager): fence a retiring lifecycle's membership writes and bound every retirement by @davidfarah2003 in #4982
  • feat(core,cli)!: recreate pre-0.111.0 issued-authority stores through cotal up by @davidfarah2003 in #4983
  • fix(workspace): decide the user-mode control refusals once by @davidfarah2003 in #4985
  • fix(cli): wait for broker restore evidence and stage new extensions until accepted by @davidfarah2003 in #4980
  • fix(core): keep a contract compile off the embedder's stderr by @davidfarah2003 in #4987
  • fix(cli): give broker and stack-broker in a down set the refusal nats gets by @davidfarah2003 in #4988
  • chore(release): version packages by @davidfarah2003 in #4977

Full Changelog: v0.112.0...v0.113.0