@bongos/core 1.19.1033 → 1.19.1034

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.bongos-core.json +186 -86
  2. package/.claude/skills/builder-start/SKILL.md +1 -1
  3. package/.claude/skills/grade-recover/SKILL.md +2 -1
  4. package/.claude/skills/grader-health/SKILL.md +4 -0
  5. package/.claude/skills/merge-mode/SKILL.md +1 -1
  6. package/docs/adr/0089-modular-multi-model-adversarial-grader.md +15 -0
  7. package/docs/adr/README.md +1 -1
  8. package/docs/api/openapi.json +1 -1
  9. package/docs/architecture.md +3 -2
  10. package/docs/canonical-permissions.md +2 -2
  11. package/docs/copy-inventory.md +34 -30
  12. package/docs/copy-registry.json +69 -33
  13. package/docs/module-api-changelog.md +3 -1
  14. package/docs/recipes/local-dev.md +45 -3
  15. package/docs/recipes/packaging-the-core.md +1 -1
  16. package/modules/autonomy/cadence.js +52 -0
  17. package/modules/government/protected-surfaces.json +1 -0
  18. package/modules/grading/grade-engine.js +267 -0
  19. package/modules/grading/grader-subagent.js +4 -3
  20. package/modules/grading/grader-workers/index.js +67 -11
  21. package/modules/grading/grader-workers/worker-verdict.js +32 -2
  22. package/modules/grading/grader.js +109 -88
  23. package/modules/hall-ui/public/deploy.js +35 -0
  24. package/modules/hall-ui/public/project-settings.css +7 -0
  25. package/modules/lifecycle/routes/tasks.js +19 -4
  26. package/modules/provisioning/control-plane-guard.js +14 -13
  27. package/modules/provisioning/core-upgrade.js +30 -17
  28. package/modules/provisioning/public-refusal.js +44 -0
  29. package/modules/provisioning/routes/disconnect.js +2 -1
  30. package/modules/provisioning/routes/env-manifest.js +5 -4
  31. package/modules/provisioning/routes/provisioning.js +16 -15
  32. package/modules/provisioning/routes/repo-private.js +2 -1
  33. package/package-lock.json +2 -2
  34. package/package.json +1 -1
  35. package/release-notes.json +70 -0
  36. package/scripts/gds/autobongos-run.js +10 -2
  37. package/scripts/gds/backfill-cost.js +20 -9
  38. package/scripts/gds/claim.js +2 -2
  39. package/scripts/gds/credential-presence.js +281 -0
  40. package/scripts/gds/deploy-main-audit-gate.sh +11 -4
  41. package/scripts/gds/dev-lib.js +212 -5
  42. package/scripts/gds/dev.js +102 -50
  43. package/scripts/gds/doctor.js +3 -2
  44. package/scripts/gds/grade-correlation-audit.js +280 -0
  45. package/scripts/gds/grade-replay.js +237 -0
  46. package/scripts/gds/hooks/pre-push.js +7 -3
  47. package/scripts/gds/main-audit.js +19 -10
  48. package/scripts/gds/memory-map.js +3 -1
  49. package/scripts/gds/onboarding-config.js +3 -2
  50. package/scripts/gds/plain-cards.js +4 -0
  51. package/scripts/gds/preflight.js +12 -4
  52. package/scripts/gds/provision-core-upgrade.js +155 -4
  53. package/scripts/gds/provision-repo-auth.js +15 -0
  54. package/scripts/gds/provision.js +1 -1
  55. package/scripts/gds/publish-credential-check.js +3 -0
  56. package/scripts/gds/push-main.js +14 -3
  57. package/scripts/gds/push-path-brief.js +3 -2
  58. package/scripts/gds/run-routine.js +18 -5
  59. package/scripts/gds/run-unit-tests.js +14 -3
  60. package/scripts/gds/session-cost.js +12 -3
  61. package/scripts/gds/ship-deploy-target.js +11 -6
  62. package/scripts/gds/ship-grade-steps.js +33 -0
  63. package/scripts/gds/ship-land.js +157 -11
  64. package/scripts/gds/ship-merge.js +3 -2
  65. package/scripts/gds/ship-preflight-steps.js +30 -8
  66. package/scripts/gds/ship.js +1 -1
  67. package/scripts/gds/upgrade.js +3 -3
  68. package/scripts/hall-preview/README.md +20 -3
  69. package/scripts/hall-preview/live-identity.js +1 -1
  70. package/scripts/hall-preview/refresh-fixtures.js +71 -11
  71. package/scripts/hall-preview/scrub-identity.js +296 -0
  72. package/src/bongos/routes/security.js +3 -3
  73. package/src/build-info.js +4 -2
  74. package/src/module-api.js +1 -1
  75. package/tests/adr_0089_scope.mjs +70 -0
  76. package/tests/autobongos_cadence.mjs +74 -0
  77. package/tests/consumer_layout_boot.mjs +363 -31
  78. package/tests/core_upgrade_door.mjs +40 -6
  79. package/tests/core_upgrade_runner.mjs +240 -4
  80. package/tests/credential_presence.mjs +153 -0
  81. package/tests/deploy_audit_gate.mjs +5 -2
  82. package/tests/deploy_page_projects.mjs +63 -2
  83. package/tests/dev_lib.mjs +2 -1
  84. package/tests/dev_windows.mjs +324 -0
  85. package/tests/env_knobs_neutral_prefix.mjs +203 -0
  86. package/tests/fixtures/grade-replay/recorded-panel-grades.json +27 -0
  87. package/tests/government_protected_surfaces.mjs +10 -0
  88. package/tests/grade_correlation_audit.mjs +159 -0
  89. package/tests/grade_engine.mjs +249 -0
  90. package/tests/grade_engine_replay.mjs +99 -0
  91. package/tests/grader_prompt_window_bound.mjs +132 -0
  92. package/tests/grader_unbacked_score.mjs +194 -0
  93. package/tests/hall_preview_scrub.mjs +214 -0
  94. package/tests/integration_parked_ratchet.mjs +24 -1
  95. package/tests/provisioning_public_refusal.mjs +195 -0
  96. package/tests/publish_status_branch.mjs +128 -0
  97. package/tests/ship_land_red_pr.mjs +236 -0
  98. package/tests/ship_preflight.mjs +67 -1
  99. package/tests/start_env_guard.mjs +16 -0
  100. package/tests/upgrade.mjs +20 -1
