@bongos/core 1.19.332 → 1.19.334

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/.bongos-core.json +173 -43
  2. package/docs/adr/0187-oauth-handshake-cookie-lifetime.md +84 -0
  3. package/docs/adr/README.md +1 -0
  4. package/docs/api/openapi.json +2 -2
  5. package/docs/api-reference.md +1 -1
  6. package/docs/copy-inventory.md +202 -202
  7. package/docs/copy-registry.json +384 -384
  8. package/modules/grading/grader-config.js +98 -0
  9. package/modules/grading/grader-model.js +150 -0
  10. package/modules/grading/grader-prompt.js +139 -0
  11. package/modules/grading/grader-score.js +706 -0
  12. package/modules/grading/grader-subagent.js +328 -0
  13. package/modules/grading/grader.js +5 -1287
  14. package/modules/hall-ui/public/builders.js +19 -1182
  15. package/modules/hall-ui/public/goals-page.js +11 -997
  16. package/modules/hall-ui/public/goals-render.js +1032 -0
  17. package/modules/hall-ui/public/goals.html +4 -0
  18. package/modules/hall-ui/public/hall-render.js +1211 -0
  19. package/modules/hall-ui/public/index.html +6 -0
  20. package/modules/lifecycle/routes/goal-route-authz.js +400 -0
  21. package/modules/lifecycle/routes/goals.js +1 -367
  22. package/modules/lifecycle/routes/task-route-helpers.js +219 -0
  23. package/modules/lifecycle/routes/task-write-routes.js +542 -0
  24. package/modules/lifecycle/routes/tasks.js +3 -696
  25. package/package-lock.json +2 -2
  26. package/package.json +1 -1
  27. package/scripts/gds/box-infra.js +280 -0
  28. package/scripts/gds/box.js +1 -245
  29. package/scripts/gds/fitness-checks-identity.js +320 -0
  30. package/scripts/gds/fitness-checks-vocabulary.js +230 -0
  31. package/scripts/gds/fitness-checks-write-validation.js +144 -0
  32. package/scripts/gds/fitness-lib.js +82 -0
  33. package/scripts/gds/fitness.js +55 -668
  34. package/scripts/gds/provision-config.js +204 -0
  35. package/scripts/gds/provision-net.js +221 -0
  36. package/scripts/gds/provision-repo.js +849 -0
  37. package/scripts/gds/provision-units.js +262 -0
  38. package/scripts/gds/provision.js +4 -1395
  39. package/src/bongos/auth-admission.js +264 -0
  40. package/src/bongos/auth-config.js +151 -0
  41. package/src/bongos/auth-discord.js +198 -0
  42. package/src/bongos/auth-github.js +336 -0
  43. package/src/bongos/auth-idp.js +330 -0
  44. package/src/bongos/auth.js +5 -1100
  45. package/src/bongos/routes/auth.js +54 -10
  46. package/src/module-api.js +5 -1
  47. package/tests/auth_admission_gate.mjs +3 -1
  48. package/tests/auth_web_recovery.mjs +63 -0
  49. package/tests/est_advisory.mjs +3 -1
  50. package/tests/goal_advisory.mjs +3 -2
  51. package/tests/goal_criterion_confirm_ui.mjs +6 -0
  52. package/tests/goal_subtitle.mjs +5 -2
  53. package/tests/goals_card_view.mjs +10 -3
  54. package/tests/grader_generated_provenance.mjs +3 -1
  55. package/tests/hall_palette.mjs +3 -1
  56. package/tests/helpers.mjs +58 -25
  57. package/tests/lib_sh_resolution.mjs +3 -1
  58. package/tests/membership_kind_lockstep.mjs +3 -1
  59. package/tests/migration_allocation.mjs +5 -2
  60. package/tests/patch_gate_ordering.mjs +3 -1
  61. package/tests/rank_tier_single_source.mjs +16 -3
  62. package/tests/reward_gate.mjs +3 -2
