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>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-01 18:36:18 +00:00
1 parent dfeee1cbb7
commit 142757b107
1 file changed
+2 -1
+2 -1
View File
@@ -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}`);