@@ -3,9 +3,9 @@
3
3
  "generator": "scripts/gds/copy-inventory.js",
4
4
  "goal": 1000074,
5
5
  "counts": {
6
- "strings": 2048,
7
- "unique_ids": 1750,
8
- "certain": 2048,
6
+ "strings": 2052,
7
+ "unique_ids": 1754,
8
+ "certain": 2052,
9
9
  "heuristic": 0,
10
10
  "duplicate_ids": 211
11
11
  },
@@ -13,7 +13,7 @@
13
13
  "builders-hall": {
14
14
  "at": "modules/hall-ui/public",
15
15
  "files": 102,
16
- "strings": 1547
16
+ "strings": 1551
17
17
  },
18
18
  "status-dashboard": {
19
19
  "at": "modules/status-ui/public",
@@ -1181,8 +1181,8 @@
1181
1181
  "text": "Move to {…}",
1182
1182
  "occurrences": 2,
1183
1183
  "at": [
1184
- "modules/hall-ui/public/deploy.js:360",
1185
- "modules/hall-ui/public/deploy.js:472"
1184
+ "modules/hall-ui/public/deploy.js:395",
1185
+ "modules/hall-ui/public/deploy.js:507"
1186
1186
  ]
1187
1187
  },
1188
1188
  {
@@ -2305,7 +2305,7 @@
2305
2305
  "surface": "builders-hall",
2306
2306
  "text": "(checked {…})",
2307
2307
  "file": "modules/hall-ui/public/deploy.js",
2308
- "line": 256,
2308
+ "line": 291,
2309
2309
  "origin": "js-markup",
2310
2310
  "confidence": "certain"
2311
2311
  },
@@ -3709,7 +3709,7 @@
3709
3709
  "surface": "builders-hall",
3710
3710
  "text": "Checked against {…} — nothing blocks this move.{…}",
3711
3711
  "file": "modules/hall-ui/public/deploy.js",
3712
- "line": 259,
3712
+ "line": 294,
3713
3713
  "origin": "js-markup",
