- Full Obsidian vault content - Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte) - Media stack documentation - Traefik HA setup - Automation scripts - Bachelor party planning
6.5 KiB
title, type, tags, created, updated, confidence
| title | type | tags | created | updated | confidence | |||
|---|---|---|---|---|---|---|---|---|
| Bachelor Party — Data Sources | concept |
|
2026-05-04 | 2026-05-04 | high |
Bachelor Party Price Data — Two-Agent Source System
IMPORTANT: There are TWO independent price-scraping agents that BOTH write to the same
history.jsonl. They must be treated as distinct sources to avoid confusion about data provenance. Chris's local Codex agent on MacBook and the Hermes agent on grizzley both scrape prices independently.
Architecture Overview
┌─────────────────────────────────────────────────────────────────────┐
│ price-watch/history.jsonl │
│ (authoritative price log — single source of truth) │
└─────────────────────┬───────────────────────────────────────────────┘
│ read on server restart / vote reload
↓
┌─────────────────────────────────────────────────────────────────────┐
│ seed-data.js → votes.json │
│ (merged into voting app on restart or reload) │
└─────────────────────┬───────────────────────────────────────────────┘
│ serves
↓
┌─────────────────────────────────────────────────────────────────────┐
│ cabo-vote.local.tophermayor.com :3001 │
│ (voting app — live poll results) │
└─────────────────────────────────────────────────────────────────────┘
Source 1: MacBook Air — Codex Agent (Local)
| Property | Detail |
|---|---|
| Host | Chris's MacBook Air (local, not on homelab network) |
| Agent | OpenAI Codex CLI (codex) |
| Method | Native Computer Use Plugin — browser automation via Codex's built-in browser tool |
| Schedule | Every 4 hours |
| Output | Writes to price-watch/history.jsonl in the local repo clone |
| Delivery | Sends daily email report via AgentMail to toph.homelab@gmail.com |
| Repo | Clone of bachelor-party repo on MacBook at ~/hermes/bachelor_party/ |
Key distinction: Uses Codex's native browser automation (Computer Use Plugin). Runs locally on Chris's machine. When it scrapes, it writes directly to the local history.jsonl file. That file must be pushed to Git and pulled on the server for the voting app to see it.
Source 2: grizzley — Hermes Agent (Remote/OpenComputerUse)
| Property | Detail |
|---|---|
| Host | grizzley (192.168.50.84) — Raspberry Pi 5 |
| Agent | Hermes Agent (autonomous AI) |
| Method | OpenComputerUse project — browser automation via Hermes browser tool |
| Schedule | Daily at 8:00 AM (0 8 * * *) |
| Output | Writes to price-watch/history.jsonl in the repo clone on grizzley |
| Delivery | Sends Telegram report to topic 1054 "Bachelor Party" in AigentZeroHermes |
| Repo | Clone of bachelor-party repo on grizzley at /home/bear/hermes/bachelor_party/ |
Cron job name: Cabo Bachelor Party Price Tracker — Flights, Hotels, Golf, Clubs & Excursions
Job ID: 1a9f519189fb
Key distinction: Uses the OpenComputerUse project (a browser automation framework) via Hermes's browser tool. Runs on the homelab Pi 5. Same output file, independent run.
Why Two Sources?
Chris runs Codex locally on his MacBook as a lightweight always-on agent using his own API billing. The Hermes agent on grizzley is the "official" homelab agent that runs on the cluster's schedule and delivers to Telegram. Both are independent browsers hitting the same travel sites.
The risk is data collision — if both agents write to history.jsonl without coordination, entries can get interleaved or overwritten. The history.jsonl format (newline-delimited JSON) is append-oriented, so interleaving is the expected behavior — but this means a single run's report may have gaps if another agent's run truncated the file.
Data Flow Into the Voting App
history.jsonl (price points)
│
│ manual step or server restart
↓
seed-data.js (hardcoded prices via buildSeedData())
│
│ mergeSeedData() on server restart
↓
votes.json (authoritative app data)
│
│ API: GET /api/options, GET /api/categories
↓
cabo-vote.local.tophermayor.com :3001
The app does not read history.jsonl directly. Prices from history.jsonl must be manually promoted into seed-data.js (by editing the buildSeedData() function), then the server must be restarted to reload.
How to Identify Which Agent Wrote an Entry
Each JSON line in history.jsonl has a checkedAt timestamp. Entries from the MacBook Codex agent will have source: "computer-use" or similar in the metadata if the agent tagged them. Entries from Hermes on grizzley will come from the OpenComputerUse run and may have different formatting.
If entries are mixed and it's unclear which agent produced them, check:
- MacBook: timestamps aligned with local MacBook timezone (PT), typically every 4 hours
- grizzley: timestamps aligned with the cron schedule (8 AM daily), in the Pi's timezone
Reconciling Conflicting Prices
If the two sources report different prices for the same item:
- Both are valid — they may have scraped at different times on different days
- Use the most recent
checkedAttimestamp as the authoritative current price - If timestamps are the same day, average them or flag for manual review
Related
- bachelor-party/project
- bachelor-party/voting-app — deployment and data flow