@awebai/oats 0.60.0 → 0.62.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.
Files changed (96) hide show
  1. package/README.md +15 -19
  2. package/bin/oats.mjs +68 -21
  3. package/docs/capabilities.md +1 -1
  4. package/docs/configuration.md +9 -0
  5. package/docs/desktop-cli-api.md +28 -5
  6. package/docs/desktop.md +7 -0
  7. package/docs/execution-targets.md +49 -3
  8. package/docs/first-team.md +8 -0
  9. package/docs/implementation.md +2 -1
  10. package/docs/named-test-runs.md +382 -0
  11. package/docs/official-catalog.md +1 -1
  12. package/docs/packages.md +5 -5
  13. package/docs/release-notes/v0.61.0.md +155 -0
  14. package/docs/release-notes/v0.62.0.md +223 -0
  15. package/docs/tui.md +10 -4
  16. package/docs/upgrading.md +133 -11
  17. package/docs/workspaces.md +1 -1
  18. package/lib/core.mjs +2 -2
  19. package/lib/doctor-capture.mjs +35 -0
  20. package/lib/session-viewer.mjs +86 -7
  21. package/package-catalog.json +1 -1
  22. package/package.json +1 -1
  23. package/packages/client/cli-locator.mjs +2 -2
  24. package/packages/client/instance-presentation.mjs +10 -0
  25. package/packages/client/instance-tree.mjs +48 -6
  26. package/packages/record/README.md +87 -13
  27. package/packages/record/bin/capture-hook.mjs +8 -0
  28. package/packages/record/bin/capture.mjs +143 -124
  29. package/packages/record/bin/recall.mjs +8 -3
  30. package/packages/record/bin/setup.mjs +115 -225
  31. package/packages/record/bin/turn-record.mjs +2 -2
  32. package/packages/record/docs/capture-service.md +1443 -28
  33. package/packages/record/docs/capture-status.schema.json +429 -12
  34. package/packages/record/lib/capture-admission.mjs +82 -0
  35. package/packages/record/lib/capture-aw-unit.mjs +137 -0
  36. package/packages/record/lib/capture-aw.mjs +31 -12
  37. package/packages/record/lib/capture-budget.mjs +31 -0
  38. package/packages/record/lib/capture-cc.mjs +39 -6
  39. package/packages/record/lib/capture-cleanup-queue.mjs +135 -0
  40. package/packages/record/lib/capture-cleanup-work.mjs +77 -0
  41. package/packages/record/lib/capture-command-operation.mjs +37 -0
  42. package/packages/record/lib/capture-command-output.mjs +61 -0
  43. package/packages/record/lib/capture-command-worker.mjs +6 -0
  44. package/packages/record/lib/capture-command.mjs +48 -0
  45. package/packages/record/lib/capture-completion.mjs +152 -0
  46. package/packages/record/lib/capture-context.mjs +50 -0
  47. package/packages/record/lib/capture-default-roots.mjs +30 -0
  48. package/packages/record/lib/capture-discovery.mjs +114 -0
  49. package/packages/record/lib/capture-failures.mjs +45 -0
  50. package/packages/record/lib/capture-health-doctor.mjs +13 -0
  51. package/packages/record/lib/capture-health-installation.mjs +117 -0
  52. package/packages/record/lib/capture-health.mjs +116 -0
  53. package/packages/record/lib/capture-hook-ownership.mjs +58 -0
  54. package/packages/record/lib/capture-hook-runner.mjs +17 -0
  55. package/packages/record/lib/capture-hook.mjs +26 -0
  56. package/packages/record/lib/capture-index-inventory.mjs +205 -0
  57. package/packages/record/lib/capture-index-outcomes.mjs +113 -0
  58. package/packages/record/lib/capture-index-reset.mjs +109 -0
  59. package/packages/record/lib/capture-index-work.mjs +77 -0
  60. package/packages/record/lib/capture-issue-preparation.mjs +73 -0
  61. package/packages/record/lib/capture-issues.mjs +15 -2
  62. package/packages/record/lib/capture-lock.mjs +102 -16
  63. package/packages/record/lib/capture-native-unit.mjs +322 -0
  64. package/packages/record/lib/capture-pass.mjs +102 -0
  65. package/packages/record/lib/capture-recovery-snapshot.mjs +182 -0
  66. package/packages/record/lib/capture-retained-scratch.mjs +213 -0
  67. package/packages/record/lib/capture-retry.mjs +102 -0
  68. package/packages/record/lib/capture-run.mjs +125 -0
  69. package/packages/record/lib/capture-scratch.mjs +12 -3
  70. package/packages/record/lib/capture-service-definition.mjs +104 -0
  71. package/packages/record/lib/capture-service-install.mjs +362 -0
  72. package/packages/record/lib/capture-service-ownership.mjs +137 -0
  73. package/packages/record/lib/capture-service-runner.mjs +18 -0
  74. package/packages/record/lib/capture-small-snapshot.mjs +85 -0
  75. package/packages/record/lib/capture-source-discovery.mjs +319 -0
  76. package/packages/record/lib/capture-source-queue.mjs +199 -0
  77. package/packages/record/lib/capture-source-work.mjs +85 -0
  78. package/packages/record/lib/capture-state.mjs +16 -71
  79. package/packages/record/lib/capture-status.mjs +171 -0
  80. package/packages/record/lib/capture-supervisor.mjs +117 -0
  81. package/packages/record/lib/capture-watch.mjs +32 -0
  82. package/packages/record/lib/capture-work-session.mjs +238 -0
  83. package/packages/record/lib/capture-worker.mjs +58 -0
  84. package/packages/record/lib/derived-state.mjs +28 -15
  85. package/packages/record/lib/file-lines.mjs +22 -6
  86. package/packages/record/lib/formats.mjs +4 -3
  87. package/packages/record/lib/index-capture.mjs +97 -0
  88. package/packages/record/lib/index-db.mjs +3 -17
  89. package/packages/record/lib/index-reset.mjs +19 -0
  90. package/packages/record/lib/store.mjs +36 -11
  91. package/packages/record/lib/transcript-prefix.mjs +125 -0
  92. package/packages/tui/lib/client.mjs +2 -2
  93. package/packages/tui/lib/model.mjs +15 -5
  94. package/packages/tui/lib/views/palette.mjs +7 -3
  95. package/skills/oats-getting-started/SKILL.md +1 -1
  96. package/docs/macos-test-runs.md +0 -246
