"""Create a disposable, clearly fictional GitHerald UI capture database. This writes no OAuth token from GitHub and calls no provider. It seeds the existing SQLite store schema so the unmodified app can render its real review and publish surfaces. Never present the rows as a generated provider result. """ import json import sqlite3 from pathlib import Path OUT = Path('/var/tmp/githerald-synthetic-fixture/githerald.db') SESSION_ID = 'synthetic-local-session-for-visual-capture' USER_ID = '900000001' REPO = 'fixture-studio/newsroom-demo' GENERATION_ID = 'synthetic-hand-authored-generation-001' session = { 'accessToken': 'synthetic-no-network-token', 'githubId': int(USER_ID), 'username': 'fictional-local-editor', 'avatarUrl': '', 'email': 'editor@example.test', } repo = { 'id': '900000002', 'fullName': REPO, 'owner': 'fixture-studio', 'name': 'newsroom-demo', 'description': 'Fictional capture repository — no GitHub connection', 'url': 'https://example.test/fixture-studio/newsroom-demo', 'defaultBranch': 'main', 'connectedAt': '2026-09-25T08:00:00.000Z', } markdown = '''# v0.2.0 — Fictional local release This draft was hand-authored for a visual fixture. No GitHub or AI provider produced it. ## Added - A clearer export path for saved release notes. - A source-activity disclosure beside the draft. ## Fixed - Empty-state wording for a new project. ''' generation = { 'id': GENERATION_ID, 'repoFullName': REPO, 'createdAt': '2026-09-25T08:15:00.000Z', 'changelog': { 'version': '0.2.0', 'date': '2026-09-25', 'entries': [ {'category': 'added', 'description': 'A clearer export path for saved release notes.'}, {'category': 'added', 'description': 'A source-activity disclosure beside the draft.'}, {'category': 'fixed', 'description': 'Empty-state wording for a new project.'}, ], 'markdown': markdown, }, 'blogPost': { 'title': 'How a fictional release note stays reviewable', 'excerpt': 'Hand-authored local fixture for a product UI study.', 'body': 'This is a **hand-authored fictional fixture**, not a provider-generated post.\n\nThe note points to a clearer export path and a source disclosure.', 'tags': ['fictional', 'release-notes'], 'markdown': '# How a fictional release note stays reviewable\n\nHand-authored local fixture. No GitHub or AI provider run occurred.\n', }, 'socialPosts': [ {'platform': 'twitter', 'content': 'Fictional local release: clearer export and a source disclosure. Hand-authored fixture.', 'hashtags': ['fictional'], 'threadParts': []}, {'platform': 'linkedin', 'content': 'This example is a hand-authored local fixture for GitHerald UI capture.', 'hashtags': [], 'threadParts': []}, {'platform': 'bluesky', 'content': 'A fictional release note for an actual UI walkthrough. No provider run.', 'hashtags': [], 'threadParts': []}, ], 'tone': 'technical', 'status': 'draft', 'sources': { 'commits': [ {'sha': 'f000000000000000000000000000000000000001', 'message': 'feat: make export clearer (fictional)', 'url': None}, {'sha': 'f000000000000000000000000000000000000002', 'message': 'fix: explain empty state (fictional)', 'url': None}, ], 'pullRequests': [ {'number': 12, 'title': 'Document the fictional review flow', 'url': None}, ], }, } OUT.unlink(missing_ok=True) db = sqlite3.connect(OUT) db.executescript(''' CREATE TABLE sessions (session_id TEXT PRIMARY KEY, data TEXT NOT NULL); CREATE TABLE repos (user_id TEXT NOT NULL, full_name TEXT NOT NULL, data TEXT NOT NULL, PRIMARY KEY (user_id, full_name)); CREATE TABLE generations (id TEXT PRIMARY KEY, user_id TEXT NOT NULL, seq INTEGER NOT NULL, status TEXT NOT NULL, data TEXT NOT NULL); CREATE INDEX generations_user_seq ON generations (user_id, seq DESC); CREATE TABLE configs (user_id TEXT PRIMARY KEY, data TEXT NOT NULL); CREATE TABLE published_changelogs (slug TEXT PRIMARY KEY, data TEXT NOT NULL); ''') db.execute('INSERT INTO sessions VALUES (?,?)', (SESSION_ID, json.dumps(session))) db.execute('INSERT INTO repos VALUES (?,?,?)', (USER_ID, REPO, json.dumps(repo))) db.execute('INSERT INTO generations VALUES (?,?,?,?,?)', (GENERATION_ID, USER_ID, 1, 'draft', json.dumps(generation))) db.commit() db.close() print(f'Wrote fictional UI fixture: {OUT}')