mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-16 17:22:12 +08:00
merge: incorporate origin/main into community-mode branch
Resolved 10 conflicted files:
- VERSION/package.json: kept 0.12.0.0 (feature branch version)
- CHANGELOG.md: preserved both branch entry and main's new entries
- supabase/config.sh: kept GSTACK_WEB_URL, accepted TELEMETRY_ENDPOINT removal
- bin/gstack-{community-dashboard,telemetry-log,telemetry-sync,update-check}:
took main's improved versions (edge function approach, safe cursor, UUID gen)
- supabase/functions/community-pulse: took main's count-based approach
- test/telemetry.test.ts: took main's structure with fingerprint field name
Post-merge fixes:
- Removed shadowed local RESOLVERS/functions in gen-skill-docs.ts (main's
resolver imports now take precedence for tier-based preamble, coverage gates)
- Added 3 missing E2E_TIERS entries (ship-plan-*, review-plan-completion)
- Updated telemetry test to match current prompt text
- Regenerated all SKILL.md files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,8 +78,9 @@ describe('gstack-telemetry-log', () => {
|
||||
|
||||
const events = parseJsonl();
|
||||
expect(events).toHaveLength(1);
|
||||
// install_fingerprint should be a UUID (lowercase)
|
||||
expect(events[0].install_fingerprint).toMatch(/^[a-f0-9-]{36}$/);
|
||||
// install_fingerprint should be a UUID v4 (or hex fallback)
|
||||
expect(events[0].install_fingerprint).toMatch(/^[a-f0-9-]{32,36}$/);
|
||||
|
||||
});
|
||||
|
||||
test('includes install_fingerprint for anonymous tier (not null — UUID is not PII)', () => {
|
||||
@@ -306,16 +307,32 @@ describe('gstack-analytics', () => {
|
||||
});
|
||||
|
||||
describe('gstack-telemetry-sync', () => {
|
||||
test('exits silently with no endpoint configured', () => {
|
||||
// Default: GSTACK_TELEMETRY_ENDPOINT is not set → exit 0
|
||||
test('exits silently with no Supabase URL configured', () => {
|
||||
// Default: GSTACK_SUPABASE_URL is not set → exit 0
|
||||
const result = run(`${BIN}/gstack-telemetry-sync`);
|
||||
expect(result).toBe('');
|
||||
});
|
||||
|
||||
test('exits silently with no JSONL file', () => {
|
||||
const result = run(`${BIN}/gstack-telemetry-sync`, { GSTACK_TELEMETRY_ENDPOINT: 'http://localhost:9999' });
|
||||
const result = run(`${BIN}/gstack-telemetry-sync`, { GSTACK_SUPABASE_URL: 'http://localhost:9999' });
|
||||
expect(result).toBe('');
|
||||
});
|
||||
|
||||
test('does not rename JSONL field names (edge function expects raw names)', () => {
|
||||
setConfig('telemetry', 'anonymous');
|
||||
run(`${BIN}/gstack-telemetry-log --skill qa --duration 60 --outcome success --session-id raw-fields-1`);
|
||||
|
||||
const events = parseJsonl();
|
||||
expect(events).toHaveLength(1);
|
||||
// Edge function expects these raw field names, NOT Postgres column names
|
||||
expect(events[0]).toHaveProperty('v');
|
||||
expect(events[0]).toHaveProperty('ts');
|
||||
expect(events[0]).toHaveProperty('sessions');
|
||||
// Should NOT have Postgres column names
|
||||
expect(events[0]).not.toHaveProperty('schema_version');
|
||||
expect(events[0]).not.toHaveProperty('event_timestamp');
|
||||
expect(events[0]).not.toHaveProperty('concurrent_sessions');
|
||||
});
|
||||
});
|
||||
|
||||
describe('gstack-community-dashboard', () => {
|
||||
|
||||
Reference in New Issue
Block a user