mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-22 04:40:44 +02:00
test: onboarding tombstone + Phase 2 pin relocations
New test/onboarding-moved-literals.test.ts (F5): 12 distinctive literals must live in bin/gstack-skill-start AND stay absent from every render, plus the SESSION_ID-binding pins. ~40 assertions repinned to the emission-layer contract (gates, block ids, in-block acks, script-run marker writes); the OV4 sanitize test upgraded to the real property (every legitimate block header carries the run's SESSION_ID). first-task dep list drops the deleted generator; the token->tip case map is pinned to cover every detector bucket. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
a57fef299c
commit
d2ac837773
@@ -108,9 +108,19 @@ describe('Writing Style preamble section', () => {
|
||||
expect(out).toContain('AskUserQuestion Format');
|
||||
});
|
||||
|
||||
test('tier 2+ preamble migration-prompt block appears', () => {
|
||||
const out = generatePreamble(makeCtx('claude', 2));
|
||||
expect(out).toContain('WRITING_STYLE_PENDING');
|
||||
expect(out).toMatch(/writing-style-prompt-pending/);
|
||||
test('migration prompt lives in gstack-skill-start (marker-gated emit)', () => {
|
||||
// Token-reduction Phase 2: the one-time V0→V1 migration prompt left the
|
||||
// rendered preamble; bin/gstack-skill-start computes the gate from the
|
||||
// marker files and emits it as a GSTACK_INSTRUCTION block, with the ack
|
||||
// (clear pending + set prompted) carried INSIDE the block for the model
|
||||
// to run after the interaction. The prompt text itself is pinned by
|
||||
// test/onboarding-moved-literals.test.ts (tombstone).
|
||||
expect(SKILL_START_SCRIPT).toContain(
|
||||
'if [ -f "$_GH/.writing-style-prompt-pending" ] && [ ! -f "$_GH/.writing-style-prompted" ]',
|
||||
);
|
||||
expect(SKILL_START_SCRIPT).toContain('_emit_block writing-style-migration');
|
||||
expect(SKILL_START_SCRIPT).toContain(
|
||||
'rm -f "$_GH/.writing-style-prompt-pending" && touch "$_GH/.writing-style-prompted"',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user