@bongos/core 1.19.915 → 1.19.917
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.bongos-core.json +74 -24
- package/docs/adr/0317-a-plane-that-cannot-give-an-instance-its-own-account-is-refused.md +148 -0
- package/docs/adr/README.md +1 -0
- package/docs/module-api-changelog.md +4 -0
- package/docs/recipes/self-host.md +1 -1
- package/migrations/core_252_claims_published_head_sha_idx.sql +33 -0
- package/modules/government/board.js +1 -1
- package/modules/ideas/grades.js +317 -0
- package/modules/ideas/inbox.js +65 -721
- package/modules/ideas/projection.js +103 -0
- package/modules/ideas/ratify.js +211 -0
- package/modules/ideas/reads.js +96 -0
- package/modules/ideas/trail.js +111 -0
- package/modules/lifecycle/cascade.js +92 -4
- package/modules/lifecycle/db-ship.js +43 -0
- package/modules/lifecycle/db.js +2 -0
- package/modules/lifecycle/removal-derivation.js +332 -0
- package/modules/lifecycle/routes/lifecycle.js +24 -0
- package/modules/lifecycle/tests/cascade.mjs +21 -4
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/provision-repo.js +52 -0
- package/scripts/gds/provision.js +7 -1
- package/src/module-api.js +1 -1
- package/tests/idea_cascade.mjs +3 -3
- package/tests/provision_account_identity.mjs +135 -0
- package/tests/removal_proposal.mjs +583 -0
package/.bongos-core.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"artifact": "bongos-core",
|
|
3
3
|
"manifest_schema": 1,
|
|
4
4
|
"generator": "scripts/gds/package-core.js",
|
|
5
|
-
"core_version": "1.19.
|
|
6
|
-
"core_contract": "1.19.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.19.917",
|
|
6
|
+
"core_contract": "1.19.917",
|
|
7
|
+
"source_commit": "5e828ad0df8cbaa5a638c0365e6a9f993756b6f9",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-09-
|
|
9
|
+
"built_at": "2026-09-20T17:33:13.906Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
|
-
"docs_redacted":
|
|
12
|
+
"docs_redacted": 506,
|
|
13
13
|
"agent_docs_stubbed": 26,
|
|
14
|
-
"functional_verbatim":
|
|
14
|
+
"functional_verbatim": 2298,
|
|
15
15
|
"rules": 3,
|
|
16
16
|
"gate_literals": 3,
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
|
-
"file_count":
|
|
20
|
-
"tree_sha256": "
|
|
19
|
+
"file_count": 2830,
|
|
20
|
+
"tree_sha256": "5d48e907f305164b84433d1bad09d324336c2fb2924f148081143ff761c39f58",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/ask-for-help/SKILL.md",
|
|
@@ -2074,10 +2074,15 @@
|
|
|
2074
2074
|
"mode": "0000644",
|
|
2075
2075
|
"sha256": "d0597a50d8f9a23c8d6c81a595fe6af73640cf574ae32f64730078ac7e19c7a5"
|
|
2076
2076
|
},
|
|
2077
|
+
{
|
|
2078
|
+
"path": "docs/adr/0317-a-plane-that-cannot-give-an-instance-its-own-account-is-refused.md",
|
|
2079
|
+
"mode": "0000644",
|
|
2080
|
+
"sha256": "4dd5bbb9c14e4ba19568646ceea2d29b66c46b99555d6c236a25b7b40097756c"
|
|
2081
|
+
},
|
|
2077
2082
|
{
|
|
2078
2083
|
"path": "docs/adr/README.md",
|
|
2079
2084
|
"mode": "0000644",
|
|
2080
|
-
"sha256": "
|
|
2085
|
+
"sha256": "05a90e437ed0c53a9bcc4f310f9cb056c4f8aa333ab8953f2f56a20d4381f7f9"
|
|
2081
2086
|
},
|
|
2082
2087
|
{
|
|
2083
2088
|
"path": "docs/api-reference.md",
|
|
@@ -2647,7 +2652,7 @@
|
|
|
2647
2652
|
{
|
|
2648
2653
|
"path": "docs/module-api-changelog.md",
|
|
2649
2654
|
"mode": "0000644",
|
|
2650
|
-
"sha256": "
|
|
2655
|
+
"sha256": "7459f942b736ed35b74c50c3f95279e64f3c80dc7e06d686aef147bf6c3bb62c"
|
|
2651
2656
|
},
|
|
2652
2657
|
{
|
|
2653
2658
|
"path": "docs/modules-contract.md",
|
|
@@ -2867,7 +2872,7 @@
|
|
|
2867
2872
|
{
|
|
2868
2873
|
"path": "docs/recipes/self-host.md",
|
|
2869
2874
|
"mode": "0000644",
|
|
2870
|
-
"sha256": "
|
|
2875
|
+
"sha256": "a5c98b8ee01461669a5f4ee5fa361e85e11915eb8326e060c4cf20841c35c07e"
|
|
2871
2876
|
},
|
|
2872
2877
|
{
|
|
2873
2878
|
"path": "docs/recipes/server-bring-up.md",
|
|
@@ -3754,6 +3759,11 @@
|
|
|
3754
3759
|
"mode": "0000644",
|
|
3755
3760
|
"sha256": "75bb644b32a70b52ac544edb901abff91aad07701848a470cc52103dc7e74234"
|
|
3756
3761
|
},
|
|
3762
|
+
{
|
|
3763
|
+
"path": "migrations/core_252_claims_published_head_sha_idx.sql",
|
|
3764
|
+
"mode": "0000644",
|
|
3765
|
+
"sha256": "4c7a47e03192ee2ed1e885d14a06854af40acb6472f52af40bcb36ad3e3ddb17"
|
|
3766
|
+
},
|
|
3757
3767
|
{
|
|
3758
3768
|
"path": "modules/agents/CLAUDE.md",
|
|
3759
3769
|
"mode": "0000644",
|
|
@@ -4277,7 +4287,7 @@
|
|
|
4277
4287
|
{
|
|
4278
4288
|
"path": "modules/government/board.js",
|
|
4279
4289
|
"mode": "0000644",
|
|
4280
|
-
"sha256": "
|
|
4290
|
+
"sha256": "88a52649894a03171ae46d6e517b9828923e033eaf161f387c7434cd78871750"
|
|
4281
4291
|
},
|
|
4282
4292
|
{
|
|
4283
4293
|
"path": "modules/government/catalog.js",
|
|
@@ -5349,6 +5359,11 @@
|
|
|
5349
5359
|
"mode": "0000644",
|
|
5350
5360
|
"sha256": "778558f148d8b403b64f0714b27436b08c41ae0d21ed18b4ed73939928e05cd4"
|
|
5351
5361
|
},
|
|
5362
|
+
{
|
|
5363
|
+
"path": "modules/ideas/grades.js",
|
|
5364
|
+
"mode": "0000644",
|
|
5365
|
+
"sha256": "a445024a9da1f91d1b5842066599e12422f6252a71fd0c30c4a60c2ecfb6ae51"
|
|
5366
|
+
},
|
|
5352
5367
|
{
|
|
5353
5368
|
"path": "modules/ideas/homeless-home.js",
|
|
5354
5369
|
"mode": "0000644",
|
|
@@ -5357,7 +5372,7 @@
|
|
|
5357
5372
|
{
|
|
5358
5373
|
"path": "modules/ideas/inbox.js",
|
|
5359
5374
|
"mode": "0000644",
|
|
5360
|
-
"sha256": "
|
|
5375
|
+
"sha256": "85d629f2ac8ad36dd7dfd274a95ac40d9a7dfe3501dbff207dedc7846d981e53"
|
|
5361
5376
|
},
|
|
5362
5377
|
{
|
|
5363
5378
|
"path": "modules/ideas/landing-preview.js",
|
|
@@ -5409,6 +5424,21 @@
|
|
|
5409
5424
|
"mode": "0000644",
|
|
5410
5425
|
"sha256": "80faf8d20df4f051000460a0453472bd1a177ca4e9e9a31e8c5b7f3065575995"
|
|
5411
5426
|
},
|
|
5427
|
+
{
|
|
5428
|
+
"path": "modules/ideas/projection.js",
|
|
5429
|
+
"mode": "0000644",
|
|
5430
|
+
"sha256": "2548cb8ac60664efaf11221333d445bb3ce07365b7e98d64f041cef60fd2fd53"
|
|
5431
|
+
},
|
|
5432
|
+
{
|
|
5433
|
+
"path": "modules/ideas/ratify.js",
|
|
5434
|
+
"mode": "0000644",
|
|
5435
|
+
"sha256": "2988a93940cd1eba73fb0c9e04f8326108466ba81901f86b3768b29115f17237"
|
|
5436
|
+
},
|
|
5437
|
+
{
|
|
5438
|
+
"path": "modules/ideas/reads.js",
|
|
5439
|
+
"mode": "0000644",
|
|
5440
|
+
"sha256": "d7a55415e6fdfca47bca5579ceac0e877de0b1a041b5173253f43d3a9a90d1b4"
|
|
5441
|
+
},
|
|
5412
5442
|
{
|
|
5413
5443
|
"path": "modules/ideas/routes/blockers.js",
|
|
5414
5444
|
"mode": "0000644",
|
|
@@ -5444,6 +5474,11 @@
|
|
|
5444
5474
|
"mode": "0000644",
|
|
5445
5475
|
"sha256": "f1e60dbc8c6dc0e9f5f5cb93bf26c659422503e8ec66937a3dcee5b64971e995"
|
|
5446
5476
|
},
|
|
5477
|
+
{
|
|
5478
|
+
"path": "modules/ideas/trail.js",
|
|
5479
|
+
"mode": "0000644",
|
|
5480
|
+
"sha256": "35dfa6abb78efdac695b89805d660ff4bb0e0d2bc2587f0d1945310dcffb2980"
|
|
5481
|
+
},
|
|
5447
5482
|
{
|
|
5448
5483
|
"path": "modules/lifecycle/CLAUDE.md",
|
|
5449
5484
|
"mode": "0000644",
|
|
@@ -5467,7 +5502,7 @@
|
|
|
5467
5502
|
{
|
|
5468
5503
|
"path": "modules/lifecycle/cascade.js",
|
|
5469
5504
|
"mode": "0000644",
|
|
5470
|
-
"sha256": "
|
|
5505
|
+
"sha256": "52e63c329e4546f0a8ce2ca75157b9974b23eeaabf155f7ea02ead4d8f9bb8a8"
|
|
5471
5506
|
},
|
|
5472
5507
|
{
|
|
5473
5508
|
"path": "modules/lifecycle/check-rollup.js",
|
|
@@ -5562,7 +5597,7 @@
|
|
|
5562
5597
|
{
|
|
5563
5598
|
"path": "modules/lifecycle/db-ship.js",
|
|
5564
5599
|
"mode": "0000644",
|
|
5565
|
-
"sha256": "
|
|
5600
|
+
"sha256": "d280c54d35721d0a24090ab9cc3ac35d311d253d59d4ea57fb542e1232f5c744"
|
|
5566
5601
|
},
|
|
5567
5602
|
{
|
|
5568
5603
|
"path": "modules/lifecycle/db-tasks.js",
|
|
@@ -5577,7 +5612,7 @@
|
|
|
5577
5612
|
{
|
|
5578
5613
|
"path": "modules/lifecycle/db.js",
|
|
5579
5614
|
"mode": "0000644",
|
|
5580
|
-
"sha256": "
|
|
5615
|
+
"sha256": "2dea49342bf4a9be1279e662240075e57c31855804c8407a212ea9c33934f95e"
|
|
5581
5616
|
},
|
|
5582
5617
|
{
|
|
5583
5618
|
"path": "modules/lifecycle/dead-deps.js",
|
|
@@ -5734,6 +5769,11 @@
|
|
|
5734
5769
|
"mode": "0000644",
|
|
5735
5770
|
"sha256": "6176e109575f02c681240b809b85b272c438c7284a7fdd290cd87b46abdb9e7c"
|
|
5736
5771
|
},
|
|
5772
|
+
{
|
|
5773
|
+
"path": "modules/lifecycle/removal-derivation.js",
|
|
5774
|
+
"mode": "0000644",
|
|
5775
|
+
"sha256": "ef63843d5d00230a90063c454a5ad7a9dc170ce26cedc99377807ae1ced3f7c0"
|
|
5776
|
+
},
|
|
5737
5777
|
{
|
|
5738
5778
|
"path": "modules/lifecycle/rot.js",
|
|
5739
5779
|
"mode": "0000644",
|
|
@@ -5802,7 +5842,7 @@
|
|
|
5802
5842
|
{
|
|
5803
5843
|
"path": "modules/lifecycle/routes/lifecycle.js",
|
|
5804
5844
|
"mode": "0000644",
|
|
5805
|
-
"sha256": "
|
|
5845
|
+
"sha256": "f4b080286870b6cd52cd59c5cb7c5a5127c3b0a90df50b7d87495d684767203b"
|
|
5806
5846
|
},
|
|
5807
5847
|
{
|
|
5808
5848
|
"path": "modules/lifecycle/routes/mingle.js",
|
|
@@ -5902,7 +5942,7 @@
|
|
|
5902
5942
|
{
|
|
5903
5943
|
"path": "modules/lifecycle/tests/cascade.mjs",
|
|
5904
5944
|
"mode": "0000644",
|
|
5905
|
-
"sha256": "
|
|
5945
|
+
"sha256": "fc8c5cf14265515faf8dc63b17b80de1acbb7558a08d26808960244aec6e4377"
|
|
5906
5946
|
},
|
|
5907
5947
|
{
|
|
5908
5948
|
"path": "modules/lifecycle/version-autoclose.js",
|
|
@@ -7807,12 +7847,12 @@
|
|
|
7807
7847
|
{
|
|
7808
7848
|
"path": "package-lock.json",
|
|
7809
7849
|
"mode": "0000644",
|
|
7810
|
-
"sha256": "
|
|
7850
|
+
"sha256": "fd2d387fbc65cce2c412625937abd7fd2c7760083fd0768aa8ae45c2e8bd4992"
|
|
7811
7851
|
},
|
|
7812
7852
|
{
|
|
7813
7853
|
"path": "package.json",
|
|
7814
7854
|
"mode": "0000644",
|
|
7815
|
-
"sha256": "
|
|
7855
|
+
"sha256": "bfee39b9a538046973186020153d4058238ccd25e55c8874316fd5ebab0c42c2"
|
|
7816
7856
|
},
|
|
7817
7857
|
{
|
|
7818
7858
|
"path": "public-docs/index.html",
|
|
@@ -8782,7 +8822,7 @@
|
|
|
8782
8822
|
{
|
|
8783
8823
|
"path": "scripts/gds/provision-repo.js",
|
|
8784
8824
|
"mode": "0000644",
|
|
8785
|
-
"sha256": "
|
|
8825
|
+
"sha256": "dd912cf4446f572257b0a9cc7380a331b8ae7e3d834ccff828fddc13ae5bcb19"
|
|
8786
8826
|
},
|
|
8787
8827
|
{
|
|
8788
8828
|
"path": "scripts/gds/provision-teardown.js",
|
|
@@ -8797,7 +8837,7 @@
|
|
|
8797
8837
|
{
|
|
8798
8838
|
"path": "scripts/gds/provision.js",
|
|
8799
8839
|
"mode": "0000644",
|
|
8800
|
-
"sha256": "
|
|
8840
|
+
"sha256": "784400e0a2912fb4c9bd14107dca7d50cc4a10d77b4a849cd73fe853a6cf3966"
|
|
8801
8841
|
},
|
|
8802
8842
|
{
|
|
8803
8843
|
"path": "scripts/gds/publish-credential-check.js",
|
|
@@ -9812,7 +9852,7 @@
|
|
|
9812
9852
|
{
|
|
9813
9853
|
"path": "src/module-api.js",
|
|
9814
9854
|
"mode": "0000644",
|
|
9815
|
-
"sha256": "
|
|
9855
|
+
"sha256": "d0494683c02dfc17a402568d4ed72ccc574b73b4813d06de8eda9ccfcafe09d9"
|
|
9816
9856
|
},
|
|
9817
9857
|
{
|
|
9818
9858
|
"path": "src/module-loader/catalog.js",
|
|
@@ -11822,7 +11862,7 @@
|
|
|
11822
11862
|
{
|
|
11823
11863
|
"path": "tests/idea_cascade.mjs",
|
|
11824
11864
|
"mode": "0000644",
|
|
11825
|
-
"sha256": "
|
|
11865
|
+
"sha256": "7e49b96f4c3365b0d7240d92775022fdea988049d30041885e13eca61f18e5b1"
|
|
11826
11866
|
},
|
|
11827
11867
|
{
|
|
11828
11868
|
"path": "tests/idea_completeness.mjs",
|
|
@@ -12799,6 +12839,11 @@
|
|
|
12799
12839
|
"mode": "0000644",
|
|
12800
12840
|
"sha256": "642ba54a20f08df1514f94114d39cdb70427f93542f4c060c83251ad1f46c80a"
|
|
12801
12841
|
},
|
|
12842
|
+
{
|
|
12843
|
+
"path": "tests/provision_account_identity.mjs",
|
|
12844
|
+
"mode": "0000644",
|
|
12845
|
+
"sha256": "d56cf2553c0b5efa6a17df3d578b7b5766ff62504af6c226688f73ac417df3c6"
|
|
12846
|
+
},
|
|
12802
12847
|
{
|
|
12803
12848
|
"path": "tests/provision_caddy_wiring.mjs",
|
|
12804
12849
|
"mode": "0000644",
|
|
@@ -13074,6 +13119,11 @@
|
|
|
13074
13119
|
"mode": "0000644",
|
|
13075
13120
|
"sha256": "a7a0a61260a4ee78f5452b76ee6d8ef732104cf9c32a3c05bfa25517bf883aeb"
|
|
13076
13121
|
},
|
|
13122
|
+
{
|
|
13123
|
+
"path": "tests/removal_proposal.mjs",
|
|
13124
|
+
"mode": "0000644",
|
|
13125
|
+
"sha256": "b447287dca1ffe65a926715e0a5f07c0a05e3503066febf85b7f6d317b805c8f"
|
|
13126
|
+
},
|
|
13077
13127
|
{
|
|
13078
13128
|
"path": "tests/rename_history_restraint.mjs",
|
|
13079
13129
|
"mode": "0000644",
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# ADR 0317 — A plane that cannot give an instance its own account is refused, not given a shared uid
|
|
2
|
+
|
|
3
|
+
**Status:** accepted · **Date:** 2026-09-20 · **Task:** [task 1004018](https://cloudbongos.com/builders#/task/1004018) (goal 1000106 — BONGOS-V2)
|
|
4
|
+
|
|
5
|
+
**Related:** [ADR 0281](0281-an-instance-identity-is-its-own-unix-account-and-pg-role.md) (the per-instance account this one guards) · [ADR 0315](0315-a-plane-with-no-proxy-is-refused-not-given-a-no-op-ingress.md) (the sibling refusal, and the ordering this one extends) · [ADR 0306](0306-instance-supervision-is-a-seam-with-systemd-as-the-default.md) (the supervision seam that deferred this question here) · [ADR 0128](0128-provisioning-runner-privilege-and-db-auth-model.md) (the `PROVISION_SUDO` escalation the probe tests)
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
ADR 0281 made an instance's identity its own unix account: provisioning step 1c runs
|
|
10
|
+
`ensureInstanceUserCmd` → `useradd --system`, and the unit's `User=`/`Group=` is what
|
|
11
|
+
stops one co-tenant instance reading a sibling's `/proc/<pid>/environ` — where every
|
|
12
|
+
instance's `EnvironmentFile` carries its GitHub App private key and its OAuth client
|
|
13
|
+
secret. That was audit finding B3, and closing it is the whole point of the account.
|
|
14
|
+
|
|
15
|
+
`useradd` needs uid 0. The self-host image is `node:22-bookworm-slim`, runs `USER node`,
|
|
16
|
+
and installs `postgresql-client bash tini curl ca-certificates git` — **no sudo**. On that
|
|
17
|
+
plane the account cannot be created at all, and ADR 0306 named this as the piece its seam
|
|
18
|
+
does not cover: *"`useradd` cannot run under `USER node` — that is task 1004018."*
|
|
19
|
+
|
|
20
|
+
**Two failure shapes, neither of them honest.**
|
|
21
|
+
|
|
22
|
+
- **Today it crashes, late.** `boxExec(ensureInstanceUserCmd(...))` is not `allowFail`, so
|
|
23
|
+
step 1c throws — *after* the capacity, ingress and wiring preflights have passed, after
|
|
24
|
+
the status flip to `provisioning`, and after the standalone shape has already pulled its
|
|
25
|
+
repo and run `npm ci`. The runner records a crash where the honest answer is a refusal,
|
|
26
|
+
and it records it with the box half-changed.
|
|
27
|
+
- **Tomorrow it goes quiet.** ADR 0315 refuses a proxyless plane, so a compose self-host
|
|
28
|
+
currently stops at the ingress question and never reaches step 1c. That is coincidence,
|
|
29
|
+
not protection: 0315 says in its own consequences that *"a future ADR that adds [a front
|
|
30
|
+
door] replaces this refusal rather than extending it."* The moment someone gives the
|
|
31
|
+
container a published port, the identity gap is live again — and `provision-process.js`'s
|
|
32
|
+
supervisord program block writes `user=<instanceUser>` for an account that was never
|
|
33
|
+
created, which supervisord reports as a program that will not start rather than as a
|
|
34
|
+
security regression.
|
|
35
|
+
|
|
36
|
+
The task asked for a posture, and it is worth naming the one that was rejected: *accept
|
|
37
|
+
that a self-host container is single-tenant and document that instances there are not
|
|
38
|
+
isolated.* It buys a working container standup by re-opening B3, and an operator has no
|
|
39
|
+
way to see which posture their box is running.
|
|
40
|
+
|
|
41
|
+
## Decision
|
|
42
|
+
|
|
43
|
+
**A plane where the runner cannot become root is refused before anything is attempted, and
|
|
44
|
+
the refusal names what a shared uid would cost.**
|
|
45
|
+
|
|
46
|
+
`accountPlaneGap(exec, { privileged })` in `scripts/gds/provision-repo.js` — beside the
|
|
47
|
+
account it guards — probes with `${sudo}sh -c 'test "$(id -u)" = 0'`. It returns `null`
|
|
48
|
+
when the runner reaches root, or a string naming the missing privilege.
|
|
49
|
+
`accountPreflight({ exec, apply, log, shape, privileged })` wraps it with the narration
|
|
50
|
+
its sibling preflights carry, and `provisionInstance` returns `{ok:false, error: 'Account
|
|
51
|
+
preflight failed: …'}`.
|
|
52
|
+
|
|
53
|
+
**The probe runs the same escalation the mutation will,** so a pass is evidence rather than
|
|
54
|
+
inference: `privileged` (i.e. `PROVISION_SUDO=1`) renders `sudo sh -c …`, exactly the
|
|
55
|
+
prefix `ensureInstanceUserCmd` will use a few steps later.
|
|
56
|
+
|
|
57
|
+
**`sh -c`, not a bare `test`, and that is load-bearing.** Under sudo the *outer*,
|
|
58
|
+
unprivileged shell would expand `$(id -u)` before sudo ever ran, and the probe would
|
|
59
|
+
cheerfully answer about the wrong user — passing on precisely the plane this refuses. The
|
|
60
|
+
command substitution has to happen inside the escalation. For the same reason there is no
|
|
61
|
+
pipeline: a pipeline's exit status is its last stage's, which would erase the distinction
|
|
62
|
+
below.
|
|
63
|
+
|
|
64
|
+
**A shell that ran and answered is the only failure that proves the plane cannot.** Under
|
|
65
|
+
remote exec `boxExec` is `ssh <host> bash -s`, so a briefly-unreachable co-hosting box
|
|
66
|
+
throws here too — and answering that with "this plane cannot create accounts, provision
|
|
67
|
+
elsewhere" would be a confident wrong diagnosis burning the intent's retry budget on a
|
|
68
|
+
network blip. Exit 1 (`test` said no) and 127 (`sudo` is not installed) are read as proof;
|
|
69
|
+
ssh reports its own failures as 255, so both still mean what they say across the hop.
|
|
70
|
+
Anything else returns *"could not confirm the runner can create a per-instance unix
|
|
71
|
+
account on this plane"* with the real cause leading. This is ADR 0315's rule, applied to a
|
|
72
|
+
different question.
|
|
73
|
+
|
|
74
|
+
**The refusal is ordered third, after capacity and ingress and before ADR 0303's wiring
|
|
75
|
+
check.** Those first three are questions about the *plane* — has it room, has it a proxy,
|
|
76
|
+
can it hand out an identity — and 0303's is the one question about *this instance's*
|
|
77
|
+
domain. ADR 0315's capacity → ingress → wiring order is extended, not rearranged: all four
|
|
78
|
+
still return before anything on the box changes.
|
|
79
|
+
|
|
80
|
+
**No container-shaped identity model, and no "single-tenant" acceptance.** The symmetry
|
|
81
|
+
with ADR 0306 would be a seam with a container implementation. There is nothing to put in
|
|
82
|
+
it: a per-instance account inside the container needs the image to run privileged, a
|
|
83
|
+
container-per-instance needs a docker socket and an orchestrator that does not exist here,
|
|
84
|
+
and unprivileged user namespaces are not reliably available. The honest encoding of "this
|
|
85
|
+
plane cannot give a child its own identity" is a refusal — the same reasoning ADR 0315
|
|
86
|
+
used to reject a no-op ingress backend.
|
|
87
|
+
|
|
88
|
+
## Consequences
|
|
89
|
+
|
|
90
|
+
- **A compose self-host still cannot provision a child instance — and now it says so for
|
|
91
|
+
its own reason, not by accident.** This refusal does not depend on ADR 0315's firing
|
|
92
|
+
first, so giving the container a front door later cannot silently re-open B3. Whoever
|
|
93
|
+
builds that front door has to answer this question too, and the error text is where they
|
|
94
|
+
will find it.
|
|
95
|
+
|
|
96
|
+
- **The failure moved from step 1c to the preflight.** A plane without root used to hard-
|
|
97
|
+
error after the status flip and, for a standalone, after a repo pull and an `npm ci`.
|
|
98
|
+
It now returns `{ok:false}` before any mutation, which is the pending-retry path an
|
|
99
|
+
environment problem earns rather than the crash it was getting.
|
|
100
|
+
|
|
101
|
+
- **One extra `sh -c` per applied standup.** Read-only, no mutation, and it runs after the
|
|
102
|
+
capacity measurement, so a full box still refuses without it. A dry run never probes, and
|
|
103
|
+
a dedicated droplet is skipped — cloud-init runs as root there, and ADR 0281's account
|
|
104
|
+
steps are baked into its user-data unchanged.
|
|
105
|
+
|
|
106
|
+
- **The live box is untouched.** The control-plane runner unit sets `PROVISION_SUDO=1`, so
|
|
107
|
+
the probe renders `sudo sh -c …`, passes, and every command after it is byte-identical.
|
|
108
|
+
The regression is pinned by a test that provisions a root-reaching plane and asserts
|
|
109
|
+
`useradd --system` still runs, after the probe.
|
|
110
|
+
|
|
111
|
+
- **Root, but no `useradd`, is deliberately not covered.** An Alpine-style plane with
|
|
112
|
+
`adduser` instead would pass the probe and fail at step 1c as it does today. The gap this
|
|
113
|
+
ADR closes is privilege, which is the one the planes we actually run exhibit; inventing a
|
|
114
|
+
second probe for a plane nobody has would be speculation, and it would fail loudly rather
|
|
115
|
+
than quietly in any case.
|
|
116
|
+
|
|
117
|
+
- **Teardown is not covered,** for ADR 0315's reason: a refusal on the teardown path would
|
|
118
|
+
strand a row instead of cleaning it.
|
|
119
|
+
|
|
120
|
+
- **This is a capability question, not a configuration knob.** There is no
|
|
121
|
+
`PROVISION_ALLOW_SHARED_UID`. A runner either reaches root on this plane or it does not,
|
|
122
|
+
and an operator who wants provisioning to proceed needs privilege, not a flag that says
|
|
123
|
+
to pretend.
|
|
124
|
+
|
|
125
|
+
## Alternatives considered
|
|
126
|
+
|
|
127
|
+
- **Accept it: document a self-host container as single-tenant with instances sharing one
|
|
128
|
+
uid.** Rejected. It is a silent downgrade of the exact vector ADR 0281 closed, visible
|
|
129
|
+
nowhere on the running box, and "single-tenant" is not what a container hosting several
|
|
130
|
+
child projects is. A posture an operator cannot observe is not a posture.
|
|
131
|
+
|
|
132
|
+
- **An identity seam with a container implementation** (mirroring ADR 0306). Rejected: no
|
|
133
|
+
implementation exists to put behind it. A seam whose second backend is "do nothing" is
|
|
134
|
+
the no-op backend ADR 0315 already rejected, wearing a seam's clothes.
|
|
135
|
+
|
|
136
|
+
- **Probe `useradd --help`, or `command -v useradd`.** Rejected on the mechanism: both
|
|
137
|
+
succeed as an unprivileged user on the very image this refuses. They test the binary; the
|
|
138
|
+
missing thing is the privilege to run it.
|
|
139
|
+
|
|
140
|
+
- **`${sudo}id -u` and compare the output to `0`.** Rejected: it decides on captured stdout
|
|
141
|
+
rather than on exit status, which every sibling preflight and every provisioning test
|
|
142
|
+
fake treats as the contract — the fakes answer commands with an empty `stdout`, so the
|
|
143
|
+
probe would have failed on hermetic planes that are fine, and the fix would have been to
|
|
144
|
+
teach a dozen harnesses about one probe.
|
|
145
|
+
|
|
146
|
+
- **Run the probe inside `ensureInstanceUserCmd` and let step 1c refuse itself.** Rejected:
|
|
147
|
+
it keeps the refusal after the status flip and after the standalone repo sync, which is
|
|
148
|
+
most of what makes the current failure a bad one.
|
package/docs/adr/README.md
CHANGED
|
@@ -408,3 +408,4 @@ This keeps the decision history honest and traceable.
|
|
|
408
408
|
| 0314 | [**A module owns a protected path without the whole module becoming protected** ([task 1004070](https://cloudbongos.com/builders#/task/1004070), goal 1000095 — BONGOS-V2). Three modules derive `protected` — and so are Archon-only to scope a goal to — because of ONE file that is not their domain: `onboarding` on `scripts/gds/setup.js`, `autonomy` on `scripts/gds/conductor-dispatch.js`, `copy-desk` on `scripts/gds/copy-inventory.js`. The owner chose *narrow what counts as protected*; the task set the fork and required the choice be justified before any glob moved. **Deleting the glob is out**: `MODULE_GLOBS` is also the territory deciding who may AUTHOR a task on a path, and the shared floor is only `tests/`, so an unowned path is authorable by no goal at all. That left reassigning each CLI to an already-protected module — **measured, not reasoned about**, by applying the edit to the source and re-requiring in a fresh process (`MODULE_SCOPE_MAP` is frozen and built from a COPY of `MODULE_GLOBS` at load, so an in-process mutation proves nothing and passes green). The measurement kills it: `copy-desk` and `autonomy` lose the ability to author on their own generator and their own conductor, and — the row that decides it — `devsecops` as the new owner **cannot author the generator together with the two artifacts it writes**, because `docs/copy-registry.json` and `docs/copy-inventory.md` stay `copy-desk`'s. So *change a UI string, regenerate the registry* becomes authorable by no single goal, and that is the ship-check freshness gate every UI task hits. Decision: **protection becomes per-path at the goal-scope wall, as it already is at the other three** — `matchProtected` decides task-authoring, the grader and gate decide ship, the post-push audit decides the dishonest case; only goal-creation asked about the MODULE, and that inconsistency is the whole defect. The derivation stays computed from `PROTECTED_GLOBS` and no flag is hand-set ([ADR 0086](0086-goal-scoped-work-hierarchy.md) §7 / SEC #863), and the Metic floor on those paths does not move. **Corrects the task's own numbers**: 12 of 26 modules derive protected, not 11, and `agents` (protected by `modules/agents/`, itself a protected glob) is absent from its list of seven — which is why the one thing this ADR SHIPS is a test pinning the full protected key set **by name**, a count assertion passing on the wrong twelve being exactly how that drifted. Implementation is deferred to task 1004109, per the task's own instruction to stop after the ADR. Also filed: `builder-settings` (task 1004110), whose overlap rides the blanket `src/bongos/routes/` prefix and so needs either the `me.js` strangler move or its own security ADR; and **nine protected paths owned by no module at all** (task 1004111) — the freshness generators, the merge-driver pair and `cli-lib.js` among them — found while checking whether deletion was viable, a pre-existing hole rather than one this opens. Does not decide: the floor a protected path carries, whether `scripts/gds/` deserves a shared-floor entry the way `tests/` has one, or how the nine unowned paths get a home.](0314-module-protection-is-per-path-not-per-module.md) | modules / permissions |
|
|
409
409
|
| 0316 | [**The ignite floor is a scheduling dial, not the trusted tier** ([task 1004084](https://cloudbongos.com/builders#/task/1004084), goal 1000095 — BONGOS-V2). BV2 decision 3 makes the ignite floor — who may turn a quick idea straight into claimable work — a per-instance setting, and decision 16 adds the descent decay rate beside it, the two to share one home. Both the spec and the seeded task described the mechanism the same way: the floor IS the `METIC_PLUS` constant in `modules/ideas/routing.js`, so this is "a setting, not a refactor". Tracing the code before building refuted that: `METIC_PLUS` is spelled once but READ for four semantically different gates — the two `decideLanding` bug branches (land at `ready` or at `backlog`), `mayProposeCriterion` (who may file a `kind='criterion-proposal'`, a planning-scope write), and the protected-scope wall in `authorizeRoutedLanding` (who may route work into the permission / ship-grade / deploy / migration core). Only the first two are the ignite floor, so making the CONSTANT configurable would mean an instance setting its floor to `xenos` — exactly the "project of one wants every thought claimable" case the owner asked for — ALSO gaining the right to file criterion-proposals and to breach the protected core. The codebase already said so in three places nobody had read into the spec: the constant's own header ("It grants nothing — the server-side rank floor and the goal's scope wall are separate, load-bearing gates"), the protected-scope branch ("the two are layers, not alternatives"), and `tests/filing_abuse_matrix.mjs`, which models the widening as an ATTACK and pins the literal. Decision: a separate dial. `modules/ideas/config.js` + `config/ideas.neutral.json` carry both knobs on the `modules/government/config.js` precedence (env -> instance root `config/ideas.json` -> core root neutral; the ADR 0268 dual-root split matters, since one root reads the host pack out of `node_modules` where `npm ci` erases it). `igniteFloor` defaults to `metic`, resolving to exactly the `METIC_PLUS` set, and is threaded into `decideLanding` as a ready-made `trustedRanks` **Set** by the callers — `routing.js` is TOLD the floor and never reads config, staying pure and DB-free — while `METIC_PLUS` stays a FIXED constant for the other two gates, neither of which takes a floor argument (pinned structurally). `descentDecayRate` defaults to 0.5 and ships with no production caller, because R11 is its intended reader and depends on the unbuilt R08 — the same deliberate slice boundary `modules/government/config.js` documents for itself, and what decision 16 asked for. Everything fails to VANILLA rather than dead: a malformed pack, an unknown rank or an out-of-band rate falls back, and an unrecognised floor yields the DEFAULT set, never an empty one (failing closed would stop every ignition on a typo). Rejected: configuring `METIC_PLUS` as written (a security widening in a config file's clothes); splitting it into four named constants (the other three want the same fixed tier, and naming them invites configuring them); having `routing.js` read the config itself (makes the landing matrix impure and untestable at a different floor). Spec decision 3's "spelled in one place" describes the intent, not the mechanism; the spec was not edited and the task description was amended in flight.](0316-the-ignite-floor-is-not-the-trusted-tier.md) | ideas / permissions |
|
|
410
410
|
| 0315 | [**A plane with no proxy is refused, not given a no-op ingress** ([task 1004017](https://cloudbongos.com/builders#/task/1004017), goal 1000106 — BONGOS-V2). The piece [ADR 0306](0306-instance-supervision-is-a-seam-with-systemd-as-the-default.md) explicitly deferred: the self-host image ships no proxy, so provisioning step 6's `<slug>.caddy` snippet write and `systemctl reload caddy` cannot work there and a child instance gets no front door. **Two failure shapes, only one visible**: a DOMAINED child already half-refused, because `caddy adapt` fails with no binary and [ADR 0303](0303-provisioning-verifies-the-base-caddyfile-and-never-edits-it.md)'s own catch turns that into a gap — but the message told the operator to add a directive to `/etc/caddy/Caddyfile`, a file the container does not have and that ADR 0303 §1 forbids provisioning from creating; a DOMAINLESS child skipped that preflight entirely (it is gated on `inst.domain`), reached step 6 and died on the `sudo` write, an uncaught throw that bypasses the `{ok:false}` pending-retry path and hard-errors the instance on attempt one — a crash recorded where a refusal was the honest answer. Decision: `ingressPlaneGap(exec)` probes the plane with `caddy version` — one cheap unprivileged read, the same posture as `checkCaddyWiring` — and both standup legs refuse with `Ingress preflight failed: …`, deliberately NOT domain-gated, because the domainless child is the one 0303 could not see. **Only a missing binary proves there is no proxy**: under remote exec `boxExec` is `ssh <host> bash -s`, so an unreachable co-hosting box throws here too, and diagnosing a network blip as 'this plane has no proxy, provision elsewhere' would be a confident wrong answer that burns the intent's retry budget — exit 127 is read as proof, anything else answers 'could not confirm a reverse proxy on this plane' with the real cause leading. The three refusals are ordered **capacity → ingress → wiring**, cheapest and most fundamental first and all before any mutation, which moves 0303's preflight behind the ADR 0285 capacity measurement; both still refuse before anything changes, so only the precedence between two refusals moves. **No ingress seam and no no-op backend**, despite the obvious symmetry with 0306: a `none` implementation whose `writeSite`/`reload` are no-ops lets the standup SUCCEED while leaving the child unreachable — neither half of the task's done-when, and exactly the silently-broken instance it exists to prevent. Does not decide: what a child's front door IS on a container plane (a published port, a bundled proxy, an explicit localhost-only shape) — a future ADR that adds one replaces this refusal rather than extending it. Teardown is left alone on purpose: it already reloads `allowFail`, and refusing there would strand a row instead of cleaning it.](0315-a-plane-with-no-proxy-is-refused-not-given-a-no-op-ingress.md) | provisioning / ingress |
|
|
411
|
+
| 0317 | [**A plane that cannot give an instance its own account is refused, not given a shared uid** ([task 1004018](https://cloudbongos.com/builders#/task/1004018), goal 1000106 — BONGOS-V2). The last of the three container gaps [ADR 0306](0306-instance-supervision-is-a-seam-with-systemd-as-the-default.md) deferred, and the sibling of [ADR 0315](0315-a-plane-with-no-proxy-is-refused-not-given-a-no-op-ingress.md). [ADR 0281](0281-an-instance-identity-is-its-own-unix-account-and-pg-role.md) makes an instance's identity its own unix account, and the unit's `User=`/`Group=` is what stops one co-tenant reading a sibling's `/proc/<pid>/environ` — where every instance's `EnvironmentFile` carries its GitHub App private key and OAuth client secret (audit B3). `useradd` needs uid 0; the self-host image is `node:22-bookworm-slim` running `USER node` with **no sudo**, so there the account cannot be created at all. **Two failure shapes, neither honest**: today step 1c's `boxExec(ensureInstanceUserCmd(...))` is not `allowFail`, so it throws AFTER every preflight passed, AFTER the status flip to `provisioning`, and — for a standalone — after a repo pull and an `npm ci`, recording a crash with the box half-changed; and tomorrow it goes quiet, because a compose self-host only stops short of step 1c by ADR 0315's coincidence, and 0315 says in its own consequences that a future front door **replaces** that refusal. Decision: `accountPlaneGap(exec, { privileged })` in `provision-repo.js` probes with `${sudo}sh -c 'test "$(id -u)" = 0'` and `provisionInstance` refuses with `Account preflight failed: …` before any mutation. **The probe runs the SAME escalation the mutation will** (`PROVISION_SUDO=1` renders the same `sudo ` prefix `ensureInstanceUserCmd` uses), so a pass is evidence rather than inference. **`sh -c`, not a bare `test`, is load-bearing**: under sudo the outer unprivileged shell would expand `$(id -u)` first and answer about the wrong user, passing on exactly the plane this refuses — and for the same reason there is no pipeline, whose exit status is its last stage's. **Only a shell that ran and answered proves it**: `boxExec` is `ssh <host> bash -s` under remote exec, so exit 1 (`test` said no) and 127 (no sudo binary) are read as proof while ssh's own 255 answers "could not confirm" with the real cause leading — ADR 0315's rule applied to a different question. Ordered **third**, after capacity and ingress and before 0303's wiring check: the first three ask about the PLANE, 0303 asks about this instance's DOMAIN, and 0315's order is extended rather than rearranged. **Rejected: accepting it** — documenting a self-host container as single-tenant with a shared uid is a silent downgrade of the vector 0281 closed, observable nowhere on the running box, and "single-tenant" is not what a container hosting several child projects is; **an identity seam with a container implementation**, because nothing exists to put behind it and a seam whose second backend does nothing is 0315's no-op wearing a seam's clothes; **probing `useradd --help` / `command -v useradd`**, which succeed unprivileged on the very image this refuses; **`${sudo}id -u` compared against `0`**, which decides on captured stdout where every sibling preflight and every test fake treats exit status as the contract; and **refusing inside step 1c**, which keeps the refusal after the status flip. Not covered, deliberately: root-but-no-`useradd` (an Alpine-style plane fails loudly at step 1c as today), and teardown (0315's reason — a refusal there strands a row instead of cleaning it). No `PROVISION_ALLOW_SHARED_UID`: a runner either reaches root on this plane or it does not.](0317-a-plane-that-cannot-give-an-instance-its-own-account-is-refused.md) | provisioning / identity |
|
|
@@ -2304,5 +2304,9 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
2304
2304
|
landed since 1.19.913 with no explicit bump. run 35523700531. (task 1002620)
|
|
2305
2305
|
1.19.915 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2306
2306
|
landed since 1.19.914 with no explicit bump. run 35524223153. (task 1002620)
|
|
2307
|
+
1.19.916 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2308
|
+
landed since 1.19.915 with no explicit bump. run 35525694524. (task 1002620)
|
|
2309
|
+
1.19.917 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2310
|
+
landed since 1.19.916 with no explicit bump. run 35526196428. (task 1002620)
|
|
2307
2311
|
---------------------------------------------------------------------------
|
|
2308
2312
|
```
|
|
@@ -39,7 +39,7 @@ Author `config/branding.json` from the neutral starter — see [the branding con
|
|
|
39
39
|
|
|
40
40
|
**Or scaffold it with `bongos init`** ([task #1204](https://example.com/builders#/task/1204)): a short interview (or `bongos init --from spec.json` for a hands-free / CI run) that writes both config files, **seeds your first version + its done-when goal**, and **files the human-only kickoff steps** (register a GitHub OAuth app, first owner sign-in, repo binding, admission) as real tracked tasks — so a fresh instance has a claimable queue on day one instead of an empty hall. It never invents your branding (it points you at the fill prompt for that). Preview the whole plan with `bongos init --dry-run`.
|
|
41
41
|
|
|
42
|
-
**Production hosting, optional (the `provisioning` module — [ADR 0111](../adr/0111-instance-hosting-provisioning-module.md) §3).** If you enable the `provisioning` module and answer the interview's hosting questions (shape — co-tenant `$0` or a dedicated droplet — bring-your-own domain, credential ref, tier), init turns those answers into a real **provisioning request** (a queued `provision` intent the control-plane runner drains) instead of only filing a manual "production topology" task. **A queued request does nothing until a runner drains it:** on the control plane that is a systemd timer running `node scripts/gds/provision.js run-intents --apply`. This Docker image now carries the tools the scaffold needs — git, and a core it can package out of its own `.git`-less checkout (task 1003995) — and supervision is no longer systemd-only: the runner picks a process manager, falling back to supervisord where systemd is not running (task 1003997, [ADR 0306](../adr/0306-instance-supervision-is-a-seam-with-systemd-as-the-default.md)). Three standup legs still assume a systemd box, so on a compose self-host a new project cannot stand up: the container has no reverse proxy for a child instance's front door, cannot create the per-instance unix account that isolates one instance from another
|
|
42
|
+
**Production hosting, optional (the `provisioning` module — [ADR 0111](../adr/0111-instance-hosting-provisioning-module.md) §3).** If you enable the `provisioning` module and answer the interview's hosting questions (shape — co-tenant `$0` or a dedicated droplet — bring-your-own domain, credential ref, tier), init turns those answers into a real **provisioning request** (a queued `provision` intent the control-plane runner drains) instead of only filing a manual "production topology" task. **A queued request does nothing until a runner drains it:** on the control plane that is a systemd timer running `node scripts/gds/provision.js run-intents --apply`. This Docker image now carries the tools the scaffold needs — git, and a core it can package out of its own `.git`-less checkout (task 1003995) — and supervision is no longer systemd-only: the runner picks a process manager, falling back to supervisord where systemd is not running (task 1003997, [ADR 0306](../adr/0306-instance-supervision-is-a-seam-with-systemd-as-the-default.md)). Three standup legs still assume a systemd box, so on a compose self-host a new project cannot stand up: the container has no reverse proxy for a child instance's front door, cannot create the per-instance unix account that isolates one instance from another, and installs its backup dir as a hardcoded founder user (task 1002719). **Two of the three now refuse instead of failing opaquely, each for its own reason** — so fixing one cannot silently re-open the other. **The ingress leg now refuses instead of failing opaquely** (task 1004017, [ADR 0315](../adr/0315-a-plane-with-no-proxy-is-refused-not-given-a-no-op-ingress.md)): provisioning probes the plane with `caddy version` and returns `Ingress preflight failed: …` naming the missing proxy, before it writes a Caddy snippet or reloads anything. Previously a domained child was told to edit an `/etc/caddy/Caddyfile` the container does not have, and a domainless one crashed on the snippet write. Giving the container a real front door is still unbuilt — the refusal closes the failure mode, not the capability. **The identity leg refuses too** (task 1004018, [ADR 0317](../adr/0317-a-plane-that-cannot-give-an-instance-its-own-account-is-refused.md)): provisioning probes whether the runner can reach root on this plane and returns `Account preflight failed: …` before any mutation, because `useradd` cannot run under `USER node` and every child there would otherwise share one uid — the sibling-secret vector [ADR 0281](../adr/0281-an-instance-identity-is-its-own-unix-account-and-pg-role.md) exists to close. It is a capability question, not a knob: there is no setting that accepts a shared uid. Note supervisord has no timer concept either, so a container-hosted instance gets no automatic DB backup — the standup log prints the `crontab` line to add instead. The two irreducibly-human legs — the GitHub OAuth app and the first owner sign-in — stay guided/manual. If the module isn't enabled on the target instance, init falls back to the manual production-topology task, so nothing is silently skipped.
|
|
43
43
|
|
|
44
44
|
## Configuration surface
|
|
45
45
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- core_252 — index claims.published_head_sha for REVERSE lookup (task 1004090 / BV2.R15)
|
|
2
|
+
--
|
|
3
|
+
-- migrations/171 added the column and every reader since has gone FORWARD:
|
|
4
|
+
-- getClaimPublishedSha(taskId) reads one row by task_id, which the existing
|
|
5
|
+
-- task_id index serves. BV2.R15 introduced the first reader that goes BACKWARD —
|
|
6
|
+
-- shippedTasksByPublishedSha(shas) asks "which shipped tasks published these
|
|
7
|
+
-- commits", i.e. `WHERE published_head_sha = ANY($1::text[])` — and nothing
|
|
8
|
+
-- indexed that direction, so it planned a full scan of `claims` on every ship
|
|
9
|
+
-- that deleted a previously shipped file.
|
|
10
|
+
--
|
|
11
|
+
-- That is on the ship path, which is exactly where a seq scan must not be: the
|
|
12
|
+
-- table grows one row per claim forever, and the cost would arrive quietly as
|
|
13
|
+
-- ships gradually slowing rather than as anything failing.
|
|
14
|
+
--
|
|
15
|
+
-- PARTIAL, on NOT NULL. The column is nullable and most historical rows are null
|
|
16
|
+
-- (rows predating 171, and publishes that rode another branch), so a partial
|
|
17
|
+
-- index is both smaller and a better match for the query — `= ANY(...)` never
|
|
18
|
+
-- matches NULL, so the excluded rows could not have been returned anyway.
|
|
19
|
+
--
|
|
20
|
+
-- Additive and idempotent: adds an index, touches no data, no column and no
|
|
21
|
+
-- constraint. Safe to run forward against a live database, and safe for an older
|
|
22
|
+
-- release to run against — an unused index changes no behaviour.
|
|
23
|
+
--
|
|
24
|
+
-- NOT a lifecycle_* module migration: `claims` is a CORE table, and a module
|
|
25
|
+
-- migration may only touch its own namespaced tables (fitness.js
|
|
26
|
+
-- checkModuleMigrationsAdditive, ADR 0083 Decision #5).
|
|
27
|
+
|
|
28
|
+
CREATE INDEX IF NOT EXISTS claims_published_head_sha_idx
|
|
29
|
+
ON claims (published_head_sha)
|
|
30
|
+
WHERE published_head_sha IS NOT NULL;
|
|
31
|
+
|
|
32
|
+
COMMENT ON INDEX claims_published_head_sha_idx IS
|
|
33
|
+
'Reverse lookup sha -> claim for BV2.R15 removal attribution (db-ship.shippedTasksByPublishedSha). Partial: = ANY() never matches NULL.';
|
|
@@ -171,7 +171,7 @@ async function emitItemClosed(closed, { cause, votes } = {}) {
|
|
|
171
171
|
const FULL_IDEA_SECTION_KEYS = Object.freeze(['purpose', 'big_picture', 'why_had', 'why_matters', 'fit']);
|
|
172
172
|
|
|
173
173
|
// Author karma on RATIFICATION: +3, mirroring the criterion-proposal ratify
|
|
174
|
-
// award (modules/ideas/
|
|
174
|
+
// award (modules/ideas/ratify.js KARMA_RATIFY_DELTA — tuned down from +5 in
|
|
175
175
|
// V3.R28; the +5 still printed in planning-session/SKILL.md and openapi.json is
|
|
176
176
|
// STALE, do not copy it). Ratification is the CLOSE outcome, so R10's tally is
|
|
177
177
|
// what fires the payout — this file owns the constant and the payout so the
|