3714
3714
  "confidence": "certain"
3715
3715
  },
@@ -3736,7 +3736,7 @@
3736
3736
  "surface": "builders-hall",
3737
3737
  "text": "Checking what this would do, and what it would bring in. The answer comes from the machine itself, so it can take a couple of minutes.",
3738
3738
  "file": "modules/hall-ui/public/deploy.js",
3739
- "line": 248,
3739
+ "line": 283,
3740
3740
  "origin": "js-markup",
3741
3741
  "confidence": "certain"
3742
3742
  },
@@ -4537,7 +4537,7 @@
4537
4537
  "surface": "builders-hall",
4538
4538
  "text": "Could not read this project's deploy state: {…}",
4539
4539
  "file": "modules/hall-ui/public/deploy.js",
4540
- "line": 414,
4540
+ "line": 449,
4541
4541
  "origin": "js-markup",
4542
4542
  "confidence": "certain"
4543
4543
  },
@@ -4546,7 +4546,7 @@
4546
4546
  "surface": "builders-hall",
4547
4547
  "text": "Could not read what this would bring in: {…}. The check below still applies.",
4548
4548
  "file": "modules/hall-ui/public/deploy.js",
4549
- "line": 333,
4549
+ "line": 368,
4550
4550
  "origin": "js-markup",
4551
4551
  "confidence": "certain"
4552
4552
  },
@@ -4996,7 +4996,7 @@
4996
4996
  "surface": "builders-hall",
4997
4997
  "text": "Database behind.",
4998
4998
  "file": "modules/hall-ui/public/deploy.js",
4999
- "line": 378,
4999
+ "line": 413,
5000
5000
  "origin": "js-markup",
5001
5001
  "confidence": "certain"
5002
5002
  },
@@ -6602,6 +6602,15 @@
6602
6602
  "origin": "js-markup",
6603
6603
  "confidence": "certain"
6604
6604
  },
6605
+ {
6606
+ "id": "4ef9f2a4df3b",
6607
+ "surface": "builders-hall",
6608
+ "text": "If you own this project,",
6609
+ "file": "modules/hall-ui/public/deploy.js",
6610
+ "line": 250,
6611
+ "origin": "js-markup",
6612
+ "confidence": "certain"
6613
+ },
6605
6614
  {
6606
6615
  "id": "b6c47d4ee42c",
6607
6616
  "surface": "builders-hall",
@@ -7507,7 +7516,7 @@
7507
7516
  "surface": "builders-hall",
7508
7517
  "text": "Move to {…}",
7509
7518
  "file": "modules/hall-ui/public/deploy.js",
7510
- "line": 360,
7519
+ "line": 395,
7511
7520
  "origin": "js-markup",
7512
7521
  "confidence": "certain"
7513
7522
  },
@@ -7516,10 +7525,19 @@
7516
7525
  "surface": "builders-hall",
7517
7526
  "text": "Move to {…}",
7518
7527
  "file": "modules/hall-ui/public/deploy.js",
7519
- "line": 472,
7528
+ "line": 507,
7520
7529
  "origin": "js-text-assign",
7521
7530
  "confidence": "certain"
7522
7531
  },
7532
+ {
7533
+ "id": "a851e4dc141b",
7534
+ "surface": "builders-hall",
7535
+ "text": "Moved {…}, and the box confirmed it. The project’s repository on GitHub still names the old core, so changes pushed there may not reach the live site until the two match.",
7536
+ "file": "modules/hall-ui/public/deploy.js",
7537
+ "line": 216,
7538
+ "origin": "js-markup",
7539
+ "confidence": "certain"
7540
+ },
7523
7541
  {
7524
7542
  "id": "393139f648b8",
7525
7543
  "surface": "builders-hall",
@@ -7867,7 +7885,7 @@
7867
7885
  "surface": "builders-hall",
7868
7886
  "text": "No running box to deploy.",
7869
7887
  "file": "modules/hall-ui/public/deploy.js",
7870
- "line": 450,
7888
+ "line": 485,
7871
7889
  "origin": "js-markup",
7872
7890
  "confidence": "certain"
7873
7891
  },
@@ -7894,7 +7912,7 @@
7894
7912
  "surface": "builders-hall",
