From 142757b107edeffff7c78453490c4d2786996fa7 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sun, 1 Nov 2026 18:36:18 +0000 Subject: [PATCH] test: qa-caller-authority's template adapter applies IF_SESSION guards like gen-skill-docs Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/qa-caller-authority.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/qa-caller-authority.test.ts b/test/qa-caller-authority.test.ts index 72d68db1e..13b302c51 100644 --- a/test/qa-caller-authority.test.ts +++ b/test/qa-caller-authority.test.ts @@ -4,6 +4,7 @@ import { join } from 'node:path'; import { ALL_HOST_CONFIGS } from '../hosts'; import { RESOLVERS } from '../scripts/resolvers'; import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types'; +import { applySessionGuards } from '../scripts/resolvers/unattended'; import { qaProbeNames } from './helpers/qa-probe-names'; const root = join(import.meta.dir, '..'); @@ -14,7 +15,7 @@ function context(host: string, skillName: string): TemplateContext { } function render(file: string, ctx: TemplateContext): string { - let body = readFileSync(join(root, file), 'utf8'); + let body = applySessionGuards(readFileSync(join(root, file), 'utf8'), ctx); for (let pass = 0; pass < 10; pass++) { const next = body.replace(/\{\{([A-Z_]+)(?::([^}]+))?\}\}/g, (_match, name, args) => { if (!RESOLVERS[name]) throw new Error(`Unknown resolver ${name}`);