mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-13 11:57:19 +01:00
fix(state-root): taste-profile legacy fallback globs $GSTACK_STATE_ROOT designs
The legacy approved.json fallback in {{TASTE_PROFILE}} (design-consultation,
design-shotgun) named the literal ~/.gstack/projects path while the approval
writers use $GSTACK_STATE_ROOT/projects/$SLUG/designs.
Allowlist: drops the design.ts PENDING row.
Pin (W7a): design-consultation-contract's exact glob string becomes a
meaning-level check (legacy fallback names the state-root designs dir and
approved.json, and no ~/.gstack literal).
This commit is contained in:
1 parent
b7a1d77050
commit
10d8c1c027
3 files changed
+5
-3
No files matched your search
@@ -1410,7 +1410,7 @@ fonts [top-3], colors [top-3], layouts [top-3], aesthetics [top-3]. Bias
|
||||
generation toward these unless the user explicitly requests a different direction.
|
||||
Also avoid their strong rejections: [top-3 rejected per dimension]."
|
||||
|
||||
**Legacy fallback:** Glob \`~/.gstack/projects/$SLUG/designs/**/approved.json\`; Read the five newest. Use explicit feedback only, never infer fonts/colors from variant letters. No usable files: continue without a taste profile.
|
||||
**Legacy fallback:** Glob \`$GSTACK_STATE_ROOT/projects/$SLUG/designs/**/approved.json\` (resolve the root with gstack-paths); Read the five newest. Use explicit feedback only, never infer fonts/colors from variant letters. No usable files: continue without a taste profile.
|
||||
|
||||
**Conflict handling:** If the current user request contradicts a strong persistent
|
||||
signal (e.g., "make it playful" when taste profile strongly prefers minimal), flag
|
||||
|
||||
@@ -193,7 +193,10 @@ test('taste context has defined count and bounded legacy and malformed-profile f
|
||||
expect(text).not.toContain('head -200');
|
||||
expect(text).toContain('Count retained sessions (at most 50, not lifetime)');
|
||||
expect(text).toContain('malformed/unreadable uses the legacy fallback');
|
||||
expect(text).toContain('Glob `~/.gstack/projects/$SLUG/designs/**/approved.json`');
|
||||
const legacy = text.slice(text.indexOf('**Legacy fallback:**'), text.indexOf('**Conflict handling:**'));
|
||||
expect(legacy).toContain('$GSTACK_STATE_ROOT/projects/$SLUG/designs/');
|
||||
expect(legacy).toContain('approved.json');
|
||||
expect(legacy).not.toContain('~/.gstack');
|
||||
expect(text).toContain('Read the five newest');
|
||||
expect(text).toContain('No usable files: continue without a taste profile');
|
||||
expect(text).toContain('never infer fonts/colors from variant letters');
|
||||
|
||||
@@ -191,7 +191,6 @@ const STATE_ROOT_ALLOWLIST: Array<{ file: string; match: string; reason: string
|
||||
{ file: 'plan-tune/SKILL.md.tmpl', match: '`~/.gstack/projects/<slug>/question-log.jsonl` — nothing leaves your', reason: DESCRIPTION },
|
||||
{ file: 'retro/SKILL.md.tmpl', match: 'glob: "~/.gstack/projects/{repo_slug}/timeline.jsonl"', reason: MANIFEST_GLOB },
|
||||
{ file: 'retro/SKILL.md.tmpl', match: 'glob: "~/.gstack/projects/{repo_slug}/learnings.jsonl"', reason: MANIFEST_GLOB },
|
||||
{ file: 'scripts/resolvers/design.ts', match: 'Glob \\`~/.gstack/projects/$SLUG/designs/**/approved.json\\`', reason: PENDING },
|
||||
{ file: 'scripts/resolvers/learnings.ts', match: '* Learnings are stored per-project at ~/.gstack/projects/{slug}/learnings.jsonl', reason: SOURCE_COMMENT },
|
||||
{ file: 'scripts/resolvers/preamble.ts', match: 'local JSONL append to ~/.gstack/analytics/ (inline, inspectable)', reason: SOURCE_COMMENT },
|
||||
{ file: 'scripts/resolvers/preamble/generate-completion-status.ts', match: '\\`~/.gstack/analytics/\\`, matching preamble analytics writes', reason: PENDING },
|
||||
|
||||
Reference in new issue
Block a user