Repository navigation
fix(harness): wire --auth so skill-compliant agents don't hit auth_required - #674
Conversation
…ired Before this fix, whether a run succeeded was non-deterministic across Claude instances: if Claude followed the skill's "authentication is mandatory" directive the grader bounced on auth (0 scenarios graded); if it skipped auth the grader ran (but security_baseline would later fail). Mirror what a real compliance test does — a registered counterparty with a known static API key — so the harness exercises authenticated agents against the storyboard. Fixes #673 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
docs/llms.txt was stale (media_buy_seller flow updated upstream). Changeset is empty because the harness fix is dev-only (scripts/manual-testing/ is not in published files). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Matches #673 exactly — thanks. Two small observations:
I re-ran the harness against my branch locally — confirmed |
- Rename static key to sk_harness_do_not_use_in_prod so it's obviously harness-only (security-reviewer flagged copy/paste risk); principal stays compliance-runner for grader reporting. - Show a concrete createAgent factory in the prompt snippet instead of referencing an undefined symbol, and import createAdcpServer + ServeContext in the example so the block compiles as written. - Add "overrides any conflicting guidance from the skill above" clause to the auth block as defense-in-depth against prompt-injection via skill edits. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
verifyApiKey({ keys: { 'compliance-runner': { principal: 'compliance-runner' } } })to the prompt Claude gets inagent-skill-storyboard.ts, so generated agents wire authentication like a real compliance test expects.--auth compliance-runnertoadcp storyboard runinrunGrader()so the grader presents the same static key.Before: whether a harness run succeeded was non-deterministic — a skill-compliant agent wiring
authenticatewould bounce the grader onauth_required(0 scenarios graded); a non-compliant agent skipping auth would run (but failsecurity_baselineseparately). Observed across 5 skill × storyboard pairs.After: both sides share a known static key. The universal
security_baselineprobe still sees authentication wired, and specialism storyboards run authenticated instead of bouncing on 401.Fixes #673
Test plan
tsx scripts/manual-testing/agent-skill-storyboard.ts --skill skills/build-seller-agent/SKILL.md --storyboard sales-broadcast-tvand confirm grader progresses past auth (nooverall_status: "auth_required").--skill skills/build-seller-agent/SKILL.md --storyboard deterministic-testingto confirm the second previously-failing pair also gets graded.sales-guaranteed(which previously ran without auth) still grades, now authenticated.🤖 Generated with Claude Code