{"slug": "never-forget-to-enter-the-stern-grove-lottery-again", "title": "Never forget to enter the Stern Grove lottery again!", "summary": "A developer built a Python script that runs weekly via GitHub Actions, scrapes the Stern Grove Music Festival website with Playwright, and auto-enters the lottery. The project was built using a coding agent and recorded with Entire, providing a complete auditable record of the development process.", "body_md": "It's summer in San Francisco, which means that every week I forget to enter the lottery for the free [Stern Grove Music Festival](https://www.sterngrove.org/).\n\nSolution? I did what any reasonable developer would do instead of just setting a calendar reminder: I built a Python script that runs weekly via GitHub Actions, scrapes the festival website with Playwright, and auto-enters the lottery for me.\n\nThe fun part is *how* I built it. I described what I wanted to a coding agent (I've done a lot of browser automation to automate tennis court bookings, make data visualizations, etc), and [Entire](https://entire.io/) recorded every prompt, tool call, and output along the way, so I have a complete, auditable record of how the whole thing came together. If you want to retrace the entire build yourself, [here's the live session](https://entire.io/gh/elizabethsiegle/stern-grove-book-python/session/f9182a78-4e6c-4c6e-9ef6-4855f3b1d9ff). Let me walk you through it:\n\nThe entire (lol) project began with a single message to my coding agent (I used Claude Code, but any agent works!) I gave it the rules of the game:\n\nThe Stern Grove lottery opens six weeks before each show at 10:00 AM and stays open for one full week to enter…\n\nI also handed it the exact HTML for the entry button. Stern Grove runs its ticketing through **Tixologi**, so the agent needed to know what it was dealing with.\n\nThen I told it about the secrets my GitHub Action would have access to:\n\nBefore writing a line of implementation, the agent explored the spec, asked one clarifying question, and proposed a clean design:\n\n`lottery.py`\n\n`browser.py`\n\n`state.py`\n\n`entered_lotteries.json`\n\nso we never double-enter`notify.py`\n\n```\n{\n  \"entered\": [\n    { \"event_id\": \"abc123\", \"show\": \"Show Name\", \"entered_at\": \"2025-06-21T10:02:00Z\" }\n  ]\n}\n```\n\nThe cron schedule lives in the workflow file:\n\n```\n# .github/workflows/lottery.yml\non:\n  schedule:\n    - cron: \"0 17 * * 1\"   # weekly check\n  workflow_dispatch:\n```\n\nHere's a step worth highlighting. Before touching any browser logic, the agent did a **live inspection** of the actual Stern Grove page — specifically `window.tixologiWidget.concerts`\n\n— to learn the real data shape rather than guessing.\n\nTixologi is a ticket and event management platform. That inspection documented the precise field names, the ISO 8601 date format, and the event ID structure. One `console log`\n\nit captured saved a lot of debugging later:\n\n```\n// What the page actually exposes\nwindow.tixologyWidget.concerts\n// → [{ eventId, name, startDate: \"2025-07-13T19:00:00Z\", ... }]\n```\n\nGrounding the implementation in real, observed data instead of assumptions is a major differentiator between code that works on the first real run and code that fails silently in production.\n\n`state.py`\n\ndoesn't just read the JSON — after a successful entry it commits and pushes the update using a GitHub Personal Access Token (PAT), so the next run knows what's already been done:\n\n``` php\ndef commit_state(token: str) -> None:\n    subprocess.run([\"git\", \"add\", \"entered_lotteries.json\"], check=True)\n    subprocess.run([\"git\", \"commit\", \"-m\", \"Update entered lotteries\"], check=True)\n    subprocess.run([\"git\", \"push\"], check=True)\n```\n\nWhen the agent added `notify.py`\n\n, a reviewer sub-agent immediately flagged two issues in the diff:\n\n`print()`\n\nstatements instead of the `logging`\n\nmodule.\n\n``` python\nimport logging\n\nlogger = logging.getLogger(__name__)\nresend.api_key = os.environ[\"RESEND_API_KEY\"]  # initialized once\n\ndef notify_success(show: str) -> None:\n    logger.info(\"Entered lottery for %s\", show)\n    resend.Emails.send({ ... })\n```\n\nThis is the part I do genuinely find handy: I didn't have to *remember* how the automation got built, because [Entire](https://docs.entire.io/web/inspect-session) captured all of it. A **session** in Entire is the complete record of an AI coding interaction, ie every prompt, response, tool call, and file change. You can browse mine at the [session link above](https://entire.io/gh/elizabethsiegle/stern-grove-book-python/session/f9182a78-4e6c-4c6e-9ef6-4855f3b1d9ff).\n\nHere's how to navigate it:\n\n`Task`\n\ntool, Entire captured it as its own session with its own transcript and tool calls, rolled up into the parent checkpoint's totals. That's exactly where you can see the review loop that flagged the `print()`\n\n/logging issue.`Entire-Checkpoint`\n\ntrailer, so you can open the matching checkpoint or the underlying commit on GitHub. The metadata itself lives on a distinct separate `entire/checkpoints/v1`\n\nbranch, which keeps your main history clean.\nSo the screencast you're watching isn't the only record-- the full reasoning behind every line is sitting in that session, ready to rewind through.I'll be honest: the first real run failed. CI rarely cooperates on the first try, and this was no exception. Two environment issues bit me:\n\n**1. Ubuntu version drift.** I had to pin the runner to **Ubuntu 22.04** for Playwright compatibility. `ubuntu-latest`\n\nhad quietly become Ubuntu 24.04 in 2025, and the `libasound2`\n\npackage was renamed in the process.\n\n**2. Chromium dependencies.** I ended up installing the Chromium deps manually with the correct Ubuntu 24.04 package names instead of relying on Playwright's bundled installer.\n\nThe fix went from this:\n\n```\n# before\n- run: playwright install --with-deps chromium\n```\n\nto explicit apt installs plus a leaner Playwright step:\n\n```\n# after\n- run: |\n    sudo apt-get update\n    sudo apt-get install -y libasound2t64 libnss3 libnspr4 # ...correct 24.04 names\n- run: playwright install chromium\n```\n\nFinally, it ran cleanly. I got the confirmation email straight from Stern Grove and Resend.\n\nThe stack came together nicely:", "url": "https://wpnews.pro/news/never-forget-to-enter-the-stern-grove-lottery-again", "canonical_source": "https://dev.to/entire/never-forget-to-enter-the-stern-grove-lottery-again-31i5", "published_at": "2026-06-26 17:18:04+00:00", "updated_at": "2026-06-26 17:33:49.097218+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence"], "entities": ["Stern Grove Music Festival", "GitHub Actions", "Playwright", "Entire", "Claude Code", "Tixologi", "Resend"], "alternates": {"html": "https://wpnews.pro/news/never-forget-to-enter-the-stern-grove-lottery-again", "markdown": "https://wpnews.pro/news/never-forget-to-enter-the-stern-grove-lottery-again.md", "text": "https://wpnews.pro/news/never-forget-to-enter-the-stern-grove-lottery-again.txt", "jsonld": "https://wpnews.pro/news/never-forget-to-enter-the-stern-grove-lottery-again.jsonld"}}