mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-28 02:44:38 +01:00
fix(evals): tpa-absent-linux accepts instructions the user follows themselves as the manual option
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
29fa9b67e4
commit
6f327370b4
6 files changed
+33
-3
No files matched your search
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"source": "https://github.com/garrytan/gstack/actions/runs/39166935531/job/117794218422 (eval slice 14, tpa-absent-linux, claude-opus-5-5, 2026-10-18)",
|
||||
"recordedFailure": "expect(received).toMatch(/manual/i)",
|
||||
"assistantText": "The policy says to run the Aside readiness probe before asking anything, so I'll run it exactly as written.\nThe Aside browser check returned `NEEDS_ASIDE: Linux`, so it isn't available here. Aside only runs on macOS, so I'm leaving it out of the options and not suggesting you install it. I haven't opened any browser yet.\n\n**Question:** You want a test-mode API token created in the Acme vendor dashboard at **https://dashboard.acme.test**. How should I do that?\n\n- **B)** I drive it in gstack's own visible browser. When the dashboard asks you to sign in, I hand the window to you and wait until you say \"done\". After the token is created, you copy it with the dashboard's own copy button, so I never see it in chat.\n- **C)** I give you step-by-step instructions to do it yourself.\n- **D)** Put this off for now. The token step stays blocked until you do it.\n\nYour answer applies to this task only. I've stopped here and will wait for your choice."
|
||||
}
|
||||
@@ -184,6 +184,7 @@ export const FREE_FIXTURES: Readonly<Record<string, readonly string[]>> = {
|
||||
'test/fixtures/pregate-timing/**': ['test/pregate-timing.test.ts'],
|
||||
'test/fixtures/skillify-narration/**': ['test/skill-fixture.test.ts'],
|
||||
'test/fixtures/test-value-seam-evidence.json': ['test/test-value-bar.test.ts'],
|
||||
'test/fixtures/third-party-actions-manual-wording.json': ['test/third-party-actions.test.ts'],
|
||||
'test/fixtures/third-party-actions-pitch-captures.json': ['test/third-party-actions.test.ts'],
|
||||
'test/fixtures/third-party-actions-recovery-public.json': ['test/third-party-actions-recording.test.ts', 'test/third-party-actions.test.ts'],
|
||||
'test/fixtures/touchfile-moved-code/**': ['test/touchfiles.test.ts'],
|
||||
|
||||
@@ -34,3 +34,9 @@ export function asideDriveOptions(text: string): string[] {
|
||||
return /\bAside\b/.test(option) && /\b(?:drive|driving|browse|browsing|navigate|click)\b/i.test(currentOffer);
|
||||
});
|
||||
}
|
||||
|
||||
/** The manual option: "manual", or one sentence offering instructions or steps the user follows themselves. */
|
||||
export function offersManualSteps(text: string): boolean {
|
||||
return /manual/i.test(text) || text.split(/[.!?](?:\s|$)|\n/).some(sentence => /\b(?:instructions?|steps?)\b/i.test(sentence) &&
|
||||
(/\byourself\b/i.test(sentence) || (/\bby\s+hand\b/i.test(sentence) && /\byour?\b/i.test(sentence))));
|
||||
}
|
||||
@@ -30,7 +30,7 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as os from 'os';
|
||||
import { runSkillTest, type SkillTestResult } from './helpers/session-runner';
|
||||
import { asideDownloadPitch, asideDriveOptions } from './helpers/third-party-actions';
|
||||
import { asideDownloadPitch, asideDriveOptions, offersManualSteps } from './helpers/third-party-actions';
|
||||
import { resolveEvalModel } from '../lib/eval-model';
|
||||
import {
|
||||
ROOT, describeIfSelected, testIfSelected, createEvalCollector,
|
||||
@@ -219,7 +219,7 @@ describeIfSelected('third-party-actions consent gate', [
|
||||
// the detected case; here agents legitimately either re-letter from A or
|
||||
// keep the contract's B/C/D lettering with A dropped (observed live).
|
||||
expect(text).toMatch(/\b[A-D]\)/);
|
||||
expect(text).toMatch(/manual/i);
|
||||
expect(offersManualSteps(text)).toBe(true);
|
||||
// The gstack drive is the universal fallback — it must be on offer.
|
||||
expect(text).toMatch(/gstack('s| own| drive)|\$B|headed|visible browser/i);
|
||||
} finally { cleanup(); }
|
||||
|
||||
@@ -25,7 +25,8 @@ import { marked } from "marked";
|
||||
import { generateThirdPartyActions } from "../scripts/resolvers/third-party-actions";
|
||||
import { generateAsideSetup } from "../scripts/resolvers/aside";
|
||||
import { HOST_PATHS } from "../scripts/resolvers/types";
|
||||
import { asideDownloadPitch, asideDownloadPitchCount, asideDriveOptions } from './helpers/third-party-actions';
|
||||
import { asideDownloadPitch, asideDownloadPitchCount, asideDriveOptions, offersManualSteps } from './helpers/third-party-actions';
|
||||
import manualWording from './fixtures/third-party-actions-manual-wording.json';
|
||||
import recoveryFixture from './fixtures/third-party-actions-recovery-public.json';
|
||||
import pitchCaptures from './fixtures/third-party-actions-pitch-captures.json';
|
||||
import { expectMentions, expectTokens } from './helpers/prompt-structure';
|
||||
@@ -493,3 +494,19 @@ describe("NEEDS_ASIDE: Darwin download pitch detector", () => {
|
||||
expect(asideDownloadPitchCount('Download Aside (macOS 15+) at aside.com; open, sign in, re-run. Download it at aside.com.')).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('manual-option detector', () => {
|
||||
test('the captured CI 39166935531 tpa-absent-linux reply offers manual steps', () => {
|
||||
expect(manualWording.recordedFailure).toContain('/manual/i');
|
||||
expect(manualWording.assistantText).not.toMatch(/manual/i);
|
||||
expect(offersManualSteps(manualWording.assistantText)).toBe(true);
|
||||
expect(asideDriveOptions(manualWording.assistantText)).toEqual([]);
|
||||
});
|
||||
test('only an offer of instructions the user follows themselves counts beside "manual"', () => {
|
||||
for (const text of ['C) manual instructions', 'C) I give you step-by-step instructions to do it yourself.',
|
||||
'C) I list the steps so you can do them by hand.']) expect(offersManualSteps(text), text).toBe(true);
|
||||
const withoutC = manualWording.assistantText.split('\n').filter(line => !line.includes('**C)**')).join('\n');
|
||||
for (const text of [withoutC, 'C) I do it myself in the dashboard.', 'D) Defer, and do it yourself later.',
|
||||
'I followed the steps by hand earlier.', 'The steps are done. Check it yourself.']) expect(offersManualSteps(text), text).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user