@bongos/core 1.19.47 → 1.19.48
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 +25 -20
- package/docs/canonical-permissions.md +3 -3
- package/modules/economy/achievements.js +1 -1
- package/modules/lifecycle/publish-reconciler.js +2 -2
- package/modules/lifecycle/routes/gate-approvals.js +1 -1
- package/modules/status-ui/public/status.js +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/audit-authorship.sh +71 -3
- package/scripts/gds/provision.js +1 -1
- package/scripts/setup-builder.sh +3 -3
- package/src/bongos/auth.js +1 -1
- package/src/bongos/routes/modules.js +1 -1
- package/src/module-api.js +3 -1
- package/tests/authorship_audit.mjs +44 -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.48",
|
|
6
|
+
"core_contract": "1.19.48",
|
|
7
|
+
"source_commit": "55b3c049db775bb60d3749a998a44110a340f3fa",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-08-11T18:
|
|
9
|
+
"built_at": "2026-08-11T18:28:57.362Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 290,
|
|
13
13
|
"agent_docs_stubbed": 21,
|
|
14
|
-
"functional_verbatim":
|
|
14
|
+
"functional_verbatim": 1217,
|
|
15
15
|
"rules": 3,
|
|
16
16
|
"gate_literals": 3,
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
|
-
"file_count":
|
|
20
|
-
"tree_sha256": "
|
|
19
|
+
"file_count": 1528,
|
|
20
|
+
"tree_sha256": "be96d3ccab1f445af630ea28b9609a9dc3dfba76aa75b5bc394a97e9d9a1d166",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/blocker-review/SKILL.md",
|
|
@@ -1327,7 +1327,7 @@
|
|
|
1327
1327
|
{
|
|
1328
1328
|
"path": "docs/canonical-permissions.md",
|
|
1329
1329
|
"mode": "0000644",
|
|
1330
|
-
"sha256": "
|
|
1330
|
+
"sha256": "3cc48fe7b291976d819450202090b0df0c165d2470f5895a16febb7cdd5834a2"
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
1333
|
"path": "docs/design-contract.md",
|
|
@@ -2687,7 +2687,7 @@
|
|
|
2687
2687
|
{
|
|
2688
2688
|
"path": "modules/economy/achievements.js",
|
|
2689
2689
|
"mode": "0000644",
|
|
2690
|
-
"sha256": "
|
|
2690
|
+
"sha256": "387c37df8b65bab755e8f006722e6665d9e5aafea29eabf868d1e2dfc4720e99"
|
|
2691
2691
|
},
|
|
2692
2692
|
{
|
|
2693
2693
|
"path": "modules/economy/cost-classify.js",
|
|
@@ -3447,7 +3447,7 @@
|
|
|
3447
3447
|
{
|
|
3448
3448
|
"path": "modules/lifecycle/publish-reconciler.js",
|
|
3449
3449
|
"mode": "0000644",
|
|
3450
|
-
"sha256": "
|
|
3450
|
+
"sha256": "3f7f65007955c419ccce1c89cb1f6da6eeca6daa8a76a738540db2858ebff4e6"
|
|
3451
3451
|
},
|
|
3452
3452
|
{
|
|
3453
3453
|
"path": "modules/lifecycle/routes/analytics.js",
|
|
@@ -3472,7 +3472,7 @@
|
|
|
3472
3472
|
{
|
|
3473
3473
|
"path": "modules/lifecycle/routes/gate-approvals.js",
|
|
3474
3474
|
"mode": "0000644",
|
|
3475
|
-
"sha256": "
|
|
3475
|
+
"sha256": "e65687656da193f9d23b398a94061f927cfbf8a63b5263c7e6ee48c5ef50f6e5"
|
|
3476
3476
|
},
|
|
3477
3477
|
{
|
|
3478
3478
|
"path": "modules/lifecycle/routes/goals.js",
|
|
@@ -4022,7 +4022,7 @@
|
|
|
4022
4022
|
{
|
|
4023
4023
|
"path": "modules/status-ui/public/status.js",
|
|
4024
4024
|
"mode": "0000644",
|
|
4025
|
-
"sha256": "
|
|
4025
|
+
"sha256": "bd0fcd32548c7b2cc7c6d36b0f31cba3e0575c95ff3dc85fdb15b11decbdfe42"
|
|
4026
4026
|
},
|
|
4027
4027
|
{
|
|
4028
4028
|
"path": "modules/status-ui/public/style.css",
|
|
@@ -4032,12 +4032,12 @@
|
|
|
4032
4032
|
{
|
|
4033
4033
|
"path": "package-lock.json",
|
|
4034
4034
|
"mode": "0000644",
|
|
4035
|
-
"sha256": "
|
|
4035
|
+
"sha256": "132fd0ff1d19c5dc9ed4fddbcab4d6ca1754214e00da32fcd4bf06fd42cf0b05"
|
|
4036
4036
|
},
|
|
4037
4037
|
{
|
|
4038
4038
|
"path": "package.json",
|
|
4039
4039
|
"mode": "0000644",
|
|
4040
|
-
"sha256": "
|
|
4040
|
+
"sha256": "f8aec45507128cd1060537a8aae479db0806b9adbc9f2b1024e601fe181bce32"
|
|
4041
4041
|
},
|
|
4042
4042
|
{
|
|
4043
4043
|
"path": "public-docs/index.html",
|
|
@@ -4457,7 +4457,7 @@
|
|
|
4457
4457
|
{
|
|
4458
4458
|
"path": "scripts/gds/audit-authorship.sh",
|
|
4459
4459
|
"mode": "0000644",
|
|
4460
|
-
"sha256": "
|
|
4460
|
+
"sha256": "6922f6008c72db47855172fce7e40df0953575b7bead0504758648e2cf2859e9"
|
|
4461
4461
|
},
|
|
4462
4462
|
{
|
|
4463
4463
|
"path": "scripts/gds/audit-deps.js",
|
|
@@ -5007,7 +5007,7 @@
|
|
|
5007
5007
|
{
|
|
5008
5008
|
"path": "scripts/gds/provision.js",
|
|
5009
5009
|
"mode": "0000644",
|
|
5010
|
-
"sha256": "
|
|
5010
|
+
"sha256": "93a5c4a6d6f76cf1fa8ca4c902b19d6ef94f9147488f1c01d3413f692a196942"
|
|
5011
5011
|
},
|
|
5012
5012
|
{
|
|
5013
5013
|
"path": "scripts/gds/publish-manifest.js",
|
|
@@ -5352,7 +5352,7 @@
|
|
|
5352
5352
|
{
|
|
5353
5353
|
"path": "scripts/setup-builder.sh",
|
|
5354
5354
|
"mode": "0000644",
|
|
5355
|
-
"sha256": "
|
|
5355
|
+
"sha256": "5860bf9daef3dd83a5ff4d3ee5e017e3cbd465ebda0c00df4ca622d629468ec4"
|
|
5356
5356
|
},
|
|
5357
5357
|
{
|
|
5358
5358
|
"path": "scripts/snapshots/backfill-history.mjs",
|
|
@@ -5422,7 +5422,7 @@
|
|
|
5422
5422
|
{
|
|
5423
5423
|
"path": "src/bongos/auth.js",
|
|
5424
5424
|
"mode": "0000644",
|
|
5425
|
-
"sha256": "
|
|
5425
|
+
"sha256": "a8215fa2659638d5850acb787eb3b193b18b545bc7e86f801764cab328b0c837"
|
|
5426
5426
|
},
|
|
5427
5427
|
{
|
|
5428
5428
|
"path": "src/bongos/cascade-dispatch.js",
|
|
@@ -5597,7 +5597,7 @@
|
|
|
5597
5597
|
{
|
|
5598
5598
|
"path": "src/bongos/routes/modules.js",
|
|
5599
5599
|
"mode": "0000644",
|
|
5600
|
-
"sha256": "
|
|
5600
|
+
"sha256": "30be4d5a235cc704d4e1db264fb4e976ef6c614bc680fe90e05f3a199b62fd3d"
|
|
5601
5601
|
},
|
|
5602
5602
|
{
|
|
5603
5603
|
"path": "src/bongos/routes/optimizer.js",
|
|
@@ -5657,7 +5657,7 @@
|
|
|
5657
5657
|
{
|
|
5658
5658
|
"path": "src/module-api.js",
|
|
5659
5659
|
"mode": "0000644",
|
|
5660
|
-
"sha256": "
|
|
5660
|
+
"sha256": "59777605e64fb494479971b94c25cf91ef601c21b5f4153d0856d6281c31db39"
|
|
5661
5661
|
},
|
|
5662
5662
|
{
|
|
5663
5663
|
"path": "src/module-loader/loader.js",
|
|
@@ -5854,6 +5854,11 @@
|
|
|
5854
5854
|
"mode": "0000644",
|
|
5855
5855
|
"sha256": "92b7033ab16d9d4472fcca4695d9df47938a45bdc62feda87b8771f5a2d59ff2"
|
|
5856
5856
|
},
|
|
5857
|
+
{
|
|
5858
|
+
"path": "tests/authorship_audit.mjs",
|
|
5859
|
+
"mode": "0000644",
|
|
5860
|
+
"sha256": "4697e7e264023c148d1f18cac9695157de56b5dd3db4b60f2ab94d73a8d7af65"
|
|
5861
|
+
},
|
|
5857
5862
|
{
|
|
5858
5863
|
"path": "tests/autonomous_fit_protected_paths.mjs",
|
|
5859
5864
|
"mode": "0000644",
|
|
@@ -299,6 +299,6 @@ identity. Use `req.builder.*` server-side, the active session client-side, `$HOM
|
|
|
299
299
|
- **Infra config, not impersonation:** the droplet's operational identity (`User=lars`,
|
|
300
300
|
`lars@REDACTED_IP`, `/home/lars/example`, `lars@example.com`).
|
|
301
301
|
- **Enforcement:** [`scripts/gds/audit-authorship.sh`](../scripts/gds/audit-authorship.sh) — exits 0
|
|
302
|
-
clean, exits 1 with a hit list + remediation hints if a new hardcode shows up.
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
clean, exits 1 with a hit list + remediation hints if a new hardcode shows up. Runs on every PR
|
|
303
|
+
inside the required `unit` check via `tests/authorship_audit.mjs` (task 1002640 — it previously had
|
|
304
|
+
no caller and its exclusions had rotted to 342 stale hits). State clean (0 hits) as of that rewire.
|
|
@@ -239,7 +239,7 @@ async function evaluateAfterCreditAward(client, builderId, totalBefore, totalAft
|
|
|
239
239
|
// with grader_bypass on only ever unlocked first-claim (the claim path works).
|
|
240
240
|
// And breaking-the-100c-bar was boundary-only (totalBefore<100 && totalAfter>=100)
|
|
241
241
|
// on a credit branch the per-session cost-plus reward (ADR 0054) never hits, so
|
|
242
|
-
// it fired for NOBODY — even
|
|
242
|
+
// it fired for NOBODY — even the founding Archon at 22k credits. The whole board looked dead.
|
|
243
243
|
//
|
|
244
244
|
// reconcileBuilderAchievements evaluates every achievement against CURRENT DB
|
|
245
245
|
// state and unlocks any the builder is eligible for but hasn't. It is:
|
|
@@ -122,8 +122,8 @@ function couldBeStaleGenerated(m) {
|
|
|
122
122
|
|
|
123
123
|
// task 1002461 — render the reconciler's operating target: which repo it resolved
|
|
124
124
|
// and whether it holds a credential. This is the line that makes a WRONG repo bind
|
|
125
|
-
// visible without owner access (the live failure: the hub bound
|
|
126
|
-
//
|
|
125
|
+
// visible without owner access (the live failure: the hub bound the instance
|
|
126
|
+
// repo while the PRs were in the core repo).
|
|
127
127
|
// Pure — takes the resolved facts, returns the string — so the wording is
|
|
128
128
|
// unit-tested without a boot.
|
|
129
129
|
function describeTarget({ configured, repo } = {}) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// WHY. The gate-review CI check (ADR 0058) clears an ESCALATE (hard floor) ONLY on
|
|
5
5
|
// an owner approval, and a NEEDS_TRUST without a Metic+ author likewise blocks until
|
|
6
6
|
// the owner approves. Historically that owner approval was a GitHub APPROVED review
|
|
7
|
-
// by
|
|
7
|
+
// by the repo owner on the head sha — i.e. the owner had to leave a GitHub/terminal review.
|
|
8
8
|
// This router gives Archons a browser-only equivalent (feedback: auth flows must be
|
|
9
9
|
// UI-first), trust-consistent with the existing server-set `gate-author-trust`
|
|
10
10
|
// status: the server re-checks the caller's Archon rank server-side (ADR 0016) and
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// API base for the public read endpoints (#737). Empty = same-origin, the case
|
|
5
5
|
// when this file is served by the droplet itself (status.amazonprimea.com
|
|
6
6
|
// proxies /api/* to the same Node process). The OFF-BOX GitHub Pages mirror
|
|
7
|
-
// (
|
|
7
|
+
// (the owner's status-mirror repo, ADR 0029) injects window.STATUS_API_BASE =
|
|
8
8
|
// 'https://amazonprimea.com' in its <head> so the same byte-identical file
|
|
9
9
|
// fetches cross-origin from the droplet there (CORS is open). Keeping this file
|
|
10
10
|
// identical on both hosts is what lets the mirror sync be a pure copy.
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.48",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bongos/core",
|
|
9
|
-
"version": "1.19.
|
|
9
|
+
"version": "1.19.48",
|
|
10
10
|
"license": "AGPL-3.0-or-later",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"express": "^4.21.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.48",
|
|
4
4
|
"description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"main": "src/platform-server.js",
|
|
@@ -34,14 +34,24 @@
|
|
|
34
34
|
# * GitHub remote `lars589/amazonprimea` — actual repo owner; cloning
|
|
35
35
|
# anything else would clone a different project.
|
|
36
36
|
# * Comments that document who decided something or who originally ran a
|
|
37
|
-
# one-time backfill — historical decision-attribution.
|
|
37
|
+
# one-time backfill — historical decision-attribution. Allowlisted
|
|
38
|
+
# PER FILE below (a content-level "looks like a comment" filter would
|
|
39
|
+
# also match live code — a JS private class field, a //host literal —
|
|
40
|
+
# so it could be gamed; file entries with justifications can't).
|
|
41
|
+
# * Test data that pins a real contract, allowlisted PER FILE below: owner
|
|
42
|
+
# approval RECORDS the Archon's login, the terminal-URL guard validates
|
|
43
|
+
# term-<login> hostnames — identity in an assertion is the contract.
|
|
44
|
+
# New test files are still scanned (no blanket tests/ exclusion).
|
|
45
|
+
# * Sample API payloads (fixtures/) and gitignored build output (dist/).
|
|
38
46
|
#
|
|
39
47
|
# Usage:
|
|
40
48
|
# bash scripts/gds/audit-authorship.sh # check, exit 1 on new hits
|
|
41
49
|
# bash scripts/gds/audit-authorship.sh --verbose # print every hit (incl.
|
|
42
50
|
# # allowlisted) for review
|
|
43
51
|
#
|
|
44
|
-
#
|
|
52
|
+
# CI lane: tests/authorship_audit.mjs runs this inside the required `unit`
|
|
53
|
+
# check (task 1002640 — it previously had no caller and 342 stale hits).
|
|
54
|
+
# No writes, no network.
|
|
45
55
|
|
|
46
56
|
set -uo pipefail
|
|
47
57
|
|
|
@@ -72,6 +82,10 @@ done
|
|
|
72
82
|
EXCLUDE_DIRS=(
|
|
73
83
|
--exclude-dir=node_modules
|
|
74
84
|
--exclude-dir=.git
|
|
85
|
+
--exclude-dir=dist # gitignored build/package output (a stale
|
|
86
|
+
# core tarball tree re-reports every hit in
|
|
87
|
+
# it — task 1002640); grep -R walks the
|
|
88
|
+
# filesystem, not the git index.
|
|
75
89
|
--exclude-dir=iterations # under art/, historical cost ledger
|
|
76
90
|
--exclude-dir=generated # under art/, generated PNGs / metadata
|
|
77
91
|
--exclude-dir=docs # human prose: ADRs, recipes, plans,
|
|
@@ -79,6 +93,9 @@ EXCLUDE_DIRS=(
|
|
|
79
93
|
# naming the founder by intent
|
|
80
94
|
--exclude-dir=blockers # blockers ARE the things stuck on Lars
|
|
81
95
|
--exclude-dir=limitations # archives + scope-truth docs
|
|
96
|
+
--exclude-dir=fixtures # sample API payloads (hall-preview) mirror
|
|
97
|
+
# real prod rows, which name real builders —
|
|
98
|
+
# frozen sample data, not runtime code.
|
|
82
99
|
--exclude-dir=worktrees # .claude/worktrees/ holds N full repo
|
|
83
100
|
# copies (one per builder worktree); from
|
|
84
101
|
# the main checkout, recursing them is slow
|
|
@@ -151,6 +168,53 @@ ALLOWLIST=(
|
|
|
151
168
|
# leaks in setup.js — the string appearing in the comment IS the
|
|
152
169
|
# specification of what's forbidden in implementation code.
|
|
153
170
|
'tests/setup_smoke.mjs'
|
|
171
|
+
|
|
172
|
+
# Test DATA that pins a real contract (task 1002640) — identity in an
|
|
173
|
+
# assertion IS the contract, not a mis-attribution: owner approval RECORDS
|
|
174
|
+
# the Archon's login (gate_approvals), the terminal-URL SSRF guard validates
|
|
175
|
+
# term-<login> hostnames (box_terminal_ssrf), packaging/provisioning tests
|
|
176
|
+
# exercise the real repo owner + the mirror-redaction floor. Listed per file
|
|
177
|
+
# (never a blanket tests/ exclusion) so a NEW test file is still scanned.
|
|
178
|
+
'tests/provision.mjs'
|
|
179
|
+
'tests/package_core.mjs'
|
|
180
|
+
'tests/init.mjs'
|
|
181
|
+
'tests/box_terminal_ssrf.mjs'
|
|
182
|
+
'tests/gate_approvals.mjs'
|
|
183
|
+
'tests/publish_reconciler.mjs'
|
|
184
|
+
'tests/dev_lib.mjs'
|
|
185
|
+
'tests/ship_card.mjs'
|
|
186
|
+
'tests/scrubber_corpus.mjs'
|
|
187
|
+
'tests/module_submissions.mjs'
|
|
188
|
+
'tests/boxes.mjs'
|
|
189
|
+
'tests/provisioning_onboard_mode.mjs'
|
|
190
|
+
'tests/instance_manifest.mjs'
|
|
191
|
+
'tests/bongos_downloads.mjs'
|
|
192
|
+
'tests/status_mirror_sync.mjs'
|
|
193
|
+
'tests/search_isolation.mjs'
|
|
194
|
+
'tests/grade_aggregates_unavailable.mjs'
|
|
195
|
+
'tests/first_admin_bootstrap.mjs'
|
|
196
|
+
'tests/discord_approvals.mjs'
|
|
197
|
+
'tests/currency_label.mjs'
|
|
198
|
+
'tests/cloud_bongos_pack.mjs'
|
|
199
|
+
'tests/bump_version.mjs'
|
|
200
|
+
'tests/box_scope_session.mjs'
|
|
201
|
+
'tests/auth_inactive_builder.mjs'
|
|
202
|
+
'tests/auth_anthropic_identity.mjs'
|
|
203
|
+
'modules/dev-box/app/test/unit.mjs'
|
|
204
|
+
|
|
205
|
+
# The public landing page links the open-source repo by URL — repo-hosting
|
|
206
|
+
# identity (the provision-staging.sh class), not a builder identity.
|
|
207
|
+
'public-landing/create.html'
|
|
208
|
+
|
|
209
|
+
# The mirror-redaction floor: PRIOR_INSTANCE_FLOOR carries the prior
|
|
210
|
+
# instance's owner literal precisely so packaging can SCRUB it from every
|
|
211
|
+
# published core — the anti-leak spec, not a runtime hardcode (task 1002640).
|
|
212
|
+
'scripts/gds/package-core.js'
|
|
213
|
+
|
|
214
|
+
# Frozen seed script — a task DESCRIPTION quotes migration 023's founding-
|
|
215
|
+
# Archon literal as the thing that task exists to remove (the
|
|
216
|
+
# seed-v3-tasks.js class: stripping it would lose the task history).
|
|
217
|
+
'scripts/gds/seed-medusa-tasks.js'
|
|
154
218
|
)
|
|
155
219
|
|
|
156
220
|
# ----------------------------------------------------------------------------
|
|
@@ -212,7 +276,11 @@ else
|
|
|
212
276
|
fi
|
|
213
277
|
|
|
214
278
|
# Apply operational-identity + spec-string pattern allowlists (both match on
|
|
215
|
-
# line content, not file path).
|
|
279
|
+
# line content, not file path). NB deliberately NO comment-line filter: a
|
|
280
|
+
# content pattern like `^\s*(//|#)` also matches live code (a JS private class
|
|
281
|
+
# field `#name = ...`, a protocol-relative `//host` continuation line), so a
|
|
282
|
+
# real hardcode could dress as a comment to slip through. Historical-
|
|
283
|
+
# attribution comments get per-file ALLOWLIST entries instead (task 1002640).
|
|
216
284
|
grep -vE "$OPS_ALLOWLIST_PATTERN" "$TMP_HITS" \
|
|
217
285
|
| grep -vE "$SPEC_ALLOWLIST_PATTERN" > "$TMP_FILTERED" || true
|
|
218
286
|
|
package/scripts/gds/provision.js
CHANGED
|
@@ -851,7 +851,7 @@ ${prefix}_OAUTH_ORIGIN=${origin}
|
|
|
851
851
|
// <prefix>_FIRST_ADMIN before branding.firstAdmin). WITHOUT it a provisioned instance
|
|
852
852
|
// has NO owner — first sign-in is refused / lands rankless and the owner can never
|
|
853
853
|
// claim their own instance (goal 35 / criterion 165 regression, caught live 2026-07-07:
|
|
854
|
-
// demo had every origin override but no FIRST_ADMIN, so
|
|
854
|
+
// demo had every origin override but no FIRST_ADMIN, so the owner could not be seated).
|
|
855
855
|
// Derived from the instance repo owner (target_ref = "<owner>/<repo>"), the SAME source
|
|
856
856
|
// instanceInitSpec uses for the scaffold's branding.firstAdmin — so this env override and
|
|
857
857
|
// the scaffolded config/branding.json agree. (Org-owned repo: the org login is not a
|
package/scripts/setup-builder.sh
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
# ./scripts/setup-builder.sh [--skip-keys] [--no-auth] [--help]
|
|
15
15
|
#
|
|
16
16
|
# Run this from INSIDE a clone of the repo. If you don't have the code yet,
|
|
17
|
-
# do "Step 0 — get the project onto your machine" first (see README.md)
|
|
18
|
-
#
|
|
17
|
+
# do "Step 0 — get the project onto your machine" first (see README.md) —
|
|
18
|
+
# clone YOUR instance's repo, then cd into it.
|
|
19
19
|
set -uo pipefail
|
|
20
20
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
21
21
|
# Guard: this shim must run from inside the repo (where setup-builder.js lives).
|
|
22
22
|
if [ ! -f "$SCRIPT_DIR/setup-builder.js" ]; then
|
|
23
23
|
echo "setup-builder: can't find setup-builder.js next to this script." >&2
|
|
24
24
|
echo "Did you clone the repo and cd into it? See README.md 'Step 0 — get the project onto your machine'." >&2
|
|
25
|
-
echo "
|
|
25
|
+
echo " (clone YOUR instance's repo, then cd into it and re-run this script)" >&2
|
|
26
26
|
exit 1
|
|
27
27
|
fi
|
|
28
28
|
exec node "$SCRIPT_DIR/setup-builder.js" "$@"
|
package/src/bongos/auth.js
CHANGED
|
@@ -63,7 +63,7 @@ const SCOPE = 'read:user';
|
|
|
63
63
|
// support is needed". It is needed. `public_repo` grants write to PUBLIC repos
|
|
64
64
|
// only, so ADOPTING an existing PRIVATE repo dies at the provisioner's scaffold
|
|
65
65
|
// push with GitHub 403 "Write access to repository not granted" — observed live on
|
|
66
|
-
//
|
|
66
|
+
// a private repo of the owner's. ADR 0155 takes the reversal at the owner's
|
|
67
67
|
// explicit call, accepting the cost it names: a token we persist can now write to
|
|
68
68
|
// EVERY repo the user owns, not just their public ones.
|
|
69
69
|
const REPO_SCOPE = 'repo';
|
|
@@ -65,7 +65,7 @@ function ownProjectName() {
|
|
|
65
65
|
try { return require('../../branding').branding().identity.productName; } catch { return null; }
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// "owner/name", e.g. "
|
|
68
|
+
// "owner/name", e.g. "some-owner/their-repo" — the provenance a submission
|
|
69
69
|
// carries (ADR 0107 §2: attribution/provenance travels WITH the module as a
|
|
70
70
|
// portable record, not a cross-GDS link). null if the branding pack has none.
|
|
71
71
|
function sourceRepoLabel() {
|
package/src/module-api.js
CHANGED
|
@@ -521,8 +521,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
|
|
|
521
521
|
// landed since 1.19.45 with no explicit bump. run 31520432748. (task 1002620)
|
|
522
522
|
// 1.19.47 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
523
523
|
// landed since 1.19.46 with no explicit bump. run 31521404176. (task 1002620)
|
|
524
|
+
// 1.19.48 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
525
|
+
// landed since 1.19.47 with no explicit bump. run 31522865111. (task 1002620)
|
|
524
526
|
// ---------------------------------------------------------------------------
|
|
525
|
-
const CORE_VERSION = '1.19.
|
|
527
|
+
const CORE_VERSION = '1.19.48'; // CI auto-patch carrier (ADR 0161); see changelog above
|
|
526
528
|
|
|
527
529
|
// A namespaced logger so a module's log lines are attributable + consistent.
|
|
528
530
|
// Usage: const log = api.logger('dev-box'); log.info('mounted');
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// tests/authorship_audit.mjs — the no-hardcoded-Archon-identity gate (task 1002640).
|
|
2
|
+
//
|
|
3
|
+
// scripts/gds/audit-authorship.sh (named as THE enforcement in
|
|
4
|
+
// docs/canonical-permissions.md) had no caller — no CI lane, no test, no skill
|
|
5
|
+
// — and 342 stale hits on a clean tree. This test makes it a real gate: it runs
|
|
6
|
+
// inside the required `unit` check, so a new hardcoded founder-identity
|
|
7
|
+
// reference in implementation code fails the PR. The script is local-only (grep
|
|
8
|
+
// over the tree — no DB, no network). Fail-open only where the RUNTIME is
|
|
9
|
+
// missing: a builder machine without bash on PATH (the gen-diagrams render-step
|
|
10
|
+
// precedent) skips with a warning; Linux CI always has bash, so the gate is
|
|
11
|
+
// always live where it matters.
|
|
12
|
+
|
|
13
|
+
import { strict as assert } from 'node:assert';
|
|
14
|
+
import { spawnSync } from 'node:child_process';
|
|
15
|
+
import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
const REPO = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
19
|
+
const SCRIPT = path.join(REPO, 'scripts', 'gds', 'audit-authorship.sh');
|
|
20
|
+
const SPAWN_TIMEOUT_MS = 75_000; // under run-unit-tests' 90s cap
|
|
21
|
+
|
|
22
|
+
const r = spawnSync('bash', [SCRIPT], {
|
|
23
|
+
cwd: REPO,
|
|
24
|
+
encoding: 'utf8',
|
|
25
|
+
timeout: SPAWN_TIMEOUT_MS,
|
|
26
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
if (r.error && r.error.code === 'ENOENT') {
|
|
30
|
+
console.warn('authorship_audit: bash not on PATH — skipping (the gate runs on Linux CI; a bash-less builder box cannot run a .sh).');
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// NO timeout fail-open: the audit is local-only (grep over the tree — no DB,
|
|
35
|
+
// no network), so unlike an infra-dependent check there is no innocent reason
|
|
36
|
+
// for it to hang; a diff engineered to make the scan slow must FAIL the gate,
|
|
37
|
+
// not slip through it. spawnSync's ETIMEDOUT falls through to the assertions.
|
|
38
|
+
assert.equal(r.error, undefined, `audit-authorship.sh failed to run: ${r.error && r.error.message}`);
|
|
39
|
+
assert.equal(
|
|
40
|
+
r.status,
|
|
41
|
+
0,
|
|
42
|
+
`audit-authorship.sh found hardcoded founder-identity references in implementation code:\n${r.stdout}\n${r.stderr}`
|
|
43
|
+
);
|
|
44
|
+
console.log('authorship_audit: clean — no hardcoded Archon-identity references in implementation code.');
|