fix: adjust test key names to avoid redaction pattern collision

Rename testKey→testData and normalKey→displayName in storage tests
to avoid triggering #238's SENSITIVE_KEY regex (which matches 'key').
Also generate Codex variant of /cso skill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-22 09:58:32 -07:00
parent 5daba1c6e6
commit f98968aa90
2 changed files with 478 additions and 4 deletions
+4 -4
View File
@@ -386,22 +386,22 @@ describe('Cookies and storage', () => {
});
test('storage set and get works', async () => {
await handleReadCommand('storage', ['set', 'testKey', 'testValue'], bm);
await handleReadCommand('storage', ['set', 'testData', 'testValue'], bm);
const result = await handleReadCommand('storage', [], bm);
const storage = JSON.parse(result);
expect(storage.localStorage.testKey).toBe('testValue');
expect(storage.localStorage.testData).toBe('testValue');
});
test('storage read redacts sensitive keys', async () => {
await handleWriteCommand('goto', [baseUrl + '/basic.html'], bm);
await handleReadCommand('storage', ['set', 'auth_token', 'my-secret-token'], bm);
await handleReadCommand('storage', ['set', 'api_key', 'key-12345'], bm);
await handleReadCommand('storage', ['set', 'normalKey', 'normalValue'], bm);
await handleReadCommand('storage', ['set', 'displayName', 'normalValue'], bm);
const result = await handleReadCommand('storage', [], bm);
const storage = JSON.parse(result);
expect(storage.localStorage.auth_token).toMatch(/REDACTED/);
expect(storage.localStorage.api_key).toMatch(/REDACTED/);
expect(storage.localStorage.normalKey).toBe('normalValue');
expect(storage.localStorage.displayName).toBe('normalValue');
});
test('storage read redacts sensitive values by prefix', async () => {