@@ -124,9 +124,18 @@ test('static ladder copies carry the exact canonical ladder', () => {
124
124
  }
125
125
  });
126
126
 
127
- const STATIC_MAP_FILES = ['modules/hall-ui/public/builders.js', 'modules/hall-ui/public/goals-page.js'];
127
+ // task 1003206 carved the hall page scripts up; the rank tier maps travelled with
128
+ // the renderers that read them, so the pin and the allowlist follow the code.
129
+ const HALL_SCRIPTS = ['modules/hall-ui/public/builders.js', 'modules/hall-ui/public/goals-page.js',
130
+ 'modules/hall-ui/public/hall-render.js', 'modules/hall-ui/public/goals-render.js'];
131
+ // Filtered INSIDE the test, not at module scope: extractRankMaps is declared
132
+ // further down, so calling it up here is a temporal-dead-zone crash.
133
+ const staticMapFiles = () => HALL_SCRIPTS.filter(
134
+ (rel) => extractRankMaps(fs.readFileSync(path.join(ROOT, rel), 'utf8')).length > 0);
128
135
  test('hall static tier maps match the kernel map', () => {
129
- for (const rel of STATIC_MAP_FILES) {
136
+ const files = staticMapFiles();
137
+ assert.ok(files.length > 0, 'at least one hall script must carry the tier map');
138
+ for (const rel of files) {
130
139
  const src = fs.readFileSync(path.join(ROOT, rel), 'utf8');
131
140
  const maps = extractRankMaps(src);
132
141
  assert.ok(maps.length > 0, `${rel}: expected a rank tier map`);
@@ -146,7 +155,11 @@ const MAP_ALLOWLIST = new Set([
146
155
  'scripts/gds/box-connect-lib.js',
147
156
  'modules/dev-box/boxes.js',
148
157
  'modules/hall-ui/public/builders.js',
149
- 'modules/hall-ui/public/goals-page.js',
158
+ // task 1003206 carved the hall page scripts up. builders.js KEPT its map (the
159
+ // renderers read it through the injected ctx), while goals-page.js's travelled
160
+ // into goals-render.js — so goals-page.js is pruned and hall-render.js is never
161
+ // added. The allowlist fails on a stale entry, which is the check working.
162
+ 'modules/hall-ui/public/goals-render.js',
150
163
  ]);
151
164
  // Where a rank-ladder array literal is allowed to exist.
152
165
  const LADDER_ALLOWLIST = new Set([
@@ -25,7 +25,7 @@ const db = require('../modules/lifecycle/db.js');
25
25
  // the SAME singleton object db.js captured, so mutating its .query stubs the INSERT
26
26
  // createTask runs — no database needed.
27
27
  const sharedPool = require('../src/module-api.js').pool;
28
- import { lifecycleDbSource } from './helpers.mjs';
28
+ import { lifecycleDbSource, taskRoutesSource } from './helpers.mjs';
29
29
 
30
30
  const __dir = dirname(fileURLToPath(import.meta.url));
31
31
  const root = join(__dir, '..');
@@ -132,7 +132,8 @@ t('null task is a no-op (no throw, no assignment)', () => {
132
132
  // ---------------------------------------------------------------------------
133
133
  console.log('\nenforcement points (source-wiring — AUTO-ASSIGN):');
134
134
 
135
- const tasksRouteSrc = readFileSync(join(root, 'modules/lifecycle/routes/tasks.js'), 'utf8');
135
+ // task 1003206: POST /tasks now lives in task-write-routes.js — read the family.
136
+ const tasksRouteSrc = taskRoutesSource();
136
137
  // task 1003204: the lifecycle data layer is db.js + db-*.js now — read the family.
137
138
  const dbSrc = lifecycleDbSource();
138
139
  const migration178 = readFileSync(join(root, 'migrations/178_reward_gate_auto_assign_revert_autopromote.sql'), 'utf8');