@niscorp/nisc 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +362 -245
- package/CHANGELOG.md +131 -0
- package/CHANGING_A_PACKAGE.md +59 -0
- package/README.md +2 -1
- package/REVIEW.md +3 -3
- package/STYLE_GUIDE.md +8 -8
- package/UPGRADING.md +583 -0
- package/package.json +14 -14
package/UPGRADING.md
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
# Upgrading to @niscorp/nisc 0.11.0
|
|
2
|
+
|
|
3
|
+
This is a review-and-fix release. Every package was reviewed; the holes found are closed, and every change an app can see is declared here with what to do about it. No table, grammar or stored document changes: nothing migrates, there is no `strata upgrade` and no `nisc migrate` to run. Most apps change nothing. The few code patterns that need a change are listed first, under "Do these before you upgrade".
|
|
4
|
+
|
|
5
|
+
| Package | From | To |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `@niscorp/nisc` | 0.10.0 | 0.11.0 |
|
|
8
|
+
| `@niscorp/charter` | 0.1.5 | 0.2.0 |
|
|
9
|
+
| `@niscorp/cli` | 0.9.1 | 0.10.0 |
|
|
10
|
+
| `@niscorp/cortex` | 0.1.6 | 0.2.0 |
|
|
11
|
+
| `@niscorp/haptic` | 0.2.0 | 0.3.0 |
|
|
12
|
+
| `@niscorp/loom` | 0.5.0 | 0.6.0 |
|
|
13
|
+
| `@niscorp/moss` | 0.9.3 | 0.10.0 |
|
|
14
|
+
| `@niscorp/nova` | 0.5.2 | 0.6.0 |
|
|
15
|
+
| `@niscorp/prism` | 0.3.4 | 0.4.0 |
|
|
16
|
+
| `@niscorp/signal` | 0.1.9 | 0.2.0 |
|
|
17
|
+
| `@niscorp/solid` | 0.1.3 | 0.2.0 |
|
|
18
|
+
| `@niscorp/strata` | 0.1.9 | 0.2.0 |
|
|
19
|
+
| `@niscorp/tide` | 0.1.12 | 0.2.0 |
|
|
20
|
+
| `@niscorp/vex` | 0.4.5 | 0.5.0 |
|
|
21
|
+
|
|
22
|
+
## How to upgrade
|
|
23
|
+
|
|
24
|
+
1. Go through "Do these before you upgrade" and make the changes that apply to the app.
|
|
25
|
+
2. Bump every `@niscorp` package the app lists, together, to the version in the table (`@niscorp/nisc` to `0.11.0`). Below 1.0 a caret range does not cross a minor: `^0.9.3` never installs `0.10.0`, so write the new versions out. Do not mix old and new packages; the set is tested only as a whole.
|
|
26
|
+
3. Install, then run the app's checks and tests (`npm run check`, `npm test`).
|
|
27
|
+
|
|
28
|
+
## Do these before you upgrade
|
|
29
|
+
|
|
30
|
+
Each line is a pattern to search the app for, and the change to make where it is found. Every other change in this release needs nothing from an app.
|
|
31
|
+
|
|
32
|
+
- **vex, moss: an update that hands a row over.** Search the update and upsert entries for a column that the table's write or update rule pins with `match:` (`owner_id`, `project_id`, `account_id`), written to a value outside that rule. Such a write is now refused with 400 `scope_denied`. If the app means it (handing a task to someone else), set `runtime.checkMovedRows: false` in moss, or `mutations: { …, checkMovedRows: false }` on a vex handler or adapter.
|
|
33
|
+
- **moss: an integration that reads the visitor's session at its webhook.** Search the integration's service for `cookie`, `proxy-authorization` or `x-operator-key` read on a `/hook/` request, and for a vendor callback page (OAuth `form_post`, SAML POST) that posts into the app and expects the visitor to be signed in. The door now strips those headers, and a page served through it runs with no origin. Carry what the integration needs in the request itself (a signed `state` value), not in the app's session.
|
|
34
|
+
- **cortex: a tool that passes `ctx.signal` to long work.** Search for `ctx.signal` in tools, and for `asTool(` and `manifold.asTool(`. A tool's signal now aborts at its `timeoutMs` (30 s by default; 300 s for a delegated agent). Set `timeoutMs` on each tool whose work may take longer.
|
|
35
|
+
- **cortex: an `onToolResult` hook.** Search for `onToolResult`. Hooks now also run when a tool threw or timed out. A hook meant for results only starts with `if (observation.kind !== 'result') return;`.
|
|
36
|
+
- **cortex: a snapshot taken while a tool runs.** Search for `run.snapshot()` called inside a tool or before `tool-end`, and for `resumeRun`. A resumed run now runs that call again. Take the snapshot after `tool-end`, or make the tool safe to run twice.
|
|
37
|
+
- **cli: `nisc export --out <dir>`.** Search scripts and CI for `--out`. Only the files the previous export recorded are removed, so pages an older export left there stay. Where the folder must contain only the export, empty it yourself before the export.
|
|
38
|
+
- **charter: a string where a list belongs.** Search the charter for `allow: '`, `deny: '`, `actions: '`, `data: '`, `extends: '`. A string is now one pattern, where each character was one (so a `*` in it granted everything). Write it as a list and check the role grants what it should.
|
|
39
|
+
- **nova: an `onError` that switches over error codes.** Search for `switch (` on `error.code` or `ErrorCode` with an exhaustive `never` check. `ErrorCode` gains `'ENDPOINT_FAILED'` and `'HANDLER_FAILED'`; add both cases.
|
|
40
|
+
- **prism: `$replace` with `$` in its replacement.** Search for `$replace` whose `replacement` contains `$$`, `$&`, `` $` `` or `$'`. The replacement is now written as given: write `"US$5"` where you wrote `"US$$5"`.
|
|
41
|
+
- **prism: code that catches `RangeError` or `TypeError` around prism.** Options Intl refuses are now a `PrismError` with code `E_SCHEMA`. Catch `PrismError` (or read `code`).
|
|
42
|
+
- **signal: a stream that detects an abort by its error.** Search for a `catch` around `for await` over `stream()` that looks for "stream ended without a done event". An aborted `stream()` now ends without a `done` event and without throwing; check `signal.aborted` after the loop.
|
|
43
|
+
- **signal: `complete()` or `stream()` without `.schema()` on Groq.** Search for calls with no `.schema(` that treat `''` as an answer. A rejected reply nothing was recovered from now throws `SignalError` `E_PROVIDER_ERROR`; catch it there.
|
|
44
|
+
- **strata: stamps in a `text` column, or a `workDir` of your own.** Search for `upgradeStore(` over a table whose stamp column is `text`: change the column to `jsonb` in an appended migration. Search for `strata upgrade` with `workDir`: if that folder has a `REPORT.md` or `plan.json` of your own, give strata a folder of its own.
|
|
45
|
+
- **tide: a sort on a tide table that breaks ties on `id`.** Search for `tide_run.created_at`, `tide_fact.created_at`, `tide_task.created_at`, and for code that parses ids starting `fact_`, `run_` or `task_`. New ids are UUIDs. Break ties on `due_at`, then `id`: `[{ field: 'tide_run.created_at', dir: 'desc' }, { field: 'tide_run.due_at', dir: 'desc' }, { field: 'tide_run.id', dir: 'desc' }]`.
|
|
46
|
+
- **tide: `ingest` of a `manual` or `run` fact.** Search for `ingest(` with `kind: 'manual'` or `kind: 'run'`. A manual fact now reaches only reflexes of its own `as`; a run fact is refused. Call `fire(reflexId, { now, input, by })` instead.
|
|
47
|
+
- **vex: a cache wrapper that overrides `set`.** Search for a cache made by spreading `createPostgresCache(…)`, `createMemoryCache(…)` or `createTieredCache(…)` and overriding `set`. "Last used" stamps now go through the `touch` it inherits; override `touch` too if the wrapper must see them.
|
|
48
|
+
- **vex: a semantic filter with `$scope`.** Search for `semantic:` with `$scope`. The text now comes from the scope values the host supplies, never from the caller's context; a request without it is refused with `missing_scope`. Supply that scope value from the server.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## @niscorp/charter
|
|
53
|
+
|
|
54
|
+
### A string where a list belongs is read as one pattern
|
|
55
|
+
- Before: `allow: 'crm.deal.view*'` was read one pattern per character, and its `*` granted every id. A misspelt key (`denny`, `Deny`) was ignored without a word, and a value that was no list of strings could crash `verifyCharter`.
|
|
56
|
+
- Now: `allow: 'crm.deal.view*'` grants `crm.deal.view*` only. `verifyCharter` reports such a string, and every key it does not read, as a `shape` warning; any other value that is no list of strings grants nothing (a warning), and in `deny`, `without` or as a whole role that is `null` it is a `shape` error. moss prints these lines at boot, `nisc build` lists them after the route table, and `nisc dev` shows them on vite's error overlay each time a browser connects. `*` also matches across line breaks in an id.
|
|
57
|
+
- You are affected if: a charter has a string where a list belongs (`allow: '…'`, `deny: '…'`, `actions: '…'`, `data: '…'`, `extends: '…'`), or a misspelt key.
|
|
58
|
+
- What to do: write the string as a list (`allow: ['crm.deal.view*']`), fix every key the warnings name, and check the role grants what it should.
|
|
59
|
+
|
|
60
|
+
### A top-level `deny` beside an `actions:` section takes away when a role is resolved without verifying
|
|
61
|
+
- Before: `{ r: { actions: ['crm.*'], deny: ['crm.deal.delete'] } }` resolved through `resolveRole` or `resolvePrincipal` to everything under `crm.*`, `crm.deal.delete` included. `verifyCharter` refuses such a role (`ambiguous-selection`), so moss never boots it.
|
|
62
|
+
- Now: it resolves to everything under `crm.*` but `crm.deal.delete`, and a role that extends it loses `crm.deal.delete` too. A top-level `allow` beside an `actions:` section still grants nothing. `verifyCharter` refuses the role as before and also checks that `deny`, so it can report `dead-deny`, `orphan` or a re-allow warning for it.
|
|
63
|
+
- You are affected if: code calls `resolveRole` or `resolvePrincipal` on a charter it never passed through `verifyCharter`, with such a role. Under moss, nothing changes.
|
|
64
|
+
- What to do: run `verifyCharter`, and move the `deny` into the section: `actions: { allow: ['crm.*'], deny: ['crm.deal.delete'] }`.
|
|
65
|
+
|
|
66
|
+
### New, opt-in
|
|
67
|
+
- `RoleClosure.functions`: the functions a role is granted, listed in `verifyCharter`'s `perRole` when the functions universe is handed in.
|
|
68
|
+
|
|
69
|
+
## @niscorp/cli
|
|
70
|
+
|
|
71
|
+
### `nisc export --out <dir>` removes only the files its previous export wrote
|
|
72
|
+
- Before: `nisc export --out site` emptied `site/` (a `.git`, a notes file and all) and wrote the export. A link named with `--out` was replaced by a folder; a file at the `--out` path was replaced.
|
|
73
|
+
- Now: it removes only the files the previous export wrote there (recorded in `node_modules/.cache/nisc/exports.json`), then writes the new export. Everything else stays and is named, one line each run, including files an older export left before there was a record (a fresh CI checkout). A link named with `--out` is written into. A file at the `--out` path, or a folder of your own where the export writes a file, is refused with a sentence and nothing is written. `--out` pointing at the app, above it, or at the build is refused. The default `out/` is emptied and written as before, also when named `--out out` (and `--out OUT` on Windows and macOS).
|
|
74
|
+
- You are affected if: a script or CI step runs `nisc export --out <dir>` and expects the folder to contain only the export afterwards.
|
|
75
|
+
- What to do: empty the folder yourself before the export (keeping a `.git` if it is a deploy repository), or delete the files each run names.
|
|
76
|
+
|
|
77
|
+
### `nisc export` writes the whole export before it touches the folder
|
|
78
|
+
- Before: on Windows, a path from `paths()` such as `/a:b` emptied `out/`, wrote part of the site and died with a raw `ENOENT` stack (exit 1). A path such as `/z\..\..\escape` wrote a page outside the export's folder (with the default `out/`, into the app's own folder) and exited 0.
|
|
79
|
+
- Now: every export is first written whole into a fresh `.nisc-export-…` folder (for `out/`, in `node_modules/.cache/nisc/`; for `--out`, inside that folder). Only when every file was made is the export's folder touched. Both paths print `nisc: the path "/a:b" cannot be written here (ENOENT). Nothing was written.` and exit 1 with the folder as it was. A full disk prints `nisc: the export could not be written into <out> (ENOSPC on <file>). Nothing already in it was changed.` Which names fail is the system's answer: `/a:b` still writes `a:b/index.html` on Linux and macOS. A `.nisc-export-…` folder a killed export leaves is removed by the next one.
|
|
80
|
+
- You are affected if: on Windows, `paths()` returns a path with `\..\` or with `:`, `*`, `"`, `<`, `>` or `|`.
|
|
81
|
+
- What to do: nothing. If an export stops with `cannot be written here`, leave that path out of `paths()` or spell it as a folder name.
|
|
82
|
+
|
|
83
|
+
### `nisc start` compresses every answer as it streams
|
|
84
|
+
- Before: `nisc start` kept every compressed answer marked `immutable`, keyed by path and `last-modified` but not by query, and never forgot one. A route `/thumb` answering `cache-control: public, max-age=31536000, immutable` by `?user=` gave `/thumb?user=bob` the thumbnail made for `?user=alice`.
|
|
85
|
+
- Now: every answer is compressed as it streams. `/thumb?user=bob` gets Bob's thumbnail. A repeated `/assets/…` answer comes without `content-length` and costs the compression again (about 10 ms for a 0.6 MB bundle, once per new browser).
|
|
86
|
+
- You are affected if: a server route answers `immutable` text whose body depends on the query or the caller, or a client reads `content-length` on a repeated asset answer.
|
|
87
|
+
- What to do: nothing.
|
|
88
|
+
|
|
89
|
+
### The shape check reports other spellings of what a rule fails, and passes `<const>`
|
|
90
|
+
- Before: the shape check (`@niscorp/cli/shape`) matched spellings: `session.roles` failed rule 11 but `const { roles } = session` passed; `Intl.NumberFormat` failed rule 9 but `const { NumberFormat } = Intl` passed; `import { wordsOf } from '../app/helpers'` failed the `data` rule but `import * as helpers` passed. `<const>['a', 'b']` failed rule 16.
|
|
91
|
+
- Now: the same rules fail. A second reading prints one `[info]` line for each other spelling, such as `[info] rule 9: src/server/when.ts:1 Intl, the global one — another spelling of what the rule fails on; reported, not failed`. The exit code never changes because of these lines. A name read only as a type is not reported, nor one a rule already fails in that file, nor one `allow` names for that rule. `<const>[…]` passes rule 16, as `as const` does. The check takes a second or two longer on a large app.
|
|
92
|
+
- You are affected if: the app runs the shape check (`src/dev/shape-check.ts`); or its `allow.style` names a file only because of a `<const>` assertion.
|
|
93
|
+
- What to do: read the `[info]` lines and fix the reach or leave it. Delete an `allow.style` entry that now fails as "has nothing to allow". An `allow` entry added only to quiet an `[info]` line fails the same way.
|
|
94
|
+
|
|
95
|
+
## @niscorp/cortex
|
|
96
|
+
|
|
97
|
+
### A tool's `ctx.signal` aborts at the tool's time limit
|
|
98
|
+
- Before: a tool that passed its `timeoutMs` (30 s by default) was reported to the model as timed out, but its `ctx.signal` stayed live and its work ran on: a `send_email` that timed out and was called again sent the email twice. A delegated agent (`asTool`, `manifold.asTool`; 300 s by default) ran on after its limit. A later abort of the run reached work a tool left running after it returned.
|
|
99
|
+
- Now: at the limit, `ctx.signal` aborts with an `AbortError`; work handed that signal stops, and the email is sent once. A delegated agent stops at its delegation's limit. Each call has its own `ctx.signal`, which aborts with the run while the call runs; once the call has ended, a later abort of the run does not reach it. Gates and `onToolResult` hooks are still handed the run's signal. A tool that ignores `ctx.signal` runs on as before.
|
|
100
|
+
- You are affected if: a tool hands `ctx.signal` to work that can take longer than its `timeoutMs` (a build of several minutes, a long agent behind `asTool(`), or starts background work on `ctx.signal` and expects a later abort of the run to stop it.
|
|
101
|
+
- What to do: set `timeoutMs` on the tool (`defineTool({ …, timeoutMs })`, `asTool(agent, { timeoutMs })`) above the longest run you accept. Give background work a signal of its own and abort it yourself.
|
|
102
|
+
|
|
103
|
+
### `onToolResult` hooks run on errors too
|
|
104
|
+
- Before: a tool that threw `connect failed: postgres://admin:hunter2@db.internal/prod` sent that text to the model and to `tool-end`; a redacting hook `(o) => ({ result: '[redacted]' })` was not called.
|
|
105
|
+
- Now: hooks run after every executed call, also when the tool threw or passed its time limit. On an `error` observation a hook's `{ result }` replaces the error text: the model gets `error: [redacted]`, and `tool-end` carries `{ kind: 'error', error: '[redacted]' }`. A hook that throws makes the call an error with the hook's message. Hooks still do not run for a denied call, an unknown tool, or arguments that failed the input check.
|
|
106
|
+
- You are affected if: an `onToolResult` hook does not check `observation.kind`, or counts or logs calls.
|
|
107
|
+
- What to do: a hook meant for results only starts with `if (observation.kind !== 'result') return;`.
|
|
108
|
+
|
|
109
|
+
### A resumed run first runs the calls its last step left unanswered
|
|
110
|
+
- Before: a run aborted between two calls of one step (`c1` answered, `c2` not) left a transcript ending `assistant(c1, c2) tool[c1]`. `resumeRun` sent that to the provider and `c2` never ran: OpenAI refuses such a transcript; Groq takes it and the model goes on without `c2`'s result.
|
|
111
|
+
- Now: `resumeRun` runs `c2` first, through its gates, approvals and hooks, then calls the model. Any call of the last step with no tool message runs, so a call that was still running when the snapshot was taken runs a second time. A resume from a pending approval is unchanged.
|
|
112
|
+
- You are affected if: the app calls `resumeRun`, and takes `run.snapshot()` while a tool runs (inside the tool, or on an event before its `tool-end`).
|
|
113
|
+
- What to do: take the snapshot after the call's `tool-end`, or make the tool safe to run twice.
|
|
114
|
+
|
|
115
|
+
### `resumeRun` says what is wrong with a snapshot it cannot resume
|
|
116
|
+
- Before: a snapshot with no `messages` threw a `TypeError`; one whose `pending` had no `remaining` ran and ended `unknown`.
|
|
117
|
+
- Now: both throw from `resumeRun`: `[cortex:config] snapshot cannot be resumed: pending.remaining: …`. Every snapshot that resumed still does, `null` in optional fields included.
|
|
118
|
+
- You are affected if: code catches those old failures of a broken snapshot.
|
|
119
|
+
- What to do: nothing.
|
|
120
|
+
|
|
121
|
+
### A parent run's handle answers its delegated agent's approval
|
|
122
|
+
- Before: a delegated agent (`asTool(child)`, `manifold.asTool(id)`) whose gate asked for approval put `approval-required` on the parent's stream, but `run.approve(id)` on the parent's handle did nothing; the child waited until its delegation's time limit.
|
|
123
|
+
- Now: `run.approve(id)` or `run.deny(id)` on the parent, with the nested event's id, reaches the child at any depth. The child's own handle still works; the first answer counts. A nested approval does not survive a reload.
|
|
124
|
+
- You are affected if: the app answers approvals on the parent handle for events whose `agentPath` is deeper than the parent's.
|
|
125
|
+
- What to do: nothing. A tool that runs an agent itself passes its handle on:
|
|
126
|
+
```ts
|
|
127
|
+
const handle = agent.run(input, { onEvent: ctx.forward, agentPath: ctx.agentPath, signal: ctx.signal });
|
|
128
|
+
const stopForwarding = ctx.forwardApprovals?.(handle);
|
|
129
|
+
const result = await handle.result.finally(() => stopForwarding?.());
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### More agents stream `output-partial` events
|
|
133
|
+
- Before: an agent whose data schema has a constrained field (`.min(1)`, `.positive()`, an email or url format), a `z.record` or a `z.lazy` emitted no `output-partial` for the whole run. One with a field that takes any value (`z.record(z.string(), z.unknown())`, `z.any()`) stopped emitting at the first value nested inside it.
|
|
134
|
+
- Now: both stream partials to the end of the reply (one agent went from 0 to 27 events per answer). A union field whose value only a later variant takes is kept in the partials. As before, a partial can fail the schema until the run ends; the result is checked as before. A run handle keeps the extra events until it is dropped.
|
|
135
|
+
- You are affected if: an `output-partial` listener does work on each event (moves a live screen, sends a frame) for such a schema.
|
|
136
|
+
- What to do: nothing, unless the listener cannot take more events: then filter them.
|
|
137
|
+
|
|
138
|
+
### New, opt-in
|
|
139
|
+
- `output: { schema, refuseCutOff: true }`: a reply the provider cut off while its JSON was open (finish `length` or `content_filter`), or an attempt a Groq rejection carried cut short, is corrected (a `retry` event) instead of accepted closed at its last whole value.
|
|
140
|
+
- `ctx.forwardApprovals(handle)` for a tool that runs an agent itself (above).
|
|
141
|
+
|
|
142
|
+
## @niscorp/haptic
|
|
143
|
+
|
|
144
|
+
### `prepareArtifact` refuses a stamp entry that is no number
|
|
145
|
+
- Before: `prepareArtifact({ stamp: { 'nisc.haptic': 'v0', 'nisc.prism': 3 }, … })` read the `nisc.haptic` entry as current, ran none of its migrations, and prepared the artifact.
|
|
146
|
+
- Now: it throws `ArtifactError` with code `UPGRADE`: "The stamp's entry for nisc.haptic is \"v0\": not a number of migrations."
|
|
147
|
+
- You are affected if: the app prepares artifacts whose stamps it wrote by hand with entries that are not numbers. Stamps haptic writes are always numbers.
|
|
148
|
+
- What to do: write each stamp entry as a number of migrations.
|
|
149
|
+
|
|
150
|
+
## @niscorp/loom
|
|
151
|
+
|
|
152
|
+
### An optional field can be removed; a new Prism op starts with its required arguments only
|
|
153
|
+
- Before: an optional field (`email: z.string().email().optional()`) started as `""` with no way to leave it out. In a union branch, `toNova`'s `includeOptional: false` and `empty` were ignored. In the Prism plugin a newly chosen `$localeMoney` got `{ minorUnits: false, digits: 0 }` (4500 cents showed `€ 4.500`), `$localeDate` `{ hour12: false, timeZone: "" }` (a runtime error).
|
|
154
|
+
- Now: an optional field's `loom:field` node has `model` (the field's path) and `optional: true`; the kit shows **Remove** beside the label while the field has a value, and Remove writes it back to absent. `includeOptional` and `empty` apply in union branches. A newly chosen Prism op starts with its required arguments only (`$localeMoney: {}`, `$sortBy: { as: "" }`).
|
|
155
|
+
- You are affected if: a host kit registers its own `loom:field` (it gets the two new props and shows no Remove), or passes `includeOptional: false` or `empty` with unions.
|
|
156
|
+
- What to do: nothing. A custom `loom:field` can offer Remove by writing `undefined` through its `novaModel`.
|
|
157
|
+
|
|
158
|
+
### A union shows the branch the value is, or shows the value as JSON
|
|
159
|
+
- Before: a stored value no branch recognises (`kind: "triangle"`) was shown as the first branch, and an edit wrote that branch's fields into it. A structural union picked its branch by the first unique key, even an optional one. A union of `z.lazy` branches was a raw JSON box.
|
|
160
|
+
- Now: with no fallback branch the chooser shows "—" and the value is in the JSON editor until a branch is chosen. A key the branch requires is preferred. Lazy branches form a union with a chooser.
|
|
161
|
+
- You are affected if: the host reads `parse`'s `Field` model, or opens forms on values no branch matches.
|
|
162
|
+
- What to do: nothing.
|
|
163
|
+
|
|
164
|
+
### A literal starts as its value
|
|
165
|
+
- Before: `z.literal("circle")` parsed as `unknown` (a raw box starting at `null`); a union of literal-tagged objects started as `{ kind: null, radius: 0 }`.
|
|
166
|
+
- Now: it is `{ kind: "enum", options, default }`, a select starting at `"circle"`; that union starts as `{ kind: "circle", radius: 0 }`.
|
|
167
|
+
- You are affected if: the host reads the `Field` model.
|
|
168
|
+
- What to do: nothing.
|
|
169
|
+
|
|
170
|
+
### Clearing a number leaves it absent unless the schema takes `null`
|
|
171
|
+
- Before: emptying a number box wrote `{ "qty": null }`, which `z.number().optional()` refused.
|
|
172
|
+
- Now: the key is absent; `null` only where the schema is `.nullable()`. `FieldMeta` gains `nullable?: true`; `loom:number` gets `nullable` and `integer` props and steps by 1 for an integer.
|
|
173
|
+
- You are affected if: the host saves on change and reads `null` as "no number".
|
|
174
|
+
- What to do: read a missing key as "no number".
|
|
175
|
+
|
|
176
|
+
### A select with no value shows "—"
|
|
177
|
+
- Before: a required enum with no value displayed its first option, and choosing it wrote nothing.
|
|
178
|
+
- Now: a disabled "—" row shows until an option is chosen; every option is a change and is written. Documents are unchanged.
|
|
179
|
+
- You are affected if: a test reads the select's displayed value.
|
|
180
|
+
- What to do: update the test (an empty select now reads `''`).
|
|
181
|
+
|
|
182
|
+
### An object with a dotted key is edited as JSON
|
|
183
|
+
- Before: `{ "a.b": string }` bound `$.a.b`: the control showed nothing and an edit wrote `{ a: { b: … } }`.
|
|
184
|
+
- Now: such an object is the raw JSON box at its own path, and an edit writes `{ "a.b": … }`; the editor wraps such a root document.
|
|
185
|
+
- You are affected if: a schema has a key with a dot in it, and the host calls `toNova` directly.
|
|
186
|
+
- What to do: with `toNova` at the root, pass `rootKey`.
|
|
187
|
+
|
|
188
|
+
### New, opt-in
|
|
189
|
+
- CSS variables for the kit's and reference plugins' colours (`--loom-border`, `--loom-danger` and 23 more, listed in the README); each falls back to today's colour.
|
|
190
|
+
|
|
191
|
+
## @niscorp/moss
|
|
192
|
+
|
|
193
|
+
### An update that moves a row out of the caller's update rule is refused
|
|
194
|
+
- Before: an update through `/api/vex` or `executeAs` that wrote a column the caller's update rule pins (`owner_id` under an `owner_id = me` rule, `project_id` under `match: 'project_id'`) to a value the rule does not allow wrote it, and the row left the caller's reach.
|
|
195
|
+
- Now: it is refused with 400 `scope_denied`, naming the rule and the column, and nothing is written (one check query first). A column a `set` rule stamps is not checked. An insert's `onConflict … set` that would move a row leaves it as it is and answers `[]` for it.
|
|
196
|
+
- You are affected if: an update or upsert entry writes a column that the table's write or update behavior pins with `match:`, to a value outside it: handing a record to someone else, moving it to another project or account.
|
|
197
|
+
- What to do: if the app means it, set `runtime.checkMovedRows: false`.
|
|
198
|
+
|
|
199
|
+
### The webhook door and the integration proxy keep the app's session out
|
|
200
|
+
- Before: a webhook (`POST /integrations/:id/hook/*`) passed the visitor's `cookie`, `proxy-authorization` and `x-operator-key` on to the integration, and a page the integration answered was served as the app's own page.
|
|
201
|
+
- Now: those headers stay behind. What an integration answers, through a webhook or the proxy, is served with `x-content-type-options: nosniff` and `content-security-policy: sandbox allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-modals allow-downloads allow-top-navigation`. A vendor page a browser lands on (an OAuth `form_post` callback, a SAML POST) still runs its script, submits its forms and moves the window on, but with no origin: it cannot read the app's cookies or browser storage, a socket it opens is refused, and a form it posts into the app carries no session cookie. A `fetch` that reads the answer is not affected.
|
|
202
|
+
- You are affected if: an integration's service reads `cookie`, `proxy-authorization` or `x-operator-key` on a hook request, or a vendor page served through the door uses the app's cookies or storage, or posts into the app expecting the visitor to be signed in.
|
|
203
|
+
- What to do: carry what the integration needs in the request itself (a signed `state` value), not in the app's session.
|
|
204
|
+
|
|
205
|
+
### `session.answerIntent` replays an entry at the reach it declares
|
|
206
|
+
- Before: a replay through `session.answerIntent` of an entry that declares a `reach` ran under the caller's own policy, wider than the entry asks.
|
|
207
|
+
- Now: it runs at that reach, as `/api/vex` answers the same person: fewer rows, or `scope_denied` for a role with no such reach.
|
|
208
|
+
- You are affected if: the app calls `session.answerIntent` and its entries declare `reach`.
|
|
209
|
+
- What to do: nothing.
|
|
210
|
+
|
|
211
|
+
### A revoked session's socket closes within one revalidation interval
|
|
212
|
+
- Before: every `sessionRevalidateMs` a pass asked the `session` verifier about one socket at a time. With 200 sockets, a 20 ms verifier and `sessionRevalidateMs: 500`, a revoked socket stayed open about 6.7 s.
|
|
213
|
+
- Now: a pass asks once for each distinct token, every token at the same moment, and the revoked socket closes after about 520 ms. Sockets that present one token share one call. Where a pass took longer than the interval, the verifier now sees more calls, all at once at the start of the pass (in the example, about 28 a second become about 350 a second, up to 200 at once). With `session: 'sessions'` each pass, every 60 s by default, sends one query per distinct token at once. The log line for a late failure now reads "could not be asked about a token after its pass went on. Its connections stay open and are asked again".
|
|
214
|
+
- You are affected if: the app has many signed-in sockets on `session: 'sessions'`, or a `runtime.session` function that calls a service with a limit on calls at once.
|
|
215
|
+
- What to do: small apps, nothing. With many sockets, watch request latency around each pass and raise `sessionRevalidateMs` or the pool size if it shows. A verifier of your own with a limit queues inside itself (a small semaphore around the service call).
|
|
216
|
+
|
|
217
|
+
### New, opt-in
|
|
218
|
+
- `runtime.answerReadableRows: true`: a write on the `/api/vex` surfaces answers only the rows the caller may read. Off by default: with it on, a sign-in entry that deletes a one-time link and reads who signs in from the deleted row, run by a role with no read grant on the link table, answers `[]`.
|
|
219
|
+
- `runtime.artifactsUnusedSinceStart: true`: the artifact sweep counts unused time only since the server started. By default, time the app is down counts as unused, so after a downtime longer than `artifactsUnusedMs` the sweep at boot deletes everything not used since.
|
|
220
|
+
|
|
221
|
+
## @niscorp/nisc
|
|
222
|
+
|
|
223
|
+
### The rulebook
|
|
224
|
+
- Before: `AGENTS.md` was written as long paragraphs and also carried the part for whoever changes a package.
|
|
225
|
+
- Now: `AGENTS.md` reads as short numbered points; the part for whoever changes a package is `CHANGING_A_PACKAGE.md`, beside it. Rule 16 names `<const>` beside `as const` as the one assertion allowed. This guide ships as `UPGRADING.md`.
|
|
226
|
+
- You are affected if: an app's own `AGENTS.md` quotes the rulebook rather than pointing to it.
|
|
227
|
+
- What to do: nothing; an app made by `npm create nisc` points to it.
|
|
228
|
+
|
|
229
|
+
## @niscorp/nova
|
|
230
|
+
|
|
231
|
+
### A mount hook's navigation acts from its own instance
|
|
232
|
+
- Before: an action `opener` with `lifecycle: { mount: [{ push: { action: 'child' } }] }`, pushed over `home`, ended `home:suspended > child:active > opener:active`. `mount: [{ removeSelf: true }]` did nothing, and `mount: [{ pop: true }]` closed `home`. Push a dialog over an action whose `suspend` hook takes 30 ms, pop it 1 ms later, and the action stayed `suspended` on top, its buttons dead.
|
|
233
|
+
- Now: the opener ends `home:suspended > opener:suspended > child:active`; `removeSelf` and `pop` close the opener and leave `home:active`. The action revealed by the pop ends `active`. `getState` and `getCanvasState` list a new instance while its mount hook runs, so a data-change listener sees the instance's first writes (the input merged at mount) on its canvas; and the first `onStateChange` snapshot after a mount hook pushes onto another canvas already shows the new instance.
|
|
234
|
+
- You are affected if: a `mount` hook navigates before its first `call` returns; or a `shell.onDataChange` listener looks an instance up in `getState()` and counts or reacts to its writes (it now sees one write more, the one at mount); or a listener reads the very first snapshot after a push.
|
|
235
|
+
- What to do: a listener that counts writes skips the write equal to the data the instance was placed with. Otherwise nothing.
|
|
236
|
+
|
|
237
|
+
### A field with a `ref` inside a loop writes its own row
|
|
238
|
+
- Before: `{ for: '$.lines', as: 'line', do: { component: 'Input', ref: 'qty', model: '$line.qty' } }` over three rows gave every field the model ref `qty`; typing 5 into the first row wrote the last: `[{qty:1},{qty:1},{qty:5}]`.
|
|
239
|
+
- Now: each row's model ref is `qty@lines.0.qty`, `qty@lines.1.qty`, …; typing 5 into the first row gives `[{qty:5},{qty:1},{qty:1}]`. The node's `ref` stays `qty`: `data-ref`, triggers on `ref: 'qty'` and `@event.ref` are as before. The longer name shows in the TTY command list and moss's terminal render trees (`set qty@lines.0.qty …`).
|
|
240
|
+
- You are affected if: code compares a loop field's `model.ref` with its written `ref`, or a terminal script types `set qty …` for such a field.
|
|
241
|
+
- What to do: compare the node's `ref` instead; type the longer name in terminal scripts. A kit that dispatches `ui:model` with the node's `model.ref` keeps working.
|
|
242
|
+
|
|
243
|
+
### Inside a loop, `model: '$.<as>.x'` writes the row it shows
|
|
244
|
+
- Before: in `{ for: '$.lines', as: 'line', do: { component: 'Input', model: '$.line.qty' } }` the field showed the row's `qty` but typing wrote a root `line.qty`. `model: '$.index'` wrote a root `index`. A nested `for: '$.g.items'` inside `for: '$.groups', as: 'g'` bound `g.items.0.v` in every group.
|
|
245
|
+
- Now: `model: '$.line.qty'` writes `lines.0.qty`; `model: '$.index'` binds nothing, as `model: '$index'` does; the nested loop binds `groups.0.items.0.v`, `groups.1.items.0.v`. What every layout shows is unchanged.
|
|
246
|
+
- You are affected if: a layout inside a loop writes through `model: '$.<as>…'`, `'$.items'` or `'$.index'`.
|
|
247
|
+
- What to do: nothing.
|
|
248
|
+
|
|
249
|
+
### `model` and `for` written as one `{{…}}` bind
|
|
250
|
+
- Before: `model: '{{$.q}}'` bound nothing, so typing changed nothing; inside `for: '{{$.lines}}'` every `model` lost its binding.
|
|
251
|
+
- Now: both bind as the bare path does (`model: '$.q'`, `for: '$.lines'`), and typing writes the data.
|
|
252
|
+
- You are affected if: a layout (one a model wrote, say) uses that form.
|
|
253
|
+
- What to do: nothing.
|
|
254
|
+
|
|
255
|
+
### Bindings never read what every object inherits
|
|
256
|
+
- Before: `{{$.x.constructor}}` rendered `function Object() { [native code] }`, and `$toString` read a function.
|
|
257
|
+
- Now: `$.x.constructor`, `$.x.toString` and `$.x.__proto__` are `undefined` (the text renders empty). A name every object inherits (`toString`, `constructor`, `valueOf`) is never found as an action, fragment, endpoint, function, phrase, slot or directive. A `functions` object made with `Object.create({ hello })` or as a class instance still finds `hello`; a getter on a class the data carries still reads.
|
|
258
|
+
- You are affected if: a layout reads one of `Object.prototype`'s members through a binding.
|
|
259
|
+
- What to do: put the value in the data.
|
|
260
|
+
|
|
261
|
+
### A fragment's slot renders the stored layout its action names
|
|
262
|
+
- Before: an action with `layout: 'invoice-body'` (an id in the layout store), pushed with a fragment whose layout has `{ slot: 'body' }`, showed the text `invoice-body` in the slot.
|
|
263
|
+
- Now: the slot shows the stored layout.
|
|
264
|
+
- You are affected if: an action with a string `layout` is pushed `with` a fragment.
|
|
265
|
+
- What to do: nothing.
|
|
266
|
+
|
|
267
|
+
### The DOM and TTY kits register `CanvasSlot`
|
|
268
|
+
- Before: `createShell({ canvases: [{ id: 'main', initial: 'hello' }], registry: ttyKit() })`, as the README shows, drew `!! COMPONENT_NOT_FOUND: … CanvasSlot`.
|
|
269
|
+
- Now: the default shell layout draws, and `defaultRegistry().list()` of these kits names `CanvasSlot`, as the React and Vue kits' lists do.
|
|
270
|
+
- You are affected if: code builds a component list (for a model, say) from the DOM or TTY kit's `registry.list()`.
|
|
271
|
+
- What to do: nothing.
|
|
272
|
+
|
|
273
|
+
### `NovaShell` adds only the React components a registry lacks
|
|
274
|
+
- Before: `<NovaShell shell={shell} registry={registry} />` with a registry that had no `CanvasSlot` registered all nine default React components on it, replacing the registry's own `Text`, `Stack`, `Input`, `Button`, `Box`, `Panel`, `JsonTree` and `ActionSlot`. `NovaCanvas` did the same.
|
|
275
|
+
- Now: only the names the registry does not have are added; its own components stay. A registry that has `CanvasSlot` is untouched, as before.
|
|
276
|
+
- You are affected if: the app hands `NovaShell` or `NovaCanvas` a registry with its own versions of those names and no `CanvasSlot`: it now sees its own components.
|
|
277
|
+
- What to do: nothing, unless the app wants React's defaults over its own: then call `registerNovaReactComponents(registry)` itself.
|
|
278
|
+
|
|
279
|
+
### A `$` name followed by more words is text
|
|
280
|
+
- Before: any string starting with `$` and a letter was read as a path: `children: '$CAD only'` rendered empty. `{ if: '$count > 0', then: THEN, else: ELSE }` with `count: 0` rendered ELSE (a path that does not exist).
|
|
281
|
+
- Now: `'$CAD only'` renders `$CAD only`, and with a phrasebook it is looked up and reported to `onPhraseMiss` when missing. That condition renders THEN (the string is text, which is truthy); the same for a step `{ $if: '$count > 0', … }`. `'$'` alone, `'$USD'`, `'$item.größe'` and `'$item.name '` resolve as before.
|
|
282
|
+
- You are affected if: a layout has such text, or a condition written as a `$` name and more words.
|
|
283
|
+
- What to do: write a comparison with `{ $prism: … }`; add a translation where the phrasebook reports one.
|
|
284
|
+
|
|
285
|
+
### A plain-text HTTP error body reaches `errorTarget.data`
|
|
286
|
+
- Before: an endpoint with `errorTarget: 'err'` whose server answered `503` with `Service down for maintenance` wrote `err = { status: 503, message: 'HTTP 503' }`.
|
|
287
|
+
- Now: `err = { status: 503, message: 'HTTP 503', data: 'Service down for maintenance' }`, and `@error.data` carries the text. A JSON error body is read as before. `FetchResponse` gains an optional `clone`; a fetch whose responses lack it is read as before.
|
|
288
|
+
- You are affected if: a layout or step shows the whole error object.
|
|
289
|
+
- What to do: nothing.
|
|
290
|
+
|
|
291
|
+
### A failure that comes back after a newer call came back is dropped
|
|
292
|
+
- Before: search "a" (fails after 50 ms), then "ab" (succeeds after 5 ms), on an endpoint with `target: 'rows'` and `errorTarget: 'err'`: the rows showed "ab", then the late failure wrote `err` over a screen that was fine.
|
|
293
|
+
- Now: `err` stays as it was. The failed call's `onError` steps still run. A failure that comes back while a newer call is still on its way is written, as before.
|
|
294
|
+
- You are affected if: an endpoint with `errorTarget` is called again before an earlier call failed (search as you type, repeated saves).
|
|
295
|
+
- What to do: nothing.
|
|
296
|
+
|
|
297
|
+
### Translations go in as written
|
|
298
|
+
- Before: on text with spaces around it (`'Price in dollars '`), a translation `'Preis in US$$'` rendered `Preis in US$ `: `$$`, `$&`, `` $` ``, `$'` and `$1` were read as patterns.
|
|
299
|
+
- Now: it renders `Preis in US$$ `, as on text without spaces.
|
|
300
|
+
- You are affected if: a translation contains one of those sequences.
|
|
301
|
+
- What to do: write the text you want shown.
|
|
302
|
+
|
|
303
|
+
### `onError` is told of more problems
|
|
304
|
+
- Before: these reached no one: in a strict shell (`strict: true`), a `call` that failed with no `onError` steps and no `errorTarget`, a call to an endpoint the action lacks (`{ call: 'svae' }`), and a subscriber that threw (`onStateChange`, `onDataChange`, `onEndpoint` listeners, handlers on the shell's own buses, a runtime's data and status subscribers); in any shell, a `removeAt` whose template index resolved to a negative number (`index: '{{$.found}}'` with `found = -1` removed the last row without a word), a `GET` endpoint with a `request` body, and an actions or fragments map keyed by something other than the id.
|
|
305
|
+
- Now: each is reported to `onError` as a `NovaError`: `ENDPOINT_FAILED` (`endpoint 'save' failed: disk full`, `unknown endpoint: svae`) and `HANDLER_FAILED` (the thrown message) in strict shells; `MUTATION_ERROR` for the negative index, which is still applied; `DefinitionValidationError` for the `GET` with a body. What runs is unchanged: nothing new is thrown, and an `onError` that throws stops nothing. `ErrorCodes` gains `endpointFailed` and `handlerFailed`, and `ErrorCode` gains `'ENDPOINT_FAILED'` and `'HANDLER_FAILED'`. A literal `index: -1` is not reported. Lax shells report no failed call and no throwing subscriber, as before; buses the app hands in are left as they are.
|
|
306
|
+
- You are affected if: `onError` logs or shows errors, or switches exhaustively over `ErrorCode`; or a `removeAt` template index can be negative.
|
|
307
|
+
- What to do: handle the two new codes. Guard a `removeAt` whose index can be "not found" with `$if`.
|
|
308
|
+
|
|
309
|
+
### New, opt-in
|
|
310
|
+
- `replaceDraftOnWrite: true` on a bound `Input`: while it is focused, a change at its model path that is not its own echo replaces what is typed (DOM, React, Vue and Ink adapters).
|
|
311
|
+
|
|
312
|
+
## @niscorp/prism
|
|
313
|
+
|
|
314
|
+
### `$update` and `$has` read a path as `$get` does
|
|
315
|
+
- Before: `$update` of `{ items: [{qty:1},{qty:2}] }` at `["items","0","qty"]` gave `{ items: { "0": { qty: 5 } } }`, losing item 2. At `["items","5"]` over `[1, 2]` it gave `{ items: { "5": 5 } }`. Of `{ title: "Hello" }` at `["title","en"]` it gave `{ title: { en: "Hi" } }`. `$has` at `["items","0"]` over a list answered `false`.
|
|
316
|
+
- Now: the first gives `{ items: [{qty:5},{qty:2}] }`; the second is `E_MISSING_PATH` ("No array item at items.5"); the third is `E_TYPE`; `$has` answers `true`. A key on a list (`"x"`, `"01"`) or on a string, number or boolean is `E_TYPE`. A missing key or `null` on the path is still created as an object.
|
|
317
|
+
- You are affected if: an `$update` path runs through a list by digit text or through a scalar (in a strata document step too: documents upgraded after the release get the new shape or the error).
|
|
318
|
+
- What to do: write the object you want with `$merge`, or test the value first with `$type`.
|
|
319
|
+
|
|
320
|
+
### `$round` rounds at the decimals as written
|
|
321
|
+
- Before: with `digits: 2`, `1.1` `"ceil"` gave `1.11`, `4.35` `"floor"` `4.34`, `1.005` `1`, `0.285` `0.28`; `digits: 400` gave `NaN`.
|
|
322
|
+
- Now: `1.1`, `4.35`, `1.01`, `0.29`; more digits than a number has give the number. `digits: 0` answers as before.
|
|
323
|
+
- You are affected if: `$round` with `digits` above 0 meets a value whose decimals end on a half or exactly on the cut: it can now differ by one in the last place.
|
|
324
|
+
- What to do: nothing, unless a stored number must match one rounded before; stored numbers keep their value.
|
|
325
|
+
|
|
326
|
+
### An overflowing sum, difference, product or quotient is an error
|
|
327
|
+
- Before: `{ "$mul": [1e308, 10] }` gave `Infinity`, which JSON stores as `null`.
|
|
328
|
+
- Now: `E_TYPE`, "$mul gave Infinity, which is not a JSON number." The same for `$add`, `$sub`, `$div`, and for `$sum` and `$avg`.
|
|
329
|
+
- You are affected if: arithmetic runs on numbers a person types with no bound.
|
|
330
|
+
- What to do: refuse an unbounded typed number before the arithmetic (`$lt` against a ceiling), or let the error reach the form.
|
|
331
|
+
|
|
332
|
+
### `$localeMoney` takes the divisor from the currency; the locale ops read the amount as `$toNumber` does
|
|
333
|
+
- Before: 1500 JPY with locale `en_US` (a tag Intl cannot read) printed `JPY 15.00`. An amount of `[1999]` printed `19,99 €`, `true` `0,01 €`, `"0x10"` `0,16 €`, `" "` `0,00 €`, in `$localeMoney` and `$localeNumber`.
|
|
334
|
+
- Now: `JPY 1500`. Those four amounts are `E_TYPE`. `" 1999 "` is still read; `null` and `""` still go to `fallback`.
|
|
335
|
+
- You are affected if: the amount can be a list, a boolean, hex text or blank text.
|
|
336
|
+
- What to do: hand a number or numeric text.
|
|
337
|
+
|
|
338
|
+
### Options Intl refuses are a `PrismError` with `E_SCHEMA`
|
|
339
|
+
- Before: `$localeDate` with `{ dateStyle, weekday }`, or `$localeNumber` with `minDigits: 2, digits: 1`, threw a bare `TypeError` or `RangeError`.
|
|
340
|
+
- Now: a `PrismError`, code `E_SCHEMA`: "$localeDate: Intl refused its options: …".
|
|
341
|
+
- You are affected if: code catches `RangeError` or `TypeError` by class around prism.
|
|
342
|
+
- What to do: catch `PrismError`, or read `code`.
|
|
343
|
+
|
|
344
|
+
### `$min` and `$max` skip `null` wherever it is
|
|
345
|
+
- Before: `$min` of `[3, null, 1]` was `E_TYPE`; of `[null, 3, 1]` it was `1`. Each item cost 8 steps.
|
|
346
|
+
- Now: both `1`; a list of nulls gives `null`. Each item costs 9 steps, so a list of about 111,000 items or more under the default `maxSteps` (1,000,000) is refused with `E_BUDGET`. The compiled `fingerprint` of a config using them changes once (vex re-seeds such a cached entry once at boot).
|
|
347
|
+
- You are affected if: a list can have `null` after its first item, or has more than about 110,000 items.
|
|
348
|
+
- What to do: for very long lists, raise `maxSteps`.
|
|
349
|
+
|
|
350
|
+
### `$replace` writes its replacement as given
|
|
351
|
+
- Before: replacement `"US$$5"` wrote `US$5`; `"[$&]"` wrote the matched text in brackets.
|
|
352
|
+
- Now: `US$$5` and `[$&]`, as typed.
|
|
353
|
+
- You are affected if: a replacement contains `$$`, `$&`, `` $` `` or `$'`.
|
|
354
|
+
- What to do: write the text you want (`"US$5"`).
|
|
355
|
+
|
|
356
|
+
### Text is never cut inside a character
|
|
357
|
+
- Before: `$slice` 0–5 of `"Hey 👍 there"` gave `"Hey \ud83d"`, half a character that Postgres jsonb refuses; `$take 1` of `"👍"` gave `"\ud83d"`; `$split` of `"a👍"` with `sep: ""` gave three items.
|
|
358
|
+
- Now: `"Hey "`, `""`, `["a", "👍"]`. Every result that was whole text is the same. `$length` still counts UTF-16 units.
|
|
359
|
+
- You are affected if: text that may contain emoji is cut at a fixed length: it is one character shorter where an emoji straddles the cut.
|
|
360
|
+
- What to do: nothing.
|
|
361
|
+
|
|
362
|
+
### `$interpolate` fills names in any script
|
|
363
|
+
- Before: `"Hallo {{straße}}"` stayed as written, even with `straße` in `values`.
|
|
364
|
+
- Now: `"Hallo A"`, or `"Hallo "` when the key is missing, as an ASCII name always did. `{{first-name}}` and `{{ name }}` are still left as written.
|
|
365
|
+
- You are affected if: a template has a `{{…}}` name that is not ASCII (owner-written mail templates, say): where the key is missing it becomes empty text instead of staying in braces.
|
|
366
|
+
- What to do: nothing.
|
|
367
|
+
|
|
368
|
+
### Date and locale ops are answered where they run
|
|
369
|
+
- Before: `compile` (and a kept `evaluate` from its second call) worked out `$date`, `$dateAdd`, `$dateDiff`, `$localeDate`, `$localeMoney` and `$localeNumber` whose inputs were all written: `{"$date":{"value":"2026-01-01T09:00:00Z","format":"HH:mm"}}` compiled in Vienna was stored as `{"$const":"10:00"}`, and `execute` in Los Angeles answered `10:00`.
|
|
370
|
+
- Now: these ops stay ops in a compiled IR and answer on the machine that runs them (`01:00` there). On the compiling machine every answer is the same. The `fingerprint` and `meta.stats.optimizations.constantsFolded` of such a config change once; each call spends one more step and one Intl format per such op. An IR stored before keeps its folded constant until compiled again.
|
|
371
|
+
- You are affected if: code compares stored fingerprints or `constantsFolded`, or runs IRs compiled on another machine.
|
|
372
|
+
- What to do: recompile stored IRs that should answer where they run.
|
|
373
|
+
|
|
374
|
+
### A kept config answers the same on every call
|
|
375
|
+
- Before: a config object run again by `evaluate` worked out its written parts from the second call, each counting one step: a `$join` of 600 written parts under `maxSteps: 500` failed on call one and passed from call two. A `$const` with a `__proto__` key kept it on the first call and lost it from the second (`out.admin` read `true` through the prototype).
|
|
376
|
+
- Now: every call answers as the first. `compile` and `execute` are unchanged.
|
|
377
|
+
- You are affected if: a kept config's first call is near `maxSteps`, or a constant has a `__proto__` key.
|
|
378
|
+
- What to do: nothing.
|
|
379
|
+
|
|
380
|
+
### New, opt-in
|
|
381
|
+
- `EvalContext.folding?: boolean`, set while the optimizer works a subtree out ahead of time; an op written against `EvalContext` can ignore it.
|
|
382
|
+
|
|
383
|
+
## @niscorp/signal
|
|
384
|
+
|
|
385
|
+
### A Groq tool call cut inside its arguments is not run
|
|
386
|
+
- Before: Groq rejected a call with `tool_use_failed` and the attempt `{"name":"transfer","arguments":{"to":"acct-1","amount":10` (the model was writing 1000). signal closed it and ran `transfer({ to: "acct-1", amount: 10 })`.
|
|
387
|
+
- Now: the arguments go on as the text they are, the tool's input check fails, the model is told `error: input_invalid: …` and calls again. An attempt whose arguments are whole runs as before.
|
|
388
|
+
- You are affected if: the app runs tools on Groq through signal or cortex: the rare turn where Groq cuts inside the arguments costs one more model call.
|
|
389
|
+
- What to do: nothing.
|
|
390
|
+
|
|
391
|
+
### Two tool calls streamed at one index stay two calls
|
|
392
|
+
- Before: a provider stream that sent `add {"a":1}` and `mul {"b":2}` both at index 0 gave one call `mul` with `{"a":1}{"b":2}`; `tool_call_delta` events read `a@0, b@0, c@1`.
|
|
393
|
+
- Now: two calls; a piece with a new id at an index another call has starts a new call under the next free index: `a@0, b@1, c@2`. OpenAI, Groq, OpenRouter and the Responses adapter send one id per index and see no change.
|
|
394
|
+
- You are affected if: code reads `tool_call_delta.index` from a provider that repeats indices.
|
|
395
|
+
- What to do: nothing.
|
|
396
|
+
|
|
397
|
+
### With no schema, a rejected reply nothing was recovered from throws
|
|
398
|
+
- Before: `createSignal('groq').tools([lookup]).complete('x')`, where Groq rejected a call to an undeclared tool, resolved with `response: ''`.
|
|
399
|
+
- Now: it rejects with `SignalError` `E_PROVIDER_ERROR` ("Provider rejected the reply: …", the provider's error in `context.raw`); `stream()` throws the same from its iteration. With a schema nothing changes.
|
|
400
|
+
- You are affected if: code calls `complete()` or `stream()` without `.schema()` and treats `''` as an answer.
|
|
401
|
+
- What to do: catch `E_PROVIDER_ERROR` there.
|
|
402
|
+
|
|
403
|
+
### `.apiKey()` overrides a custom provider's own key
|
|
404
|
+
- Before: `createSignal({ baseUrl, apiKey: 'provider-key', model }).apiKey('override-key')` sent `Authorization: Bearer provider-key`.
|
|
405
|
+
- Now: it sends `Bearer override-key`. Without `.apiKey()`, the provider's own key is sent as before.
|
|
406
|
+
- You are affected if: code calls `.apiKey()` on a custom provider that has its own key.
|
|
407
|
+
- What to do: remove the override if it was there by mistake.
|
|
408
|
+
|
|
409
|
+
### An `AbortSignal` aborts every call
|
|
410
|
+
- Before: a signal set with `.options({ signal })` was not read by every call. An aborted `stream()` threw "stream ended without a done event". An abort waited out a rate limit's `retry-after`.
|
|
411
|
+
- Now: `complete()`, `stream()`, `step()`, `stepStream()`, `embed()` and `decide()` read it, and `step()` takes `{ signal }` as its second argument. An aborted `stream()` ends without a `done` event and without throwing; `complete()`, `step()`, `embed()` and `decide()` reject with `E_PROVIDER_ERROR`; a call aborted before it starts sends nothing. `stream()`, `stepStream()` and `complete()` end at once during a `retry-after` wait.
|
|
412
|
+
- You are affected if: code detects an abort of `stream()` by catching that error.
|
|
413
|
+
- What to do: check `signal.aborted` after the loop.
|
|
414
|
+
|
|
415
|
+
### New, opt-in
|
|
416
|
+
- `meta.finishReason` on every `complete()` and `stream()` result (`stop`, `length`, `content_filter`, `tool_calls`, or signal's own `error_recovered`), and `wire.truncated: true` on a `step()` or `stepStream()` result rescued from a cut reply. Code that compares a whole `meta` or `wire` object for equality sees the new fields.
|
|
417
|
+
- `createSignal(provider, { refuseCutOff: true })`, or `output.refuseCutOff` on `step()`: a reply cut off while its JSON was open is a failed attempt and is retried, instead of accepted as far as it was written.
|
|
418
|
+
- `step()` returns `reasoning` when a non-streaming reply carries the model's thinking.
|
|
419
|
+
|
|
420
|
+
## @niscorp/solid
|
|
421
|
+
|
|
422
|
+
### A stream ends once
|
|
423
|
+
- Before: in `strict` mode, `{"title":"Hi","items":["a"` then `,2]` failed the stream, but `select('items').final()` awaited before the failure never settled, and `select('count').final()` asked after it resolved with the starting value 0. Prose after a valid reply made a second `final()` reject. `{"":{"x":1},"b":2}` resolved `final()` at the inner `}`, without `b`.
|
|
424
|
+
- Now: both selections reject with `[solid] stream failed validation`; a selection that resolved before the failure keeps its value; `final()` keeps the value it resolved with; that reply resolves at the last `}`, with `b`.
|
|
425
|
+
- You are affected if: strict-mode code awaits selections.
|
|
426
|
+
- What to do: handle the rejection of a selection's `final()`, as for the root's.
|
|
427
|
+
|
|
428
|
+
### Fields that take any value keep their contents; string formats take only strings
|
|
429
|
+
- Before: below `z.any()`, `z.unknown()` or an intersection, everything was refused as `<unknown path>`: `x: z.any()` given `{"x":{"b":[1,2]}}` ended `{ x: {} }` with an error, and a recursive `z.lazy` schema kept nothing. `to: z.email()` given `{"to":[1]}` gave `{ to: [] }`.
|
|
430
|
+
- Now: `{ x: { b: [1, 2] } }` with no error; a recursive schema keeps every level. `{"to":[1]}` is skipped with an error in `recover`, and fails the stream in `strict`.
|
|
431
|
+
- You are affected if: a strict stream can get a non-string for `z.email()`, `z.url()`, `z.uuid()` or `z.iso.*`.
|
|
432
|
+
- What to do: expect the rejection.
|
|
433
|
+
|
|
434
|
+
### No `initial` needed for schemas like `.min(1)`
|
|
435
|
+
- Before: `createStream({ schema })` without `initial` threw `[solid] cannot derive valid base…` for `.min(1)`, `.positive()`, `array().min(1)`, an email, url or uuid format, a `z.record` or a `z.lazy`; a root of `z.any()` or a `.nullable()` object made `write('{…')` throw a `TypeError`.
|
|
436
|
+
- Now: the derived starting value is used. A `strict` stream started so checks the value `final()` would resolve with against the whole schema: `{"t":""}` for `.min(1)` rejects `final()` (`onError` phase `finalize`). In `recover` mode, without `constraints: 'finalize'`, `final()` can resolve with a value the schema refuses.
|
|
437
|
+
- You are affected if: code relied on the construction error.
|
|
438
|
+
- What to do: nothing.
|
|
439
|
+
|
|
440
|
+
### A union's field is checked against every variant
|
|
441
|
+
- Before: with `w: z.discriminatedUnion('kind', [{ kind: 'text', value: z.string() }, { kind: 'count', value: z.number() }])`, `{"w":{"kind":"count","value":5}}` lost the 5 in `recover` and failed a valid reply in `strict`.
|
|
442
|
+
- Now: `{ w: { kind: 'count', value: 5 } }`. An object a union decides must fit one variant when it closes: `{"w":{"kind":"text","value":5}}` still fails a strict stream, and in `recover` it is reported (`onError`, `expected: 'a variant of the union'`) with the value left in `current()`.
|
|
443
|
+
- You are affected if: a union's variants type one field differently, or an `onError` listener in `recover` mode.
|
|
444
|
+
- What to do: nothing.
|
|
445
|
+
|
|
446
|
+
### Only JSON numbers are read as numbers
|
|
447
|
+
- Before: `{"a":Infinity,"b":0x1F,"c":+5,"d":.5}` put `Infinity`, 1, 5 and 0.5 into `current()`.
|
|
448
|
+
- Now: such text is dropped with no error, and each field keeps what it had. Valid JSON reads as before.
|
|
449
|
+
- You are affected if: the input is not JSON.
|
|
450
|
+
- What to do: nothing.
|
|
451
|
+
|
|
452
|
+
## @niscorp/strata
|
|
453
|
+
|
|
454
|
+
### A stamp entry that is no number is refused; rows strata cannot read are named
|
|
455
|
+
- Before: `upgrader.upgrade(doc, { kind, stamp: { 'acme.kit': 'v0' } })` returned the document unmigrated, stamped current. `upgradeStore` skipped a row stamped `{"acme.kit":"five"}` without a word, and read a stamp column of type `text` as "no stamp", so every migration ran again over documents already through them.
|
|
456
|
+
- Now: an entry that reads as no number makes `upgrade` and `behind` throw `StrataError` `INVALID_SEQUENCE` ("The stamp's entry for acme.kit is \"v0\": not a number of migrations."). Digits in a string and `null` read as before. `upgradeStore` leaves rows it cannot read as they are and names them in a new `unread` field of its report (`unread: ['id="e"']`, present only when there is one): such an entry, a stamp that is neither null nor a JSON object, or a key the driver does not hand back as stored (a `timestamptz` with microseconds). It loads only the documents of rows that are behind. Under moss, an integration bundle with such an entry is refused at intake.
|
|
457
|
+
- You are affected if: the app calls `upgrade` or `upgradeStore` itself with stamps it wrote by hand, keeps stamps in a `text` column, or compares the whole `upgradeStore` report.
|
|
458
|
+
- What to do: nothing for stamps strata wrote. Change a `text` stamp column to `jsonb` in an appended migration of your own sequence.
|
|
459
|
+
|
|
460
|
+
### `strata upgrade` replaces and removes only its own files; `verify` trusts the lock
|
|
461
|
+
- Before: `strata upgrade` with `workDir: '.'` replaced a `REPORT.md` or `plan.json` already there, and `verify` deleted it. `verify` took `from` and the untouched artifacts from `plan.json`, so an edited plan could move the lock with the source never migrated. Grammars passed in another order refused a valid plan. Two ids that clean to one file name (`a/b`, `a_b`) shared one expected file.
|
|
462
|
+
- Now: in a `workDir` the host names, `REPORT.md` is strata's only when it begins with `# strata upgrade`, and `plan.json` only when it has a plan's shape; otherwise `upgrade` exits 1 with "REPORT.md is not one strata wrote — it is left as it is. Move it, or give strata a workDir of its own." The default `.strata/upgrade` is replaced as before. `verify` refuses a plan whose `from` is not the committed `strata.lock.json` ("… plan again"), and fails when an edited artifact does not pass its kind's current schema. Stamps are compared grammar by grammar. The second id gets `a_b~2.json`.
|
|
463
|
+
- You are affected if: `strata upgrade` runs with a `workDir` that has files of your own with those names, or someone edits `plan.json` by hand.
|
|
464
|
+
- What to do: give strata a work folder of its own (or the default); re-run `strata upgrade` instead of editing `plan.json`.
|
|
465
|
+
|
|
466
|
+
## @niscorp/tide
|
|
467
|
+
|
|
468
|
+
### A manual fact runs only a reflex of its own identity; a run fact cannot be ingested
|
|
469
|
+
- Before: `tide.ingest({ kind: 'manual', target: 'b.refund', payload: { amount: 99999 }, at }, { as: 'tenant-a' })` ran tenant B's reflex `b.refund`, even disabled, with tenant A's payload. `ingest` stored a `kind: 'run'` fact and woke that identity's `on: { fact: { run: … } }` reflexes.
|
|
470
|
+
- Now: a manual fact reaches only a reflex with the same `as` (no `as` reaches only reflexes with none). A run fact throws `TideError` `invalid_fact`: tide writes one when a run settles.
|
|
471
|
+
- You are affected if: the host calls `ingest` with `kind: 'manual'` and an `as` other than the target reflex's, or with `kind: 'run'`.
|
|
472
|
+
- What to do: aim at a reflex with `fire(reflexId, { now, input, by })`, which runs it under its own identity, disabled or not.
|
|
473
|
+
|
|
474
|
+
### A run whose fan-out failed waits before it is tried again
|
|
475
|
+
- Before: a run whose fan-out threw in a host seam (`select` throws `ECONNREFUSED`, a template breaks) stayed `pending` and was tried again on the next `advance`, oldest first: three such runs and `limit: 3` filled every pass, and a healthy run behind them never fanned out.
|
|
476
|
+
- Now: it stays `pending` and is tried again after a wait from the reflex's own `policy.retry`: `baseMs · 2^(min(n, max) − 1)` with `backoff: 'exponential'` (the default), `baseMs` with `'fixed'`; with the defaults, 60 s, 120 s, 240 s, then 240 s each time. The runs behind it fan out meanwhile. Waits are kept in each engine's memory: after a restart a deferred run is tried once at once. A large `retry.max` makes a long wait (`max: 20` waits 364 days).
|
|
477
|
+
- You are affected if: a reflex's selection or transform can fail for a moment (a database restart): its run fans out after the wait, not on the next advance.
|
|
478
|
+
- What to do: nothing. A reflex that must retry sooner sets `policy: { retry: { baseMs: 5_000 } }`.
|
|
479
|
+
|
|
480
|
+
### The Postgres store mints UUID ids
|
|
481
|
+
- Before: new `fact`, `run` and `task` rows got ids like `fact_mwi60d3d_1`. Two processes on one database could mint the same id in the same millisecond, and the second write failed (`duplicate key value violates unique constraint "tide_fact_pkey"`).
|
|
482
|
+
- Now: new rows get a UUID. Rows already written keep their ids; nothing migrates. The memory store keeps `fact_1`-style ids. Runs opened in one advance share one `created_at`, and UUIDs break that tie at random.
|
|
483
|
+
- You are affected if: code parses tide ids, or a list sorts tide rows by `created_at` and breaks ties on `id`.
|
|
484
|
+
- What to do: break ties on `due_at`, then `id`.
|
|
485
|
+
|
|
486
|
+
### The driver renews a task's lease just before its effect
|
|
487
|
+
- Before: a task late in a slow pass, whose lease had run out and which another instance had claimed again, could run twice.
|
|
488
|
+
- Now: `advance` takes an optional `clock`, and the driver passes its own. Each task's lease starts again just before its effect, and the effect runs only if the task is still this claim's. That is one more write per task.
|
|
489
|
+
- You are affected if: the app runs tide through the driver.
|
|
490
|
+
- What to do: nothing.
|
|
491
|
+
|
|
492
|
+
### The memory store claims serial tasks first
|
|
493
|
+
- Before: with limit 1, a task of a parallel reflex ordered first and a task of an `order: 'serial'` reflex second, `createMemoryStore().claim` took the parallel one; the Postgres store took the serial one.
|
|
494
|
+
- Now: both claim the serial one.
|
|
495
|
+
- You are affected if: tests on `createMemoryStore()` with `order: 'serial'` hit the claim limit. A store of your own should do the same.
|
|
496
|
+
- What to do: assert what the Postgres store does.
|
|
497
|
+
|
|
498
|
+
### Daylight-saving times resolve as documented in +12 and +13 zones
|
|
499
|
+
- Before: in Pacific/Auckland and Antarctica/McMurdo, a daily 02:00 on the spring-forward day fired at 01:00, and in the repeated hour the second occurrence was taken. In Pacific/Chatham, the times 02:00–02:30 on both transition days fired an hour off too.
|
|
500
|
+
- Now: they fire as in every other zone: an erased time past the gap by its length, a repeated time at its first occurrence. Occurrence keys do not change, so no run is opened twice or lost.
|
|
501
|
+
- You are affected if: a clock reflex runs in one of those three zones inside the transition hour.
|
|
502
|
+
- What to do: nothing.
|
|
503
|
+
|
|
504
|
+
### The reflex agent sends back a draft whose one-shot date does not exist
|
|
505
|
+
- Before: `createReflexAgent(…)` accepted `{ on: { clock: { at: '2026-02-30T10:00', tz } } }`, which fires on 2 March.
|
|
506
|
+
- Now: the draft goes back to the model in the same run ("The clock's date 2026-02-30 is not a date. …"): one more model call for such a draft.
|
|
507
|
+
- You are affected if: the app runs the reflex agent with clock triggers.
|
|
508
|
+
- What to do: nothing.
|
|
509
|
+
|
|
510
|
+
### New warnings at `load`
|
|
511
|
+
- `load` warns about a reflex whose `timeoutMs` is not shorter than its `leaseMs`, and about a one-shot clock whose date does not exist, naming the day it fires on. Both still load and run as before.
|
|
512
|
+
|
|
513
|
+
### New, opt-in
|
|
514
|
+
- `load(reflexes, { at, resume: true })` for the load a process makes as it starts: a reflex this engine never loaded keeps its stored watermark, so its `catchUp` decides what the downtime runs. Without `resume`, `load` starts each reflex afresh, as before.
|
|
515
|
+
|
|
516
|
+
## @niscorp/vex
|
|
517
|
+
|
|
518
|
+
### An update that moves a row out of the caller's update rule is refused
|
|
519
|
+
- Before: an update writing a column a `match` rule pins (`project_id` under `match: 'project_id', in: 'projectIds'`) to a value that rule does not allow wrote it.
|
|
520
|
+
- Now: it is refused with 400 `scope_denied`, naming the rule and the column (`the new "tasks.project_id" is not one of the scope's "projectIds"`), and nothing is written; in a batch, the whole batch. A column a `set` rule stamps is not checked. An insert's `onConflict … set` that would move a row leaves it and answers `[]` for it.
|
|
521
|
+
- You are affected if: an update, upsert or `onConflict … set` hands a row over (setting `owner_id` under an `owner_id = me` rule).
|
|
522
|
+
- What to do: if the app means it, set `mutations: { …, checkMovedRows: false }` on the handler or adapter (`executeWrites(client, def, { …, checkMovedRows: false })` at the library level).
|
|
523
|
+
|
|
524
|
+
### An unlocked endpoint warns that it manages fingerprints
|
|
525
|
+
- Before: an unlocked endpoint let whoever reaches it unprotect, delete or regenerate any entry, without a word.
|
|
526
|
+
- Now: the Hono and Express adapters log one warning as they mount such an endpoint: `[vex] This endpoint is unlocked and manages fingerprints: …`. With `manageFingerprints: false`, `PATCH` and `DELETE` answer 403 `locked` and the endpoint still generates. Management stays on by default. moss's endpoints are locked and do not warn.
|
|
527
|
+
- You are affected if: the app mounts an unlocked endpoint.
|
|
528
|
+
- What to do: set `manageFingerprints: false` unless everybody who reaches it may manage entries.
|
|
529
|
+
|
|
530
|
+
### `engine.execute` serves an entry at the reach it declares
|
|
531
|
+
- Before: `engine.execute` replayed an entry that declares a `reach` under the policy it was handed, whatever the reach.
|
|
532
|
+
- Now: pass `policyForReach` and the run uses the policy it returns (`undefined` throws `scope_denied`). Without it the run is as before and logs one warning per fingerprint: `[vex] "<fingerprint>" declares reach "<reach>" and was replayed without policyForReach, …`.
|
|
533
|
+
- You are affected if: the host calls `engine.execute` itself on entries that declare `reach`.
|
|
534
|
+
- What to do: pass `policyForReach`.
|
|
535
|
+
|
|
536
|
+
### Discovery lists only what runs
|
|
537
|
+
- Before: an engine created with `createQueryEngine({ adapter, scope })` and mounted without a policy of its own (no `getPolicy`, or `handleDiscovery({ engine })`) listed every table and fingerprint, a denied `secrets` table included, although a query there is refused it. Entries whose `exists` read a table the caller cannot read were listed.
|
|
538
|
+
- Now: each table and entry is listed only where the policy it runs under lets it run: tables and read entries by the handler's or request's policy, else the engine's; a write entry by `mutations.policy`. `rowCount` is unchanged.
|
|
539
|
+
- You are affected if: a client reads such a listing and relies on seeing what does not run there.
|
|
540
|
+
- What to do: nothing. To list more, give the handler its own policy (`scopePolicy`, or `getPolicy` on an adapter).
|
|
541
|
+
|
|
542
|
+
### A table joined to itself is filtered on every copy
|
|
543
|
+
- Before: in a query that joins a table to itself, the row rule applied to one copy only, so the other read every tenant's rows.
|
|
544
|
+
- Now: every copy gets the caller's row rules.
|
|
545
|
+
- You are affected if: an entry joins a table to itself (a parent task, a manager who is also a person): rows outside the caller's rules drop out.
|
|
546
|
+
- What to do: nothing.
|
|
547
|
+
|
|
548
|
+
### A semantic filter's `$scope` text comes from the server
|
|
549
|
+
- Before: the text of `{ semantic: { query: { $scope: key } } }` was read from the caller's context, so a caller could choose it, and a missing value answered empty.
|
|
550
|
+
- Now: it is bound as a scope value the host supplies; a request without it is refused with `missing_scope`.
|
|
551
|
+
- You are affected if: an entry has a semantic filter with `$scope`.
|
|
552
|
+
- What to do: supply that scope value from the server.
|
|
553
|
+
|
|
554
|
+
### An `upsert` with a `null` key inserts where the database makes the key
|
|
555
|
+
- Before: `{ op: 'upsert', table: 'tasks', key: 'id', columns: { title: … } }` called with `{ id: null, title: 'new' }` ran `UPDATE … WHERE id = NULL`, wrote nothing, and answered 200 `[]`, even where the database fills `tasks.id`.
|
|
556
|
+
- Now: where the key column has a default or is an identity column, and the entry does not write the key itself, a `null` key inserts the row and answers it. A caller whose policy grants update but not insert gets 400 `scope_denied`, as for an absent key. Introspection gives an identity column a `defaultValue` (`GENERATED ALWAYS AS IDENTITY`).
|
|
557
|
+
- You are affected if: a client sends `null` as an upsert's key on a table whose key the database fills.
|
|
558
|
+
- What to do: nothing.
|
|
559
|
+
|
|
560
|
+
### `mergeScopePolicies` keeps `public` and `write`
|
|
561
|
+
- Before: `mergeScopePolicies([{ default: 'deny', entities: { countries: { public: true } } }])` gave `{ entities: {} }`, refusing the public table. A `write` list was dropped: `{ read: [], write: [tenant], update: [] }` merged to an update with no rule, across tenants.
|
|
562
|
+
- Now: `public` merges to all four phases with no rule; `write` is added to insert, update and delete, so that example updates only the tenant's rows. Policies made by `createScopePolicy` (moss's) merge as before.
|
|
563
|
+
- You are affected if: the app merges hand-written policies.
|
|
564
|
+
- What to do: write the merged rules out by hand if the old merge was relied on.
|
|
565
|
+
|
|
566
|
+
### The "last used" stamp writes `lastUsedAt` alone, where the cache has `touch`
|
|
567
|
+
- Before: a replay due a stamp wrote the whole entry back through `cache.set`, which could undo a `PATCH` or a reseed landing in between.
|
|
568
|
+
- Now: `CacheBackend` has an optional `touch(key, lastUsedAt)`; the memory, Postgres and tiered caches implement it, and the engine and handler stamp through it where it exists. moss wraps every cache in its own entry cache without `touch`, so moss apps stamp through `set` as before.
|
|
569
|
+
- You are affected if: the host wraps a built-in cache by spreading it and overriding `set` to watch writes: stamps now go through the inherited `touch`.
|
|
570
|
+
- What to do: override `touch` too.
|
|
571
|
+
|
|
572
|
+
### The error log line carries no bound values
|
|
573
|
+
- Before: an unexpected error logged the whole error object; under PGlite it carries the SQL and every bound value, the caller's scope among them.
|
|
574
|
+
- Now: `[vex] unhandled error <code> in: <SQL>` and the stack; the SQL only where the driver's error carries it. What the caller receives is unchanged.
|
|
575
|
+
- You are affected if: something parses that log line.
|
|
576
|
+
- What to do: nothing.
|
|
577
|
+
|
|
578
|
+
### New, opt-in
|
|
579
|
+
- `mutations: { …, answerReadableRows: true }`: a write answers only the rows the caller's read rules show.
|
|
580
|
+
- `manageFingerprints: false` on the handler and the Hono and Express adapters.
|
|
581
|
+
- `createPostgresAdapter({ …, qualifyTables: true })`: every table is named with the adapter's `schema`, so no `search_path` is needed; `introspect()` reports it as `namespace`.
|
|
582
|
+
- The Express adapter takes `getPolicy(req)`, `getPolicyForReach(req, reach)` and `onExecute`, as the Hono adapter does.
|
|
583
|
+
- `QueryEngine.scopePolicy`: the policy given to `createQueryEngine`.
|