hosted-write-eval-hints-budget-e2e.test.mjs
25 lines 1.1 KB
Raw
sha256:700fafdd1afa490919f9515d660ca6e75456bcd5bb67513abcd8757a634c01f6 docs: record AIP-b SD-21 land (KN #308) Human 10 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 1 commit
sha256:700fafdd1afa490919f9515d660ca6e75456bcd5bb67513abcd8757a634c01f6 docs: record AIP-b SD-21 land (KN #308) Human 10 days ago