7895
7913
  "text": "No shipped work is recorded between core {…} and {…}.",
7896
7914
  "file": "modules/hall-ui/public/deploy.js",
7897
- "line": 340,
7915
+ "line": 375,
7898
7916
  "origin": "js-markup",
7899
7917
  "confidence": "certain"
7900
7918
  },
@@ -8002,7 +8020,7 @@
8002
8020
  "surface": "builders-hall",
8003
8021
  "text": "Not checked yet — the runner takes this reading on its own tick.",
8004
8022
  "file": "modules/hall-ui/public/deploy.js",
8005
- "line": 254,
8023
+ "line": 289,
8006
8024
  "origin": "js-markup",
8007
8025
  "confidence": "certain"
8008
8026
  },
@@ -8191,7 +8209,7 @@
8191
8209
  "surface": "builders-hall",
8192
8210
  "text": "Nothing newer is published that this box can take. There is nothing to deploy.",
8193
8211
  "file": "modules/hall-ui/public/deploy.js",
8194
- "line": 395,
8212
+ "line": 430,
8195
8213
  "origin": "js-markup",
8196
8214
  "confidence": "certain"
8197
8215
  },
@@ -8236,7 +8254,16 @@
8236
8254
  "surface": "builders-hall",
8237
8255
  "text": "Now running core {…}",
8238
8256
  "file": "modules/hall-ui/public/deploy.js",
8239
- "line": 211,
8257
+ "line": 226,
8258
+ "origin": "js-markup",
8259
+ "confidence": "certain"
8260
+ },
8261
+ {
8262
+ "id": "21cb60a8a96a",
8263
+ "surface": "builders-hall",
8264
+ "text": "Now running core {…} — but GitHub was not updated.",
8265
+ "file": "modules/hall-ui/public/deploy.js",
8266
+ "line": 216,
8240
8267
  "origin": "js-markup",
8241
8268
  "confidence": "certain"
8242
8269
  },
@@ -9919,7 +9946,7 @@
9919
9946
  "surface": "builders-hall",
9920
9947
  "text": "See what would change",
9921
9948
  "file": "modules/hall-ui/public/deploy.js",
9922
- "line": 221,
9949
+ "line": 256,
9923
9950
  "origin": "js-markup",
9924
9951
  "confidence": "certain"
9925
9952
  },
@@ -10000,7 +10027,7 @@
10000
10027
  "surface": "builders-hall",
10001
10028
  "text": "Serving {…} — read from the box itself, {…}.",
10002
10029
  "file": "modules/hall-ui/public/deploy.js",
10003
- "line": 398,
10030
+ "line": 433,
10004
10031
  "origin": "js-markup",
10005
10032
  "confidence": "certain"
10006
10033
  },
@@ -10549,7 +10576,7 @@
10549
10576
  "surface": "builders-hall",
10550
10577
  "text": "Still working on core {…}. It keeps going without this page — reload to see where it got to.",
10551
10578
  "file": "modules/hall-ui/public/deploy.js",
10552
- "line": 506,
10579
+ "line": 541,
10553
10580
  "origin": "js-notice",
10554
10581
  "confidence": "certain"
10555
10582
  },
@@ -11503,7 +11530,7 @@
11503
11530
  "surface": "builders-hall",
11504
11531
  "text": "The upgrade checked {…} and refused:{…}",
11505
11532
  "file": "modules/hall-ui/public/deploy.js",
11506
- "line": 264,
11533
+ "line": 299,
11507
11534
  "origin": "js-markup",
11508
11535
  "confidence": "certain"
11509
11536
  },
@@ -11836,7 +11863,7 @@
11836
11863
  "surface": "builders-hall",
11837
11864
  "text": "This project's code expects {…} database change{…} that its database has not applied yet. Anything that relies on {…} may fail until the migrations run.",
11838
11865
  "file": "modules/hall-ui/public/deploy.js",
11839
- "line": 378,
11866
+ "line": 413,
11840
11867
  "origin": "js-markup",
11841
11868
  "confidence": "certain"
11842
11869
  },
@@ -11845,7 +11872,7 @@
11845
11872
  "surface": "builders-hall",
11846
11873
  "text": "This restarts {…} onto core",
