Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: pre-landing review fixes (pass 3): pregate allowlist hashFiles arguments must be lowercase paths under src/, test/ or scripts/; ./token, src/<hex>.ts and mixed-case probes stay flagged; reason softened
garrytan43599642843d
diff --git a/.gstack/pregate.json b/.gstack/pregate.jsonindex f9c31bbbae..5c1fe0ed94 100644--- a/.gstack/pregate.json+++ b/.gstack/pregate.json@@ -135,8 +135,8 @@"paths": [".github/workflows/*.yml"],- "pattern": "pglite-snapshot-(?:default-)?\\$\\{\\{ runner\\.os \\}\\}-\\$\\{\\{ hashFiles\\('[\\w-]*[./*][\\w./*-]*'(?:, '[\\w-]*[./*][\\w./*-]*')*\\) \\}\\}$",- "reason": "GitHub Actions cache keys: the whole value is pglite-snapshot-[default-]${{ runner.os }}-${{ hashFiles('<path globs>') }} where every argument holds a '.', '/' or '*', never a credential"+ "pattern": "pglite-snapshot-(?:default-)?\\$\\{\\{ runner\\.os \\}\\}-\\$\\{\\{ hashFiles\\('(?:src|test|scripts)(?:/(?:\\*\\*|[a-z*][a-z*_-]*(?:\\.[a-z]+)?))+'(?:, '(?:src|test|scripts)(?:/(?:\\*\\*|[a-z*][a-z*_-]*(?:\\.[a-z]+)?))+')*\\) \\}\\}$",+ "reason": "GitHub Actions PGLite snapshot cache keys: the whole value is pglite-snapshot-[default-]${{ runner.os }}-${{ hashFiles(<args>) }} and every argument is a lowercase path or glob under src/, test/ or scripts/; an argument with digits, capitals or a ./ prefix is not covered and stays flagged"}]}diff --git a/test/pregate-allowlist-cache-keys.test.ts b/test/pregate-allowlist-cache-keys.test.tsindex 8966f684b8..0e2fad6214 100644--- a/test/pregate-allowlist-cache-keys.test.ts+++ b/test/pregate-allowlist-cache-keys.test.ts@@ -44,6 +44,9 @@ describe('pregate allowlist: workflow cache keys', () => {pat,"pglite-snapshot-${{ runner.os }}-${{ hashFiles('" + pat + "') }}","pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', '" + pat + "') }}",+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', './" + hex + "') }}",+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', 'src/" + hex + ".ts') }}",+ "pglite-snapshot-${{ runner.os }}-${{ hashFiles('src/*.ts', 'src/Zx9Qw8Lk2Mn4Bv6Cx1Za3Sd5Fg7Hj9Kl0Pq2Wr4.ts') }}",]) expect({ value, covered: covers(value) }).toEqual({ value, covered: false });});});