mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-08 17:58:13 +01:00
fix: pre-landing review fixes
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
667064a375
commit
f00c84d95c
3 files changed
+11
-7
No files matched your search
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
### Tests
|
||||
- `test/honesty-kernel.test.ts` no longer requires the Step 16 pointer. It now rejects any `Step <n>` cross-reference in the kernel, which every skill renders.
|
||||
- `test/resolver-ask-user-format.test.ts` checks that item 1 states the unattended pending set with no section or block pointer (no "Unattended session block", no "per its printed"). It also checks that the failure fallback's `unattended` branch keeps destructive or irreversible options pending, and that the printed `unattended-session` block and the hook's unattended directive say the same. `test/auq-error-fallback-hook.test.ts` asserts the hook's unattended directive no longer says "Unattended session block".
|
||||
- `test/resolver-ask-user-format.test.ts` checks that item 1 states the unattended pending set with no section or block pointer (no "Unattended session block", no "per its printed"). It also checks that the failure fallback's `unattended` branch keeps destructive or irreversible options pending, and that the hook's unattended directive says the same. `test/gstack-skill-start.test.ts` checks that the block gstack-skill-start actually prints keeps destructive or irreversible options pending for every skill it samples. `test/auq-error-fallback-hook.test.ts` asserts the hook's unattended directive no longer says "Unattended session block".
|
||||
- `test/plan-reality.test.ts` checks that the reality-rows block for the eng and ceo phases says its `gstack-plan-reality check` line prints `PLAN_REALITY`.
|
||||
- 89 pins in `test/fixtures/skill-md-size-allowlist.json` were moved to their new exact sizes, and every pin went down. 78 went down by 62 characters. The 11 non-Claude plan-eng-review pins went down by 38, because they also inline the 24-character "prints `PLAN_REALITY`" pointer from `review-sections.md`. Both figures already include the destructive/irreversible carve-out the fallback branch keeps. The /ship goldens were regenerated.
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { generatePreamble } from '../scripts/resolvers/preamble';
|
||||
import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types';
|
||||
import { expectMentions } from './helpers/prompt-structure';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
const START = path.join(ROOT, 'bin', 'gstack-skill-start');
|
||||
@@ -389,6 +390,7 @@ describe('gstack-skill-start behavior', () => {
|
||||
for (const text of Object.values(blocks)) {
|
||||
expect(text).not.toContain('skill=<name>');
|
||||
expect(text).toMatch(/never choose them/);
|
||||
expectMentions(text, [['destructive', 'irreversible', 'pending']], 'printed unattended-session block');
|
||||
expect(text).toMatch(/never approve a gate/);
|
||||
expect(text).toMatch(/never publish, push, sync or send data off this machine/);
|
||||
}
|
||||
|
||||
@@ -219,6 +219,12 @@ describe('generateAskUserFormat — runtime-failure prose fallback', () => {
|
||||
['destructive', 'irreversible', 'pending'],
|
||||
['consent', 'unrecommended question', 'approval gate', 'pending'],
|
||||
], `${skillName} unattended fallback branch`);
|
||||
// Generated by /ship Step 7 coverage audit pass 1 (GSTA-91, PR #3421).
|
||||
// Value: protects=the failure fallback's unattended branch states its rule with no pointer to a section the reader
|
||||
// never sees; fails_when=the "(Unattended session block)" pointer returns to that branch; why_new=CQ3 reads item 1
|
||||
// only and the hook test reads the hook only; seam=none; no_claim=model behaviour after an AUQ failure (unit only)
|
||||
expect(unattended).not.toContain('Unattended session block');
|
||||
expect(unattended).not.toContain('per its printed');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -377,12 +383,8 @@ describe('CQ3 — Tool resolution item 1 states the unattended rule with no sect
|
||||
}
|
||||
});
|
||||
|
||||
describe('CQ4 — the printed unattended-session block and the hook directive keep destructive or irreversible options pending', () => {
|
||||
test('the printed unattended-session block and the hook directive agree with the resolver fallback', () => {
|
||||
const startSrc = fs.readFileSync(path.resolve(__dirname, '..', 'bin', 'gstack-skill-start'), 'utf-8');
|
||||
const block = /_emit_block unattended-session <<EOI\n([\s\S]*?)\nEOI/.exec(startSrc)?.[1] ?? '';
|
||||
expect(block, 'gstack-skill-start must emit the unattended-session block').not.toBe('');
|
||||
expectMentions(block, [['destructive', 'irreversible', 'pending']], 'unattended-session block');
|
||||
describe('CQ4 — the hook directive keeps destructive or irreversible options pending', () => {
|
||||
test('directiveFor(unattended) names destructive or irreversible options as pending', () => {
|
||||
expectMentions(directiveFor('unattended'), [['destructive', 'irreversible', 'pending']], 'hook unattended directive');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user