hosted-write-eval-hints-budget-e2e.test.mjs
25 lines 1.1 KB
Raw
sha256:4215cecbbabf5591b1ff69053cc938b4b6c800f0d487be40618c1d4254d8b67b security: npm audit fix pre-bridge 2026-09-05 Human 3 days ago
1 /**
2 * HOSTED-WRITE-EVAL hints budget — Tier 3 e2e: gateway wiring passes createBody.
3 */
4 import { describe, it } from 'node:test';
5 import assert from 'node:assert/strict';
6 import { readFileSync } from 'node:fs';
7 import { fileURLToPath } from 'node:url';
8 import { dirname, join } from 'node:path';
9
10 const root = join(dirname(fileURLToPath(import.meta.url)), '..');
11
12 describe('hosted review-hints gateway wiring (e2e source)', () => {
13 it('server.mjs passes createBody into maybeScheduleHostedProposalReviewHints', () => {
14 const src = readFileSync(join(root, 'hub/gateway/server.mjs'), 'utf8');
15 assert.ok(src.includes('maybeScheduleHostedProposalReviewHints'));
16 assert.ok(/createBody:\s*bodyOut/.test(src));
17 });
18
19 it('async module exports capped budget constant', () => {
20 const src = readFileSync(join(root, 'hub/gateway/proposal-review-hints-async.mjs'), 'utf8');
21 assert.ok(src.includes('HOSTED_PROPOSAL_REVIEW_HINTS_INLINE_BUDGET_MS = 2000'));
22 assert.ok(src.includes('shouldSkipInlineReviewHintsOnCreate'));
23 assert.ok(!src.includes('budgetMs = 18000'));
24 });
25 });
File History 3 commits
sha256:4215cecbbabf5591b1ff69053cc938b4b6c800f0d487be40618c1d4254d8b67b security: npm audit fix pre-bridge 2026-09-05 Human 3 days ago
sha256:9eaa2a7ec9aaf5866cd03d0deadf843cca97778299d1857b5452f71d92a1880a feat(f24): flip DOCS_NOTION_HUB_KEY_AUTHORIZED=true (Tier 3) Human minor 16 days ago
sha256:e4c529f14a0bb908c1caaaeb3f95f3623a1a82e636e7e3722ca2cd3dc9821263 security: npm audit fix pre-bridge 2026-07-29 Human 40 days ago