11847
11874
  "file": "modules/hall-ui/public/deploy.js",
11848
- "line": 360,
11875
+ "line": 395,
11849
11876
  "origin": "js-markup",
11850
11877
  "confidence": "certain"
11851
11878
  },
@@ -11890,7 +11917,7 @@
11890
11917
  "surface": "builders-hall",
11891
11918
  "text": "This would fail.",
11892
11919
  "file": "modules/hall-ui/public/deploy.js",
11893
- "line": 264,
11920
+ "line": 299,
11894
11921
  "origin": "js-markup",
11895
11922
  "confidence": "certain"
11896
11923
  },
@@ -12322,7 +12349,7 @@
12322
12349
  "surface": "builders-hall",
12323
12350
  "text": "What this brings in",
12324
12351
  "file": "modules/hall-ui/public/deploy.js",
12325
- "line": 349,
12352
+ "line": 384,
12326
12353
  "origin": "js-markup",
12327
12354
  "confidence": "certain"
12328
12355
  },
@@ -12682,7 +12709,7 @@
12682
12709
  "surface": "builders-hall",
12683
12710
  "text": "You can still press Move — the runner will refuse it the same way, and the box is left where it is.",
12684
12711
  "file": "modules/hall-ui/public/deploy.js",
12685
- "line": 264,
12712
+ "line": 299,
12686
12713
  "origin": "js-markup",
12687
12714
  "confidence": "certain"
12688
12715
  },
@@ -13897,7 +13924,7 @@
13897
13924
  "surface": "builders-hall",
13898
13925
  "text": "is published and this box is not on it yet.",
13899
13926
  "file": "modules/hall-ui/public/deploy.js",
13900
- "line": 221,
13927
+ "line": 256,
13901
13928
  "origin": "js-markup",
13902
13929
  "confidence": "certain"
13903
13930
  },
@@ -14392,7 +14419,16 @@
14392
14419
  "surface": "builders-hall",
14393
14420
  "text": "reads the control plane's own observation · ADR 0293 · every move is recorded with who asked",
14394
14421
  "file": "modules/hall-ui/public/deploy.js",
14395
- "line": 454,
14422
+ "line": 489,
14423
+ "origin": "js-markup",
14424
+ "confidence": "certain"
14425
+ },
14426
+ {
14427
+ "id": "8d810f134b7b",
14428
+ "surface": "builders-hall",
14429
+ "text": "reconnect GitHub with repository access",
14430
+ "file": "modules/hall-ui/public/deploy.js",
14431
+ "line": 250,
14396
14432
  "origin": "js-markup",
14397
14433
  "confidence": "certain"
14398
14434
  },
@@ -15832,7 +15868,7 @@
15832
15868
  "surface": "builders-hall",
15833
15869
  "text": "— moved {…}, and the box confirmed it.",
15834
15870
  "file": "modules/hall-ui/public/deploy.js",
15835
- "line": 211,
15871
+ "line": 226,
15836
15872
  "origin": "js-markup",
15837
15873
  "confidence": "certain"
15838
15874
  },
@@ -15922,7 +15958,7 @@
15922
15958
  "surface": "builders-hall",
15923
15959
  "text": "— {…} {…} of work landed between core {…} and {…}{…}:",
15924
15960
  "file": "modules/hall-ui/public/deploy.js",
15925
- "line": 349,
15961
+ "line": 384,
15926
15962
  "origin": "js-markup",
15927
15963
  "confidence": "certain"
15928
15964
  },
@@ -15958,7 +15994,7 @@
15958
15994
  "surface": "builders-hall",
15959
15995
  "text": "…and {…} more, not listed.",
15960
15996
  "file": "modules/hall-ui/public/deploy.js",
15961
- "line": 347,
15997
+ "line": 382,
15962
15998
  "origin": "js-markup",
15963
15999
  "confidence": "certain"
15964
16000
  },
@@ -2544,6 +2544,8 @@ is load-bearing: the script throws rather than guess if it is missing, and
2544
2544
  1.19.1032 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2545
2545
  landed since 1.19.1031 with no explicit bump. run 36192968150. (task 1002620)
2546
2546
  1.19.1033 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2547
