@bongos/core 1.21.176 → 1.21.178
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 +186 -496
- package/.claude/skills/planning-session/SKILL.md +2 -2
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +0 -6
- package/clients/bongos-client/index.cjs +0 -6
- package/clients/bongos-client/index.d.ts +0 -6
- package/clients/bongos-client/index.mjs +0 -6
- package/config/scheduled-routines.json +3 -8
- package/docs/adr/0042-builder-self-deploy-ci-auto-merge.md +3 -2
- package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +1 -1
- package/docs/adr/0093-tranche-2-core-carve-sequence.md +1 -1
- package/docs/api/openapi.json +1 -87
- package/docs/api-reference.md +1 -8
- package/docs/canonical-permissions.md +4 -4
- package/docs/copy-inventory.md +25 -39
- package/docs/copy-registry.json +73 -200
- package/docs/file-map.md +6 -11
- package/docs/handoff-template.md +1 -1
- package/docs/module-api-changelog.md +4 -0
- package/docs/modules-contract.md +2 -2
- package/docs/onboarding/diagrams/README.md +3 -7
- package/docs/onboarding/diagrams/assertions.json +3 -3
- package/docs/page-inventory.json +4 -7
- package/docs/page-readings.json +1520 -1569
- package/docs/recipes/ops-gotchas.md +3 -1
- package/modules/autonomy/db.js +9 -0
- package/modules/autonomy/module.json +2 -2
- package/modules/autonomy/pollers/daily-checks.js +262 -0
- package/modules/autonomy/pollers/routine-timers.js +7 -5
- package/modules/autonomy/rank-roles.js +64 -0
- package/modules/autonomy/server-schedule.js +37 -0
- package/modules/government/catalog.js +10 -7
- package/modules/government/decision-board.js +0 -1
- package/modules/government/decision-rules.js +0 -1
- package/modules/government/docket.js +0 -1
- package/modules/government/protected-surfaces.js +1 -1
- package/modules/government/protected-surfaces.json +2 -3
- package/modules/hall-ui/public/atlas.html +1 -1
- package/modules/hall-ui/public/blockers.html +1 -1
- package/modules/hall-ui/public/board-room.html +1 -1
- package/modules/hall-ui/public/city.html +1 -1
- package/modules/hall-ui/public/collab.html +1 -1
- package/modules/hall-ui/public/commands.html +1 -1
- package/modules/hall-ui/public/copy-desk.html +1 -1
- package/modules/hall-ui/public/deploy.html +1 -1
- package/modules/hall-ui/public/diagrams.html +1 -1
- package/modules/hall-ui/public/drachmae.html +1 -1
- package/modules/hall-ui/public/fleet.html +1 -1
- package/modules/hall-ui/public/gate.css +4 -26
- package/modules/hall-ui/public/gate.html +12 -27
- package/modules/hall-ui/public/gate.js +26 -176
- package/modules/hall-ui/public/gate.states.json +4 -22
- package/modules/hall-ui/public/goal-map.html +1 -1
- package/modules/hall-ui/public/goals.html +1 -1
- package/modules/hall-ui/public/government.html +1 -1
- package/modules/hall-ui/public/idea.html +1 -1
- package/modules/hall-ui/public/ideas.html +1 -1
- package/modules/hall-ui/public/index.html +1 -1
- package/modules/hall-ui/public/modules.html +1 -1
- package/modules/hall-ui/public/my-agents.html +1 -1
- package/modules/hall-ui/public/primer.html +1 -1
- package/modules/hall-ui/public/profile.html +1 -1
- package/modules/hall-ui/public/project-settings.html +1 -1
- package/modules/hall-ui/public/ranks.html +1 -1
- package/modules/hall-ui/public/roadmap.html +1 -1
- package/modules/hall-ui/public/roster.html +1 -1
- package/modules/hall-ui/public/sessions.html +1 -1
- package/modules/hall-ui/public/settings.html +1 -1
- package/modules/hall-ui/public/shell.js +1 -1
- package/modules/hall-ui/public/street-card.js +5 -9
- package/modules/hall-ui/public/street-desk.js +2 -2
- package/modules/hall-ui/public/street-inside.js +1 -1
- package/modules/hall-ui/public/street.html +1 -1
- package/modules/hall-ui/public/studio.html +1 -1
- package/modules/hall-ui/public/task.html +1 -1
- package/modules/hall-ui/public/thinking.html +1 -1
- package/modules/hall-ui/public/tweak-editor.html +1 -1
- package/modules/hall-ui/public/watch.html +1 -1
- package/modules/hall-ui/public/work.html +1 -1
- package/modules/lifecycle/matter-acts.js +0 -6
- package/modules/lifecycle/module.json +0 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +36 -0
- package/scripts/bongos/adopt-preflight.js +3 -3
- package/scripts/bongos/api-alias-caller-scan.js +2 -2
- package/scripts/bongos/audit-authorship.sh +1 -8
- package/scripts/bongos/audit-rank-roles.js +15 -56
- package/scripts/bongos/bump-version.js +46 -9
- package/scripts/bongos/codemod-rename-scripts-gds.js +0 -1
- package/scripts/bongos/diagram-facts.js +1 -1
- package/scripts/bongos/do-api.js +1 -1
- package/scripts/bongos/doc-cli-guard.js +2 -0
- package/scripts/bongos/doc-control-claims.js +2 -2
- package/scripts/bongos/fitness-checks-identity.js +4 -15
- package/scripts/bongos/gen-diagrams.js +3 -3
- package/scripts/bongos/government-walk.js +3 -9
- package/scripts/bongos/hard-floor.js +52 -0
- package/scripts/bongos/publish-manifest.js +3 -3
- package/scripts/bongos/pulse.js +5 -3
- package/scripts/bongos/routine-schedule.js +38 -3
- package/scripts/bongos/run-unit-tests.js +17 -5
- package/scripts/bongos/ship-regen.js +2 -3
- package/scripts/gds/{goal-names.js → hard-floor.js} +3 -4
- package/scripts/security/dep-audit.js +50 -124
- package/src/bongos/module-scope-map.js +2 -2
- package/src/bongos/permission-path-check.js +1 -1
- package/src/bongos/route-rank-check.js +1 -8
- package/src/bongos/routes.js +1 -2
- package/src/module-api.js +1 -1
- package/src/modules.js +1 -1
- package/tests/acclaim_feed_evidence_db.mjs +42 -23
- package/tests/adr_0089_scope.mjs +7 -5
- package/tests/autonomy_daily_checks.mjs +201 -0
- package/tests/bump_version.mjs +52 -18
- package/tests/claude_materialize.mjs +12 -12
- package/tests/copy_desk_flags_db.mjs +22 -14
- package/tests/effective_visibility_predicate.mjs +0 -18
- package/tests/gating_review_retired.mjs +1 -1
- package/tests/government_act_alone_buildings.mjs +1 -3
- package/tests/government_board_membership_db.mjs +35 -22
- package/tests/government_protected_surfaces.mjs +29 -13
- package/tests/governor_docket.mjs +0 -2
- package/tests/governor_matter_acts.mjs +6 -8
- package/tests/hall_city.mjs +1 -1
- package/tests/hall_matter_card.mjs +2 -2
- package/tests/hall_oversight_world.mjs +16 -12
- package/tests/hall_street_desk.mjs +4 -3
- package/tests/hall_street_inside.mjs +1 -1
- package/tests/helpers.mjs +34 -0
- package/tests/howto_state.mjs +33 -56
- package/tests/howto_state_db.mjs +68 -0
- package/tests/idea_credit_streams_db.mjs +11 -3
- package/tests/integration_parked_ratchet.mjs +7 -1
- package/tests/nav_permission_atoms.mjs +1 -1
- package/tests/page_notes_db.mjs +12 -8
- package/tests/page_tweak_no_rearm.mjs +50 -0
- package/tests/publish_manifest.mjs +64 -0
- package/tests/routine_capture_kind.mjs +18 -7
- package/tests/routine_schedule.mjs +42 -0
- package/tests/search_isolation.mjs +5 -103
- package/tests/search_isolation_db.mjs +140 -0
- package/tests/session_earnings_mirror_db.mjs +2 -0
- package/tests/workflow_exec_paths.mjs +9 -11
- package/modules/lifecycle/routes/gate-approvals.js +0 -299
- package/scripts/bongos/artifact-staleness.js +0 -267
- package/scripts/bongos/ci-grade.js +0 -82
- package/scripts/bongos/classify-discipline.js +0 -153
- package/scripts/bongos/codemod-rename-src-gds.js +0 -145
- package/scripts/bongos/coreB-carve-proof.sh +0 -725
- package/scripts/bongos/gate-review.js +0 -330
- package/scripts/bongos/goal-names.js +0 -102
- package/scripts/bongos/rename-goals.js +0 -109
- package/scripts/bongos/seed-adopt-tasks.js +0 -75
- package/scripts/bongos/seed-api-contract-goal-tasks.js +0 -141
- package/scripts/bongos/seed-board-room-tasks.js +0 -196
- package/scripts/bongos/seed-bongos-app-tasks.js +0 -294
- package/scripts/bongos/seed-bongos-coreB-tranche1-tasks.js +0 -81
- package/scripts/bongos/seed-bongos-coreB-tranche2-tasks.js +0 -100
- package/scripts/bongos/seed-bongos-goal-hierarchy-tasks.js +0 -307
- package/scripts/bongos/seed-bongos-module-system-tasks.js +0 -346
- package/scripts/bongos/seed-bongos-tasks.js +0 -214
- package/scripts/bongos/seed-bongos-v1-seo-tasks.js +0 -104
- package/scripts/bongos/seed-bv1-community-tasks.js +0 -131
- package/scripts/bongos/seed-bv1-privacy-invites-tasks.js +0 -133
- package/scripts/bongos/seed-bv1-profile-page-tasks.js +0 -161
- package/scripts/bongos/seed-bv1-r01-delta-tasks.js +0 -154
- package/scripts/bongos/seed-bv2-tweak-mode-tasks.js +0 -277
- package/scripts/bongos/seed-gds-v4-tasks.js +0 -624
- package/scripts/bongos/seed-governance-tasks.js +0 -340
- package/scripts/bongos/seed-medusa-tasks.js +0 -440
- package/scripts/bongos/seed-module-upstreaming.js +0 -219
- package/scripts/bongos/seed-productization-tasks.js +0 -235
- package/scripts/bongos/seed-project-admin-console-tasks.js +0 -88
- package/scripts/bongos/seed-provisioning-tasks.js +0 -83
- package/scripts/bongos/seed-strict-versioning-tasks.js +0 -275
- package/scripts/bongos/seed-v2-world-tasks.js +0 -283
- package/scripts/gds/artifact-staleness.js +0 -7
- package/scripts/gds/ci-grade.js +0 -7
- package/scripts/gds/classify-discipline.js +0 -7
- package/scripts/gds/codemod-rename-src-gds.js +0 -7
- package/scripts/gds/coreB-carve-proof.sh +0 -8
- package/scripts/gds/gate-review.js +0 -7
- package/scripts/gds/rename-goals.js +0 -7
- package/scripts/gds/seed-adopt-tasks.js +0 -7
- package/scripts/gds/seed-api-contract-goal-tasks.js +0 -7
- package/scripts/gds/seed-board-room-tasks.js +0 -6
- package/scripts/gds/seed-bongos-app-tasks.js +0 -7
- package/scripts/gds/seed-bongos-coreB-tranche1-tasks.js +0 -7
- package/scripts/gds/seed-bongos-coreB-tranche2-tasks.js +0 -7
- package/scripts/gds/seed-bongos-goal-hierarchy-tasks.js +0 -7
- package/scripts/gds/seed-bongos-module-system-tasks.js +0 -7
- package/scripts/gds/seed-bongos-tasks.js +0 -7
- package/scripts/gds/seed-bongos-v1-seo-tasks.js +0 -6
- package/scripts/gds/seed-bv1-community-tasks.js +0 -6
- package/scripts/gds/seed-bv1-privacy-invites-tasks.js +0 -6
- package/scripts/gds/seed-bv1-profile-page-tasks.js +0 -6
- package/scripts/gds/seed-bv1-r01-delta-tasks.js +0 -6
- package/scripts/gds/seed-bv2-tweak-mode-tasks.js +0 -6
- package/scripts/gds/seed-gds-v4-tasks.js +0 -7
- package/scripts/gds/seed-governance-tasks.js +0 -7
- package/scripts/gds/seed-medusa-tasks.js +0 -7
- package/scripts/gds/seed-module-upstreaming.js +0 -7
- package/scripts/gds/seed-productization-tasks.js +0 -7
- package/scripts/gds/seed-project-admin-console-tasks.js +0 -6
- package/scripts/gds/seed-provisioning-tasks.js +0 -7
- package/scripts/gds/seed-strict-versioning-tasks.js +0 -7
- package/scripts/gds/seed-v2-world-tasks.js +0 -7
- package/scripts/migrate_cost_ledger.sh +0 -178
- package/tests/artifact_staleness.mjs +0 -207
- package/tests/gate_approvals.mjs +0 -611
- package/tests/gate_review.mjs +0 -152
- package/tests/goal_names.mjs +0 -120
- package/tests/newcomer_generator.mjs +0 -48
|
@@ -77,8 +77,8 @@ const SKIP_PREFIXES = ['docs/session-logs/', 'docs/audits/', 'limitations/'];
|
|
|
77
77
|
const ALLOW = new Map([
|
|
78
78
|
['docs/adr/0025-structured-criterion-task-link.md::scripts/bongos/seed-v3-tasks.js',
|
|
79
79
|
'describes the grep a session HAD to do before this ADR; a seed script, not a control'],
|
|
80
|
-
['docs/adr/
|
|
81
|
-
'
|
|
80
|
+
['docs/adr/0089-modular-multi-model-adversarial-grader.md::scripts/bongos/gate-review.js',
|
|
81
|
+
'ADR 0089 section 8 names the ADR 0058 gatekeeper as a surface the grading engine does not own; task 1004859 deleted it (the CI check it drove never ran) and moved its hard-floor list to scripts/bongos/hard-floor.js'],
|
|
82
82
|
['docs/adr/0111-instance-hosting-provisioning-module.md::scripts/bongos/box.js',
|
|
83
83
|
'the dev-box control-plane runner, retired with dev boxes by ADR 0346 (dev-box-guard.js keeps it out)'],
|
|
84
84
|
['docs/adr/0150-box-first-boot-bringup-vendored-instances.md::scripts/bongos/box.js',
|
|
@@ -79,10 +79,8 @@ const IDENTITY_SCAN_EXTRA_FILES = [];
|
|
|
79
79
|
// * backfill-sessions.js / version-close.js — one-time operator runbook text
|
|
80
80
|
// naming the actual prod DB + a historical local directory. Describing what
|
|
81
81
|
// an operator must literally type is the correct content.
|
|
82
|
-
// * seed-*.js — the
|
|
83
|
-
//
|
|
84
|
-
// falsify the record; deleting the files would destroy it. They are inert
|
|
85
|
-
// (idempotent on source_ref) and referenced only by generated manifests.
|
|
82
|
+
// * seed-*.js — the nine one-shot seeders once listed here (prose inside seeded
|
|
83
|
+
// task descriptions) were deleted by task 1004856; the repo history keeps them.
|
|
86
84
|
// * the four *.sh entries — surfaced when `.sh` joined the extension set (task
|
|
87
85
|
// 1002567). Each is a HOST-PINNED OPS script, not portable code: they name the
|
|
88
86
|
// live box's actual Postgres database/role and its actual /etc secrets dir, and
|
|
@@ -94,7 +92,7 @@ const IDENTITY_SCAN_EXTRA_FILES = [];
|
|
|
94
92
|
// NEW literal in any of them fails exactly like one in an unlisted file.
|
|
95
93
|
// * fitness-checks-identity.js / package-core.js — THE DETECTORS THEMSELVES: Check 13's regexes
|
|
96
94
|
// and package-core's PRIOR_INSTANCE_FLOOR name the brand because hunting it is
|
|
97
|
-
// their job.
|
|
95
|
+
// their job. (seed-v3-tasks.js was the third; it is gone.) All
|
|
98
96
|
// three passed pre-1002756 only by the old stripper's accidents (phantom
|
|
99
97
|
// blocks + regex-blindness); now they are seen and counted.
|
|
100
98
|
const IDENTITY_SCAN_ALLOWED = {
|
|
@@ -113,19 +111,10 @@ const IDENTITY_SCAN_ALLOWED = {
|
|
|
113
111
|
'scripts/bongos/seed-staging.sh': 4,
|
|
114
112
|
'scripts/bongos/backfill-sessions.js': 2,
|
|
115
113
|
'scripts/bongos/publish-manifest.js': 3,
|
|
116
|
-
'scripts/bongos/seed-bongos-coreB-tranche1-tasks.js': 1,
|
|
117
|
-
'scripts/bongos/seed-bongos-coreB-tranche2-tasks.js': 1,
|
|
118
|
-
'scripts/bongos/seed-bongos-goal-hierarchy-tasks.js': 1,
|
|
119
|
-
'scripts/bongos/seed-bongos-tasks.js': 1,
|
|
120
|
-
'scripts/bongos/seed-gds-v4-tasks.js': 1,
|
|
121
|
-
'scripts/bongos/seed-medusa-tasks.js': 7,
|
|
122
|
-
'scripts/bongos/seed-module-upstreaming.js': 1,
|
|
123
|
-
'scripts/bongos/seed-productization-tasks.js': 6,
|
|
124
|
-
'scripts/bongos/seed-provisioning-tasks.js': 2,
|
|
125
114
|
'scripts/bongos/version-close.js': 1,
|
|
126
115
|
// task 1002853 (the company literal joined the list): audit-authorship.sh is itself a
|
|
127
116
|
// detector — its ops allowlist names the founder's commit address so it can exempt it; grade-smoke.js
|
|
128
|
-
// is a protected grader probe whose fixture task prose names the company
|
|
117
|
+
// is a protected grader probe whose fixture task prose names the company.
|
|
129
118
|
'scripts/bongos/audit-authorship.sh': 1,
|
|
130
119
|
'scripts/bongos/grade-smoke.js': 1,
|
|
131
120
|
};
|
|
@@ -488,7 +488,7 @@ function rebuildAssertions(prev, f) {
|
|
|
488
488
|
next.architecture = {
|
|
489
489
|
diagram: '04-architecture',
|
|
490
490
|
_comment:
|
|
491
|
-
"Pieces of 04-architecture gated on a backing Bongos task. A piece is LIVE iff its task is 'shipped'; live_tasks must ALL be shipped, pending_tasks must NOT yet be. Rebuilt by scripts/bongos/gen-diagrams.js in lockstep with the diagram
|
|
491
|
+
"Pieces of 04-architecture gated on a backing Bongos task. A piece is LIVE iff its task is 'shipped'; live_tasks must ALL be shipped, pending_tasks must NOT yet be. Rebuilt by scripts/bongos/gen-diagrams.js in lockstep with the diagram. The machine/server/GitHub topology is structural (not task-gated); these are the LIVE/PLANNED markers. MEMORY layer (ADR 0024): 273 schema / 274 sync-on-ship / 275 pull-on-start / 276 isolation. Ship flow: 1025 (server-mediated publish, for a checkout with no push credential), 1028 (GitHub App push credential). The deploy leg is the standalone AUTO-PULL (ADR 0108/0129), not a task-gated GitHub-Actions CI job, so 859 is intentionally absent.",
|
|
492
492
|
live_tasks: arch.live_tasks,
|
|
493
493
|
pending_tasks: arch.pending_tasks,
|
|
494
494
|
};
|
|
@@ -499,7 +499,7 @@ function rebuildAssertions(prev, f) {
|
|
|
499
499
|
...next.drachmae_karma,
|
|
500
500
|
diagram: '03-drachmae-karma',
|
|
501
501
|
_comment:
|
|
502
|
-
"Pieces of 03-drachmae-karma that are gated on a backing Bongos task. A piece is LIVE iff its task is 'shipped'. live_tasks must ALL be shipped live; pending_tasks must NOT yet be shipped. Rebuilt automatically by scripts/bongos/gen-diagrams.js from the authenticated /tasks/:id status; the diagram is regenerated in lockstep
|
|
502
|
+
"Pieces of 03-drachmae-karma that are gated on a backing Bongos task. A piece is LIVE iff its task is 'shipped'. live_tasks must ALL be shipped live; pending_tasks must NOT yet be shipped. Rebuilt automatically by scripts/bongos/gen-diagrams.js from the authenticated /tasks/:id status; the diagram is regenerated in lockstep. D_SHIP (credit_log trigger) and D_ACH (achievement bonuses) have no task gate and are always LIVE. achievements_seeded mirrors 03's 'N seeded' label, counted from the achievements seed INSERTs in migrations/.",
|
|
503
503
|
};
|
|
504
504
|
next.drachmae_karma.live_tasks = dk.live_tasks;
|
|
505
505
|
next.drachmae_karma.pending_tasks = dk.pending_tasks;
|
|
@@ -589,7 +589,7 @@ const CONCEPTUAL_TARGETS = [
|
|
|
589
589
|
// r.error (ENOENT) and r.status is null. The .mmd sources are already
|
|
590
590
|
// written above and the caller (ship.js regenerateDiagrams) will commit
|
|
591
591
|
// them; PNGs get re-rendered on the Linux droplet at deploy time, and the
|
|
592
|
-
//
|
|
592
|
+
// next render-capable ship refreshes them. So skip the render
|
|
593
593
|
// NON-FATALLY rather than hard-failing the whole ship on a missing bash.
|
|
594
594
|
console.warn(
|
|
595
595
|
`gen-diagrams: could not run the render step (${r.error.code || r.error.message}). ` +
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
// an in-memory fake with the same row shapes and the same guards (one open sitting
|
|
38
38
|
// per subject, one vote per member, single-winner close, the decision-rules write
|
|
39
39
|
// only from a passed decision-rules amendment), and the few writes a passed matter
|
|
40
|
-
// makes into other modules are recorded in memory instead of written to a database
|
|
41
|
-
//
|
|
40
|
+
// makes into other modules are recorded in memory instead of written to a database.
|
|
41
|
+
// The table says which mode ran.
|
|
42
42
|
//
|
|
43
43
|
// Usage:
|
|
44
44
|
// node scripts/bongos/government-walk.js run it and print the table
|
|
@@ -102,7 +102,6 @@ const REQUESTS = Object.freeze({
|
|
|
102
102
|
'POST /autonomy/builders/:builderId/pause': ['POST', `/autonomy/builders/${BAD}/pause`, { paused: false }],
|
|
103
103
|
'POST /done-when/:criterionId/satisfy': ['POST', `/done-when/${BAD}/satisfy`, {}],
|
|
104
104
|
'POST /done-when/:criterionId/unsatisfy': ['POST', `/done-when/${BAD}/unsatisfy`, {}],
|
|
105
|
-
'POST /gate-approvals/:pr/approve': ['POST', `/gate-approvals/${BAD}/approve`, {}],
|
|
106
105
|
'POST /override-requests/:id/decide': ['POST', `/override-requests/${BAD}/decide`, { decision: 'approve' }],
|
|
107
106
|
'POST /provisioning/instances/:id/core-upgrade': ['POST', `/provisioning/instances/${BAD}/core-upgrade`, { to: '1.2.3' }],
|
|
108
107
|
'POST /provisioning/instances/:id/update-channel': ['POST', `/provisioning/instances/${BAD}/update-channel`, { channel: 'nightly' }],
|
|
@@ -122,7 +121,6 @@ const MATTER_PLAN = Object.freeze([
|
|
|
122
121
|
['automation', 'Switch unattended building off', { type: 'switch_off' }, 'fence off'],
|
|
123
122
|
['automation', 'Allow goal 77 to build unattended', { type: 'allow_goal', goal_id: 77 }, 'goal 77 allowed'],
|
|
124
123
|
['release', 'Approve override request 5', { type: 'approve_override', request_id: 5 }, 'request 5 approved'],
|
|
125
|
-
['release', 'Clear the gate on PR 1500', { type: 'approve_gate', pr: 1500 }, 'PR 1500 cleared'],
|
|
126
124
|
['review', 'Sign off criterion 9', { type: 'satisfy_criterion', criterion_id: 9 }, 'criterion 9 satisfied'],
|
|
127
125
|
['treasury', 'Dee gets $50 a month', { type: 'set_budget', builder_id: 45, monthly_usd: 50 }, 'Dee\'s limit is $50'],
|
|
128
126
|
]);
|
|
@@ -135,7 +133,6 @@ const ROUTERS = Object.freeze([
|
|
|
135
133
|
// no HTTP surface; it contributes the Release and Review matter acts, as at boot
|
|
136
134
|
'modules/lifecycle/routes/lifecycle.js',
|
|
137
135
|
'modules/lifecycle/routes/done-when.js',
|
|
138
|
-
'modules/lifecycle/routes/gate-approvals.js',
|
|
139
136
|
'modules/lifecycle/routes/tasks.js',
|
|
140
137
|
'modules/lifecycle/routes/goals.js',
|
|
141
138
|
'modules/lifecycle/routes/versions.js',
|
|
@@ -618,7 +615,6 @@ async function runWalk() {
|
|
|
618
615
|
const lifeDb = req('modules/lifecycle/db.js');
|
|
619
616
|
const doneWhen = req('modules/lifecycle/done-when.js');
|
|
620
617
|
const doneWhenRoutes = req('modules/lifecycle/routes/done-when.js');
|
|
621
|
-
const gateRoutes = req('modules/lifecycle/routes/gate-approvals.js');
|
|
622
618
|
const express = require('express');
|
|
623
619
|
const http = require('http');
|
|
624
620
|
|
|
@@ -634,11 +630,10 @@ async function runWalk() {
|
|
|
634
630
|
projectSettings.setSetting = async (k, v) => { settings.set(k, String(v)); return { key: k, value: String(v) }; };
|
|
635
631
|
|
|
636
632
|
// What passed matters write into other modules, recorded.
|
|
637
|
-
const effects = { fence: null, allowedGoals: [], overrides: [],
|
|
633
|
+
const effects = { fence: null, allowedGoals: [], overrides: [], criteria: new Map([['9', false]]), budgets: new Map() };
|
|
638
634
|
autoDb.setFenceEnabled = async ({ enabled }) => { effects.fence = enabled; return { enabled }; };
|
|
639
635
|
autoDb.allowGoal = async ({ goalId }) => { effects.allowedGoals.push(String(goalId)); return { goal_id: goalId }; };
|
|
640
636
|
lifeDb.decideOverrideRequest = async ({ requestId, decision }) => { effects.overrides.push([String(requestId), decision]); return {}; };
|
|
641
|
-
gateRoutes.approveGatePr = async ({ number }) => { effects.gates.push(String(number)); return { ok: true, body: {} }; };
|
|
642
637
|
doneWhen.getCriterion = async (id) => (effects.criteria.has(String(id)) ? { id, satisfied: effects.criteria.get(String(id)) } : null);
|
|
643
638
|
doneWhenRoutes.satisfyByOverride = async ({ criterionId }) => { effects.criteria.set(String(criterionId), true); return { updated: {}, goalResult: {} }; };
|
|
644
639
|
|
|
@@ -971,7 +966,6 @@ async function runWalk() {
|
|
|
971
966
|
'automation.switch_off': () => effects.fence === false,
|
|
972
967
|
'automation.allow_goal': () => effects.allowedGoals.includes('77'),
|
|
973
968
|
'release.approve_override': () => effects.overrides.some(([id, d]) => id === '5' && d === 'approve'),
|
|
974
|
-
'release.approve_gate': () => effects.gates.includes('1500'),
|
|
975
969
|
'review.satisfy_criterion': () => effects.criteria.get('9') === true,
|
|
976
970
|
'treasury.set_budget': () => effects.budgets.get('45') === 50,
|
|
977
971
|
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// scripts/bongos/hard-floor.js — the trust-boundary HARD FLOOR: the repo paths that,
|
|
4
|
+
// if a compromised or injected senior session changed them, would disable the safety
|
|
5
|
+
// system itself or the deploy switch. A subset of PROTECTED_GLOBS (the protected-surface
|
|
6
|
+
// registry, modules/government/protected-surfaces.json); tests/government_protected_surfaces.mjs
|
|
7
|
+
// holds the subset honest.
|
|
8
|
+
//
|
|
9
|
+
// WHERE IT CAME FROM. This list lived in scripts/bongos/gate-review.js, the ADR 0058
|
|
10
|
+
// classifier a planned gate-review CI check was meant to run. That check never ran on
|
|
11
|
+
// main, and task 1004859 removed the classifier with the hall Gate page that waited on
|
|
12
|
+
// it. Two live readers still need the list, so it moved here unchanged (minus the two
|
|
13
|
+
// deleted drivers that named themselves):
|
|
14
|
+
// - scripts/bongos/publish-manifest.js — what the public mirror must never carry;
|
|
15
|
+
// - scripts/bongos/adopt-preflight.js — whether an adopted repo lands on the floor.
|
|
16
|
+
//
|
|
17
|
+
// Imported, never re-typed: a consumer that needs the floor requires this file.
|
|
18
|
+
// Kept as globs so the matcher is the one permission-path-check builds (trailing '/' =
|
|
19
|
+
// subtree, case- and NFC-folded — task 1002874: a byte-exact matcher let an uppercased
|
|
20
|
+
// spelling of a floor surface walk past).
|
|
21
|
+
|
|
22
|
+
const { compileGlobMatcher } = require('../../src/bongos/permission-path-check');
|
|
23
|
+
|
|
24
|
+
const HARD_FLOOR_GLOBS = [
|
|
25
|
+
'scripts/bongos/hard-floor.js', // self
|
|
26
|
+
'src/bongos/permission-path-check.js', // defines the protected set
|
|
27
|
+
'src/bongos/route-rank-check.js', // the route-gate auditor
|
|
28
|
+
'src/bongos/auth.js', // requireRank / requireBuilder — the enforcement point
|
|
29
|
+
'modules/grading/grader.js', // BV1.R73: grading carved to modules/grading/
|
|
30
|
+
'modules/grading/grader-workers/',
|
|
31
|
+
'modules/grading/grader-rubric.json',
|
|
32
|
+
'scripts/bongos/grade-smoke.js', // grade-smoke driver
|
|
33
|
+
'scripts/bongos/conductor-dispatch.js', // mid-flight grader dispatch
|
|
34
|
+
'scripts/bongos/main-audit.js', // the authoritative deploy-time audit (the backstop)
|
|
35
|
+
'scripts/bongos/push-main.js', // the sanctioned main-push carrying the override
|
|
36
|
+
'scripts/bongos/run-unit-tests.js', // the unit-gate test selector
|
|
37
|
+
'scripts/bongos/install-git-hooks.js',
|
|
38
|
+
'scripts/bongos/hooks/',
|
|
39
|
+
'scripts/migrate.sh',
|
|
40
|
+
'scripts/deploy/',
|
|
41
|
+
'config/deploy.json', // the laptop/ci/bypass deploy switch
|
|
42
|
+
'infra/', // branch-protection.json + deploy substrate
|
|
43
|
+
'.github/', // CI workflows: the unit gate, secret scan, publish
|
|
44
|
+
'CODEOWNERS',
|
|
45
|
+
'.husky/', // pre-push/pre-commit gate delivery
|
|
46
|
+
'.claude/hooks/',
|
|
47
|
+
'.claude/settings.json',
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const matchesHardFloor = compileGlobMatcher(HARD_FLOOR_GLOBS);
|
|
51
|
+
|
|
52
|
+
module.exports = { HARD_FLOOR_GLOBS, matchesHardFloor };
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// that falls inside an allowlisted subtree is dropped if the denylist forbids it.
|
|
17
17
|
// isPublishable(p) == matchesDeny(p) ? false : matchesAllow(p)
|
|
18
18
|
//
|
|
19
|
-
// REUSE, NEVER RE-TYPE (the task's explicit instruction; the
|
|
19
|
+
// REUSE, NEVER RE-TYPE (the task's explicit instruction; the hard-floor.js doctrine):
|
|
20
20
|
// The three canonical sensitive-surface inventories are IMPORTED, never copied —
|
|
21
21
|
// PROTECTED_GLOBS (write-protection over trust/pipeline/infra code),
|
|
22
22
|
// HARD_FLOOR_GLOBS (the rank-independent escalate subset), and
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
// cross-checks the partition against the live inventory so it cannot silently drift.
|
|
29
29
|
|
|
30
30
|
// The three canonical sensitive-surface inventories — imported from their homes,
|
|
31
|
-
// NEVER re-typed (the
|
|
31
|
+
// NEVER re-typed (the "imported, never hand-retyped" doctrine). All
|
|
32
32
|
// three are pure to require (no DB/network at load; their CLIs are require.main-guarded).
|
|
33
33
|
const { PROTECTED_GLOBS, globToRegExp } = require('../../src/bongos/permission-path-check');
|
|
34
|
-
const { HARD_FLOOR_GLOBS } = require('./
|
|
34
|
+
const { HARD_FLOOR_GLOBS } = require('./hard-floor');
|
|
35
35
|
const { SENSITIVE_DOC_GLOBS } = require('./search-ingest-md');
|
|
36
36
|
|
|
37
37
|
// ---------------------------------------------------------------------------
|
package/scripts/bongos/pulse.js
CHANGED
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
// node scripts/bongos/pulse.js --claim-id <N>
|
|
9
9
|
//
|
|
10
10
|
// 2) Release-stale mode (V3.R49 / #268) — scan for active claims with
|
|
11
|
-
// no pulse in N hours and auto-release them.
|
|
12
|
-
// `stale-claim-release`
|
|
13
|
-
//
|
|
11
|
+
// no pulse in N hours and auto-release them. Runnable by hand for ops
|
|
12
|
+
// ONLY: the scheduled `stale-claim-release` routine was retired unscheduled
|
|
13
|
+
// in task 1004878, because nothing records pulses yet (no POST /pulse route,
|
|
14
|
+
// no hook sends one), so a timed sweep would release every claim older
|
|
15
|
+
// than the threshold.
|
|
14
16
|
// node scripts/bongos/pulse.js --release-stale [--threshold-hours 6] [--dry-run]
|
|
15
17
|
//
|
|
16
18
|
// -------------------------------------------------------------------------
|
|
@@ -51,6 +51,9 @@ const TASKS_DIR = path.join(ROOT, '.claude', 'scheduled-tasks');
|
|
|
51
51
|
const WORKFLOWS_DIR = path.join(ROOT, '.github', 'workflows');
|
|
52
52
|
|
|
53
53
|
const { parseRoutineFrontmatter } = require('./run-routine.js');
|
|
54
|
+
// The routines the always-on server fires itself (task 1004878) — the second
|
|
55
|
+
// scheduler this check reads, beside .github/workflows/.
|
|
56
|
+
const { SERVER_ROUTINES } = require('../../modules/autonomy/server-schedule.js');
|
|
54
57
|
|
|
55
58
|
// The NAMED cadences a routine may declare. The value is the period a cron
|
|
56
59
|
// expression must resolve to for the two to agree. Add a name here and
|
|
@@ -189,17 +192,32 @@ function readWorkflows(dir = WORKFLOWS_DIR) {
|
|
|
189
192
|
// `workflows === null` means "this checkout has no CI to schedule with", which
|
|
190
193
|
// downgrades unscheduled routines from violations to warnings (see the two-repo
|
|
191
194
|
// note in the header).
|
|
192
|
-
|
|
195
|
+
//
|
|
196
|
+
// `server` is the in-process scheduler (modules/autonomy/server-schedule.js): rows
|
|
197
|
+
// of { routine, cadence } the always-on server fires itself. A row there IS a
|
|
198
|
+
// scheduler, at exactly its cadence — and it travels with the core, so it fires in
|
|
199
|
+
// an instance checkout too, where there are no workflows. It is held to the same
|
|
200
|
+
// rules as a cron: the routine must declare the cadence the server realizes, and
|
|
201
|
+
// must still exist.
|
|
202
|
+
function evaluate({ withCadence, withoutCadence }, workflows, server = []) {
|
|
193
203
|
const violations = [];
|
|
194
204
|
const warnings = [];
|
|
195
205
|
const hasCI = workflows !== null;
|
|
196
206
|
const wf = workflows || [];
|
|
207
|
+
const serverRow = new Map(server.map((s) => [s.routine, s]));
|
|
197
208
|
|
|
198
209
|
for (const r of withCadence) {
|
|
199
210
|
if (!isCadence(r.cadence)) {
|
|
200
211
|
violations.push(`routine '${r.name}': unknown cadence "${r.cadence}" (want ${[...CADENCES].join('|')}, or <N>min where N divides 60)`);
|
|
201
212
|
continue;
|
|
202
213
|
}
|
|
214
|
+
const srv = serverRow.get(r.name);
|
|
215
|
+
if (srv) {
|
|
216
|
+
if (srv.cadence !== r.cadence) {
|
|
217
|
+
violations.push(`routine '${r.name}' declares cadence: ${r.cadence} but the server fires it ${srv.cadence} (modules/autonomy/server-schedule.js)`);
|
|
218
|
+
}
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
203
221
|
const firing = wf.filter((w) => invokesRoutine(w.text, r.name, r.steps));
|
|
204
222
|
if (!firing.length) {
|
|
205
223
|
const msg = `routine '${r.name}' declares cadence: ${r.cadence} but NOTHING fires it — no scheduled workflow invokes it`;
|
|
@@ -242,7 +260,24 @@ function evaluate({ withCadence, withoutCadence }, workflows) {
|
|
|
242
260
|
}
|
|
243
261
|
violations.push(...dangling);
|
|
244
262
|
|
|
263
|
+
// The server-side rename rot, and a label that lies the other way: a routine the
|
|
264
|
+
// server fires on a schedule its own SKILL.md says nothing about. Skipped where
|
|
265
|
+
// there is no routine tree at all (an instance before materialization) — there
|
|
266
|
+
// every row would read as dangling, and none of them is.
|
|
267
|
+
const serverFired = new Set();
|
|
268
|
+
if (known.size) {
|
|
269
|
+
for (const s of server) {
|
|
270
|
+
if (!known.has(s.routine)) {
|
|
271
|
+
violations.push(`modules/autonomy/server-schedule.js fires routine '${s.routine}', which has no .claude/scheduled-tasks/${s.routine}/SKILL.md`);
|
|
272
|
+
} else if (withoutCadence.some((r) => r.name === s.routine)) {
|
|
273
|
+
violations.push(`routine '${s.routine}' is fired ${s.cadence} by the server but its SKILL.md declares no cadence: — add \`cadence: ${s.cadence}\``);
|
|
274
|
+
serverFired.add(s.routine);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
245
279
|
for (const r of withoutCadence) {
|
|
280
|
+
if (serverFired.has(r.name)) continue;
|
|
246
281
|
warnings.push(`routine '${r.name}' declares no cadence: — it can only ever be run by hand`);
|
|
247
282
|
}
|
|
248
283
|
return { violations, warnings };
|
|
@@ -252,7 +287,7 @@ function evaluate({ withCadence, withoutCadence }, workflows) {
|
|
|
252
287
|
function checkRoutineCadencesScheduled() {
|
|
253
288
|
const routines = readRoutines();
|
|
254
289
|
const workflows = readWorkflows();
|
|
255
|
-
const { violations, warnings } = evaluate(routines, workflows);
|
|
290
|
+
const { violations, warnings } = evaluate(routines, workflows, SERVER_ROUTINES);
|
|
256
291
|
const scheduled = routines.withCadence.length - violations.filter((v) => v.startsWith("routine '")).length;
|
|
257
292
|
return {
|
|
258
293
|
name: 'a declared cron cadence has something that fires it (task 1003209)',
|
|
@@ -262,7 +297,7 @@ function checkRoutineCadencesScheduled() {
|
|
|
262
297
|
warnings,
|
|
263
298
|
note: violations.length
|
|
264
299
|
? 'a scheduled routine is declared but dormant — add/repair the scheduler, or drop the cadence: field and stop claiming it runs'
|
|
265
|
-
: `${scheduled}/${routines.withCadence.length} cadence-declaring routine(s) fired by a committed scheduler at the declared period; ${routines.withoutCadence.length} manual-only.`,
|
|
300
|
+
: `${scheduled}/${routines.withCadence.length} cadence-declaring routine(s) fired by a committed scheduler (a workflow or the server) at the declared period; ${routines.withoutCadence.length} manual-only.`,
|
|
266
301
|
};
|
|
267
302
|
}
|
|
268
303
|
|
|
@@ -258,6 +258,14 @@ const INTEGRATION = new Set([
|
|
|
258
258
|
// branch over a fake table; only a real engine runs the one-shot DO block and
|
|
259
259
|
// shows a legacy account published again and marked apart from a sign-in.
|
|
260
260
|
'terms_grandfather_db',
|
|
261
|
+
// task 1004863: three database halves that no lane ran. page_notes_db (the page
|
|
262
|
+
// feedback doc schema rules; modules/page-notes is live and on by default) self-skipped
|
|
263
|
+
// in the unit lane and was in no set. howto_state_db and search_isolation_db are the
|
|
264
|
+
// database halves split out of howto_state and search_isolation, whose DB-free halves
|
|
265
|
+
// stay in the unit lane: the first runs the how-to read contract on the real schema,
|
|
266
|
+
// the second proves the search index never widens a caller past their rank or into
|
|
267
|
+
// another builder memory. Each skipped in CI before, so none had ever been gated.
|
|
268
|
+
'page_notes_db', 'howto_state_db', 'search_isolation_db',
|
|
261
269
|
]);
|
|
262
270
|
|
|
263
271
|
// Excluded so this gate is trustworthy in a CLEAN checkout (the CI condition):
|
|
@@ -448,6 +456,15 @@ function discoverModuleTests({ modulesDir = MODULES_DIR, isEnabled = isModuleEna
|
|
|
448
456
|
// needed terms_accepted_at stamped: the public read requires both consent columns since
|
|
449
457
|
// ADR 0213. If one of them reds again, check the module flag is still set first.
|
|
450
458
|
//
|
|
459
|
+
// FIVE LEFT THIS LIST under task 1004863, each repaired against a freshly migrated
|
|
460
|
+
// database: copy_desk_flags_db, government_board_membership_db (builders.github_id is
|
|
461
|
+
// NOT NULL now; their rows go through insertTestBuilders in tests/helpers.mjs, and the
|
|
462
|
+
// stand-in tables that hid the drift are gone), idea_credit_streams_db and
|
|
463
|
+
// session_earnings_mirror_db (fixture rows named a version status and a task discipline
|
|
464
|
+
// the CHECK constraints no longer admit), and acclaim_feed_evidence_db, which now calls
|
|
465
|
+
// the real feed route handler instead of a sliced copy of its SQL and owns a building
|
|
466
|
+
// version rather than colliding with the seeded planning one (the oscillation above).
|
|
467
|
+
//
|
|
451
468
|
// consumer_layout_boot LEFT THIS LIST under task 1002863. Its "missing core tarball" was
|
|
452
469
|
// package-core's fail-closed leak gate reading the lane's throwaway database password (the
|
|
453
470
|
// word postgres, present in hundreds of core files) as a leaked credential and refusing to
|
|
@@ -464,11 +481,6 @@ function discoverModuleTests({ modulesDir = MODULES_DIR, isEnabled = isModuleEna
|
|
|
464
481
|
// with no blocker_ref, and db.shipTask called without the land assurance task 1002483
|
|
465
482
|
// made mandatory. Each passes alone on a freshly migrated database.
|
|
466
483
|
const INTEGRATION_PARKED = new Set([
|
|
467
|
-
'acclaim_feed_evidence_db',
|
|
468
|
-
'copy_desk_flags_db',
|
|
469
|
-
'government_board_membership_db',
|
|
470
|
-
'idea_credit_streams_db',
|
|
471
|
-
'session_earnings_mirror_db',
|
|
472
484
|
]);
|
|
473
485
|
|
|
474
486
|
function main() {
|
|
@@ -22,7 +22,7 @@ function currentBranch() {
|
|
|
22
22
|
// Task #357: keep the 3 mechanical onboarding diagrams current on every deploy.
|
|
23
23
|
// Regenerate them from live facts; if any changed, commit the refresh on this
|
|
24
24
|
// branch so it ships with the deploy. Non-fatal — a render/network hiccup must
|
|
25
|
-
// never block a ship; the
|
|
25
|
+
// never block a ship; the next render-capable ship refreshes any miss.
|
|
26
26
|
//
|
|
27
27
|
// Returns a status string ('skipped-server' | 'regen-failed' | 'current' |
|
|
28
28
|
// 'committed' | 'committed-nofatal') so the regression test (task 1046) can
|
|
@@ -35,8 +35,7 @@ function regenerateDiagrams() {
|
|
|
35
35
|
// leaving those files UNCOMMITTED in the builder's tree (had to be reverted by
|
|
36
36
|
// hand). That path must not attempt the regen at all: skip here and let a
|
|
37
37
|
// render-capable ship (the laptop path, which CAN render the PNGs) refresh them
|
|
38
|
-
// as a matched .mmd+.png+assertions set
|
|
39
|
-
// staleness in the meantime. Skipping entirely (vs --no-render) avoids committing
|
|
38
|
+
// as a matched .mmd+.png+assertions set. Skipping entirely (vs --no-render) avoids committing
|
|
40
39
|
// a .mmd/.png mismatch to main. Mirrors gen-diagrams.js's own non-fatal skip when
|
|
41
40
|
// bash itself is absent (ENOENT).
|
|
42
41
|
if (pushVia() === 'server') {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
// scripts/gds/goal-names.js — @bongos-forwarder (task 1004848). Generated by
|
|
1
|
+
// scripts/gds/hard-floor.js — @bongos-forwarder (task 1004848). Generated by
|
|
3
2
|
// scripts/bongos/codemod-rename-scripts-gds.js; do not edit.
|
|
4
|
-
// The real script is scripts/bongos/
|
|
3
|
+
// The real script is scripts/bongos/hard-floor.js. This forwarder keeps callers that still name
|
|
5
4
|
// the old path working, and warns once so they get repointed. Task 1003706 removes it.
|
|
6
5
|
'use strict';
|
|
7
|
-
require('../bongos/forwarder.js').forward(module, '
|
|
6
|
+
require('../bongos/forwarder.js').forward(module, 'hard-floor.js');
|