mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 09:56:57 +02:00
fix(review): define what a Step 5c Skip option says
Step 5c named "B) Skip" without saying what its description may claim. Two CI captures (path-eligibility on131d43be, index-flags on4643cb85) offered a Skip whose description added effects beyond declining: "The extraction can be applied in a later editing review pass" and "replacing the invalidated prior Skip". Those read as change commitments, so the no-change actor refused both. Step 5c now says to describe Skip only as no code/index change with the Skip recorded; adjacent lines are compacted so the review parity caps hold unchanged. Both exact packets are kept as a free regression: still refused, and accepted once Skip follows the rule. The actor's classifier is unchanged.
This commit is contained in:
1 parent
cc044e5f89
commit
f02636f05e
4 files changed
+86
-9
No files matched your search
@@ -6,7 +6,7 @@ import * as path from 'node:path';
|
||||
import { execFileSync, spawnSync } from 'node:child_process';
|
||||
import {
|
||||
createSharedInteractiveToolHandler, createSharedLibsFixture, fixtureGit, fixtureWrite, installSourceShims,
|
||||
installHostileGitConfig, isGuardedGitRequest, standaloneInstructions, SHARED_LIBS_ROOT, readRequests, seedOpportunitySources, sharedReadOnlyViolations, shellQuote, snapshotFixture, type SharedLibsFixture,
|
||||
installHostileGitConfig, isGuardedGitRequest, reviewLifecycleInstructions, standaloneInstructions, SHARED_LIBS_ROOT, readRequests, seedOpportunitySources, sharedReadOnlyViolations, shellQuote, snapshotFixture, type SharedLibsFixture,
|
||||
SharedCaptureAccumulator, type SharedCaptureAttempt, isInternalClaudeGitRequest, SHARED_LIBS_OLDER_OPEN_PRS, incompleteFirstFileView,
|
||||
} from './helpers/shared-libs-eval-fixture';
|
||||
import { EvalCollector, type EvalTestEntry } from './helpers/eval-store';
|
||||
@@ -14,6 +14,7 @@ import { collectorOutcomeCounts } from '../scripts/test-paid-shards';
|
||||
import { E2E_TOUCHFILES, GLOBAL_TOUCHFILES, selectTests } from './helpers/touchfiles';
|
||||
import nativeNoChangeCases from './fixtures/shared-libs-no-change-ci-public.json';
|
||||
import r44 from './fixtures/shared-libs-index-flags-r44-packets.json';
|
||||
import skipDescriptions from './fixtures/shared-libs-index-flags-skip-description-public.json';
|
||||
import { seedPathReviewPrerequisites, checkPathReviewPrerequisites } from './helpers/shared-libs-path-fixture';
|
||||
|
||||
const cleanup: string[] = [];
|
||||
@@ -72,6 +73,27 @@ describe('shared-code Git guard', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('review Skip option description', () => {
|
||||
test.each(skipDescriptions.cases)('Step 5c limits Skip to its own effect; the $scenario capture narrated more and stays refused', async ({ input }) => {
|
||||
const rule = 'B) Skip (describe only as: no code/index change; Skip recorded)';
|
||||
expect(fs.readFileSync(path.join(SHARED_LIBS_ROOT, 'review/SKILL.md'), 'utf8')).toContain(rule);
|
||||
const workflow = fs.readFileSync(reviewLifecycleInstructions({ root: scratch() } as SharedLibsFixture), 'utf8');
|
||||
expect(workflow.slice(workflow.indexOf('### Step 5c'), workflow.indexOf('### Step 5d'))).toContain(rule);
|
||||
const refusals: Error[] = [];
|
||||
const handler = () => createSharedInteractiveToolHandler('skip', { nonQuestion: () => { throw new Error('unexpected tool'); },
|
||||
onQuestion: () => {}, onAnswer: () => {}, onRefusal: error => { refusals.push(error); } });
|
||||
const skip = input.questions[0].options.find(option => option.label.startsWith('Skip'))!;
|
||||
expect(skip.description).toMatch(/can be applied in a later|replacing the invalidated prior Skip/);
|
||||
await expect(handler()('AskUserQuestion', input)).rejects.toThrow('No unambiguous no-change option');
|
||||
expect(refusals).toHaveLength(1);
|
||||
const ruled = structuredClone(input);
|
||||
ruled.questions[0].options.find(option => option.label.startsWith('Skip'))!.description = 'No code/index change; Skip recorded.';
|
||||
const answer = await handler()('AskUserQuestion', ruled);
|
||||
expect(answer.updatedInput.answers).toEqual({ [ruled.questions[0].question]: ruled.questions[0].options.find(option => option.label.startsWith('Skip'))!.label });
|
||||
expect(refusals).toHaveLength(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('shared-code legacy interactive actor', () => {
|
||||
test('R58 acknowledges the exact removed-filter Skip packet without authorizing its recommended fix', async () => {
|
||||
const input = {
|
||||
|
||||
Reference in new issue
Block a user