- landed since 1.19.1032 with no explicit bump. run 36194601014. (task 1002620)
2547
+ landed since 1.19.1032 with no explicit bump. run 36214617025. (task 1002620)
2548
+ 1.19.1034 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
2549
+ landed since 1.19.1033 with no explicit bump. run 36215757254. (task 1002620)
2548
2550
  ---------------------------------------------------------------------------
2549
2551
  ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  > The one-command path from a freshly-cloned **standalone instance repo** (one whose
4
4
  > `config/branding.json` points at `http://localhost:<port>`) to a running, signed-in
5
- > instance on your Mac. This is the local counterpart of `bongos onboard` (which
5
+ > instance on your Mac, Linux or Windows machine. This is the local counterpart of `bongos onboard` (which
6
6
  > stands an instance up in the **cloud**) — see [ADR 0149](../adr/0149-bongos-dev-local-launcher.md).
7
7
 
8
8
  ## TL;DR
@@ -26,8 +26,50 @@ it is safe (idempotent). Stop it with `bongos dev stop`.
26
26
  brew install postgresql@16
27
27
  brew services start postgresql@16 # bongos dev will also try to start it for you
28
28
  ```
29
- - macOS or Linux (migrations use `bash`). On **Windows**, use WSL, or the Docker path in
30
- [`self-host.md`](self-host.md).
29
+ - macOS, Linux or Windows. On **Windows**, see the next section.
30
+
31
+ ## On Windows
32
+
33
+ `bongos dev` runs natively on Windows (task 1002707). You need two installs, both one-time:
34
+
35
+ 1. **Git for Windows** — [git-scm.com/download/win](https://git-scm.com/download/win). It
36
+ includes **Git Bash**, which `bongos dev` uses to run the migrations. You can run
37
+ `bongos dev` itself from Git Bash, PowerShell or Command Prompt.
38
+ 2. **PostgreSQL** — the installer from
39
+ [postgresql.org/download/windows](https://www.postgresql.org/download/windows/). Keep the
40
+ default port (5432), and **note the password** it asks you to choose for the `postgres`
41
+ user. You do not need to add anything to PATH: `bongos dev` finds the installed tools
42
+ itself.
43
+
44
+ Then tell `bongos dev` that password and run it:
45
+
46
+ ```powershell
47
+ # PowerShell
48
+ $env:PGPASSWORD = "<the password you chose>"
49
+ npx bongos dev
50
+ ```
51
+
52
+ ```bash
53
+ # Git Bash
54
+ PGPASSWORD="<the password you chose>" npx bongos dev
55
+ ```
56
+
57
+ To keep the password for next time, run `setx PGPASSWORD "<the password you chose>"` once
58
+ and open a new terminal.
59
+
60
+ What is different on Windows, and why:
61
+
62
+ - **The Postgres user is `postgres`.** The Windows installer creates only that one user, so
63
+ `bongos dev` uses it unless you set `PGUSER`. It never stops at a password prompt: a
64
+ missing or wrong password stops with a message saying what to set.
65
+ - **Postgres runs as a Windows service** (`postgresql-x64-<version>`), which normally starts
66
+ with Windows. If it is stopped, `bongos dev` tries to start it. Starting a service needs an
67
+ Administrator terminal; otherwise press Win+R, type `services.msc`, find the service, and
68
+ click Start.
69
+ - **WSL's bash is not used.** `C:\Windows\System32\bash.exe` runs Linux, which cannot reach a
70
+ Windows Postgres, so `bongos dev` looks for Git Bash instead.
71
+ - **Docker is the fallback.** If you would rather not install Postgres or Git, the Docker
72
+ path in [`self-host.md`](self-host.md) runs everything in containers.
31
73
 
32
74
  ## What `bongos dev` does (and why it's needed)
33
75
 
@@ -46,7 +46,7 @@ If the no-leak gate fails, it names the file + the residual literal. Fix the red
46
46
 
47
47
  Two standing gates keep "a published core boots clean from a bare install" honest (task [#1002221](https://example.com/builders#/task/1002221), audit H1/H2):
48
48
 
49
- - **`node scripts/gds/run-unit-tests.js --integration`** — the integration-smoke gate. Runs the heavier integration set (longer per-test budget), including [`tests/consumer_layout_boot.mjs`](../../tests/consumer_layout_boot.mjs), which packages the core, `npm install`s the `.tgz`, and boots `/healthz` from the real consumer layout. Run it per release / on a schedule in an env that provides the services (network, and — for the deeper DB leg tracked as a follow-up — Postgres). The default `run-unit-tests.js` (no flag) stays the fast DB-free unit gate and *excludes* this set.
49
+ - **`node scripts/gds/run-unit-tests.js --integration`** — the integration-smoke gate. Runs the heavier integration set (longer per-test budget), including [`tests/consumer_layout_boot.mjs`](../../tests/consumer_layout_boot.mjs), which packages the core, `npm install`s the `.tgz`, and boots `/healthz` from the real consumer layout. Since task 1002863 it also carries the database half: it installs the unpacked package from its **own shipped lockfile** with `npm ci`, runs `npm run migrate` from the consumer onto a brand-new **empty** database (and onto a second one with every optional module switched on), then boots the installed server against the first and reads a sentinel row back through `GET /api/bongos/public/versions`. It creates and drops those databases itself, so it needs a Postgres whose role may `CREATE DATABASE`; without one it prints SKIP lines, except under `CI=true`, where a missing Postgres fails the run. The `integration` job of [`.github/workflows/integration.yml`](../../.github/workflows/integration.yml) runs this set on every push to `main` (not per PR — a cost decision recorded in that file). The default `run-unit-tests.js` (no flag) stays the fast DB-free unit gate and *excludes* this set.
50
50
  - **[`tests/pruned_lockfile_integrity.mjs`](../../tests/pruned_lockfile_integrity.mjs)** — a network-free unit guard (runs in the default gate every PR) that rebuilds the shipped pruned lockfile and asserts every registry package keeps a **well-formed, verbatim `integrity` hash**. This is the exact R88 regression (redaction once blanked those base64 hashes → `npm ci` could no longer verify) caught before a consumer's install ever fails.
51
51
 
52
52
  ## Consume + pin it (the R85 side)
@@ -50,6 +50,30 @@ const CLASSES = ['progress', 'quiet', 'stopped', 'transient', 'systemic', 'unwor
50
50
  // Only these advance the failure count toward `probing`.
51
51
  const COUNTS_AS_FAILURE = new Set(['transient', 'systemic']);
52
52
 
53
+ // WORKER_RAN_FLOOR_S — below this, a worker did not do any work (task 1004179).
54
+ //
55
+ // A real Claude Code session that read a brief, touched a repo and produced a
56
+ // verdict does not finish in seconds. The observed broken shape was 2s with no
57
+ // cost recorded at all. The floor is generous on purpose: it only has to
58
+ // separate "the process died on startup" from "a session ran", and being wrong
59
+ // in the permissive direction costs one extra iteration, while being wrong in
60
+ // the strict direction would call a fast legitimate run breakage.
61
+ const WORKER_RAN_FLOOR_S = 30;
62
+
63
+ // workerNeverRan — the supervisor already decided the worker FAILED; this asks
64
+ // whether it ever started. Both conditions are required: a worker that burned
65
+ // real time or real tokens and then failed DID run and met something, which is
66
+ // a different fact that this must not swallow.
67
+ function workerNeverRan(row = {}) {
68
+ if (row.outcome !== 'worker_failed') return false;
69
+ if (row.spawn_error) return true; // it could not even be launched
70
+ const cost = Number(row.cost_usd);
71
+ const spentNothing = !Number.isFinite(cost) || cost <= 0;
72
+ const dur = Number(row.duration_s);
73
+ const tooFast = Number.isFinite(dur) && dur < WORKER_RAN_FLOOR_S;
74
+ return spentNothing && tooFast;
75
+ }
76
+
53
77
  // SYSTEMIC_MARKERS — substrings that mean waiting will not help.
54
78
  //
55
79
  // A heuristic over an error string, which is a thing to be uneasy about, so the
@@ -86,6 +110,33 @@ function classifyEvent(row = {}) {
86
110
  // counting it as such would hold a broken runner at full speed indefinitely.
87
111
  if (row.verified === true) return { class: 'progress', detail: 'a task shipped and the ledger confirms it' };
88
112
  if (row.ledger_shape === 'undetermined') return { class: 'transient', detail: 'the ledger could not be read back' };
113
+ // DID THE WORKER ACTUALLY RUN? (task 1004179, found by the 1003907 proof run.)
114
+ //
115
+ // Everything below this line assumes a worker that ran and met a real
116
+ // obstacle — a grader refusal, a red main, a task it could not finish. That
117
+ // is genuinely quiet: the machine is fine, a blocker was filed, the task is
118
+ // out of the pool, and moving to the next one is right.
119
+ //
120
+ // A worker that never got going is the opposite, and it was landing in the
121
+ // same bucket. On the Windows host every worker exited in ~2s with "worker
122
+ // output was not JSON" because its argv was corrupted; each run filed a
123
+ // blocker, parked a task, and was classed `quiet` — which neither trips nor
124
+ // forgives the failure count. consecutive_failures stayed 0, the mode stayed
125
+ // `full`, and the runner would have worked through the entire allowlisted
126
+ // goal at one task per five minutes, parking every one of them, while the
127
+ // hall showed it alive and allowed to work. It got through one task before a
128
+ // human stopped it.
129
+ //
130
+ // The queue-vs-runner distinction this module already draws is the same one:
131
+ // `unworkable_queue` is a healthy machine with nothing it can do, and must
132
+ // never escalate. A worker that cannot start is a BROKEN machine with plenty
133
+ // it should be doing, and must.
134
+ if (workerNeverRan(row)) {
135
+ return {
136
+ class: looksSystemic(reason) ? 'systemic' : 'transient',
137
+ detail: `the worker never ran (${row.outcome || 'worker_failed'}${Number.isFinite(Number(row.duration_s)) ? `, ${row.duration_s}s` : ''}, no cost recorded): ${String(row.reason || '').slice(0, 200)}`,
138
+ };
139
+ }
89
140
  // It ran, it did not ship. Not breakage — a blocker was filed and the task is
90
141
  // out of the pool — but not progress either. Quiet keeps the runner at full
91
142
  // speed so it moves on to the next task, which is the right response.
@@ -273,4 +324,5 @@ function shouldJumpWait(before, after) {
273
324
  module.exports = {
274
325
  CLASSES, COUNTS_AS_FAILURE, SYSTEMIC_MARKERS, DEFAULTS, START,
275
326
  looksSystemic, classifyEvent, nextCadence, signalFingerprint, shouldJumpWait,
327
+ workerNeverRan, WORKER_RAN_FLOOR_S,
276
328
  };
@@ -59,6 +59,7 @@
59
59
  { "glob": "modules/grading/grader-prompt.js", "group": "pipeline", "why": "task 1004024. Carved out of grader.js: the deterministic permission-path pre-pass, the server-side score guards a model cannot talk past, the subagent spawn and the prompt. grader.js alone protected the facade and none of the gate." },
60
60
  { "glob": "modules/grading/grader-score.js", "group": "pipeline", "why": "task 1004024. Carved out of grader.js: the deterministic permission-path pre-pass, the server-side score guards a model cannot talk past, the subagent spawn and the prompt. grader.js alone protected the facade and none of the gate." },
61
61
  { "glob": "modules/grading/grader-subagent.js", "group": "pipeline", "why": "task 1004024. Carved out of grader.js: the deterministic permission-path pre-pass, the server-side score guards a model cannot talk past, the subagent spawn and the prompt. grader.js alone protected the facade and none of the gate." },
62
+ { "glob": "modules/grading/grade-engine.js", "group": "pipeline", "why": "task 1002839. The central grading engine every work-type is graded through: it runs the deterministic route-rank and permission-path pre-passes and applies the deterministic veto, so editing it can switch off the protected-path gate for every grade at once." },
62
63
  { "glob": "modules/grading/grader-workers/", "group": "pipeline", "why": "the adversarial panel (Narc/Hacker/Quality/Efficiency) — blunting these blunts the gate" },
63
64
  { "glob": "modules/grading/grader-rubric.json", "group": "pipeline", "why": "the grader's scoring rubric (ADR 0058)" },
64
65
  { "glob": "scripts/gds/ship.js", "group": "pipeline", "why": "the ship lifecycle driver" },