Repository navigation
Expand file tree
/
Copy pathcli.json
More file actions
3169 lines (3169 loc) · 430 KB
/
Copy pathcli.json
File metadata and controls
3169 lines (3169 loc) · 430 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$comment": "Standing platform test checklist — area ledger. Hand-edited, append-only; validated by scripts/check-platform-checklist.mjs (pnpm check:platform-checklist). Authoring rules: docs/qa/platform-checklist/README.md · execution protocol: RUNNER.md.",
"area": "cli",
"axis": "devpath",
"title": "CLI — os dev/build/migrate/verify/test boot, load, execution & exit-code contracts, scaffold first-run, flag/command error UX",
"fixtures": {
"$comment": "AREA-LEVEL standing fixtures (README \"Area-level `fixtures`\"; shape copied from qa-scratch-authz in areas/attachments-storage.json). An item opts in with fixtures.provisioning = { use: KEY, why: … }. This area's one recipe is not runtime-provisioned like the others: it RESTORES a committed database into two new files, so nothing in the repo or on a live boot is touched and the teardown line is the whole cleanup. Every call cites the file and symbol that grounds it; replay the calls literally, and if one answers differently re-read the citation before assuming the recipe rotted.",
"cli-18-prerelease-db": {
"title": "A showcase database the 18.0.0-next.5 release's own `os dev` created and served, restored from a committed text dump (primary + telemetry sibling)",
"why": "cli.organization-ownership-ceremony acceptance[5] upgrades a database an 18.0 pre-release created and served. Making one took a build of the release's tag commit in its own worktree on every run, so the clause scored blocked(fixture) in both 18.2.0 waves (QA runs #25812 and #26481), and a published pre-release CLI is no substitute (an npm install of @objectstack/cli@18.0.0-next.5 resolves 18.1 dependencies and births an 18.1 database, QA run #25812). The choice made here is a COMMITTED fixture, not a rebuild script per run: the database travels as SQLite text in packages/qa/dogfood/test/upgrade-harness/fixture-18.0.0-next.5/ — database.sql 198,531 bytes, telemetry.sql 202,762 bytes, manifest.json 5,573 bytes, 406,866 bytes in all, under the ~1 MB line a binary would have to clear — and the generator that made it stays beside it to remake it from the tag. Retire the recipe when an 18.0 pre-release database stops being a supported upgrade source",
"provenance": "#26624. Generated on 2026-10-27 by `cli-prerelease-fixture.ts generate --checkout` over a worktree of the @objectstack/cli@18.0.0-next.5 tag commit 820fd5aef0 (pnpm install --frozen-lockfile, turbo build of the showcase closure): that commit's `os dev --seed-admin` over a fresh file database, used through its own HTTP doors, stopped by SIGTERM; manifest.json records ref, sha and the census. Re-driven once on the restore at main 8b276385 (cli.organization-ownership-ceremony history revision 6)",
"app": "showcase",
"requires": [
"this repository installed (`pnpm install`): the restore runs under the workspace's tsx and node:sqlite, and needs no build of the tag. The run subject's CLI is built as the item's own steps need it",
"the restored pair is a COPY by construction (the restore refuses to write over an existing file), so the clause's never-the-original rule holds; restore again for a second leg",
"every boot and ceremony command of the leg run WITH --dev (`os serve --dev`, `os migrate organization-ownership --dev …`): the database was born under `os dev`, whose composition keeps a telemetry sibling beside a file primary (packages/cli/src/utils/telemetry-datasource.ts#resolveTelemetryDbPath), and that sibling holds sys_activity and sys_http_delivery. A production `os serve` boot over the restored pair is NOT MEASURED"
],
"sequence": [
{
"step": 1,
"call": "pnpm --filter @objectstack/dogfood exec tsx test/upgrade-harness/cli-prerelease-fixture.ts restore --to /tmp/RUN/n5.db",
"expect": "exit 0, printing 'restored /tmp/RUN/n5.db and /tmp/RUN/n5.telemetry.db — born under @objectstack/cli@18.0.0-next.5 (820fd5aef0d6)'. The telemetry file's name is the one `os dev` derives from the primary's, so OS_DATABASE_URL=file:/tmp/RUN/n5.db under --dev composes both. A second restore to the same path refuses (the files exist): pick a new path",
"source": "packages/qa/dogfood/test/upgrade-harness/cli-prerelease-fixture.ts#restore, loading through packages/qa/dogfood/test/upgrade-harness/sqlite-text-dump.ts#loadSqlIntoSqlite"
},
{
"step": 2,
"call": "read the restored primary with node:sqlite: sys_email, sys_job_queue (queue LIKE 'email.%'), sys_setting_audit WHERE scope = 'global', sys_webhook, and sys_migration for 'adr-0131-organization-ownership'",
"expect": "what manifest.json's census recorded: four sys_email rows, two identity mails (related_object sys_user: a password reset for n5.member-b@verify.test and a verification resend for n5.member-a@verify.test) and two organization-invitation mails (sys_invitation); four email.send.async jobs, all `pending`, one per mail; eight global sys_setting_audit rows (seven `mail`, one `auth`); the showcase_task_changed mirror row in sys_webhook with organization_id NULL and active 1; no organization-ownership marker. The people and their 18.0 passwords are manifest.json's `people` (the seeded admin, member A invited and signed up, member B made by admin create-user)",
"source": "packages/qa/dogfood/test/upgrade-harness/cli-prerelease-fixture.ts#census (the same census refuses to write a dump missing any of it) and packages/qa/dogfood/test/upgrade-harness/cli-prerelease-fixture.ts#PRERELEASE_PEOPLE"
},
{
"step": 3,
"call": "before any boot, re-date the reset token on the restored primary: node -e \"const {DatabaseSync}=require('node:sqlite'); const db=new DatabaseSync('/tmp/RUN/n5.db'); console.log(db.prepare(\\\"UPDATE sys_verification SET expires_at = ? WHERE identifier LIKE 'reset-password:%'\\\").run(new Date(Date.now()+864e5).toISOString()).changes)\"",
"expect": "prints 1: the dump's one sys_verification row, member B's reset token (identifier reset-password:TOKEN, the token the moved reset mail carries), now expires a day ahead instead of at 2026-10-27T17:42:21.457Z, one hour after the dump was generated. Without it the reset leg of cli.organization-ownership-ceremony acceptance[5] answers 400 INVALID_TOKEN on every run (QA run #27481). The value keeps the dump's own ISO-8601 text form; nothing else is touched",
"source": "packages/qa/dogfood/test/upgrade-harness/fixture-18.0.0-next.5/database.sql (the sys_verification INSERT: expires_at one hour after created_at)"
}
],
"regenerate": {
"call": "git fetch --depth=1 origin 'refs/tags/@objectstack/cli@18.0.0-next.5:refs/tags/@objectstack/cli@18.0.0-next.5', then `pnpm --filter @objectstack/dogfood exec tsx test/upgrade-harness/cli-prerelease-fixture.ts generate` (it adds, installs, builds and removes its own worktree of the tag), or `generate --checkout DIR` over a built worktree already at the tag commit",
"expect": "rewrites the three fixture files and prints the census. Not byte-reproducible (ids, timestamps, tokens and hashes are minted per run), so a regenerated dump is a reviewed diff; the census is what holds. What it drives, in order, on the tag's own `os dev --seed-admin`: admin sign-in and set-active; the global `mail` settings written twice (SMTP at a local port nothing listens on, queue_delivery on; then from_name), with OS_EMAIL_RETRIES=10 on the boot so each queued mail fails fast and waits; member A invited, signed up and accepted; member B by admin create-user; a password reset for B and a verification resend for A; a second, pending organization invitation; the declared webhook's mirror row PATCHed active; an admin task and a member task",
"source": "packages/qa/dogfood/test/upgrade-harness/cli-prerelease-fixture.ts#generate and packages/qa/dogfood/test/upgrade-harness/cli-prerelease-fixture.ts#useTheRelease; the retry budget is packages/plugins/plugin-email/src/capability-arg.ts#resolveEmailCapabilityArg (OS_EMAIL_RETRIES) over packages/plugins/plugin-email/src/email-plugin.ts#QUEUE_DELIVERY_BACKOFF"
},
"teardown": "delete /tmp/RUN/n5.db and /tmp/RUN/n5.telemetry.db with their -wal and -shm files; the restore writes nothing else",
"knownGaps": [
"no magic-link mail and no email.attachment.reclaim job: 18.0.0-next.5's served composition mounts no magic-link door, and identity mail carries no attachment, so acceptance[5]'s magic-link and reclaim arms read nothing here (QA run #24838 planted both by hand). All four mail jobs are `pending`; none is `running` or `completed`, so the 'completed jobs unchanged' arm reads the two organization-invitation jobs only",
"the second boot keeps delivering: the mail settings still name the closed port, so it retries the re-pointed sends, and each moved sys_identity_email row's attempt_count and updated_at advance (2 → 3 in the #26624 re-drive). Read 'equal over the columns both tables hold' at the apply, before the second boot, and after it on every column but those two; that the retry reads the row from sys_identity_email is itself evidence the job was re-pointed",
"the database carries no sys_http_delivery row: on 18.0.0-next.5 the organization-less declared webhook refuses to fan out an organization's event ('belongs to NO organization … refusing to fan out', QA run #24838), so the ceremony's deliveriesResourced is 0 here and the delivery leg is the post-upgrade PATCH alone",
"the restored telemetry sibling holds 9 sys_automation_run rows, two of them showcase_task_follow_up runs paused at the `hold` wait node on the two fixture tasks (status paused, node_type wait; packages/qa/dogfood/test/upgrade-harness/fixture-18.0.0-next.5/telemetry.sql). Their PT1M timers fell due one minute after the dump was generated (hold.waitUntil 2026-10-27T16:43Z; examples/app-showcase/src/automation/flows/index.ts TaskFollowUpFlow), so every boot that serves the restore resumes both, and both fail at the `remind` notify node: the two tasks carry assignee null, and the node's recipient expression then adds no recipient. QA run #28545 (at eeec88d1) read the two paused rows replaced by run_run_ history rows on the second boot: the table's count held 9 → 9 while the two pre-existing ids vanished. Count sys_automation_run like any table; do not expect its paused ids to survive the second boot, and do not score their absence against the apply (cli.organization-ownership-ceremony acceptance[5])"
]
}
},
"items": [
{
"id": "cli.dev-boot-contract",
"title": "os dev boots to healthy with a loginable seeded admin, honest DB selection, reported port shifts, and a staleness warning",
"since": "v16",
"status": "active",
"revision": 9,
"priority": "P0",
"surface": "cli",
"personas": ["operator (local shell)"],
"fixtures": {
"app": "showcase",
"requires": [
"a free non-default port (lsof -nP -iTCP:<port> -sTCP:LISTEN empty first — dogfood skill §0) and a scratch DB path under /tmp/<run>/",
"⚠️ an app directory NO other runner boots, for steps[4], steps[6] and steps[7]: each writes into the directory it runs in. steps[4] bumps a tracked source file's mtime, so every other runner booting that tree reads its artifact as stale — and an `os dev` already running there is watching `objectstack.config.ts, src` and rebuilds and restarts on the change; steps[6] creates the unified default DB under .objectstack/data/ in it; steps[7] plants a legacy dev.db. Use your own worktree, or a worktree copy of examples/app-showcase (the same prescription cli.build-own-contract carries), and discard it after",
"for acceptance[7], the console clause, a BUILT Console: in the framework repo run `pnpm console:build` at the repo root first (`turbo run build:dist --filter=@objectstack/console`: it builds ui/apps/console in this workspace and packages/console/build-dist.sh copies that dist into packages/console/dist, which `pnpm build` never produces — it builds the Console but does not copy it). On an unbuilt tree the boot still reaches health and ready, and GET /_console/ answers 503 text/plain 'The ObjectStack Console is not built, so this server has no Console to serve at /_console/.' followed by that build remedy (packages/cli/src/utils/console.ts#createConsoleNotBuiltPlugin): record acceptance[7] blocked(environment), not a FAIL of the clause"
]
},
"steps": [
"from examples/app-showcase run `objectstack dev --ui --seed-admin -p <port> -d file:/tmp/<run>/data.db` and capture the full boot log (Environment ID / Artifact / Database key-values print at boot)",
"poll `curl -s -m3 -o /dev/null -w '%{http_code}' http://localhost:<port>/api/v1/health` until 200, then GET /api/v1/ready; open /_console/ and sign in as admin@objectos.ai / admin123",
"stop; restart the SAME command against the SAME DB but with `--admin-password changed99`; attempt login with the ORIGINAL password (the seed is empty-DB-only and must not overwrite)",
"stop; in a scratch dir with NO objectstack.config.ts and no --artifact, run `os dev; echo $?` and capture the message",
"back in the app dir with the server DOWN, touch a src file so it is newer than dist/objectstack.json, boot with --no-compile, and capture the staleness warning block. Since #26130 `os dev` compiles by default whenever a config exists, so a boot that merely omits --compile rebuilds the artifact first and prints no warning (packages/cli/src/commands/dev.ts: the compile flag defaults on; the staleness check runs only when no compile is due)",
"with instance A still running, boot instance B on the same requested port and capture the '↪ server bound to port <actual> (requested <requested>)' line",
"run once with NONE of --database/--fresh/env-db set and no config-declared default datasource, and record the printed Database line (must be the project-anchored UNIFIED default file:<cwd>/.objectstack/data/objectstack.db); then run with `--fresh` and record the '🧪 Fresh OS_HOME' tempdir line (its DB is the SAME unified filename under the ephemeral home) and its deletion on exit",
"legacy compat-read: in a scratch project whose .objectstack/data holds a legacy dev.db and NO objectstack.db, boot with nothing chosen and capture both the Database line (must resolve to the legacy file — never a fresh empty objectstack.db beside it) and the one loud notice line naming that file and how to converge on the unified name",
"capture `echo $?` after every terminated invocation, against the expected codes: Ctrl-C/SIGINT ends a plain `os dev` with its serve child's exit code — 0 on a clean shutdown (the parent follows `code ?? 0`, packages/cli/src/utils/dev-restart.ts#ServeRestartCoordinator); a `--fresh` run's own SIGINT handler deletes the tempdir and exits 130 (SIGTERM 143); the no-config case of steps[3] exits 1",
"config-declared default datasource tier, for acceptance[2] (derived from the resolver source, not yet replayed live): in your own scratch project (fixtures.requires[1]), declare a NAMED sqlite datasource with a relative config.filename, e.g. `{ name: 'qa_home', driver: 'sqlite', config: { filename: '.objectstack/data/qa_home.db' } }` (the shape of the showcase's showcase-external.datasource.ts without its external block), plus a datasourceMapping rule `{ default: true, datasource: 'qa_home' }`, with every object declaring sharingModel (variants[6]). This tier reads the compiled dist/objectstack.json: `os dev` compiles it at boot by default (#26130), and `os build` first works as well. Boot with NONE of --database, --fresh, OS_DATABASE_URL, DATABASE_URL or TURSO_DATABASE_URL set, and record the Database line: it must name file: plus that filename resolved against the project root, never .objectstack/data/objectstack.db (packages/runtime/src/resolve-project-database.ts#readConfigDeclaredDefault, the rung after the explicit URL and the environment). If the boot cannot be staged, record this variant blocked(fixture) with the reason"
],
"acceptance": [
{
"clause": "the boot reaches health: /api/v1/health answers 200 and /api/v1/ready succeeds",
"oracle": "api",
"verify": "the health poll flips to 200 within the probe budget; ready returns success. The console is acceptance[7], so a run with no console build scores this clause in full",
"evidence": "curl outputs"
},
{
"clause": "--seed-admin provisions the FIXED well-known dev admin (admin@objectos.ai / admin123) loginable via the real auth endpoint, and the seed is idempotent — a later boot with a different --admin-password does NOT overwrite the existing account",
"oracle": "api",
"verify": "login succeeds with the original credentials after the changed-password restart (flag contract: 'it acts only while no account holds the seed address and no local password login exists anywhere, never overwrites an existing account'). ⚠️ The `🔑 Dev admin: …` banner row is NOT seeding evidence: plugin-auth re-arms it on every later dev boot while the account still holds the default password (auth-plugin.ts maybeReportExistingSeedAdmin), so it reprints on boots that seeded nothing — judge the seed by the auth responses only",
"evidence": "the two auth responses"
},
{
"clause": "DB selection honors the ONE shared resolution matrix (#6469 resolveProjectDatabaseUrl, which dev maps its flags onto via resolveDevDatabase and start/migrate resolve through too): with nothing chosen, dev defaults to the PERSISTENT project-anchored sqlite file — the unified <state dir>/data/objectstack.db, i.e. .objectstack/data/objectstack.db under the project — never the historical serve default of :memory: that wipes work on restart",
"oracle": "log",
"verify": "the printed Database key-value per variant matches the matrix, tier for tier (explicit -d url, including `-d :memory:` — SQLite's own in-memory database; env url; config-declared default datasource, staged by steps[9]; legacy dev.db/standalone.db compat-read WITH its notice line; otherwise the unified objectstack.db default) — and dev carries no fallback filename of its own",
"evidence": "the per-variant Database boot lines"
},
{
"clause": "--fresh isolates OS_HOME-keyed state in an auto-deleted tempdir — and the evidence must NOT claim isolation for app-declared cwd-relative paths, which survive by documented design (#5594, e.g. the showcase-external datasource file)",
"oracle": "log",
"verify": "the Fresh OS_HOME line names a tempdir; the dir is gone after exit; any surviving .objectstack/data/showcase_external.db is annotated as the documented #5594 carve-out, not filed as a bug",
"evidence": "boot line + post-exit directory listings"
},
{
"clause": "a busy requested port auto-shifts AND is reported — the actually-bound port is printed, never silently different",
"oracle": "log",
"verify": "instance B prints '↪ server bound to port <actual> (requested <requested>)' (the IPC objectstack:listening channel exists so the parent can print the truth)",
"evidence": "the log line + a health probe on the actual port"
},
{
"clause": "a stale artifact is called out at boot: when dist/objectstack.json is older than the sources, the boot warns loudly, names the newest source and the remedy — and still boots (warn, never gate — #5148). The warning belongs to a boot that does not compile (`os dev --no-compile`); a default boot compiles first, so it has no stale artifact to call out",
"oracle": "log",
"verify": "the '⚠ … is OLDER than your sources — this boot serves the STALE build' block prints with the newest-source path and the fix line; the server still comes up",
"evidence": "the warning block + subsequent healthy boot"
},
{
"clause": "negative: no config and no artifact exits 1 with the remedy ('Run in a directory with objectstack.config.ts, pass --artifact <path|url>, or run from the monorepo root.') — never a hang, never a silent 0",
"oracle": "log",
"verify": "echo $? prints 1 and stderr carries the remedy line",
"evidence": "captured stderr + exit code"
},
{
"clause": "with --ui passed, the console is served at /_console/: it serves the login page",
"oracle": "screenshot",
"verify": "after steps[1]'s health 200, open /_console/: it renders the console's login page, confirmed by a screenshot before any DOM read (RUNNER rule 1). It needs a BUILT Console (fixtures.requires[2]); on an unbuilt tree /_console/ answers 503 text/plain 'The ObjectStack Console is not built, so this server has no Console to serve at /_console/.', and this clause is recorded blocked(environment), never a FAIL",
"evidence": "console screenshot"
}
],
"negative": [
"a dev boot that wipes an existing dev DB when the user chose nothing (a regression to the historical :memory: serve default) is the FAIL the persistent default exists for",
"a dev boot that ACCEPTS the retired in-memory (mingo) engine — `--database-driver memory`, `OS_DATABASE_DRIVER=memory|mingo|in-memory`, or `-d memory://` / `mingo://` — is a FAIL: it is not a boot store (it refuses every tenant-scoped read, so a data read answers 503). The flag value is refused while the flags parse (oclif's allowlist message, exit 2); the env spelling is refused BEFORE any Database line prints, exit 1; the URL is refused by the serve child after the parent's Database line, exit 1 — each naming `--fresh` and `:memory:` except oclif's own allowlist line",
"a boot that silently opens a fresh empty objectstack.db beside an existing legacy dev.db — or reads the legacy file WITHOUT printing the notice — is a FAIL: the compat-read exists so an established dev environment never looks like data loss",
"an auto-shifted port that is not reported (URL printed for the requested port while the server bound elsewhere) is a FAIL"
],
"variants": [
"unified default: file:<cwd>/.objectstack/data/objectstack.db (persistent, imposed only when nothing else chosen)",
"--database <url> (explicit; no default imposed)",
"--fresh (ephemeral tempdir OS_HOME; same unified filename under it; implies --seed-admin)",
"OS_DATABASE_URL / DATABASE_URL / TURSO_DATABASE_URL env (env wins over the default)",
"-d :memory: (SQLite's own in-memory database — the replacement for the retired in-memory engine; nothing persists across restarts)",
"--database-driver memory / OS_DATABASE_DRIVER=memory|mingo|in-memory / -d memory:// or mingo:// → REFUSED (the retired in-memory engine; see the negative for where each is refused and what it names)",
"config-declared default datasource (the project config's default home wins over the unified default) — authored as a NAMED datasource plus a datasourceMapping rule { default: true, datasource: NAME } (readConfigDeclaredDefault); a datasource literally named `default` is refused by defineStack as reserved for the host's primary, and a mapping rule naming 'default' is declined, so neither can stand for this variant. The scratch stack's object must declare sharingModel (e.g. 'private'): without one the boot's compile refuses the stack on the error rule security-owd-unset (packages/lint/src/validate-security-posture.ts#SECURITY_OWD_UNSET) and `os dev` exits 1 with 'Compile failed — fix errors above before starting dev server' (packages/cli/src/commands/dev.ts)",
"legacy compat-read: an existing dev.db / standalone.db when no objectstack.db exists (resolved WITH one loud notice line; probe order objectstack.db → dev.db → standalone.db)"
],
"traps": ["stale-dist", "stale-console-bundle", "shared-browser-tab"],
"source": [
"packages/cli/src/commands/dev.ts#resolveDevDatabase (resolveDevDatabase — dev's ONE resolution seam onto the shared matrix, carrying no fallback filename of its own; the persistent-default rationale; --fresh coverage note #5594; seed-admin idempotency contract; IPC bound-port report; #5148 staleness warning + rebuild-restart coordinator)",
"packages/runtime/src/resolve-project-database.ts#resolveProjectDatabaseUrl (#6469 resolveProjectDatabaseUrl — the shared priority matrix explicit → env → config-declared default datasource → unified <state dir>/data/objectstack.db, with a retired in-memory driver selection refused ahead of every rung (retiredMemoryEngineMessage), the state-dir order homeDir/OS_HOME/<projectRoot>/.objectstack/~/.objectstack, and the legacy dev.db/standalone.db compat-read with its loud notice)",
"packages/cli/src/commands/unified-db-resolution.pin.test.ts#start (pins dev/start/migrate all resolving through that one seam)",
".claude/skills/dogfood-verification/SKILL.md §0–§1 (port isolation, health probe, fixed admin creds, /_console layout)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new area item: the os dev boot contract read directly out of dev.ts (DB-selection matrix as variants, seed idempotency, port-shift reporting, #5148 staleness warning, #5594 fresh-isolation carve-out) plus the dogfood skill's boot shapes", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-08-11", "change": "text refresh only, no property change: the DB-selection clause, step, variants and sources named the retired resolveDefaultDevDbUrl helper and the .objectstack/data/dev.db default, both superseded by #6469's unified <state dir>/data/objectstack.db resolved through the shared resolveProjectDatabaseUrl (dev's seam is now resolveDevDatabase). Re-derived from dev.ts + resolve-project-database.ts: added the config-datasource and legacy compat-read tiers as variants, a step and negative for the legacy dev.db notice, and the pin test to sources. The load-bearing assertion is UNCHANGED in substance — nothing-chosen still defaults to a PERSISTENT project-anchored sqlite file, never :memory:", "ref": "#7650" },
{
"revision": 3,
"date": "2026-10-01",
"change": "checklist-accuracy findings of QA run #21056: steps[4], [6] and [7] write into the app directory they run in and are unsafe on a tree parallel runners share — requires now prescribes an unshared app directory; steps[8] names the expected exit codes (SIGINT 0 for plain dev, 130 for --fresh); acceptance[1] says the Dev admin banner row reprints on later boots and is not seeding evidence",
"ref": "#21060"
},
{
"revision": 4,
"date": "2026-10-03",
"change": "the in-memory (mingo) engine was retired as a boot store, so the DB-selection matrix loses its 'memory driver imposes no file default' tier: the variant now reads REFUSED, a negative names where each spelling is refused (flag at parse, env before the Database line, URL in the serve child) and what the refusal names, `-d :memory:` is added as the replacement variant, and the resolveProjectDatabaseUrl source note drops the memory rung. Measured on the change's own build: `--database-driver memory` exit 2 (oclif allowlist), `OS_DATABASE_DRIVER=memory os dev --fresh` exit 1 with no Database line, `os dev -d :memory:` serves crm_lead 200",
"ref": "#21492"
},
{
"revision": 5,
"date": "2026-10-17",
"change": "the config-declared-default variant named no authorable shape, and the obvious one fails (checklist-accuracy finding, #23878 close-out): a datasource literally named `default` is refused by defineStack, so the variant is a named datasource routed by datasourceMapping { default: true, datasource: NAME }, the shape readConfigDeclaredDefault reads. Re-run of that variant on main c91af8ed6 on a minimal scratch stack: datasources [{ name: 'qa_main', driver: 'sqlite', config: { filename: SCRATCH/data.db } }] with the default mapping rule, os dev -p PORT with no -d and no env database → '🗄️ Database: file:SCRATCH/data.db', and no .objectstack/data file was created; a datasource named 'default' → build exit 2 with the reserved-name refusal",
"ref": "#24036"
},
{
"revision": 6,
"date": "2026-10-20",
"change": "fixtures.requires[2] added and variants[6] extended — checklist-accuracy findings C3 and C4 of QA run #24786 (wave anchor #24579 round 13), re-read at base 7697ddcf94. C3: acceptance[0]'s console leg needs `pnpm objectui:build` in the framework repo; on an unbuilt tree /_console/ answers 503 'The ObjectStack Console is not built …' (console.ts createConsoleNotBuiltPlugin), which QA run #24786 met, so the requirement now says so and how to record the leg. C4: the config-declared-default variant's scratch object must declare sharingModel, or the compile fails on security-owd-unset and os dev exits 1 (dev.ts). No clause changed",
"ref": "#24850"
},
{
"revision": 7,
"date": "2026-10-20",
"change": "acceptance[0] narrowed to its server half, with the console half appended as acceptance[7], and steps[9] stages the config-declared default tier. Checklist-accuracy findings of QA run #24838 (18.0 sweep round 4 at 307ce4c4; QA run #24841 lists the console build among its fixture gaps). (1) acceptance[0] bundled /_console/ with the health and ready probes, so a run with no console build could never pass the server half that held (health 200, ready 200, /_console/ 503 ConsoleNotBuilt). The halves now score apart, and fixtures.requires[2] points at acceptance[7]. (2) acceptance[2]'s matrix names the config-declared default datasource tier, and no step staged it. steps[9] stages it the way resolve-project-database.ts readConfigDeclaredDefault reads it at base feb09db14a: the compiled artifact's datasourceMapping rule { default: true, datasource: NAME } and that datasource's config.filename, resolved against the project root. The step says it is derived from source and not yet replayed live. No other clause changed",
"ref": "#24963"
},
{ "revision": 8, "date": "2026-10-26", "change": "fixtures.requires[2] names `pnpm console:build` — the retired objectui pin route (`pnpm objectui:build`, scripts/build-console.sh, .objectui-sha) is gone from main: the Console builds in this workspace from ui/apps/console (#26035, whose docs slice #26052 left the area JSON to the 18.2.0 ledger cards; this edit rides #25841). Read at base 9753d163: the root manifest's console script is `console:build`, packages/console/build-dist.sh does the copy, and neither scripts/build-console.sh nor .objectui-sha exists. No clause changed", "ref": "#25841" },
{
"revision": 9,
"date": "2026-10-27",
"change": "steps[4], steps[9] and acceptance[5].clause follow #26130's compile default. Checklist-accuracy finding of the 18.2.0 wave 2 (QA run #26481, priority:P0, at 756220c4; wave anchor #25807, slice A): `os dev` now compiles by default when a config exists, so steps[4]'s boot 'without --compile' printed no staleness warning; the step needs --no-compile, and steps[9]'s 'compiles only when no artifact exists' is stale. Re-read at base e4ba846f (packages/cli/src/commands/dev.ts: compile Flags.boolean default true, allowNo; the #5148 staleness block runs under !needsCompile). The clause's assertion is unchanged; it names the boot it applies to",
"ref": "#25807"
}
]
},
{
"id": "cli.build-own-contract",
"title": "os build's own contract: no computed value in the exit slot, located errors for schema and author-time rule failures, artifact + stats output, warnings never flip the exit",
"since": "v16",
"status": "active",
"revision": 9,
"priority": "P1",
"surface": "build",
"personas": ["operator (local shell)"],
"fixtures": {
"app": "showcase",
"requires": [
"a scratch copy of a known-good app config (scaffolded blank app or a worktree copy of examples/app-showcase) so deliberate breakage never touches shared fixtures. A plain-literal object added to it carries the package's namespace prefix in its name: an unprefixed one is refused for NAMESPACE_PREFIX first, and that refusal masks the break steps[2] makes and the advisory steps[5] reads"
],
"knownGaps": [
"no spec docblock or ADR states the --json payload shape of os build or os validate; the one governed element is the conversion notice both publish under conversions (packages/spec/src/stack-provenance.ts#stackConversionsOf). So acceptance[3] follows the code at base 7697ddcf94 (the emitJson payloads in compile.ts and validate.ts): the two commands spell the verdict (success / valid) and the finding list (issues / errors) differently, and build's own failure exits differ among themselves — the author-time rule and --strict-body failures carry issues, while the post-lowering schema parse, the container-name and the picklist refusals carry errors. A refusal at load carries its message and code only: packages/cli/src/utils/format.ts#errorCodeFields copies code and httpStatus, so the zod issues the STACK_SCHEMA_INVALID ledger row says that error carries ('issues carries the zod issues structurally', packages/spec/src/api/error-code-ledger.zod.ts) reach neither payload. Which spelling is canonical is unruled: score acceptance[3] on the warnings/conversions parity, and record both payloads as they are"
]
},
"steps": [
"on the clean config run `os build; echo $?` and capture the summary (metadata stats, Artifact path/size)",
"run `os build --json` and capture the success payload",
"break the schema: give one field an impossible shape (e.g. delete its type) and run `os build; echo $?` — capture the located Zod error. Make the break on an object authored as a PLAIN LITERAL handed to defineStack: ObjectSchema.create() parses at import (data/object.zod.ts), so the same break inside a helper-authored object (ObjectSchema.create / Field.*) dies at 'Loading configuration…' with the raw Zod issue array (path [fields, body, type], no object name) and never reaches the located 'defineStack validation failed … objects.0.fields.body.type' block this clause scores",
"break an author-time rule: author a flow whose Approval node approver expression does not parse (the #4409 worked example that once built green while os lint rejected it) and run `os build; echo $?`. Keep the config's `requires: ['automation', 'triggers']`, which the scaffolded blank app and the showcase both declare: when the flow carries an auto-launch trigger (record_change, schedule, time_relative or api) and `requires` lacks either token, defineStack refuses the stack at load (packages/spec/src/stack.zod.ts#validateTriggerCapability) and the build never reaches the author-time rule this step scores",
"re-run both failing builds with --json and capture the failure payloads",
"restore the config and add one UNDECLARED authoring key (the #3786 advisory class) where it is still an advisory: object, field, report and enable shapes are CLOSED, so an unknown key ON a field is a hard refusal (exit 2 out of defineStack, exit 1 'Validation failed … unrecognized_keys' under strict:false) — that is clause 2's territory, not this one. The advisory survives only at a nested strip-mode site, e.g. inside a field's object-form visibleWhen ({ dialect: 'cel', source: …, qaUndeclared: 1 }), on a RAW field object of a plain-literal object: written inside ObjectSchema.create() the key is stripped by that helper's own parse, with no advisory under either defineStack mode (build exit 0, the key silently absent). Build it under defineStack(…, { strict: false }) and run `os build; echo $?` — the 'Undeclared authoring keys (1) — dropped at load; reported here, never refused' block prints and the build passes; under the default defineStack the same key draws defineStack's own one-line warning and exit 0, without the compile-side block",
"the exit-slot pair: make the config throw at LOAD time and run BOTH `os build; echo $?` (human path — expect exit 2 out of compile.ts's human-path catch: its own ✗ line, then this.exit(2)) and `os build --json; echo $?` (expect 1 via emitJson) — the pair that separates the framework's error exit from the #4873 leak",
"repeat one successful run and one failing run verbatim and compare the two exit codes each time — a code that MOVES between identical runs is the #4873 signature, and only a repeat can see it",
"confirm `os build` and `os compile` produce identical behavior on the same input (build is the documented alias)",
"scope, not a probe: the DEEP gate content (date-arithmetic formula errors, retired-key tombstones) is api-backend.formula-gates / api-backend.enforce-or-remove-authoring-gates; cite pinned passes there. This item owns only the build's OWN exit/error/output contract"
],
"acceptance": [
{
"clause": "success: exit 0, dist/objectstack.json written, and the summary reports metadata stats + artifact size; --json answers { success: true, output, size, stats, warnings, conversions, duration }",
"oracle": "build",
"verify": "echo $? is 0, the artifact file exists and parses, and the --json payload carries the declared keys",
"evidence": "exit code + artifact listing + the JSON payload"
},
{
"clause": "a schema violation fails the build with a LOCATED error naming the failing path — never a bare 'validation failed' — and the exit code is 1 under --json or 2 on the human path",
"oracle": "build",
"verify": "the formatted Zod error names the object/field path of the deliberate break; echo $? is 1 for `--json` (compile.ts emits the failure payload then calls this.exit(1)) and 2 for a plain human-format run (the same catch prints its own ✗ line and ends at this.exit(2) — the status the this.error() that stood there raised). Both are legitimate — clause 5 of this item blesses exactly that oclif 2 — so record WHICH invocation was measured rather than failing the clause on a 2",
"evidence": "the error output + exit code"
},
{
"clause": "author-time rule failures exit 1 and every finding carries where/message/hint/rule/path — and ALL failing rules report at once, not first-failure-only",
"oracle": "build",
"verify": "the #4409 registry output for the broken-approver fixture shows the located finding with its rule id and hint ('the build is the command that SHIPS' — it must be no weaker than validate/lint)",
"evidence": "the rule-failure output + exit code"
},
{
"clause": "--json failure and advisory payloads carry the same warnings and conversions keys os validate --json carries — the #3782 parity class: the two surfaces must not disagree about what an author is told. The verdict and finding keys differ by command: os build answers success and, for an author-time rule failure, issues; os validate answers valid and errors; and a config that throws at load answers error and code on both, with no finding list",
"oracle": "log",
"verify": "pair each fixture's two --json payloads. The author-time rule failure (the steps[3] flow): build answers { success: false, error: 'author-time rules failed', issues, warnings, conversions } and validate { valid: false, errors, warnings, conversions, duration }. The schema break (steps[2], refused by defineStack at load): build answers { success: false, error, code: 'STACK_SCHEMA_INVALID', warnings, conversions } and validate { valid: false, error, code, warnings, conversions, duration }, neither with issues or errors. The clean config: build's { success: true, …, warnings, conversions } beside validate's { valid: true, …, warnings, conversions }. The parity judged is warnings and conversions, key for key. No stock fixture records a conversion (conversions is [] on both), which makes that half vacuous: give one fixture a live one by loading packages/cli/test/fixtures/live-conversion-probe.mjs with NODE_OPTIONS='--import ABSOLUTE_PATH' and authoring a flow node of type 'probe_old_callout', which the probe converts to 'http', so both payloads must carry the same conversion record; success/valid and issues/errors are each command's own spelling (packages/cli/src/commands/compile.ts, packages/cli/src/commands/validate.ts) and never a FAIL of this clause",
"evidence": "the paired --json payloads"
},
{
"clause": "#4873 exit-code honesty: the exit code is a STATUS, never a computed value — no duration, count or finding total ever reaches the exit-code slot. The legitimate exits are 0 and 1 through the CliExitCode union (every emitJson/emitText caller, i.e. both --json paths here), plus oclif's ExitError 2 when the human path (the run without --json) ends in its catch's this.exit(2): a config-load-time throw exiting 2 is the framework's error exit and is NOT a violation of this clause — cli.flag-command-error-ux pins that same 2 as the correct oclif error code, and the two items must not disagree",
"oracle": "build",
"verify": "every observed exit is 0, 1, or an oclif 2 from the human path's this.exit(2), AND none of them varies with the run: the #4873 shape is a value that TRACKS something (timer.elapsed() in emitJson's positional exit slot made a fully successful run exit 531 & 0xFF = 19, a different nonzero every time). Repeat one success and one failure to show the codes are stable; a nonzero that is neither 1 nor an oclif error exit, or any code that changes between two identical runs, FAILS",
"evidence": "the collected exit codes with the --json and human paths labelled separately, plus the repeat runs showing each code is stable"
},
{
"clause": "advisories never flip the exit: the undeclared-authoring-key build warns visibly AND exits 0 — both sides of the warn/fail line",
"oracle": "build",
"verify": "the #3786 warning block prints for the nested strip-mode key built under strict:false, the artifact is written with the key gone, echo $? is 0. An unknown key on a closed shape (a field) is refused instead and does not satisfy this clause",
"evidence": "warning output + exit code + artifact"
}
],
"negative": [
"exit 0 with no artifact written, or nonzero on the clean config, is a FAIL",
"an exit code that tracks a computed value — a duration, a count, a finding total — is the #4873 leak this item's exit clause exists for: a SUCCESSFUL run exiting nonzero, or any code that differs between two identical runs, FAILS. Oclif's fixed ExitError 2 on the human path (its catch's this.exit(2)) is NOT that leak and must not be filed as one (that reading is what collided with cli.flag-command-error-ux, reconciled in #7648)"
],
"traps": ["stale-dist"],
"source": [
"packages/cli/src/commands/compile.ts#Compile (the full gate pipeline: Zod parse, #4409 author-time rule registry, #3786 unknown-key advisory, --json shapes, #3782 conversion-notice parity; the human-path catches printing their own ✗ line and ending in this.exit(2) — oclif's ExitError 2 — while the --json branch answers through emitJson + this.exit(1) — re-pointed #18104: emitJson is IMPORTED here from format.ts and only ever called; the pipeline this item means is what the Compile command class this file declares runs) + build.ts (alias)",
"packages/cli/src/utils/format.ts#CliExitCode (CliExitCode = 0 | 1 — the narrowed emitJson/emitText exit slot, NOT a bound on oclif's own error exit)",
"packages/cli/src/utils/format.exit-code.test.ts#asExitCode (the #4873 pin: the defect was an argument in the wrong slot — timer.elapsed() landing in emitJson's positional exit code — and a number can no longer reach it at all — re-pointed #18104: emitJson is IMPORTED into this test and only called; asExitCode is the binding that carries the rejection, a duration typed into that positional slot under a @ts-expect-error)",
"cli.flag-command-error-ux (the sibling item that owns oclif's exit 2 — cross-referenced so the two never re-collide)",
"api-backend.formula-gates, api-backend.enforce-or-remove-authoring-gates (gate content — cross-referenced, not duplicated)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new item: the build command's own contract (exit-code discipline, located schema + rule errors, --json parity, advisory both-sides) read from compile.ts, with the gate-content items cross-referenced instead of re-proven", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-08-11", "change": "narrowed the exit-code clause to the #4873 duration-leak it exists to pin. As phrased ('exactly 0 or 1') it also forbade oclif's standard ExitError 2, which compile.ts's human-path this.error() catches legitimately produce on a config-load-time throw — so it contradicted cli.flag-command-error-ux, which asserts that same 2 is correct, and a run reported the collision as a product violation (#7648). The clause now pins what #4873 was: a computed value (duration/count) reaching the exit slot, detectable as a nonzero on success or a code that moves between identical runs; 0/1 via CliExitCode and oclif's fixed 2 on the human path are named as legitimate. Still load-bearing — a duration in the exit slot FAILS it — with a repeat-run step and a negative added to keep it falsifiable, and the CliExitCode source note corrected to say it narrows the emitJson/emitText slot, not oclif's error exit", "ref": "#7648" },
{ "revision": 3, "date": "2026-08-18", "change": "reconciled clause 2 with clause 5, which contradicted each other. Clause 2 demanded exit 1 on a schema violation while clause 5 explicitly blesses 'an oclif 2 from a this.error() path'. Measured in compile.ts (build is an alias of it): the --json failure path emits the payload and calls this.exit(1); the human path falls through the same catch to this.error(), which exits 2. The clause now names both and asks which was run (#9417)", "ref": "#9386" },
{ "revision": 4, "date": "2026-10-03", "change": "text refresh only, no status change: six live texts named compile.ts's this.error() as the mechanism of the human path's exit 2. Since bf36edd0a1 that catch prints its own ✗ line and ends in this.exit(2), which raises the same status without oclif's second Error: rendering; every oracle (exit 2 on the human path, 1 under --json) still holds. Revisions 2 and 3 above keep their wording: they record what was true when written", "ref": "#21492" },
{ "revision": 5, "date": "2026-10-17", "change": "steps[5] re-pointed (checklist-accuracy finding, #23878 close-out): as written ('add one undeclared authoring key') it is now a hard refusal, because object, field, report and enable shapes are closed, so it could only fail clause 5 for the wrong reason. The step now places the key at a nested strip-mode site (a field's object-form visibleWhen) under defineStack(…, { strict: false }) and names what the closed site does instead; clause 5's verify says the same. Re-run on main c91af8ed6 on a scratch stack: the key on a field → exit 2 'Unrecognized key(s) on this field: qaUndeclared' (default) and exit 1 'Validation failed … unrecognized_keys' (strict:false); the key inside visibleWhen under strict:false → exit 0 with '⚠ Undeclared authoring keys (1) — dropped at load; reported here, never refused' naming objects.qa_thing.fields.note.visibleWhen.qaUndeclared, and the artifact's visibleWhen without it; the same key under the default defineStack → exit 0 with defineStack's own one-line warning and no compile-side block", "ref": "#24036" },
{ "revision": 6, "date": "2026-10-19", "change": "steps[2] and steps[5] name where the deliberate breaks must sit — checklist-accuracy findings of the 18.0 QA sweep (QA run #24551, cli.build-own-contract; wave anchor #24579 §3). Both plants were helper-authored on the stock fixtures, and ObjectSchema.create() parses at import (re-derived at base 9a7838edf5, packages/spec/src/data/object.zod.ts): the schema break died at config load with a raw Zod issue dump, and the nested strip-mode key was dropped by the helper with no advisory. The plants now sit on plain-literal objects. No clause changed", "ref": "#24649" },
{ "revision": 7, "date": "2026-10-20", "change": "acceptance[3] (clause, verify) states what each command answers, and fixtures.knownGaps[0] names the gap — checklist-accuracy finding B6 of QA run #24787 (wave anchor #24579 round 13). No spec docblock or ADR states either command's --json shape, so the clause follows the code at base 7697ddcf94 (compile.ts, validate.ts): os validate answers valid/errors where os build answers success/issues, and a refusal at load answers error and code (STACK_SCHEMA_INVALID) with no finding list on both. The '{ success: false, … issues }' the verify promised held for the author-time rule failure only. The parity the clause judges, warnings and conversions, is unchanged", "ref": "#24850" },
{ "revision": 8, "date": "2026-10-20", "change": "steps[3] names the trigger-capability requirement, and negative[2] moved to steps[9]. Checklist-accuracy findings of QA run #24841 (18.0 sweep round 4 at 307ce4c4). (1) The #4409 approver fixture needed requires: ['automation', 'triggers']. Read at base feb09db14a: stack.zod.ts validateTriggerCapability refuses an auto-launched flow at load when requires lacks either token, ahead of the author-time rules this step scores; the blank scaffold (create-objectstack's templates/blank) and the showcase both declare the pair, so the step says to keep it. (2) negative[2] (the deep gate content belongs to other items) stated a scope rule with no product expectation, so it could only score not-run; its text moved, unchanged in substance, to steps[9]. No clause changed", "ref": "#24963" },
{
"revision": 9,
"date": "2026-10-27",
"change": "fixtures.requires[0] names the namespace prefix a plain-literal object needs; acceptance[3].verify names the live-conversion probe the conversions parity needs. Checklist-accuracy findings of the 18.2.0 wave 2 (QA run #26476, release-18.2.0-w2-manual-api, at 756220c4; wave anchor #25807, slice A): stock fixtures yield conversions [], so the parity held vacuously, and an unprefixed plain-literal object's NAMESPACE_PREFIX refusal masked steps[2] and steps[5]. Re-read at base e4ba846f (packages/cli/test/fixtures/live-conversion-probe.mjs: appends the probe_old_callout → http conversion to ALL_CONVERSIONS in both spec builds). No clause changed",
"ref": "#25807"
}
]
},
{
"id": "cli.migrate-plan-apply-json",
"title": "os migrate: bare command is a read-only plan, apply is safe-by-default, re-runs are idempotent, and --json exits 0 on success (#4873)",
"since": "v15",
"status": "active",
"revision": 8,
"priority": "P1",
"surface": "cli",
"personas": ["operator (local shell)"],
"fixtures": {
"app": "showcase",
"requires": [
"a scratch app + persistent sqlite DB whose base schema was synced by one prior `os dev` boot (plan itself defers DDL since #3917, so the tables must pre-exist), e.g. -d file:/tmp/<run>/migrate.db"
],
"knownGaps": [
"no pin scores a clause of this item at its layer (RUNNER rule 6, a pin scores only the layer it drives), so the item carries no automated ref. Every clause's oracle is the CLI's own output or exit code. packages/cli/src/utils/format.exit-code.test.ts calls emitJson / emitText in-process (unit): it shows that the success path leaves process.exitCode alone and that a duration can no longer reach the exit-code slot (#4873). That is unit-layer evidence for acceptance[2], never its pass: acceptance[2] is scored on the `echo $?` collected after each subcommand's --json success. automated may return when a pin spawns `os migrate … --json` and asserts the shell's exit code"
]
},
"steps": [
"boot the scratch app once with `os dev -d file:/tmp/<run>/migrate.db` so the base schema exists; stop it",
"add a new field to one object in the config and `os build`; run bare `os migrate` twice — both runs must print the SAME pending add-column plan and mutate nothing. On a DB an `os dev` boot synced, that plan also carries create_table entries for the lifecycle-classed objects (seven at 5b14b7f3, QA run #24551): the dev boot kept them in its telemetry sibling (ADR-0057 §3.6), and a plain `os migrate` mirrors a non-dev boot, which has no sibling, so it plans them against the primary. Expect them beside the add-column, or run plan and apply under NODE_ENV=development (or OS_TELEMETRY_DB naming the sibling) so the one-shot boot provisions it as the syncing boot did (schema-migrate.ts, #22579)",
"run `os migrate plan --json; echo $?` and capture the payload ({ database, managedTables, total, changes, pending })",
"run `os migrate apply --yes; echo $?` and capture the applied list; then `os migrate plan` again and `os migrate apply --json --yes; echo $?` — the idempotent re-run. On the showcase (it declares federated showcase_external objects, which have no managed table) expect the PARTIAL reading: plan prints 'No drift over the N object(s) this plan examined — but M of T declared object(s) were NOT examined … PARTIAL plan', and the JSON re-apply answers message in_sync_partial with composition.coverage.reasons.federated > 0. Plain in_sync is the answer only for an app whose every declared object was examined",
"remove a field from the config + `os build`; run `os migrate apply --yes` WITHOUT --allow-destructive (the drop must be SKIPPED with a warning), then with `--allow-destructive --yes` (applied)",
"with the dev server booted and holding the DB, run `os migrate apply --yes; echo $?` (expect the busy refusal, exit 1, without --force) and `os migrate plan` (proceeds with a warning — a plan writes nothing either way)",
"run `os migrate apply --json` WITHOUT --yes on a pending change: the payload must say confirmation_required with the pass--yes hint and mutate nothing",
"the #4873 pair: on the scratch DB run `os migrate recorded-by --json; echo $?` and `os migrate resume --json; echo $?`",
"the #4873 --json sweep over every subcommand: read the set from the CLI itself, never from a list typed into this item. `os migrate --help` prints it under COMMANDS (oclif pattern strategy: one default-exported Command per non-test file in packages/cli/src/commands/migrate/, index.ts being the bare command); capture that list. For each listed subcommand the steps above did not already run, run its dry-run form `os migrate <name> --json; echo $?` on the scratch DB, adding only what that subcommand's own `os migrate <name> --help` USAGE line marks required (unmapped-columns takes --object <name>). audit-key-material (#26772) is in the set and takes the same flags as audit-mail-bodies (--apply, --yes, --force, --json), so its dry run is the probe. ⛔ The one exception: duplicates (#8928) is ALWAYS JSON on stdout and has NO --json flag, so run it bare (`os migrate duplicates; echo $?`) and never feed it --json, whose oclif Nonexistent-flag exit 2 is not a #4873 violation (deep coverage at cli.migrate-duplicates-inventory). A subcommand added later joins the sweep through the --help list, with no edit here, unless it too lacks --json"
],
"acceptance": [
{
"clause": "bare `os migrate` is the dry-run plan and NEVER mutates: boot-time DDL is deferred and the artifact seed suppressed (#3917), so two consecutive plans report identical drift and the physical schema is unchanged",
"oracle": "log",
"verify": "the two plan outputs match; a schema dump (or third plan) after them equals the first",
"evidence": "the two plan outputs + schema check"
},
{
"clause": "plan --json emits the declared shape and exits 0",
"oracle": "log",
"verify": "payload carries database/managedTables/total/changes/pending; echo $? is 0",
"evidence": "payload + exit code"
},
{
"clause": "#4873 exit-code honesty: EVERY migrate subcommand with --json exits 0 on success — never the elapsed-ms leak (recorded-by/resume once passed timer.elapsed() into the exit-code slot, so the shell saw duration & 0xFF: a different bogus nonzero on every successful run)",
"oracle": "log",
"verify": "echo $? after plan/apply/recorded-by/resume --json successes, and after every other subcommand the sweep step read from `os migrate --help` (duplicates run bare), is exactly 0; the CliExitCode 0|1 type now makes the mistake a compile error",
"evidence": "the captured `os migrate --help` COMMANDS list + the collected exit code per listed subcommand"
},
{
"clause": "apply is safe-by-default: a destructive change is SKIPPED with an explicit warning until --allow-destructive, then applied with it — both sides captured",
"oracle": "log",
"verify": "the drop appears under skipped (with the re-run hint) on the first apply and under applied on the --allow-destructive run",
"evidence": "the two apply outputs"
},
{
"clause": "idempotent re-run: after a successful apply there is nothing left to apply and the re-run exits 0 — and the in-sync claim is scoped to what was EXAMINED: on the showcase, whose federated objects are never diffed, plan prints the PARTIAL warning (not the 'in sync' success line) and apply --json answers message in_sync_partial carrying composition.coverage (unexaminedObjects > 0, reasons.federated > 0); only an app with no unexamined object answers in_sync / 'Physical schema is in sync with metadata — nothing to migrate.'",
"oracle": "log",
"verify": "on the showcase: the post-apply plan prints the PARTIAL warning naming the unexamined count; the JSON re-apply payload is { applied: [], skipped: [], created: [], message: 'in_sync_partial', composition: { coverage: { unexaminedObjects > 0, reasons.federated > 0 } } } and echo $? is 0 (apply.ts / plan.ts in-sync early returns, schema-migration-plugins.ts coverage). An app with nothing unexamined answers message 'in_sync' and the in-sync success line instead. ⛔ in_sync_partial on the showcase is NOT a failed migration — it is the declared honest reading of a partial reconcile",
"evidence": "outputs + exit codes"
},
{
"clause": "a busy database refuses apply (exit 1) without --force, while plan proceeds with only a warning — the read/write asymmetry is deliberate",
"oracle": "log",
"verify": "apply against the server-held DB exits 1 naming the occupancy; plan against the same DB completes with the busy warning",
"evidence": "both outputs + exit codes"
},
{
"clause": "--json is non-interactive: a mutating apply without --yes reports confirmation_required + the hint and performs NO change",
"oracle": "log",
"verify": "the payload says confirmation_required, hint 'pass --yes'; a follow-up plan still shows the pending change",
"evidence": "payload + follow-up plan"
}
],
"negative": [
"an apply that performs a drop WITHOUT --allow-destructive is the FAIL the safe-by-default split exists for",
"exit 0 from a refused (busy) apply, or ANY nonzero exit from a successful --json run, is a FAIL — exit codes are the load-bearing CI contract here"
],
"traps": ["stale-dist"],
"source": [
"packages/cli/src/commands/migrate/index.ts + plan.ts (#2186 bare-command-is-plan; #3917 enforced never-mutates; occupancy warning) + apply.ts (--allow-destructive / --force / --yes / in_sync)",
"packages/cli/src/utils/format.ts#CliExitCode (CliExitCode narrows the emitJson exit slot — the #4873 fix, commit 83df2fd)",
"packages/cli/src/commands/migrate/ (the registered subcommands under `os migrate`, besides the bare command — oclif pattern strategy, one default-exported Command per non-test file, listed by `os migrate --help`; the sweep step reads the set from there at run time, so this item carries no count and no list)",
"sibling item cli.migrate-duplicates-inventory (the duplicates subcommand's own contract — cross-referenced, not duplicated)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new item: the migrate topic's read-only/apply/idempotency contract from plan.ts+apply.ts, with #4873 --json exit-code honesty as a load-bearing clause pinned to format.exit-code.test.ts and the subcommand set enumerated from src/commands/migrate/", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-08-20", "change": "scoped scan-functionality sweep: the enumeration-as-variants under-counted — `duplicates` (#8928, landed 2026-08-16) made it NINE registered subcommands in src/commands/migrate/, not the eight the source note claimed. Added the ninth as a variant pointing detailed coverage at the new cli.migrate-duplicates-inventory item, with the one property a sweep of THIS item must know: duplicates has no --json flag (its output is always the JSON report), so the #4873 exit-code sweep must not feed it one and read the oclif Nonexistent-flag 2 as a violation", "ref": "claude/new-session-0pv25p" },
{
"revision": 3,
"date": "2026-10-04",
"change": "A5 / step 4 re-pointed: an in-sync showcase answers in_sync_partial (its federated showcase_external objects have no managed table and are never examined), and plan prints the PARTIAL warning rather than the in-sync line; plain in_sync is the answer only when nothing is unexamined (apply.ts / plan.ts in-sync early returns, schema-migration-plugins.ts coverage). Also the subcommand count: 13 registered under `os migrate`, not nine — the four missing (account-issuer, audit-metadata-bodies, multi-value-columns, unmapped-columns) are added to variants. Stale clause. Source 6c6157af05 (#13057)",
"ref": "#21735"
},
{
"revision": 4,
"date": "2026-10-13",
"change": "variants re-measured against the tree: `os migrate --help` lists 16 registered subcommands and the item named 13. Added the three it lacked: organization-ownership, security-catalog-overlays and comment-reactions (the v18 conversion of stored sys_comment.reactions into sys_comment_reaction records, whose verified run `apply --allow-destructive` waits for before dropping the column). The source note's count moves from 13 to 16 with them",
"ref": "#23281"
},
{
"revision": 5,
"date": "2026-10-19",
"change": "steps[1] and automated.ref corrected — checklist-accuracy findings of the 18.0 QA sweep (QA run #24551, cli.migrate-plan-apply-json step 2; round 2's Tier 1 record #24598, which names this ref among those that over-claim clause coverage; wave anchor #24579 §3). On an os-dev-synced DB the pending plan also lists the lifecycle-classed tables: at base 9a7838edf5 the one-shot boot provisions the telemetry sibling only under isDevelopmentBoot (packages/cli/src/utils/schema-migrate.ts) and resolveTelemetryDbPath declines on a non-dev boot without OS_TELEMETRY_DB. The one pin asserts only the #4873 exit-code contract, so the ref now says it covers acceptance[2] alone. No clause changed",
"ref": "#24649"
},
{
"revision": 6,
"date": "2026-10-20",
"change": "variants: audit-mail-bodies added, the 19th registered subcommand (#24693: the one-off mask of the mail bodies that sys_audit_log / sys_activity copies of sys_email and sys_identity_email rows still hold in clear). The source note's count moves from 18 to 19 with it. No clause changed",
"ref": "#24693"
},
{
"revision": 7,
"date": "2026-10-20",
"change": "automated removed, fixtures.knownGaps[0] added — checklist-accuracy finding of QA run #24840 (18.0 sweep round 4, Tier 1 at 307ce4c4, 'Refs that claim more than their pins assert'), round 15 of wave anchor #24579. The ref said format.exit-code.test.ts covers acceptance[2]. That pin calls emitJson / emitText in-process, while acceptance[2] asks for `echo $?` after each subcommand's --json success, which only a spawned CLI answers. By RUNNER rule 6 (a pin scores only the layer it drives) it scores no clause, so automated is dropped (theme-B rule) and the knownGap says what the pin does assert. Read at base b1676441ba. No clause changed",
"ref": "#24891"
},
{
"revision": 8,
"date": "2026-10-27",
"change": "variants list removed; the #4873 sweep now reads the subcommand set from the CLI. #26772 added audit-key-material, the 20th registered subcommand, and the typed list (19 names, the source note saying 19) missed it, as revisions 2, 3, 4 and 6 each had to re-count it before. Under the #26431 rule a retyped list of a set that already has an authority goes, so a new steps entry derives the set from `os migrate --help` (oclif pattern strategy over packages/cli/src/commands/migrate/), keeps the duplicates exception explicit (always JSON, no --json flag, run bare), takes each subcommand's required inputs from its own --help USAGE line, and names audit-key-material, which takes the audit-mail-bodies flags. acceptance[2] verify and evidence name the derived list; the source note drops the count. No gate added: the list it would hold equal to the tree is the one removed. Clause text unchanged. Read at base 4c29f384, where `os migrate --help` lists 20 subcommands",
"ref": "#26795"
}
]
},
{
"id": "cli.verify-verdict-exit-mapping",
"title": "objectstack verify: verdict vocabulary is closed, exit is nonzero exactly on failure verdicts, and the inconclusive split (needs-fixture/skipped) never fails the run",
"since": "v16",
"status": "active",
"revision": 3,
"priority": "P1",
"surface": "cli",
"personas": ["operator (local shell)"],
"fixtures": {
"app": "showcase",
"requires": ["examples/app-showcase as the verified app (its config is the stock target)"],
"knownGaps": [
"no stock fixture ships a GUARANTEED-failing app, so the exit-1 side of the hardFailures mapping must be staged (point --app at a scratch config engineered to produce a fidelity gap or 5xx create) — record how it was staged in the evidence rather than skipping the side silently",
"no pin scores a clause of this item at its layer (RUNNER rule 6, a pin scores only the layer it drives), so the item carries no automated ref. packages/cli/src/commands/verify-tenancy-posture.test.ts asserts resolveVerifyMultiTenant, the exported decision, under the real tenancy-posture resolver; its own docblock says it is 'not an end-to-end `os verify` invocation'. That is unit-layer evidence for acceptance[4], never its pass: acceptance[4] scores the posture run's payload (multiTenant) or its loud error. automated may return when a pin runs os verify under a walled OS_TENANCY_POSTURE and reads that payload"
]
},
"steps": [
"from examples/app-showcase run `objectstack verify --json > report.json; echo $?`",
"assert every results[].status in report.json is one of the six declared verdicts, and recompute the summary counts from results[] (they must reconcile)",
"recompute hardFailures = createFailed + readFailed + fidelityGaps (+ rls holes when --rls ran) from the report and compare to the exit code",
"run `objectstack verify --rls --json; echo $?` (the RLS proofs boot a SEPARATE fresh stack by design — unique-constraint collisions with the fidelity phase would silently skip objects)",
"run `OS_TENANCY_POSTURE=isolated objectstack verify --json` and capture either multiTenant:true in the payload or the hard boot error — never a quiet single-org run (#5262)",
"stage the fail side per the knownGap and capture `echo $?` (expect 1) alongside the failing report",
"capture the human-format run too (`objectstack verify`) and check the ✓/✗ banner agrees with the recomputed hardFailures"
],
"acceptance": [
{
"clause": "the verdict vocabulary is closed: every per-object status is exactly one of verified | fidelity-gaps | create-failed | read-failed | skipped | needs-fixture",
"oracle": "log",
"verify": "scan results[].status in the JSON report against the six-member union in packages/verify/src/verify.ts",
"evidence": "report.json"
},
{
"clause": "exit code is nonzero EXACTLY when hardFailures > 0, where hardFailures = createFailed + readFailed + fidelityGaps + rlsHoles — recomputed from the report, never trusted from the banner",
"oracle": "log",
"verify": "echo $? is 0 when the recomputed sum is 0 and 1 when it is positive (the staged failing run)",
"evidence": "exit codes paired with recomputed sums"
},
{
"clause": "the inconclusive split is honored: a 400 VALIDATION_FAILED on the auto-derived record is classified needs-fixture (a fixture gap, not a platform finding) and does NOT fail the run; a 5xx is create-failed and DOES",
"oracle": "log",
"verify": "needs-fixture and skipped counts are excluded from hardFailures in the report vs exit-code comparison; the classification comment in verify.ts is the contract",
"evidence": "report excerpt showing needs-fixture objects on an exit-0 run"
},
{
"clause": "--rls runs its proofs on a separate fresh stack and any hole fails the run",
"oracle": "log",
"verify": "the --rls report includes the rls section; rls.summary.holes participates in hardFailures",
"evidence": "the --rls report + exit code"
},
{
"clause": "#5262 posture honesty: a walled OS_TENANCY_POSTURE (isolated|group) makes verify boot org-scoped, or hard-fail when the enterprise runtime is missing — NEVER a quiet single-org pass that under-verifies ('a verifier that under-verifies reports success it never established')",
"oracle": "log",
"verify": "the payload shows multiTenant:true OR the run errors loudly; multiTenant:false under a walled posture is the pinned regression",
"evidence": "the posture run's payload or error"
}
],
"negative": [
"exit 0 while the report carries fidelityGaps > 0 (or any create/read failure) is a FAIL of the verifier's own honesty contract",
"a quiet single-org boot under a walled posture is the #5262 regression (third recurrence of the shape: cloud#1020, #5233) — FAIL"
],
"variants": [
"verified",
"fidelity-gaps (hard failure)",
"create-failed (hard failure)",
"read-failed (hard failure)",
"needs-fixture (inconclusive — never fails)",
"skipped (inconclusive — never fails)"
],
"traps": ["stale-dist", "wrong-persona"],
"source": [
"packages/cli/src/commands/verify.ts#hardFailures (hardFailures sum, exit contract, resolveVerifyMultiTenant / #5262 / ADR-0105 D1, separate RLS stack rationale)",
"packages/verify/src/verify.ts#ObjectVerifyResult (the six-member status union; 400-VALIDATION_FAILED→needs-fixture vs 5xx→create-failed classification — re-pointed #18104: VALIDATION_FAILED survives in this file only inside a regex literal; the union this item means is declared on ObjectVerifyResult and the classification that reads it is isValidation)",
"packages/verify/src/rls.ts (#1994 class: you can't write what you can't read)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new item: verdict-to-exit-code mapping read from verify.ts + verify.ts (verdict union), with the inconclusive split and the #5262 posture-honesty negative as load-bearing clauses; the unstageable always-failing fixture recorded as a knownGap", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-10-19", "change": "automated.ref says which clause its pin covers — round 2's Tier 1 record (#24598, via wave anchor #24579 §3, comment 6272032736) names this ref among those that over-claim clause coverage: its seven tests assert the #5262 posture selection (acceptance[4]) and nothing of acceptance[0]–[3]. Re-read at base 9a7838edf5. No clause changed", "ref": "#24649" },
{ "revision": 3, "date": "2026-10-20", "change": "automated removed, fixtures.knownGaps[1] added — checklist-accuracy finding of QA run #24840 (18.0 sweep round 4, Tier 1 at 307ce4c4, 'Refs that claim more than their pins assert'), round 15 of wave anchor #24579. The ref said verify-tenancy-posture.test.ts covers acceptance[4]. Its seven tests call resolveVerifyMultiTenant only, while acceptance[4] scores the os verify run's payload or error. By RUNNER rule 6 (a pin scores only the layer it drives) it scores no clause, so automated is dropped (theme-B rule) and the knownGap says what the pin asserts. Read at base b1676441ba. No clause changed", "ref": "#24891" }
]
},
{
"id": "cli.scaffold-first-run",
"title": "The published first-run closes: create-objectstack scaffold → install → validate → build → boot → health, with the skills boundary holding",
"since": "v15",
"status": "active",
"revision": 8,
"priority": "P1",
"surface": "mixed",
"personas": ["new user (published-registry consumer)"],
"fixtures": {
"app": "showcase",
"requires": [
"npm registry reachability (the whole point is the PUBLISHED path, not the repo checkout)",
"PRE-RELEASE VARIANT (proved by run #21845 on the 17.7 candidate) — the published path can only measure what is already released, so to test an unreleased candidate: in the candidate checkout run pnpm install --frozen-lockfile && pnpm build, pack every public workspace package and publish the tarballs ONLY to a localhost registry configured with NO upstream for @objectstack/*, @object-ui/* and create-objectstack (so nothing under test can resolve from npm) and, for verdaccio, max_body_size raised (the @objectstack/spec and @objectstack/console tarballs answer 413 at the default), point the scaffold at it (npm_config_registry), and run the repo's own bin — node <checkout>/packages/create-objectstack/bin/create-objectstack.js qa-first-run -t blank --skip-skills — in place of npx create-objectstack@latest. Prove the candidate is what got installed: the scaffold lockfile's integrity hash for each @objectstack/* package equals the local tarball's. Nothing is published anywhere else. The run record names which path it took (published or pre-release)"
],
"knownGaps": [
"during an RC window the repo version is unpublished and `latest` points at the previous major, so the protocol-major handshake refuses the artifact — that refusal is the ADR-0087 D1 gate WORKING on a skew the fallback introduced (#4894); record it in evidence, do not fail the item for it",
"automated.ref names a CI workflow, .github/workflows/scaffold-e2e.yml, not a test file, so a Tier 1 pin run collects nothing for this item: its clauses score from that workflow's own CI run at the run subject's commit, or from steps driven live, and with neither the item is not-run. A green scheduled run at another commit is not evidence for this subject (QA run #25815). Two unit pins corroborate below the workflow and score no clause alone: packages/create-objectstack/src/scaffold-skills-single-copy.test.ts and scaffold-e2e-boot-probe.test.ts",
"during a sweep of an UNRELEASED commit the pre-release variant (fixtures.requires) is the required path, not an alternative: create-objectstack@latest scaffolds the previous release (18.1.0 at 756220c4, whose @objectstack/skills catalog held one skill fewer than the tree's skills/), so a published-path verdict is a verdict on that release, not on the run subject (QA run #26468)"
]
},
"steps": [
"in a scratch dir: `npx -y create-objectstack@latest qa-first-run -t blank --skip-skills; echo $?` (or the repo's bin against the local registry, for the pre-release variant in fixtures.requires) — the scaffolder runs the install ITSELF (pnpm when its probe finds pnpm, npm otherwise), so its install output is the install step's evidence — its exit code is not: an install that fails prints '⚠ Dependency installation failed. Run `PM install` manually.', then '✓ Environment created!', and exits 0 with no node_modules (deliberate, packages/create-objectstack/src/index.ts; QA run #26468 met it with an unreachable registry). Score the install on node_modules/@objectstack/cli being present and no 'Dependency installation failed' line. ⛔ Do not follow it with a second `npm install`: on a pnpm-installed scaffold that fails (17.6.0 and 17.7 alike) and the failure is the extra step's, not the product's",
"cd qa-first-run && npm run validate; echo $? — then npm run build; echo $?",
"boot from the artifact exactly as the workflow does: `npx os start --artifact ./dist/objectstack.json --port 8080 > server.log 2>&1 &`, poll /api/v1/health up to 60s, then `curl -fsS http://localhost:8080/api/v1/ready`",
"repeat scaffold + validate + build across the template matrix (variants — `blank` only since revision 2: create-objectstack's catalog, packages/create-objectstack/src/template-registry.ts, holds the one bundled template); run validate where the script exists",
"skills: from the 18 line on (create-objectstack@next, and this checkout's bin for the pre-release variant) a scaffold WITHOUT --skip-skills installs the catalog from the @objectstack/skills package its own install put in node_modules, synced into .claude/skills/ as real files — compare that set (directories holding a SKILL.md, not symlinks) with the directories holding a SKILL.md under node_modules/@objectstack/skills/dist/skills by name and count — that directory also holds a README.md, so a bare `ls` count reads one higher — as scaffold-e2e.yml's 'Skills: the scaffolder installed exactly the @objectstack/skills catalog' step does, and assert no internal skill (dogfood-verification) is among them. The 17.x line (create-objectstack@latest while 17.7 is latest) depends on no @objectstack/skills package. The GitHub-path boundary probe stays as the guard for the channel the docs keep: in a fresh scaffold run `npx -y skills add <objectstack checkout>/skills --all --copy` and compare the installed set to the curated skills/ catalog; then list repo-root discovery (`npx skills add CHECKOUT --list` works as that listing) and assert no internal skill (dogfood-verification) surfaces",
"capture server.log for any boot error"
],
"acceptance": [
{
"clause": "scaffold → install → validate → build → boot → health closes with every step exit 0, health 200 and ready succeeding",
"oracle": "api",
"verify": "the per-step exit codes are 0 and the two probes succeed against the booted artifact",
"evidence": "step exit codes + curl outputs + server.log"
},
{
"clause": "every published template validates and builds — per-variant, no template inferred from a sibling",
"oracle": "build",
"verify": "validate (where present) and build exit 0 for each template in variants — one, `blank`: the five remote content templates were retired from the catalog (revision 2), and the published scaffolder offers only blank",
"evidence": "per-template exit codes"
},
{
"clause": "the scaffolded artifact boots via os start --artifact: the ADR-0087 D1 protocol-major handshake ACCEPTS a coherent scaffold — and when the RC-window skew applies, it REFUSES with the named engines.protocol mismatch instead of booting wrong",
"oracle": "log",
"verify": "either the healthy boot, or the exact '✗ package … targets protocol ^N … but this runtime is protocol M' refusal recorded as the gate working (#4894)",
"evidence": "server.log excerpt"
},
{
"clause": "the skills boundary holds: the installed set equals the curated skills/ catalog and repo-root discovery surfaces NO internal skill (the 15.1 third-party-eval leak, pinned in the workflow)",
"oracle": "log",
"verify": "set-equality, by UNIQUE SKILL NAME, against the curated catalog — the installed set is the de-duplicated names of the directories holding a SKILL.md (as scaffold-e2e.yml computes it with sort -u), never a raw file or path count; grep for dogfood-verification in the discovery listing comes back empty; for the scaffolder's own install (18 line), the same set-equality is against the installed @objectstack/skills package's dist/skills catalog, never this checkout's skills/",
"evidence": "the installed-set diff + discovery listing"
},
{
"clause": "negative: a server that never becomes healthy within the probe budget is a FAIL carrying server.log — not a retry-until-green",
"oracle": "log",
"verify": "on timeout the run records the failure with the full server.log, mirroring the workflow's '::error::server never became healthy' branch",
"evidence": "server.log on any failure"
}
],
"negative": [
"an internal skill appearing in a scaffolded project is the exact leak the boundary step exists for — FAIL",
"a template that builds only from the repo checkout but not from the registry is the #2908 class this whole item guards"
],
"variants": ["blank"],
"traps": ["stale-dist"],
"automated": { "kind": "ci", "ref": ".github/workflows/scaffold-e2e.yml" },
"source": [
".github/workflows/scaffold-e2e.yml (#2908 — the scaffold→install→validate→build→boot→health lane, the registry-canary template matrix, the skills-boundary assertions, the #4894 RC-window fallback)",
"packages/create-objectstack (the scaffolder under test)",
"packages/create-objectstack/src/detect-package-manager.ts (the scaffolder installs with pnpm when its probe finds it, npm otherwise — why a trailing npm install is not part of the path)",
"#21845 (follow-up run: the 17.7 candidate scaffold passed through the pre-release local-registry variant)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new item: the published first-run experience mirrored step-for-step from scaffold-e2e.yml, template matrix as variants, RC-window protocol refusal recorded as gate-working instead of failure", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-08-14", "change": "variants narrowed to [blank]: the five remote content templates were delisted from the marketplace and retired from the create-objectstack catalog, and the scaffold-e2e registry-canary matrix this item mirrors was trimmed with them", "ref": "claude/issue-8677-retire-remote-template-catalog" },
{ "revision": 3, "date": "2026-10-05", "change": "three corrections from run #21845. (1) The separate `npm install` step is dropped: the scaffolder already installs (pnpm when found, npm otherwise), and a trailing npm install fails on the pnpm layout on 17.6.0 and 17.7 alike, so the step measured itself rather than the product. The scaffolder's own exit code is now the install evidence, which is also what the published canary job in scaffold-e2e.yml does. Of the card's three options this one was picked as the least ambiguous: it does not depend on which package manager the host has, as `pnpm install` would, and it does not change the published scaffold command, as `--skip-install` would. (2) fixtures.requires gains a pre-release variant: pack the workspace to a localhost registry with no upstream for @objectstack/* and create-objectstack, run the repo's bin against it, and prove the candidate via lockfile integrity. The published path measures only what is released. (3) The skills-boundary clause compares unique skill names, not a raw count (card #21851 entries 8 and 9)", "ref": "#21845" },
{ "revision": 4, "date": "2026-10-13", "change": "acceptance[1].verify and steps[3] stop naming six templates (stale wording, #23166 C2; parked on #23121, carried by #23169). The variants have been [blank] since revision 2, when the five remote content templates were retired, and create-objectstack's template registry holds blank alone. QA run #23166 scored the published 17.7.0 path's one template. No clause's assertion changed", "ref": "#23169" },
{ "revision": 5, "date": "2026-10-17", "change": "steps[4] described only the GitHub `skills add` route (checklist-accuracy finding, #23879): on the 18 line the scaffolder installs the catalog from the @objectstack/skills package in node_modules. The step now scores that install against the package's own catalog and keeps the GitHub-path probe as the docs-channel guard; the skills clause's verify names both comparisons. Re-run on 2026-10-17: `npx -y create-objectstack@next qa-first-run -t blank` (18.0.0-next.2) exit 0, '+ @objectstack/skills 18.0.0-next.2', 'Installing AI skills for your coding agent from @objectstack/skills@18.0.0-next.2', 'Found 10 skills in node_modules'; .claude/skills held 10 skill directories, no symlinks, set-equal to node_modules/@objectstack/skills/dist/skills (objectstack-ai, -api, -automation, -data, -formula, -i18n, -platform, -query, -ui, -upgrade, also this checkout's skills/objectstack-* set), no dogfood-verification. npm view: create-objectstack latest 17.7.0 with dependencies chalk and commander only; @objectstack/skills published only as 18.0.0-next.0 to next.2", "ref": "#24036" },
{ "revision": 6, "date": "2026-10-26", "change": "fixtures.knownGaps[1] added — checklist-accuracy finding of QA run #25815 (18.2.0 sweep, Tier 1 at 6679644a), parked on wave anchor #25807 and filed as #25841: the ref is a CI workflow, not a vitest or Playwright file, so a Tier 1 pin run collected nothing and all seven clauses stayed not-run; the item now says how it scores. No clause changed", "ref": "#25841" },
{
"revision": 7,
"date": "2026-10-27",
"change": "steps[0], steps[4] and fixtures.knownGaps follow the wave-2 live leg. Checklist-accuracy findings of the 18.2.0 wave 2 (QA run #26468, release-18.2.0-w2-tier1-a, at 756220c4; wave anchor #25807, slice A): the scaffolder exits 0 after its own install fails, so the exit code is no install evidence; dist/skills holds a README.md beside the skill directories; and on an unreleased subject only the pre-release variant measures the tree. knownGaps[1] names two corroborating unit pins. The run's line that revision 6's history row says 'seven clauses' for five is not edited: history rows are append-only. Re-read at base e4ba846f (create-objectstack index.ts: the install catch prints the warning and the scaffold still reports success). No clause changed",
"ref": "#25807"
},
{
"revision": 8,
"date": "2026-11-08",
"change": "fixtures.requires[1]'s pre-release recipe raises verdaccio's max_body_size (@objectstack/spec and @objectstack/console answer 413 otherwise) and adds a no-upstream rule for @object-ui/*; steps[4] names `npx skills add CHECKOUT --list` as the repo-root discovery listing. Checklist-accuracy finding of QA run #31486 (owed:weekly, at 0647dabb). Read at base 4894cfe1",
"ref": "#31499"
}
]
},
{
"id": "cli.qa-suite-execution",
"title": "os test: a Quality Protocol suite is validated at LOAD, executed against a booted app, and its verdict is the exit code — capture/interpolation thread state, an unevaluable assertion FAILS",
"since": "v17",
"status": "active",
"revision": 11,
"priority": "P1",
"surface": "cli",
"personas": ["operator (local shell)", "suite author (writes qa/*.test.json)"],
"fixtures": {
"app": "showcase",
"requires": [
"a free non-default port and an ephemeral boot: `pnpm dev -- --fresh -p <port>` from the repo root (showcase + --seed-admin; dogfood skill §0). It needs a built workspace and NO console build: the root dev chain runs scripts/check-dev-prereqs.mjs first, which refuses an unbuilt workspace and prescribes `pnpm build`, then boots the showcase, which on an unbuilt console warns that it has no Console to serve and names `pnpm console:build` (packages/cli/src/utils/console.ts#formatConsoleDistMissingWarning). Every step here drives REST and the CLI, never /_console/, so that warning is no blocker",
"a session token for the data steps — POST /api/v1/auth/sign-in/email with the seeded admin (admin@objectos.ai / admin123) and read `.token`; pass it as `os test --token <token>` (the CLI sends it as `Authorization: Bearer`)",
"the shipped fixture suite examples/app-showcase/qa/platform-smoke.test.json — the repo's only Quality Protocol suite, authored so `os test`'s DEFAULT glob (`qa/*.test.json`) finds it from that directory with no argument",
"a scratch directory with its own qa/ for the negative and variant probes — deliberately broken suites are STAGED per run, never committed, so the repo's own suite stays green"
],
"knownGaps": [
"`run_script` has no adapter branch and fails by name (`Unsupported action type in HttpAdapter: run_script`) — the variant sweep records ONE refusal and that is the honest verdict, not a fixture gap to work around. The other seven members execute since #7848; the five record-shaped ones did not until then (see `negative`), so a sweep transcript predating that fix shows five 404s and is not comparable",
"the record action types resolve the Data Protocol mount from the server's own `/discovery` (`routes.data`) since #7983, so a deployment that sets `crud.dataPrefix` IS reached; what remains out of reach is `api.apiPath`, which moves the discovery document itself out from under the probe (measured: `{apiBase}/discovery` 404s, and `/.well-known/objectstack` reports the DISPATCHER's `/api/v1/data`, not the REST mount). Against such a host the adapter falls back to the convention and says so — it names the mount it addressed, the probe that failed and the remedy, on the warning AND on every 404 — and those steps must still be written as `api_call`. The fixture boot is stock, so neither case bites here",
"scenario SELECTION is by tag only: `os test --tags a,b` runs the scenarios carrying at least one listed tag (any-of, exact, case-sensitive — commands/test.ts `selectScenariosByTags`), counts the rest as deselected — not run, never counted as passed — and without the flag the whole glob runs. Preconditions SKIP rather than select: a scenario whose `requires.params` variable is unset or empty in the `os test` process, or whose `requires.services` entry the target's discovery does not declare enabled and available, is skipped with its reason (core runner.ts `judgeRequirements`), counted apart and never passed. The fixture suite declares no `requires`, so the green path exercises no skip; a skip probe must be STAGED — a scenario requiring a service the stock showcase boot does not declare available (`search` is one: nothing in the open framework registers that slot) — and an all-skipped run exits 0, or 1 under --fail-on-empty"
]
},
"steps": [
"boot the app: from the repo root `pnpm dev -- --fresh -p <port>`; poll `curl -s -m3 -o /dev/null -w '%{http_code}' http://localhost:<port>/api/v1/health` until 200",
"mint a token: `curl -s -X POST http://localhost:<port>/api/v1/auth/sign-in/email -H 'Content-Type: application/json' -H 'Origin: http://localhost:<port>' -d '{\"email\":\"admin@objectos.ai\",\"password\":\"admin123\"}'` and read `.token`",
"the green path on the DEFAULT glob: `cd examples/app-showcase && os test --url http://localhost:<port> --token <token>; echo $?` — capture the whole transcript including the `Found N test suites.` line and the summary",
"prove the teardown ran: list `GET /api/v1/data/showcase_category` before and after and confirm the row the run created is gone (the run leaves the fixture exactly as it found it)",
"prove the run repeats: execute the same command a second time and confirm it is green again with no leftover row — a suite that only passes once is a suite whose teardown is decorative",
"stage the negative probes in a scratch dir's qa/: (a) a suite with `steps` misspelled as `stpes`, (b) a suite asserting `data.status equals degraded` against /api/v1/health, (c) a suite asserting `contains` over `data.nope`, a path the health response does not carry. Run `os test 'qa/*.test.json' --url http://localhost:<port>; echo $?` and capture all three refusals in one transcript",
"prove the malformed suite never ran from the transcript: its refusal carries no `Scenario:` line (the load-site refusal precedes execution), while the two OTHER staged suites still print their '📄 Running suite:' heading and their `Scenario:` lines after it. The server log is no oracle here: the stock dev boot writes no per-request access line, so 'no request in the log' holds whether the suite ran or not",
"teardown-after-failure: stage a scenario that creates a record, captures its id, then fails a deliberate assertion, with a teardown that deletes `{{id}}`; run it and confirm via the API that the record is gone despite the red verdict",
"variant sweep: stage one scenario per TestActionTypeSchema member (8) and run them in one suite; record each member's own verdict and the exact error text of every refusal — no member inferred from a sibling",
"zero-match glob: `os test 'qa/nothing-matches-*.test.json' --url http://localhost:<port>; echo $?` and record BOTH the message and the exit code",
"glob discipline (#7363): `os test 'qa/**/*.test.json'` from the app dir — it must complete in seconds and find the same suite, never the multi-minute walk that preceded the lazy resolver",
"persona check: re-run the green suite with NO --token and record which scenario survives (health) and which fails (the data roundtrip, HTTP 401)",
"what counts as a run: satisfying this item by executing the unit pins in `source` instead of driving a booted app is not a run. Those pins cover the load boundary, the glob resolver and one assertion operator, and none of them proves a suite reaches a real server, which is why this item carries no `automated` entry"
],
"acceptance": [
{
"clause": "the green path closes: every scenario reports ✅ with its scenarioId and a duration, the summary reads `SUCCESS: All N scenarios passed.`, and the process exits 0",
"oracle": "log",
"verify": "the transcript shows one ✅ line per scenario and `echo $?` prints 0 — AND the evidence quotes the `Found N test suites.` line with N > 0, because a run that discovered nothing also exits 0 (see `negative`)",
"evidence": "the full os test transcript + exit code"
},
{
"clause": "state threads through the run: a step's `capture` writes into the scenario context and `{{var}}` interpolation reads it back into a LATER step's action, so the read-back step addresses the record the create step actually made",
"oracle": "api",
"verify": "the roundtrip scenario passes AND the id it captured is confirmed independently — list/GET the object over the API and match the record the run created; a green scenario whose URL still contains the literal `{{categoryId}}` would be interpolation dead and the step failing for the wrong reason",
"evidence": "the scenario transcript + the independent API read of the same id"
},
{
"clause": "a false assertion FAILS the scenario and the run: the scenario is ❌, the failing step is named, the message names the field, the expected and the actual value, and the process exits 1",
"oracle": "log",
"verify": "the staged `equals degraded` probe prints `Assertion failed: data.status expected degraded, got ok` under `Step Failed: <step name>`; `echo $?` prints 1",
"evidence": "the probe transcript + exit code"
},
{
"clause": "#7256 — an assertion the engine CANNOT evaluate fails, it does not pass: `contains` against a path the response does not carry names the runtime type it found and says which of the fixture or the assertion is the suspect",
"oracle": "log",
"verify": "the `contains` over `data.nope` probe fails with `cannot be evaluated by 'contains' … got undefined` plus the `is_null` hint — a ✅ here is the exact silent-pass regression the clause exists for",
"evidence": "the probe transcript"
},
{
"clause": "#6247 — load-site enforcement holds: a document TestSuiteSchema rejects is refused BEFORE execution, naming the file, every offending path, the expected shape and the doc reference; it adds exactly one failure to the run's tally, which the summary prints in scenarios (`FAILED: N scenarios failed.`), so the refused suite counts as one failure beside each failing sibling scenario; the rest of the glob still runs; the run exits 1",
"oracle": "log",
"verify": "the malformed probe prints `<file> is not a valid Quality Protocol suite (TestSuiteSchema)` with `✗ scenarios.0.steps: …`, the two sibling suites still execute after it, and the summary line counts it once among the failures — with the steps[5] trio, `FAILED: 3 scenarios failed.` (the malformed suite plus the two failing sibling scenarios; packages/cli/src/commands/test.ts#summaryLine) — never `SUCCESS` and never a TypeError attributed to the runner",
"evidence": "the three-suite transcript + exit code"
},
{
"clause": "teardown runs even after a failed step, so a red run does not leave the fixture dirty — and a passing teardown never rescues an already-failed scenario",
"oracle": "api",
"verify": "after the staged fail-then-teardown scenario the record created in step 1 is absent from the object listing, while the scenario's verdict stays ❌",
"evidence": "the scenario verdict + the before/after listings"
},
{
"clause": "every one of the 8 TestActionTypeSchema members carries its OWN recorded verdict — executed and asserted, or refused with a named error — and none is inferred from a sibling",
"oracle": "log",
"verify": "the sweep transcript shows all 8 scenario ids with their individual outcomes; refusals are quoted verbatim (the adapter's `Unsupported action type in HttpAdapter: <type>` and any HTTP error) rather than summarised as 'the record actions don't work'",
"evidence": "the 8-scenario sweep transcript"
},
{
"clause": "#7363 glob discipline: the default `qa/*.test.json` resolves relative to the invocation directory, a `**` pattern completes in seconds, and matches run in sorted order",
"oracle": "log",
"verify": "the bare `os test` from examples/app-showcase finds the shipped suite with no argument; the quoted `qa/**/*.test.json` run finds the same suite and returns in seconds — the pre-#7363 resolver died at exit 134 after ~7 minutes on this monorepo",
"evidence": "both transcripts with wall-clock timings"
}
],
"negative": [
"a zero-match glob prints `Found 0 test suites.` + `No test files found matching: <pattern>` and exits **0** — a green exit from a run that loaded no suite. Since #7848 that is a DECLARED posture (stated in `--help`, opt out with `--fail-on-empty`, which exits 1) rather than an accident, but the default is unchanged and so is the trap: a CI job wired to `os test` with a typo'd path still reports success forever unless it passes the flag. A run record that ticks this item without quoting a `Found N test suites.` line with N > 0 is the false positive this item exists to prevent",
"a malformed suite that REACHES the runner — reported passed having executed nothing, or dying as a TypeError inside runSuite with no file named — is the #6247 regression",
"a `contains` against a path the result does not carry reporting ✅ is the #7256 regression",
"the five record-shaped action types (`create_record`, `read_record`, `update_record`, `delete_record`, `query_records`) **round-trip** against a stock server, and an **HTTP 404** from any of them is now the regression this clause names. They answered 404 until #7848 — `HttpTestAdapter` built `${baseUrl}/api/data/:object` where the server serves `{apiPath}/data/:object` with `apiPath` = `/api/v1`, and `update_record` issued PUT where the route is PATCH. Both are fixed and the prefix is derived from `RestApiConfigSchema` + `CrudEndpointsConfigSchema` rather than written down, so this cannot regress by a literal drifting. Re-measured 2026-08-12 on showcase, one scenario per member with no shared setup: 7 of 8 execute and assert, `run_script` refuses by name"
],
"variants": [
"api_call — the only action type that reaches the real API surface (target is a path or absolute URL; `payload.method`/`payload.body` shape the request)",
"wait — local, no HTTP; resolves `{ waited: <ms> }` from `payload.duration`",
"create_record — POST {apiPath}/data/:object → 201 `{ object, id, record }` (404 before #7848)",
"read_record — GET {apiPath}/data/:object/:id → `{ object, id, record }`; the id comes from `payload.id`",
"update_record — PATCH {apiPath}/data/:object/:id with `payload.id` peeled off the body (it addresses the record, it is not a column write); issued PUT to a route that has no PUT sibling before #7848",
"delete_record — DELETE {apiPath}/data/:object/:id → `{ object, id, success }`",
"query_records — POST {apiPath}/data/:object/query with the QueryAST as the body → `{ object, records }`",
"run_script — declared in the enum with NO adapter branch: `Unsupported action type in HttpAdapter: run_script` (loud, recorded in packages/spec/liveness/qa.json)"
],
"enumSource": {
"file": "packages/spec/src/qa/testing.zod.ts",
"export": "TestActionTypeSchema",
"expect": 8
},
"traps": ["dispatcher-vs-hono-route", "stale-dist", "wrong-persona"],
"source": [
"packages/cli/src/commands/test.ts#loadTestSuite (the shipped `os test`: the #7363 lazy segment-directed glob with its prune list, `loadTestSuite`'s #6247 boundary parse, the per-scenario report, and the exit 0/1 summary)",
"packages/core/src/qa/runner.ts#scenario (scenario sequencing, `capture` + `{{var}}` interpolation, the assertion operators, setup/teardown semantics, the #7256 unevaluable-`contains` fix)",
"packages/core/src/qa/http-adapter.ts#mount (the action-type switch — its case labels ARE the enum values; the record routes take their prefix from the one memoised `/discovery` probe per run, falling back to the RestApiConfigSchema + CrudEndpointsConfigSchema convention with a diagnostic that names the mount, #7848 / #7983)",
"packages/spec/src/qa/testing.zod.ts#TestSuiteSchema (TestSuiteSchema — the shape enforced at load; TestActionTypeSchema pinned above)",
"packages/spec/liveness/qa.json#tags (the ADR-0049 ledger whose existence this item is coverage.json's mapping for — its `tags` row is live on `os test --tags`, and its `requires` row is live on the runner's precondition judgement: an unmet `params` or `services` entry skips the scenario)",
"packages/cli/test/qa-suite-schema-load.test.ts, packages/cli/test/resolve-glob-lazy-walk.test.ts, packages/core/src/qa/runner.test.ts (the three unit pins — cited so a run knows what is already covered, NOT a substitute for driving a booted app)",
"content/docs/deployment/cli.mdx §os test (the documented command contract)",
"examples/app-showcase/qa/platform-smoke.test.json (the fixture suite this item drives)"
],
"history": [
{ "revision": 1, "date": "2026-08-11", "change": "new item: the `qa` capability's coverage.json mapping, authored rather than waived (#7347 triage ruling). `os test` is a shipped, documented CLI command, so the honest mapping is a surface:cli item that authors a real qa/*.test.json suite and drives it against a booted app — the fixture suite examples/app-showcase/qa/platform-smoke.test.json lands with this item and is the repo's first Quality Protocol suite. Every clause was measured on showcase before it was written: the green path, capture/interpolation, the #6247 load refusal, the #7256 unevaluable-contains failure, teardown-after-failure, the 8-member action-type sweep and the #7363 glob. `since: v17` records the release in which the surface became GOVERNED (liveness ledger seeded + TestSuiteSchema enforced at the load site, #6247 / PR #7255); the command itself predates it. No `automated` entry: the three unit pins cover pieces, none of them proves a suite reaches a real server", "ref": "#7347" },
{"revision": 2, "date": "2026-08-12", "change": "the adapter was repaired, which this item's own `negative` clause declared to be a revision rather than a silent green (#7848). Item 1: the five record-shaped action types now round-trip against a stock server — the `${baseUrl}/api/data/:object` literal became a prefix DERIVED from the two schemas RestServer itself resolves from (RestApiConfigSchema `apiPath ?? {basePath}/{version}` + CrudEndpointsConfigSchema.dataPrefix), and `update_record` PATCHes where it used to PUT a route that has no PUT sibling. Re-measured on a booted showcase, one scenario per member with NO shared setup so no member's verdict is inferred from a sibling: 7 of 8 execute and assert, `run_script` still refuses by name. The `negative` clause is inverted accordingly — a 404 from a record action type is the regression now — and the knownGap it rested on is replaced by the narrower one that survives: the record types address the DEFAULT mount only, so a host that moves it with `api.apiPath`/`crud.dataPrefix` still needs `api_call`. Item 2: a zero-match glob still exits 0, deliberately (a repo that legitimately ships no suites must not start failing CI), but the posture is now DECLARED — stated in `--help`, opt out with the new `--fail-on-empty`, and `Found N test suites.` is emitted on EVERY run including `Found 0 test suites.`, which is the line this item's first acceptance clause already asks a run record to quote", "ref": "#7848"},
{"revision": 3, "date": "2026-08-17", "change": "the record action types stopped ASSUMING the mount (#7983). They now resolve it from the server: one memoised `GET {apiBase}/discovery` per run, addressing whatever `routes.data` advertises, with the RestApiConfigSchema + CrudEndpointsConfigSchema convention as the fallback — the `@objectstack/client` `getRoute` pattern, copied rather than re-invented. Measured on a booted stack (REST generator + dispatcher bridge) before and after, three configs: stock stays green; `crud.dataPrefix: '/objects'` went from `HTTP Error 404` to a created record, so that row of the gap is CLOSED; `api.apiPath: '/api/2026-01'` still 404s and is NOT closed — `apiPath` moves the discovery document itself, and the one fixed-path document (`/.well-known/objectstack`) advertises the dispatcher's `/api/v1/data` under all three configs, so trusting it would attach a false provenance to the same 404. That row is narrowed instead: the fallback is announced (a warning naming the mount, the failed probe and the remedy) and every 404 from a record action now carries the mount it addressed and where that mount came from, so the failure can no longer read as the suite author's own URL mistake. `api_call` is unchanged and probes nothing — it remains the escape hatch for a host the probe cannot reach", "ref": "#7983"},
{ "revision": 4, "date": "2026-08-18", "change": "corrected the flag count from two to three. packages/cli/src/commands/test.ts declares url, token AND fail-on-empty; the same revision's own acceptance already describes --fail-on-empty, so the knownGap contradicted its own item. The gap's point is unchanged and now stated directly: none of the three flags selects scenarios (#9417)", "ref": "#9386" },
{ "revision": 5, "date": "2026-09-28", "change": "the knownGap and the qa.json source note were falsified by #20289 (PR #20341) and are corrected: `os test` gained `--tags` (any-of, exact, case-sensitive; deselected scenarios are counted and never passed; a selection that matches no scenario exits 0, or 1 under --fail-on-empty), and the report now heads each suite with its `name` and prints each scenario's `name` beside its id. What stays true is narrower: `scenario.requires` is declared but NOT CHECKED, pending the maintainer's decision on #20289. Steps and acceptance are unchanged — the green-path clause's scenarioId is still on every scenario line, now in brackets after the name, or bare when the name equals the id", "ref": "#20289" },
{ "revision": 6, "date": "2026-09-28", "change": "the knownGap and the qa.json source note were falsified again by #20289's `requires` round (ruling B) and are corrected: `scenario.requires` is now CHECKED before the first step — `params` against the `os test` process environment, `services` against the target's discovery `services` (enabled and `available`) — and an unmet entry SKIPS the scenario with its reason, counted apart and never passed; an all-skipped run exits 0, or 1 under --fail-on-empty. `requires.plugins` is retired (refused at load, prescription names `requires.services`). Steps and acceptance are unchanged: the fixture suite declares no `requires`, so the green path runs every scenario exactly as before", "ref": "#20289" },
{ "revision": 7, "date": "2026-10-19", "change": "steps[6] names an oracle that can be consulted — checklist-accuracy finding of the 18.0 QA sweep (QA run #24551, cli.qa-suite-execution steps[6]; wave anchor #24579 §3): \"the server log carries no request attributable to it\" cannot be read, because the stock dev boot logs no per-request lines. Re-derived at base 9a7838edf5: the Hono server plugin logs a handler throw with method and path and no access line (packages/plugins/plugin-hono-server), and os test prints one `Scenario:` line per executed scenario under its suite heading (packages/cli/src/commands/test.ts). The step now reads the transcript. No clause changed", "ref": "#24649" },
{ "revision": 8, "date": "2026-10-20", "change": "fixtures.requires[0] states what the boot needs — checklist-accuracy finding C9 of QA run #24786 (wave anchor #24579 round 13): `pnpm dev -- --fresh -p PORT` boots without a console build (check:console-sha skips with 'No console dist' and exits 0), and the root dev chain refuses an unbuilt workspace first (check-dev-prereqs.mjs), read at base 7697ddcf94. No clause changed", "ref": "#24850" },
{ "revision": 9, "date": "2026-10-20", "change": "negative[4] moved to steps[12]. Checklist-accuracy finding of QA run #24841 (18.0 sweep round 4 at 307ce4c4): it stated a runner rule (executing the source pins instead of driving a booted app is not a run) with no product expectation, so it could only score not-run and held the item at partial. A negative names a product outcome whose occurrence is the FAIL (the README's item anatomy: the other side of every gate, its deny/absence cases). Its text moved, unchanged in substance, to steps[12]. No clause changed", "ref": "#24963" },
{ "revision": 10, "date": "2026-10-26", "change": "fixtures.requires[0] drops the retired console-SHA step — the objectui pin route is gone from main (#26035, whose docs slice #26052 left the area JSON to the 18.2.0 ledger cards; this edit rides #25841). Read at base 9753d163: the root `dev` script is check-dev-prereqs.mjs then the showcase, with no `check:console-sha` and no scripts/check-console-sha.mjs, and an unbuilt console now meets the boot's own warning naming `pnpm console:build`. No clause changed", "ref": "#25841" },
{ "revision": 11, "date": "2026-10-31", "change": "acceptance[4] said the malformed suite 'counts as one failed suite', but the summary counts scenarios. QA run #27392 read 'FAILED: 3 scenarios failed' for one malformed suite plus two failing scenarios. test.ts adds one to totalFailed for the refused suite and prints summaryLine in scenarios. The clause and verify now say the refusal counts as one failure in the scenario summary and give the expected line for the steps[5] trio. Not loosened: a SUCCESS line or a runner TypeError still fails. Read from source at base 22ce3d13fe. Wave anchor #27377, wave-3 accuracy slice S7 (#28341)", "ref": "#27392" }
]
},
{
"id": "cli.flag-command-error-ux",
"title": "Wrong flags and unknown commands error with usage and a nonzero exit — never silently ignored, never executed anyway",
"since": "v16",
"status": "active",
"revision": 3,
"priority": "P2",
"surface": "cli",
"personas": ["operator (local shell)"],
"fixtures": {
"app": "showcase",
"requires": ["any directory — the probes must not depend on a valid app config, since parse errors fire before command bodies run"]
},
"steps": [
"`os migrate plan --frobnicate; echo $?` — capture stderr, and assert the command body never ran (no 'Migrate · plan' header, no 'Booting schema stack' line)",
"`os dev --log-level bogus; echo $?` — an enum-valued flag with an out-of-set value",
"`os frobnicate; echo $?` — an unknown top-level command",
"`os environments frobnicate; echo $?` — an unknown subcommand of a registered topic",
"`os --help; echo $?` and `os migrate --help; echo $?` — the help side must exit 0",
"sweep the registered surface: for every variant run `os <name> --help; echo $?` and record exit code + presence of a USAGE block",
"collect all outputs and exit codes into one evidence table"
],
"acceptance": [
{
"clause": "an unknown flag errors NAMING the flag (oclif: 'Nonexistent flag: --frobnicate') with a help pointer, exits nonzero (oclif parse errors exit 2) — and the command body never runs",
"oracle": "log",
"verify": "stderr names --frobnicate and points at --help; echo $? is nonzero; the plan header/boot line is absent from the output",
"evidence": "captured stderr + exit code + absence check"
},
{
"clause": "an out-of-set value for an enum flag errors listing the allowed set, exit nonzero",
"oracle": "log",
"verify": "the --log-level bogus error enumerates debug|info|warn|error|fatal|silent; echo $? is nonzero",
"evidence": "stderr + exit code"
},
{
"clause": "an unknown command or topic-subcommand errors 'command … not found' with exit nonzero — never treated as a default command (this CLI ships help+plugins only, no not-found suggester: a typo is a hard error, not a did-you-mean prompt)",
"oracle": "log",
"verify": "both the top-level and topic probes error naming the unknown command; echo $? is nonzero for each",
"evidence": "the two stderr captures + exit codes"
},
{
"clause": "--help exits 0 with a usage block for the root and for EVERY registered command and topic — per-variant, none inferred",
"oracle": "log",
"verify": "the sweep records exit 0 + a USAGE section for EVERY variant: 33 at framework 1fb274e61c (20 top-level commands, 12 topics and the `g` alias of generate). The count is DERIVED, never a constant. Before the sweep, enumerate packages/cli/src/commands (each top-level command file, each topic directory) and every `static aliases` entry; if the count differs from the variants list, the list is stale, so record the measured count and the drift",
"evidence": "the sweep's exit-code/usage table"
}
],
"negative": [
"a parse error that still executes the command (output shows the command ran after the flag error) is the silent-ignore FAIL this item exists for",
"exit 0 on any unknown-flag/unknown-command probe is a FAIL even if an error message printed"
],
"variants": [
"build",
"compile",
"create",
"dev",
"diff",
"doctor",
"explain",
"generate",
"info",
"init",
"lint",
"login",
"logout",
"register",
"serve",
"start",
"test",
"validate",
"verify",
"whoami",
"cloud (topic)",
"data (topic)",
"datasource (topic)",
"db (topic)",
"environments (topic)",
"i18n (topic)",
"meta (topic)",
"migrate (topic)",
"package (topic)",
"plugin (topic)",
"g (alias of generate — static aliases in generate.ts)",
"storage (topic)",
"secret (topic)"
],
"source": [
"packages/cli/src/commands/ (the 20 top-level commands + 12 topics enumerated as variants, plus generate.ts's `g` alias — oclif pattern discovery per package.json oclif.commands)",
"packages/cli/package.json (no oclif.plugins at all — no plugin manager, no help command and no not-found plugin, so unknown commands hard-error)",
"@oclif/core parse contract (Nonexistent flag / enum FailedFlagValidation / command-not-found, exit 2)"
],
"history": [
{ "revision": 1, "date": "2026-08-07", "change": "new item: flag/command error UX with the full registered command surface enumerated from src/commands/ as variants, and never-executed-anyway as the load-bearing negative", "ref": "claude/platform-test-checklist-ocwugl" },
{ "revision": 2, "date": "2026-10-02", "change": "source: package.json no longer declares oclif.plugins — the two listed plugins sat in devDependencies and never loaded, so the array was dropped; the registered surface and the unknown-command hard-error are unchanged (os --help and the full command table read byte-identical before and after)", "ref": "claude/issue-21285-drop-dead-oclif-plugins" },
{ "revision": 3, "date": "2026-10-06", "change": "partial-coverage gap of QA run #21721 parked on #22017 (row 23), re-pointed clause. A4 pinned 30 variants; the run measured 33 registered (20 commands, 12 topics with secret and storage new, and g), all exiting 0 with a USAGE block. Verified in source: package.json oclif.commands uses the pattern strategy over dist/commands; src/commands holds 20 command files and 12 topic directories; generate.ts declares static aliases ['g']. The variants gain the three, source says 12 topics, and A4's count is derived per run instead of pinned", "ref": "#22017" }
]
},
{
"id": "cli.migrate-meta-codemod",
"title": "os migrate meta replays the spec migration chain over authored sources and PRINTS the mechanical edit list the retirement messages prescribe — by default it rewrites no source file, and --write rewrites in place exactly the edits it can prove, held to a re-run of the chain; its --out snapshot is schema-valid, replay is idempotent, and a below-floor --from is refused",
"since": "v14.7",
"status": "active",
"revision": 7,
"priority": "P1",
"surface": "cli",
"personas": ["build-time author (no session)"],
"fixtures": {
"app": "showcase",
"requires": [
"a scratch copy of an authored source tree, and a SECOND fresh copy for the --write leg: --write (#9591) rewrites the authored files in place, so it never runs on the checked-out app. The default run (no --write) writes nothing but --out (commands/migrate/meta.ts: 'By default it writes no source file'), and the --stored arm is a read-only preview until --apply. --stored --apply IS a real write too — to this deployment's sys_metadata ROWS, not to files",
"authored sources deliberately carrying retired spellings from the previous major, so the chain has something to report"
],
"knownGaps": [
"Constructing sources that carry the OLD spellings requires authoring against a retired surface, which the current schemas refuse at parse. Author the fixture files as raw text (they are the input a real upgrader has on disk — files written before the retirement, which is exactly why they do not parse now); do NOT try to produce them through the current schema. If a retired spelling cannot be reconstructed for a sampled entry, record that entry as blocked(fixture) rather than declaring the chain clean over it.",
"The registry carries entries for both the shipped major and the next one. Conversions for the NEXT major may be staged but not yet reachable through a released --from/--to pair; record which sampled entries were actually exercised.",
"--write writes a site only when it can trace it to ONE object or array literal in ONE project file whose value matches the loaded one; every other site is REFUSED with a kind from a closed set (computed, helper, spread, shared, outside-project, mismatch, injected, unspellable, layout, unattributed, entangled — packages/cli/src/utils/authored-source-codemod.ts CodemodRefusalKind) and listed under 'left for you to apply by hand' with its reason. Plant the retired spellings as plain literals the config module reaches (directly, or through a relative import or a define* helper) so each is traceable. A planted site the run lists as refused, with a kind from that set and a reason naming the blocker, is the contract working, not a fail of the write clause — record its kind and re-plant that entry as a plain literal; a refused site with no kind or no reason is a finding."
]
},
"steps": [
"enumerate the migration registries and record their sizes: packages/spec/src/migrations/entries/{retired-defs,retired-keys,semantic}",
"collect the command's advertised contract from the SHIPPED retirement messages: grep the spec for the house sentence they carry — `Run \\`os migrate meta --from <N>\\` to list the mechanical edits for existing sources; \\`--write\\` applies the ones it can prove, and you apply the rest by hand.` (shared text in packages/spec/src/shared/retired-key.ts, reworded class-wide by #9529 and given its `--write` clause by #9591) — and record which majors are named. ⚠️ The sentence promises a LIST by default and an in-place write only for the edits --write can prove: the default run is judged on the listing being complete and honest, the --write run on writing exactly the provable edits and nothing else",
"copy an authored source tree to a scratch dir and plant retired spellings sampled from the retired-keys registry (at minimum one ui/ key and one data/ key); record a per-file checksum of the scratch tree BEFORE the run",
"run `os migrate meta --from <previous major>` and capture stdout + the exit code",
"confirm every planted spelling appears in the printed `Applied <N> mechanical change(s):` block as `<path>: <from> → <to> (<conversionId>)`, naming the successor the registry declares",
"re-checksum the scratch tree and confirm every authored file is byte-identical — the run's only file write is --out",
"re-run with `--out <snapshot>.json`, read the snapshot back, and confirm the run states its schema verdict honestly: `Migrated stack is schema-valid` when it is, and, when the migrated stack still fails the schema, the `Migrated stack does not yet pass schema validation — <n> refusal(s) left after the chain. Resolve them, then run \\`os validate\\`:` warning, followed by each refusal (packages/cli/src/commands/migrate/meta.ts#printSchemaVerdict)",
"idempotence: replay a CANONICAL source — one carrying no shape the 17 → 18 chain converts; the tree the WRITE MODE leg wrote is one, while the stock showcase tree is NOT (three edge-branched decisions omit `mode`, so flow-decision-mode-inclusive-explicit lists three edits over it) — over a real range — `os migrate meta --from 17` (--to defaults to 18, CHAIN_TERMINUS_MAJOR: the higher of the runtime's PROTOCOL_MAJOR and the highest major the registries carry a step for, 18 on both counts since PROTOCOL_VERSION moved to 18 (#22215); the run's `Chain:` line prints both) — and confirm NO `Applied <N> mechanical change(s):` block and exit 0; the step-18 semantic advisories are still listed (every hop lists its semantic entries unconditionally), so `Nothing to migrate …` is NOT the expected line here. Then run the identical `--from <previous major>` command on the planted tree a second time and diff the two stdouts with the verdict line's elapsed-time stamp (`(<n>ms)`) normalized away — it is a timing, not report content. Separately record the EMPTY-RANGE answer: `--from 18` (range 18 → 18, no step) prints `⚠ No migration step exists for protocol 18 → 18, so this run replayed nothing — that is not a finding that the metadata is canonical.` — never the canonical success line",
"run it with a --from BELOW the supported floor and capture the MigrationFloorError path (`Cannot migrate from protocol <N>: the chain's support floor is <F>`)",
"run it with --json where supported and check the exit code in the same way #4873 required of every other migrate subcommand",
"confirm the semantic-only entries behave as ADVISORIES: they are reported under `<N> manual change(s) require your judgment:` with their why/verify text, never silently 'fixed' (a semantic change has no mechanical rewrite by definition)",
"WRITE MODE (#9591): run `os migrate meta --help` and record the --write line. Then, on a SECOND fresh scratch copy carrying the same planted spellings, keep a byte copy of the tree and run `os migrate meta --from <previous major> --write`; capture stdout + the exit code. Read the `Wrote <N> of <M> mechanical change(s) into <K> file(s):` block (each site `:<line> <path> (<conversionId>)`), any `<N> mechanical change(s) left for you to apply by hand:` block (each with its `not written [<kind>]: <reason>`), and the closing `Re-ran the chain over the written sources: …` line. Diff the tree against its byte copy: the changed files are exactly the files the block names, plus, when the run owed the manifest's declared protocol range an edit (a tree declaring engines.protocol '^17'; the stock showcase declares '^18'), the config file that the separate 'Rewrote the declared protocol range, so the load admits protocol N:' block names with its line. That rewrite is not one of the chain's M changes, so the 'Wrote …' block never lists it, and `--json` reports it as write.range, apart from write.written[]. Each hunk sits at a listed site, and every other byte (comments, formatting, key order) is unchanged. Then, over the WRITTEN tree: re-run `os migrate meta --from <previous major>` without --write (no written site is still listed under Applied; the semantic advisories are listed exactly as before), run `--write` a second time (it writes nothing: `--write: the chain made no mechanical change here, so no file was written.`), and run `--write --json` on a third fresh copy (exit 0; the payload's `write.status` is `written` and `write.written[]` names each site with its file and line)"
],
"acceptance": [
{
"clause": "every planted retired spelling is REPORTED in the printed mechanical-edit list, with the successor the registry declares — the listing the retirement messages prescribe is complete, for each sampled entry",
"oracle": "log",
"verify": "locate each sampled entry in the `Applied <N> mechanical change(s):` block (`<path>: <from> → <to> (<conversionId>)`); an entry left unlisted while a shipped message prescribes this command for it is a FAIL naming that entry — the prescription is then a dead end",
"evidence": "the printed block, with each sampled entry located in it"
},
{
"clause": "WITHOUT --write the authored sources are UNTOUCHED — the default run's only file write is the --out snapshot. This is the shipped contract, not a defect: the source rewrite is opt-in (--write, acceptance[7]), and the command's own docblock says 'By default it writes no source file'",
"oracle": "log",
"verify": "per-file checksums of the scratch tree before and after the runs made without --write: every file byte-identical, and the only new or changed path is the --out target when --out was passed",
"evidence": "the before/after checksum pairs + the --out path"
},
{
"clause": "the --out snapshot is the migrated stack, and the run reports its schema verdict honestly rather than claiming success over outstanding manual work",
"oracle": "log",
"verify": "read the snapshot back and reconcile it against the printed applied set; check the success/warning line agrees with `schemaValid` in the --json output for the same input",
"evidence": "the snapshot, the verdict line, and the --json schemaValid field"
},
{
"clause": "replay is IDEMPOTENT: replaying a canonical source over a range that CONTAINS steps lists zero mechanical edits and exits 0, and two identical runs print the same thing — while an EMPTY range (--from equal to the --to default, 18) is answered as an empty range ('⚠ No migration step exists for protocol N → N …'), never as a green 'already canonical' verdict over a check that never ran",
"oracle": "log",
"verify": "the canonical-source replay `--from 17` (default --to 18) over a canonical source (the written tree, never the stock showcase — see the step) prints no `Applied <N> mechanical change(s):` block (only the step-18 advisories) and exits 0; `--from 18` prints `⚠ No migration step exists for protocol 18 → 18, so this run replayed nothing — that is not a finding that the metadata is canonical.` (meta.ts printEmptyRangeAnswer) and NOT `Nothing to migrate — …`; the two identical planted-tree runs diff empty once the elapsed-time stamp is normalized. An upgrader re-runs this command, and a chain reporting fresh work on clean input cannot be trusted",
"evidence": "the canonical-replay output + exit code, the empty-range output, and the diff of the two identical-run stdouts"
},
{
"clause": "a --from below the supported floor is REFUSED loudly (MigrationFloorError) rather than silently doing a partial or wrong replay",
"oracle": "log",
"verify": "non-zero exit and a message naming the floor and the supported range; a silent no-op here would leave an upgrader believing they had migrated",
"evidence": "message + exit code"
},
{
"clause": "semantic-registry entries are surfaced as ADVISORIES the operator must act on — reported, never silently marked handled",
"oracle": "log",
"verify": "the output distinguishes mechanically-listed entries from advisory ones; a run that reports 'migrated' over a semantic change nobody applied is the dangerous direction",
"evidence": "the output, with the two classes identified"
},
{
"clause": "the exit-code honesty rule holds here as on every other migrate subcommand: --json exits 0 on success (#4873)",
"oracle": "log",
"verify": "`os migrate meta --json ...; echo $?` is 0 on a successful run",
"evidence": "exit code"
},
{
"clause": "--write rewrites the authored sources IN PLACE for exactly the mechanical changes it can prove, and for nothing else (#9591): each planted spelling traced to a literal is written at its site, each one it cannot trace is listed with a refusal kind and reason, no semantic advisory is written, every byte outside a written site is unchanged, and the write is held to a re-run of the chain over the written sources — so the written tree no longer carries the converted spelling, and a second --write has nothing to do",
"oracle": "log",
"verify": "the WRITE MODE step: the `Wrote <N> of <M> mechanical change(s) into <K> file(s):` block names a file and line for each traced planted spelling, N plus the by-hand count equals M (the Applied count of the dry run over the same input), and the run closes with `Re-ran the chain over the written sources: no mechanical change remains.` (or `only the <n> change(s) left above remain.`), which ends ` The declared protocol range now admits protocol N.` when the run rewrote the range, and exits 0; the diff against the pre-run byte copy touches only the named files, only at the named sites: the 'Wrote …' block's, and the range block's one site when the run owed the range an edit (meta.ts printRangeOutcome); the re-run without --write lists no written site under Applied and the same semantic advisories; the second --write prints `--write: the chain made no mechanical change here, so no file was written.`; `--write --json` exits 0 with `write.status` `written`. ⛔ A write the re-run disagrees with must come back `restored` with exit 1 and every file at its old bytes, never half-converted (meta.ts writeSources) — a reported `written` over a tree the re-run still converts is a FAIL",
"evidence": "the --write stdout and exit code, the before/after tree diff, the re-run stdout, the second --write line, and the --json write block"
}
],
"negative": [
"a retirement message prescribing `os migrate meta --from N` for a spelling the chain does not LIST — the prescription is then a dead end, and the author who follows it is worse off than one who was told nothing",
"a listed edit whose declared successor ALSO does not parse (pointing the author at a second retired name)",
"a run WITHOUT --write that mutates the authored sources is a FAIL of the untouched-sources clause — the rewrite is opt-in",
"a --write that changes any byte outside a listed site (a site the 'Wrote N of M mechanical change(s) into K file(s)' block lists, or the declared protocol range its 'Rewrote the declared protocol range' block names), writes a semantic advisory, drops a planted spelling from both its written and its by-hand list, or reports the write done while the re-run over the written tree still converts a written site, is a FAIL of the write clause",
"a below-floor --from that silently no-ops and exits 0",
"a replay from the target major that reports changes, or two identical runs whose stdouts disagree",
"`Migrated stack is schema-valid` printed while manual changes are still outstanding — the same dishonesty as reporting 'migrated' over a semantic change nobody applied"
],
"traps": ["destructive-in-place", "absence-inference"],
"source": [
"packages/cli/src/commands/migrate/meta.ts#writeFileSync (applyMetaMigrations, composeSpecChanges, normalizeStackInput, MigrationFloorError, PROTOCOL_MAJOR; the declared flag surface and the two --out-guarded writeFileSync calls)",
"packages/cli/src/commands/migrate/meta.ts#printWriteOutcome (the --write report: the written sites, the by-hand list with each refusal kind, and the re-run verdict; the write itself and its restore-on-disagreement are MigrateMeta.writeSources)",
"packages/cli/src/utils/authored-source-codemod.ts#CodemodRefusalKind (what --write proves before writing a site, and the closed set of reasons it refuses one; edits are text splices at node positions, so bytes outside a site are unchanged)",
"packages/cli/test/migrate-meta-write.test.ts (the #9591 pin: exactness, idempotence, semantic TODOs never written, every refusal kind, and no source change without --write)",
"packages/spec/src/migrations/entries/retired-defs/ · retired-keys/ · semantic/ (the registries it replays)",
"the retirement messages across packages/spec that prescribe this command by name — the shared sentence in packages/spec/src/shared/retired-key.ts and its per-key sites (e.g. the BOOK_TRANSLATIONS_RETIRED text in packages/spec/src/system/book.zod.ts#pinned), pinned class-wide by packages/spec/src/shared/retired-key-migrate-sentence.test.ts",
"ADR-0087 (retirement registries and conversion routes)",
"#4873 (--json exit-code honesty across migrate subcommands)",
"#9529 (the 2026-08-18 reword: the messages promise a LIST of mechanical edits applied by hand, not an automatic rewrite)",
"#9591 (the `--write` AST codemod — closed completed: the command landed by PR #22108 (commit a959493cd), and PR #22142 named `--write` in the house retirement sentence; the restart trigger revision 3 wrote into the last step and clause fired, and revision 5 restored the source-rewrite assertions as acceptance[7])",
"#9733 (the disposition: keep the item active and rewrite it to today's contract rather than retire a P1 over a capability parked two majors out)",
"sibling item cli.migrate-plan-apply-json (the DATABASE migrate lane — lists `meta` as a variant but asserts nothing about it)"
],
"history": [
{
"revision": 1,
"date": "2026-08-17",
"change": "new — cli.migrate-plan-apply-json lists `meta` among its eight subcommand variants, but every one of its acceptance clauses is about the DATABASE lane (plan/apply/destructive/busy/--json), so the source-rewriting codemod was named but never exercised. It is load-bearing well beyond its own command: retirement messages throughout the spec prescribe it by name as THE way to clear a retired spelling, so if it does not rewrite what it claims, every one of those prescriptions is a dead end. Authored against a registry that now holds nearly 200 entries across the two most recent majors",
"ref": "#9299"
},
{
"revision": 2,
"date": "2026-08-18",
"change": "corrected the fixture warning, which claimed the command REWRITES files in place. commands/migrate/meta.ts states the opposite in its own header and code: the authored-source chain writes nothing but --out (a JSON snapshot), and --apply is documented as '--stored: rewrite the rows (default is a read-only preview)'. The warning both misdescribed the safe default and hid where the real write actually lands (the sys_metadata rows under --stored --apply) — md5sum-confirmed untouched sources in the run (#9417)",
"ref": "#9386"
},
{
"revision": 3,
"date": "2026-08-20",
"change": "rewritten to the contract the command actually ships. Revisions 1-2 asserted an in-place source codemod: the title said it 'actually rewrites authored sources', and the steps prescribed grepping the spec for `Run \\`os migrate meta --from <N>\\` to rewrite existing sources automatically`, then diffing the tree to confirm each planted spelling had been rewritten. Both halves are false. The command declares exactly from/to/step/out/stored/database-url/apply/yes/force/type/json — no --write/--fix/in-place — and the authored-source arm's only file write is `if (flags.out) writeFileSync(...)`, a JSON snapshot; meta.ts's own header calls the AST rewrite 'unsafe and lossy'. The prescribed grep also finds nothing in shipped sources: #9529 (closed 2026-08-18) reworded the class-wide sentence to '... to list the mechanical edits for existing sources; apply them by hand', which left this item the last place in the repo asserting the withdrawn promise as live (the only other carriers are the deliberate pin test and four CHANGELOGs). So the item was replaced clause-for-clause with what IS real today — the printed mechanical-edit list, sources provably untouched, the schema-valid --out snapshot, idempotent replay, floor refusal, semantic advisories, --json exit honesty — and kept `active`/P1 rather than retired: the reason it could not pass was a wording defect in the ITEM, not missing coverage, and retiring it would have dropped six assertions that hold today to zero. The rewrite half is NOT re-homed as a parked item; #9591 (v18, pm:on-hold) already carries it with a Restart-when line, so the restart lives here as a mechanical trigger instead — the last step and the last acceptance clause read the --help flag surface, and a --write appearing there is defined as the signal to restore these assertions and bump the revision, not as a failure. The id keeps its `-codemod` spelling because ids are immutable and never reused (README lifecycle); it reads as a forward reference until #9591 lands, at which point it is accurate again. Added the `absence-inference` trap: the runner's live false-positive risk is now the inverse of revision 1's — reading 'no files changed' as a broken capability when print-only is the shipped contract",
"ref": "#9733"
},
{
"revision": 4,
"date": "2026-10-04",
"change": "A4 / step 8 re-pointed: replaying from the target major is now an EMPTY range and prints '⚠ No migration step exists for protocol N → N …' (no longer the 'Nothing to migrate' success line); idempotence is proven by replaying a canonical source over --from 17 with the default --to 18 (CHAIN_TERMINUS_MAJOR, ahead of PROTOCOL_MAJOR 17): zero mechanical edits, exit 0, the step-18 semantic advisories still listed (chain.ts lists every hop's semantic entries unconditionally, so 'Nothing to migrate' does not print over 17 → 18). meta.ts printEmptyRangeAnswer / printMigrationReport, the --to flag default. Stale clause. Source fb39b385f1 (#17462, fixes #17134)",
"ref": "#21735"
},
{
"revision": 5,
"date": "2026-10-16",
"change": "stale clause re-pointed (#23950, from QA run #23921): the item's own restart trigger fired. #9591 closed completed — `os migrate meta --write` landed by PR #22108 (a959493cd) and the house retirement sentence names it since PR #22142 — so `--help` now lists --write (and --all), and acceptance[7], which asserted the print-only flag surface, went red against a correct product. As revision 3 prescribed, the source-rewrite assertions are restored rather than the restart clause deleted: acceptance[7] is now the write contract — --write rewrites in place exactly the mechanical edits it can trace to one literal in one project file, lists every other with a closed-set refusal kind, writes no semantic advisory, leaves every byte outside a written site unchanged, and is held to a re-run of the chain (restored, exit 1, on disagreement), so the written tree re-runs clean and a second --write writes nothing. The last step becomes the WRITE MODE leg on its own fresh scratch copy. Following the same landing: the title and fixtures say the rewrite is opt-in and needs its own copy; the third knownGap now describes what --write refuses instead of saying it does not exist; step 2 quotes the current house sentence (with its --write clause); acceptance[1] is scoped to runs without --write and drops a quotation ('unsafe and lossy') meta.ts no longer carries; and the mutation negative splits into a no-write half and a write half. Source gains printWriteOutcome, CodemodRefusalKind and the migrate-meta-write.test.ts pin. Measured on the re-run and corrected here, same class (a step that reds a correct product): step 8 called the unmodified tree canonical for the `--from 17` replay, but the stock showcase carries three edge-branched decisions with no `mode`, which flow-decision-mode-inclusive-explicit converts, so that replay lists three edits; the canonical source is now the tree the WRITE MODE leg wrote, and the identical-run diff normalizes the verdict line's elapsed-time stamp. Same re-run, same class: step 8 still said the --to default ran ahead of the runtime's PROTOCOL_MAJOR 17, but PROTOCOL_VERSION is 18 since #22215, so the default (meta.ts CHAIN_TERMINUS_MAJOR, the higher of the two) is 18 on both counts; the parenthetical now says so, and the measured `--from 17` / `--from 18` expectations are unchanged",
"ref": "#23950"
},
{
"revision": 6,
"date": "2026-10-20",
"change": "steps[6] quotes the schema-verdict warning from its producer — checklist-accuracy finding C5 of QA run #24786 (wave anchor #24579 round 13): meta.ts printSchemaVerdict at base 7697ddcf94 prints 'Migrated stack does not yet pass schema validation — N refusal(s) left after the chain. Resolve them, then run `os validate`:' and then each refusal, where the step still quoted the older '… resolve the manual changes above …' wording. No clause changed",
"ref": "#24850"
},
{
"revision": 7,
"date": "2026-10-20",
"change": "negative[3], steps[11] and acceptance[7].verify count the declared-protocol-range rewrite as a listed site. Checklist-accuracy finding n3 of QA run #24841 (18.0 sweep round 4 at 307ce4c4): `--write` also moved engines.protocol (^17 → ^18) in objectstack.config.ts, announced outside the 'Wrote N … into K file(s)' block, so 'the changed files are exactly the files the block names' read a correct write as a FAIL. Measured on main's CLI text at base feb09db14a (meta.ts, since #22252): the 'Wrote …' block lists only the chain's files and sites; printRangeOutcome prints a separate 'Rewrote the declared protocol range, so the load admits protocol N:' block naming the file and line; the closing 'Re-ran the chain …' line then adds ' The declared protocol range now admits protocol N.'; and --json reports it as write.range, apart from write.written[]. No clause changed",
"ref": "#24963"
}
]
},
{
"id": "cli.scaffold-console-first-paint",
"title": "The documented newcomer verification loop closes on a FRESHLY SCAFFOLDED project: os validate passes and the Console actually paints at /_console/ — the seam between the scaffold item and the showcase boot item",
"since": "v17",
"status": "active",
"revision": 7,
"priority": "P1",
"surface": "mixed",
"personas": ["a brand-new developer following the published docs, with no prior project (content/docs/getting-started/quick-start.mdx carries the validate/dev check but no create-objectstack command; the scaffold line is the scaffolder's own published usage)"],
"fixtures": {
"app": "scaffold",
"requires": [
"a scratch dir and network access for `npx create-objectstack` (same prerequisite as cli.scaffold-first-run)",
"for an unreleased candidate (steps[0]'s pre-release route): a localhost npm registry with NO upstream for @objectstack/* and create-objectstack, exactly as cli.scaffold-first-run's pre-release variant prescribes — the container image carries none (QA run #24551 installed verdaccio@6 into the run dir with npm and packed the public workspace packages, ~1 min)"
],
"knownGaps": [
"This item deliberately does NOT re-prove what two existing items already cover. The scaffold→install→validate→build→artifact-boot chain belongs to cli.scaffold-first-run (automated by .github/workflows/scaffold-e2e.yml); the console-on-a-populated-app half belongs to cli.dev-boot-contract, which drives examples/app-showcase. What is untested is the SEAM: the Console rendering against a freshly scaffolded BLANK project — one object and no seed data. Score only the seam; cite the two siblings for the halves.",
"A blank scaffold DOES have a loginable identity out of the box: `seed-admin` is default-ON in dev (commands/dev.ts: flags['seed-admin'] ?? true, 'Default: on (idempotent — it acts only while no account holds the seed address and no local password login exists anywhere, never overwrites an existing account)'), so bare `objectstack dev` seeds admin@objectos.ai / admin123 on an empty DB and the banner prints the credentials. Clause 4 therefore scores whether the newcomer can COMPLETE the documented visual check with that identity, not whether one exists. Still do not import showcase credentials.",
"the scaffold serves the console its OWN install put in node_modules. On the PUBLISHED path that is @objectstack/console from the registry at the scaffold's version, not this repository's workspace Console build: the seam is then the published console against a blank project, and a console change merged in ui/apps/console but not yet released is not exercised (cli.dev-boot-contract on examples/app-showcase is where the workspace build is served). Under the PRE-RELEASE variant it is the candidate's own packed @objectstack/console — its dist is the copy packages/console/build-dist.sh makes of ui/apps/console's build, so build it (`pnpm console:build`) before packing or the tarball carries no dist/index.html — and an unreleased console change IS exercised. The run record names which path it took"