@@ -0,0 +1,382 @@
1
+ # Named test runs on macOS and Linux
2
+
3
+ Pull-request CI runs the tests on Linux, in its own way: sharded, and with no
4
+ working `systemctl --user`. Some tests need something CI does not give them,
5
+ and two workflows run them by hand:
6
+
7
+ - **macOS.** Some tests rest on what only macOS does: a file system that
8
+ ignores case, `/var` and `/tmp` as links, long temporary paths, the BSD
9
+ tools. [`macos-tests.yml`](../.github/workflows/macos-tests.yml) runs named
10
+ test files of a named ref on a macOS runner.
11
+ - **Linux, with a user manager.** Some tests drive the runner user's own
12
+ systemd manager, a real `.timer` and `.service` under `systemctl --user`.
13
+ [`linux-tests.yml`](../.github/workflows/linux-tests.yml) runs named test
14
+ files of a named ref on a Linux runner. Before the run, the workflow enables
15
+ lingering for the runner user and waits for that user's manager to answer.
16
+
17
+ A person starts either one by hand; no push and no pull request ever does. The
18
+ link of a run goes on a pull request as that pull request's macOS or Linux
19
+ evidence.
20
+
21
+ Neither is a second CI. A run runs the files you name, each alone, and nothing
22
+ else: not `npm test`, not a shard.
23
+
24
+ Both workflows run one implementation,
25
+ [`scripts/named-test-run.mjs`](../scripts/named-test-run.mjs). Each runner's
26
+ own part is a small script beside it:
27
+ [`scripts/macos-tests.mjs`](../scripts/macos-tests.mjs) and
28
+ [`scripts/linux-tests.mjs`](../scripts/linux-tests.mjs). Everything this page
29
+ says of "a run" holds for both, unless a section names one runner.
30
+
31
+ ## Starting a run
32
+
33
+ You need write access to the repository. From a checkout:
34
+
35
+ ```bash
36
+ gh workflow run macos-tests.yml --ref main \
37
+ -f ref=my-branch \
38
+ -f files='test/tui-terminal.test.mjs test/fixture-isolation.test.mjs' \
39
+ -f tmux=true
40
+ gh run list --workflow=macos-tests.yml --limit 1
41
+
42
+ gh workflow run linux-tests.yml --ref main \
43
+ -f ref=my-branch \
44
+ -f files='test/some-real-manager.test.mjs'
45
+ gh run list --workflow=linux-tests.yml --limit 1
46
+ ```
47
+
48
+ Or use the repository's Actions page. Choose **macOS tests** or **Linux
49
+ tests**, then **Run workflow**. Leave the workflow's own branch at `main` (see
50
+ [What counts as evidence](#what-counts-as-evidence)).
51
+
52
+ | input | workflow | what it is |
53
+ |---|---|---|
54
+ | `ref` | both | The commit to test: a branch name, a tag name or a full commit id (40 characters) of this repository. |
55
+ | `files` | both | The test files, separated by spaces, commas or newlines. |
56
+ | `tmux` | macOS | `true` installs tmux first (`brew install tmux`). Off by default. Tests that need tmux skip without it. |
57
+
58
+ The Linux workflow has no `tmux` input. Whether tmux is on the runner's `PATH`
59
+ is printed in its header like any other fact of the runner.
60
+
61
+ ## What a run accepts
62
+
63
+ The runner's script checks the whole request before anything of the ref is
64
+ checked out, installed or run. A refusal names every entry it refuses and why,
65
+ and the run fails having run nothing.
66
+
67
+ **The ref** must be a commit of this repository: one reachable from a branch
68
+ or a tag of `origin`.
69
+
70
+ - A name is made of `A-Z a-z 0-9 . _ / -`, does not start with `-` and has no
71
+ `..`. A branch whose name has another character is given by its full commit
72
+ id. The text is taken as typed: a space before or after it is refused too.
73
+ - A shortened commit id is refused: give all 40 characters.
74
+ - **A pull request's number is not accepted.** A pull request from a fork has
75
+ a head that is not this repository's commit, and nothing is ever fetched by
76
+ what you typed. Name the branch, or give the commit id, of a pull request
77
+ whose branch is in this repository.
78
+ - A name that is both a branch and a tag is accepted when both are the same
79
+ commit. Otherwise give the commit id of the one you mean.
80
+
81
+ **Each file** must match `test/**/*.test.mjs` or
82
+ `packages/<name>/test/**/*.test.mjs`, with path segments made of
83
+ `A-Z a-z 0-9 . _ -`, none starting with a dot. It must be a regular file at
84
+ that commit, not a symbolic link. A file named twice runs once.
85
+
86
+ ## What a run does and prints
87
+
88
+ The job checks out two trees. `runner/` is the workflow's own commit, and the
89
+ script runs from it. `tested/` is the ref. Two trees are for two things: a
90
+ ref older than the workflow can be tested, and an honest branch cannot change
91
+ the runner by accident. They are not a defence against a commit that sets out
92
+ to forge its result (see [What a run does not protect](#what-a-run-does-not-protect)).
93
+
94
+ On Linux, two steps come before the validation, so that its header can report
95
+ their effect:
96
+
97
+ 1. `sudo loginctl enable-linger "$USER"` starts the runner user's systemd
98
+ manager without a login session. It is the only privileged step, and
99
+ nothing is installed system-wide.
100
+ 2. `XDG_RUNTIME_DIR=/run/user/<uid>` is set for the later steps, through
101
+ `$GITHUB_ENV`, so that `systemctl --user` finds the manager.
102
+
103
+ After the validation, the job installs as pull-request CI does: `npm ci` at
104
+ the root, then in `packages/desktop` without the Electron binary. Then it runs
105
+ each file alone, one after another, as a developer does: `node --test <file>`
106
+ from the root of the ref's tree.
107
+
108
+ The step **Validate the request and check out its commit** prints a header,
109
+ before any code of the ref has run. The header gives:
110
+
111
+ - the commit under test (full id) and the ref that was asked for;
112
+ - the workflow's own ref and commit, as the script reads them. Where a run
113
+ really ran from is GitHub's record of it, not this line: see
114
+ [What counts as evidence](#what-counts-as-evidence);
115
+ - on macOS, the macOS version; on Linux, the distribution and the kernel;
116
+ - the runner image and the architecture;
117
+ - on Linux:
118
+ - `XDG_RUNTIME_DIR`;
119
+ - whether lingering is on for the runner user (`loginctl show-user`);
120
+ - **whether the user manager answered**, with which state, how many
121
+ times it was asked and how long that took. Lingering only queues the
122
+ manager's start, so the step waits for it, at most 60 seconds in all.
123
+ Until the manager's bus is there, `systemctl --user` answers at once
124
+ (`offline` or `unknown`), so the step asks again every half second.
125
+ Once the bus is there, `systemctl --user is-system-running --wait` waits
126
+ for the manager to finish starting. `running` and `degraded` count as an
127
+ answer. `degraded` is a running manager with a failed unit, which the
128
+ image may have of its own;
129
+ - the Node version;
130
+ - whether the file system is case-sensitive, measured there (a file is made,
131
+ then looked for by another case);
132
+ - whether `tmux` is on `PATH`, and its version;
133
+ - whether a socket is at tmux's default place for the server named `oats`.
134
+
135
+ Its last line says so: `Everything above this line was printed before any code
136
+ of the ref ran.` On Linux, a user manager that did not answer ends the step
137
+ there instead. The header says what was answered, then `Refused: nothing was
138
+ installed or run.`, and the run fails before anything is installed.
139
+
140
+ The step **Run each file alone** prints the header again before the first
141
+ file. It is read after the installs, and the step says that it is the second
142
+ reading. On Linux the user manager is asked again, without waiting. If it does
143
+ not answer, no file runs and the run fails.
144
+
145
+ For each file the log has its output, then its counts (tests, passed, failed,
146
+ skipped, cancelled, todo), its exit status and its duration. One table of all
147
+ files ends the log, and the job's summary page repeats it.
148
+
149
+ **What fails a run:**
150
+
151
+ - A file fails when its exit status is not 0. A file that ends with status 0
152
+ and prints no summary, or whose summary counts a failed test, fails too. The
153
+ files after a failing one still run.
154
+ - A file that has not ended after its time is killed with its whole process
155
+ group and reported as timed out. The run goes on.
156
+ - **A tmux server left on the default socket.** A fixture that fails to
157
+ isolate its tmux server starts one at tmux's default place
158
+ (`<dir>/tmux-<uid>/oats`, where `<dir>` is `TMUX_TMPDIR`, else `/tmp`). On a
159
+ clean runner nothing fails because of it. So the script looks at that place
160
+ before the first file and after each file. The file after which a socket
161
+ first exists is marked in the table, and the run fails. Nothing is killed or
162
+ removed. If a socket is there before the first file, the header says so and
163
+ the check is skipped for that run.
164
+ - **On Linux, a user manager that does not answer**, at either step (above).
165
+
166
+ A file in which no test passed (every test skipped, for example without tmux,
167
+ or outside the workflow its guard names) is marked `no test passed`. It does
168
+ not fail the run.
169
+
170
+ ## Guard contract
171
+
172
+ A test that only means something on one of these runners guards on facts the
173
+ runner gives it. Each workflow's `name:` is part of that guard, and it is a
174
+ contract: the workflow tests pin it (`test/macos-tests-workflow.test.mjs`,
175
+ `test/linux-tests-workflow.test.mjs`). Renaming a workflow turns every test
176
+ that guards on it into a skip.
177
+
178
+ | runner | the test runs only when |
179
+ |---|---|
180
+ | macOS | `GITHUB_WORKFLOW` is `macOS tests`, `GITHUB_EVENT_NAME` is `workflow_dispatch`, and `process.platform` is `darwin` |
181
+ | Linux | `GITHUB_WORKFLOW` is `Linux tests`, `GITHUB_EVENT_NAME` is `workflow_dispatch`, and `process.platform` is `linux` |
182
+
183
+ The run passes its environment to each file as a developer's shell would. It
184
+ leaves out the request's two variables, the runner's command files
185
+ (`GITHUB_ENV`, `GITHUB_OUTPUT`, `GITHUB_PATH`, `GITHUB_STATE`,
186
+ `GITHUB_STEP_SUMMARY`) and node's nested-run marker. So `GITHUB_WORKFLOW` and
187
+ `GITHUB_EVENT_NAME` reach the test, and on Linux so does `XDG_RUNTIME_DIR`.
188
+
189
+ A guard is a switch, not a proof. Anyone can set these variables on their own
190
+ machine, and a guarded test that runs there drives that machine's real
191
+ manager. A guarded test outside its runner skips, and a run of only skips is
192
+ not evidence (below).
193
+
194
+ ## What counts as evidence
195
+
196
+ **A run is evidence for a commit whose diff has been reviewed.** A run of a
197
+ commit that nobody has read proves nothing about it: from its first install
198
+ step on, the commit's own code runs on the runner and can change what the run
199
+ prints (see [What a run does not protect](#what-a-run-does-not-protect)).
200
+
201
+ The pull request gives **the run's link**. From it, a run is evidence when all
202
+ of this holds. The first condition comes first because the others rest on it.
203
+
204
+ 1. **The workflow ran from `main`, by GitHub's own record of the run.** Not
205
+ by the log. A run started from another branch uses that branch's workflow
206
+ file and that branch's script, so every line of its log, the header
207
+ included, is text that branch wrote. Ask GitHub about the run instead:
208
+
209
+ ```bash
210
+ gh run view <run id> --json event,headSha,workflowName
211
+ git fetch origin
212
+ git merge-base --is-ancestor <headSha> origin/main; echo $?
213
+ ```
214
+
215
+ `event` must be `workflow_dispatch`. `workflowName` must be `macOS tests`
216
+ for macOS evidence, or `Linux tests` for Linux evidence. The last command
217
+ must print `0`: the workflow's commit is a commit of `main`. Anything else
218
+ is not a pass: `1` means the commit is not on `main`, and an error means
219
+ your clone does not have it. Check the commit, not the run's branch name: a
220
+ tag can carry a branch's name.
221
+ 2. The `commit under test` in the validation step's header **equals the head
222
+ under review**. A run of an earlier head is evidence for that head only.
223
+ 3. The run passed, and no file the pull request relies on is marked `no test
224
+ passed`. **A run of only skips is not evidence.**
225
+
226
+ The header also prints a `workflow ref` line. It is a convenience for
227
+ reading a run, and it is not proof of where the workflow ran from: the
228
+ workflow prints it.
229
+
230
+ With the first condition met, the log is the evidence. The job's summary page
231
+ is a convenience.
232
+
233
+ ## Bounds
234
+
235
+ These are constants of the scripts, not inputs:
236
+
237
+ | bound | macOS | Linux |
238
+ |---|---|---|
239
+ | files in one run | at most 10 files | at most 10 files |
240
+ | time for one file, then its process group is killed | 5 minutes | 20 minutes |
241
+ | time for the job | 60 minutes | 240 minutes |
242
+ | wait for the user manager | none | 60 seconds at the validation step |
243
+ | runner | `macos-14` (arm64), Node 22 | `ubuntu-24.04` (x64), Node 22 |
244
+
245
+ A Linux file gets 20 minutes because the files that qualify the record
246
+ capture at scale ([#1108](https://github.com/awebai/oats/issues/1108)) run
247
+ capture passes of up to 300 seconds, and a first upgrade may need several.
248
+ The Linux job's 240 minutes hold ten such files and the installs, under
249
+ GitHub's 6-hour limit for a job.
250
+
251
+ The workflows' steps upload no artifact and save or restore no cache: the log
252
+ and the summary are all they leave. The token can read the repository's
253
+ contents and do nothing more, and the workflows name no secret. The code a
254
+ run executes can reach more than the workflow's own steps do: see
255
+ [What a run does not protect](#what-a-run-does-not-protect).
256
+
257
+ ## What a run does not show
258
+
259
+ - **A clean machine, not yours.** The runner is a fresh image for each run.
260
+ It has no person's `PATH`, shell profile or login environment, and nothing
261
+ of an earlier run.
262
+ - **No real terminal.** No terminal emulator is attached to the tests.
263
+ - **One version and one architecture**: the image's, printed in the header.
264
+ - **A killed file's leftovers.** The script kills the process group of a file
265
+ that timed out. A tmux server has left that group by design, so a tmux
266
+ server of a killed file stays, and it is that test's to explain. On Linux,
267
+ a unit a test started under the user manager is not in the file's process
268
+ group either: it is the test's to stop.
269
+ - **Nothing about `main`.** A run started from `main` is listed among the
270
+ runs of main's head commit (`gh run list --commit <sha>`). It is also among
271
+ that commit's check runs, as `Named test files on macOS` or
272
+ `Named test files on Linux`. Its result is about the ref under test. It
273
+ says nothing about `main`, a failed run included. The commit's status
274
+ rollup does not hold these runs. A hand-started run can be the newest run
275
+ on `main`. So whoever checks `main` after a merge lists the runs by
276
+ workflow (`gh run list --workflow CI --branch main`) or reads the commit's
277
+ status rollup.
278
+
279
+ **What a Linux run does not show: a person's machine.** The user manager is
280
+ real systemd, but it runs on a hosted VM, not on a person's computer:
281
+
282
+ - The runner user has no login session. No PAM session was opened, no
283
+ graphical session exists, and no seat is assigned. Lingering, which the
284
+ workflow switched on, is what starts the manager. On a person's machine,
285
+ logging in starts it, and lingering is usually off: there, a user's timers
286
+ stop when the person logs out.
287
+ - The manager has none of a person's own units, environment
288
+ (`systemctl --user show-environment`) or `~/.config/systemd/user`. It has
289
+ only what the image and the test put there.
290
+ - It is one distribution, one systemd version and one image: Ubuntu 24.04,
291
+ as printed in the header. Another distribution's systemd or defaults are
292
+ not covered.
293
+ - Time is the VM's. A run shows what a timer does within the file's 20
294
+ minutes. It does not show a timer's behaviour across a suspend, a reboot or
295
+ days.
296
+
297
+ So a Linux run is evidence that the code drives `systemctl --user` correctly
298
+ on a working user manager. It is not evidence of how the code behaves on a
299
+ person's machine, which still needs a person's run there.
300
+
301
+ A pull request that asks for a person's run on a Mac still gets one.
302
+
303
+ ## What a run does not protect
304
+
305
+ After the validation, the ref's own code runs on the runner as the runner's
306
+ user: its install scripts, then its tests. Pull-request CI does the same for
307
+ every branch.
308
+
309
+ **Protected, in a run whose workflow commit is `main`'s: the validation and
310
+ the header.** They are printed from the workflow's own commit, before any
311
+ code of the ref has run. A commit under test cannot change which commit the
312
+ header names, or get a refused request past it. In a run started from another
313
+ branch nothing is protected: the workflow and the script are that branch's
314
+ (see [What counts as evidence](#what-counts-as-evidence)).
315
+
316
+ **Not protected: everything after the first install step**, the per-file
317
+ results and the table included. From there on, the ref's code can change
318
+ anything the runner's user can, and so what the later steps print. The result
319
+ is as honest as the commit. On Linux that includes the user manager: the
320
+ ref's code can start, stop or change its units.
321
+
322
+ **Where the check is.** A forgery has to be in the commit's own tree, its lock
323
+ file included. The evidence names that exact commit, and the reviewer of the
324
+ pull request reads its diff. Pull-request CI has the same property.
325
+
326
+ **The cache scope of the default branch.** A run started from the default
327
+ branch belongs to it, and executes another branch's code. Such code can reach
328
+ that run's Actions cache scope, which every branch reads. Only somebody with
329
+ write access can do it, by pushing the branch and starting the run. In the
330
+ maintainers' words: a run of this workflow can write the default branch's
331
+ cache scope; nothing reads it; a workflow that starts to restore a cache
332
+ reopens this. No workflow of this repository restores an Actions cache, and
333
+ the repository's tests keep it so.
334
+
335
+ **The job's token.** It is within reach of the code a run executes. It can
336
+ read this repository's contents and nothing else, and that is why neither
337
+ workflow's `permissions` ever grows.
338
+
339
+ **Root on the Linux runner.** The hosted Linux runner's user can use `sudo`
340
+ without a password: that is how the workflow enables lingering. The ref's
341
+ code can use it too. The VM is discarded after the run, and the token's
342
+ reach does not grow with root.
343
+
344
+ ## What the first Linux run from `main` proves
345
+
346
+ The Linux workflow can only be proven by a run of it from `main`. Its first
347
+ run, of an existing test file and a short check that `systemctl --user`
348
+ works, shows three things:
349
+
350
+ - the workflow starts and validates as the macOS one does;
351
+ - lingering and `XDG_RUNTIME_DIR` give that image a user manager that answers
352
+ within the bound. The header states the answer, how many times the manager
353
+ was asked and how long it took: an answer at the first ask, well under the
354
+ bound, shows that image did not need the wait;
355
+ - the installs and a per-file run work on that image.
356
+
357
+ It does not show what a guarded test sees, or does. The run's environment has
358
+ the facts the [Guard contract](#guard-contract) names, but no test file of
359
+ this repository guards on them yet. A guarded file's behaviour is shown when
360
+ such a file is dispatched, by its own run. The first run also does not show
361
+ that a later image still answers: every run's header says so again.
362
+
363
+ ## The terms
364
+
365
+ The maintainers agreed these terms, the same for both workflows.
366
+ `test/macos-tests-workflow.test.mjs` and `test/linux-tests-workflow.test.mjs`
367
+ read the workflow files and pin each one, through the checks they share in
368
+ `test/helpers/named-tests-workflow.mjs`:
369
+
370
+ - `workflow_dispatch` is the only trigger;
371
+ - `permissions` is exactly `contents: read`; no secret is named; no artifact
372
+ is uploaded; no step saves or restores a cache;
373
+ - no input is written into a shell line: the ref and the file list reach the
374
+ script as environment variables;
375
+ - the checkout is the workflow's own commit, without its token left in the
376
+ checkout's configuration;
377
+ - the job has a timeout, and its concurrency group is its own and one per
378
+ run, so no later run cancels an earlier one;
379
+ - each workflow's `name:` is the one in [Guard contract](#guard-contract).
380
+
381
+ Change a bound or a term with the maintainers' decision, and change this page
382
+ and those tests in the same commit.
@@ -9,7 +9,7 @@ or workspace membership alone does not make a package official.
9
9
 
10
10
  | package | release | capabilities | package souls |
11
11
  |---|---|---|---|
12
- | `oats.framework` | `oats-framework/v1.12.3` (this repository) | `oats.core`, `oats.setup`, `oats.support`, `oats.knowledge-theory` | `knowledge-theory-expert` |
12
+ | `oats.framework` | `oats-framework/v1.13.1` (this repository) | `oats.core`, `oats.setup`, `oats.support`, `oats.knowledge-theory` | `knowledge-theory-expert` |
13
13
  | `oats.okf` | `v5.2.1` | `oats.okf` (knowledge), `oats.okf-harvest`, `oats.okf-maintenance` | `knowledge-harvester`, `knowledge-maintainer` |
14
14
  | `oats.aweb` | `v1.29.0` | `oats.aweb` (messaging) | |
15
15
  | `oats.engineering` | `v1.10.0` | `oats.engineering-expert`, `oats.developer`, `oats.code-review`, `oats.maintainer` | `code-reviewer` |
package/docs/packages.md CHANGED
@@ -51,7 +51,7 @@ packages:
51
51
  - **Bare version** (`v5.2.1`, `5.2.1`, `1.0.0-rc.1`): the id is looked up in
52
52
  the official catalog — `package-catalog.json` in the `oats` repo, or the file
53
53
  named by `OATS_PACKAGE_CATALOG` — which supplies the repo url, the tag
54
- convention (`v5.2.1` or `oats-framework/v1.12.3`) and the payload path. An id
54
+ convention (`v5.2.1` or `oats-framework/v1.13.1`) and the payload path. An id
55
55
  the catalog does not know is `E_PACKAGE_MISSING` ("use `git:<repo>@<ref>` for
56
56
  a package outside the catalog"). The catalog is the reviewed official list
57
57
  ([official-catalog.md](official-catalog.md)) and the only way a
@@ -74,7 +74,7 @@ members:
74
74
  - git:github.com/acme/agents
75
75
  - git:github.com/acme/platform
76
76
  packages:
77
- oats.framework: v1.12.3
77
+ oats.framework: v1.13.1
78
78
  oats.okf: v5.2.1
79
79
  oats.aweb: v1.29.0
80
80
  teams:
@@ -353,11 +353,11 @@ A soul that names one of the package's capabilities with
353
353
  "policy": "docs/official-catalog.md",
354
354
  "packages": {
355
355
  "oats.okf": { "url": "https://github.com/awebai/oats-okf.git", "ref": "v5.2.1", "path": "oats-package" },
356
- "oats.framework": { "url": "https://github.com/awebai/oats.git", "ref": "oats-framework/v1.12.3", "path": "oats-package" }
356
+ "oats.framework": { "url": "https://github.com/awebai/oats.git", "ref": "oats-framework/v1.13.1", "path": "oats-package" }
357
357
  }
358
358
  }
359
359
  ```
360
360
 
361
- `ref` carries the tag convention: a workspace's `oats.framework: v1.12.3`
362
- resolves to tag `oats-framework/v1.12.3`. Resolving through the catalog never
361
+ `ref` carries the tag convention: a workspace's `oats.framework: v1.13.1`
362
+ resolves to tag `oats-framework/v1.13.1`. Resolving through the catalog never
363
363
  advances a lock by itself: `oats sync` does, and says so.
@@ -0,0 +1,155 @@
1
+ # OATS 0.61.0
2
+
3
+ 2026-10-16
4
+
5
+ ## Upgrade
6
+
7
+ - **A pi instance stuck on its opening task: restart it after the update**
8
+ ([#1322](https://github.com/awebai/oats/issues/1322)). On pi 1.2 and
9
+ later, the 0.60.0 bridge (`@awebai/oats-pi`) held an instance's opening
10
+ task forever, and everything typed after it stayed queued. Install the
11
+ 0.61.0 bridge (`oats update` moves it in every pi folder your launches
12
+ use), then restart each pi instance that is stuck. Instances that already
13
+ ran their opening task are unaffected. See Fixed.
14
+
15
+ - **Install the Desktop first and the CLI second,** as
16
+ [Upgrading](../upgrading.md) says: a 0.60 Desktop refuses a 0.61.0 CLI. The
17
+ 0.61.0 Desktop accepts OATS CLIs `>=0.26.0 <0.62.0`.
18
+
19
+ - **The official catalog moves oats.framework 1.12.3 → 1.13.0** (oats.setup
20
+ 2.8.0, see Provider updates). The other packages are unchanged. A
21
+ deployment takes it by changing its pin and running `oats sync`. Only new
22
+ spawns use it.
23
+
24
+ - **OATS 0.61.0: `oats onboard`'s `next.spawn` can name a soul other than
25
+ `oats-operator-expert`** ([#1314](https://github.com/awebai/oats/issues/1314)).
26
+ Before OATS 0.61.0 it named `oats-operator-expert` whenever a soul had that
27
+ name, and only then; from OATS 0.61.0 it names the soul that holds
28
+ `oats.setup`, the workspace's setup expert, so a workspace without this
29
+ project's soul is pointed at its own. The JSON shape is unchanged
30
+ (`onboardApi` 2, text or `null`). A script that matched the old exact name
31
+ sees a different answer: a soul named `oats-operator-expert` that does not
32
+ declare `oats.setup` now gives `null`.
33
+
34
+ ## Changed
35
+
36
+ - **OATS Desktop's command palette shows when two instances are siblings**
37
+ ([#1312](https://github.com/awebai/oats/issues/1312)). An instance declared
38
+ a sibling of a root, and that root, each say `sibling of <name>` beside
39
+ the name, in the tree, as a match's context and in Recent, and assistive
40
+ technology reads it once with the row. Siblings under one parent still read
41
+ `under <parent>`. Matching, order and groups are unchanged
42
+ ([keyboard reference](../../packages/desktop/docs/desktop-keyboard.md)).
43
+
44
+ - **The Desktop sidebar draws the sibling line apart from the lines to
45
+ children** ([#1312](https://github.com/awebai/oats/issues/1312)). The
46
+ dotted line joining sibling instances runs through their dots, and a
47
+ parent's line to its children runs just to the right of it, so the two no
48
+ longer share one line. The dotted line is darker in the White and Solarized
49
+ themes, so it stands out on every row (3:1 contrast). See
50
+ [the sidebar's instance tree](../desktop.md#the-sidebars-instance-tree).
51
+
52
+ - **OATS 0.61.0: `oats onboard` names the workspace's OATS setup expert**
53
+ ([#1314](https://github.com/awebai/oats/issues/1314)). Its last next step,
54
+ and `next.spawn` in `--json`, name a soul whose own `soul.yaml` declares
55
+ `oats.setup` (from any source; `off` does not count): the one called
56
+ `<workspace name>-oats-setup-expert`, else the first by name, else none,
57
+ when the text suggests adding that conventional soul. A name alone never
58
+ counts. Only the
59
+ soul's own declaration is read: `oats.setup` given only through workspace
60
+ defaults is not seen. A standalone view has no workspace name, so only
61
+ the declaration counts there. `oats help` describes the step the same way
62
+ ([the rule](../desktop-cli-api.md#oats-onboard-onboardapi-2)).
63
+
64
+ - **OATS Desktop accepts an `oats` CLI 0.61.x.** Its band is now
65
+ `>=0.26.0 <0.62.0`. 0.61 adds no new gate on the band: `oats onboard`'s
66
+ next step names the workspace's setup expert in the same text-or-`null`
67
+ shape the Desktop already reads.
68
+
69
+ ## Fixed
70
+
71
+ - **pi 1.2 and later run an instance's opening task again**
72
+ ([#1322](https://github.com/awebai/oats/issues/1322)). From pi 1.2.0 a run
73
+ counts as active before its `before_agent_start`, and the bridge's hold on
74
+ the opening prompt waited for that same run. So on pi 1.2 and later, an
75
+ instance's opening task never ran. That was the launch's `@TASK.md` in
76
+ interactive mode, or the first default `session.prompt()` of an SDK
77
+ session. Escape didn't release it, and every later prompt waited queued
78
+ behind it, even after the aweb welcome's turn had finished. The hold now
79
+ never waits for the prompt's own run, and a session that shuts down
80
+ releases it. The task still runs once, after a welcome turn that started
81
+ first. On pi 1.2 and later, a welcome sent while the task's run starts is
82
+ queued by pi into that run, after the task. The bridge still sends and
83
+ alters nothing. Restart a pi instance that hangs on its opening task once
84
+ the updated `@awebai/oats-pi` is installed (`oats update`).
85
+
86
+ - **`oats tui` names a sibling at both ends of the link, and its palette
87
+ names siblings** ([#1315](https://github.com/awebai/oats/issues/1315)).
88
+ The detail's parent line named a sibling only on the instance that
89
+ declared the link, and named it as written, even when no instance had
90
+ that name or two had it. Now both ends say `sibling of <names>`, as the
91
+ Desktop does, and a name that resolves to no instance, or to more than
92
+ one, is not shown. The palette shows the same words, dim, after an
93
+ instance's name; a query never matches them. See
94
+ [the TUI page](../tui.md#the-palette).
95
+
96
+
97
+ ## Provider updates
98
+
99
+ - **oats.framework 1.13.0, oats.setup 2.8.0: the setup expert runs the
100
+ setup, and the person types only secrets**
101
+ ([#1314](https://github.com/awebai/oats/issues/1314)).
102
+ - **The setup briefing has one rule for what the person types:**
103
+ passwords, tokens, API keys and interactive logins. It also keeps the two
104
+ installs that capture their own shell, the host wake broker and the host
105
+ timer (#922). Everything else the agent runs and reads back.
106
+ - **A secret reaches its command by a route the agent never sees,** in
107
+ this order:
108
+ - a browser device flow the agent starts (`gh auth login --web` without
109
+ a terminal);
110
+ - a no-echo prompt in a split of the agent's own tmux pane, which closes
111
+ when its command ends (while it is open, wakes and `oats session input`
112
+ can't reach that instance);
113
+ - the person's own terminal.
114
+
115
+ Each route is checked with a read-only command.
116
+ - **`/oats-git-setup` is run by the agent.** The person approves each gh
117
+ login in the browser and chooses their name, email and passphrase
118
+ option. The SSH key is made with no passphrase, because the kernel's ssh
119
+ runs in batch mode; a passphrase key held in an ssh-agent is the
120
+ alternative. The GitHub host key that was checked against its published
121
+ fingerprint is the one recorded. Step 0 reads the global Git
122
+ configuration's names only, and step 7's check runs as one block.
123
+ - **`/oats-setup-expert` (new):** a workspace setup expert's first session.
124
+ It starts from the intake that the `oats-getting-started` skill hands it
125
+ from OATS 0.62.0,
126
+ covers a new or an existing workspace, and ends at a first working soul.
127
+ `/oats-onboarding` points to it.
128
+ - **`/oats-agent-permissions` (new): Claude Code's permissions for OATS
129
+ instances.** The setup expert writes the user settings of the Claude
130
+ config the launches use, never the home's `.claude/settings.json`:
131
+ - auto mode, by `permissions.defaultMode` or `--permission-mode auto` in
132
+ a launch configuration's `args`;
133
+ - an `autoMode` block naming what the workspace trusts;
134
+ - narrow allow rules for the `oats` reads, `oats spawn` (with an `ask`
135
+ rule on `--yolo`, `--server` and `--wake-*`), reading `aw` mail and
136
+ chat, and `gh` reads.
137
+
138
+ Retire and stop (except `--plan`), `aw` sends, `git` beyond Claude's
139
+ built-in read-only forms, pushes, merges and the operator acts stay
140
+ with the classifier, or an `ask` rule. The person approves the
141
+ change. The check: no `waitingOnYou` with reason `permission` during the
142
+ first working soul's task. Claude only; Codex and pi are named.
143
+ - **`/oats-setup-model` explains the per-workspace setup expert,** and how
144
+ `oats onboard` finds it from OATS 0.61.0.
145
+ - Instruction text only; the floors are unchanged. A deployment gets it by
146
+ pinning `oats.framework: v1.13.0` and running `oats sync`.
147
+
148
+ ## Documentation
149
+
150
+ - **The README's opening reads at a skim.** One paragraph says what OATS is
151
+ (a provider- and harness-agnostic framework for distributed agent teams,
152
+ completely free and open source), then five short points: each agent
153
+ keeps its harness's full power, capabilities shape the team over
154
+ opinionated defaults, you keep control, the two clients, and what it
155
+ builds on.