mirror of
https://github.com/garrytan/gbrain.git
synced 2026-08-14 08:53:22 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a9692550e | ||
|
|
f1ad0d1328 | ||
|
|
f443c2eb1f | ||
|
|
0faa46aa12 |
@@ -0,0 +1,166 @@
|
||||
---
|
||||
title: "Network Intelligence — 2026-04-26 -- 2026-04-26"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-26
|
||||
time: "21:00"
|
||||
---
|
||||
|
||||
# Network Intelligence — 2026-04-26 -- 2026-04-26 21:00
|
||||
|
||||
# 🧠 Network Intelligence Report — 2026-04-26
|
||||
|
||||
## 📊 Graph Overview
|
||||
- **74155** pages, **117440** edges, **15** edge types
|
||||
- **19552** people, **5150** companies, **611** meetings
|
||||
- **21912** edges from frontmatter (typed: works_at, founded, attended, etc.)
|
||||
|
||||
## 🔥 Inner Orbit (Meeting Velocity)
|
||||
| Person | 7d | 30d | Total |
|
||||
|--------|---:|----:|------:|
|
||||
| Garry Tan | 6 | 402 | 402 |
|
||||
| Harj Taggar | 4 | 52 | 52 |
|
||||
| Jared Friedman | 2 | 38 | 38 |
|
||||
| Diana Hu | 3 | 29 | 29 |
|
||||
| Jonathan Levy | 1 | 23 | 23 |
|
||||
| Christopher Golda | 0 | 18 | 18 |
|
||||
| Pete Koomen | 1 | 18 | 18 |
|
||||
| Josh France | 4 | 17 | 17 |
|
||||
| Renée Beck | 2 | 16 | 16 |
|
||||
| Grey Baker | 2 | 15 | 15 |
|
||||
| Ryan Choi | 2 | 14 | 14 |
|
||||
| David Lieb | 2 | 12 | 12 |
|
||||
| Forrest Liu | 0 | 11 | 11 |
|
||||
| Jamison Mercurio | 3 | 10 | 10 |
|
||||
| Tom Blomfield | 2 | 10 | 10 |
|
||||
| Lucas Szwarcberg | 1 | 9 | 9 |
|
||||
| Brad Gessler | 3 | 9 | 9 |
|
||||
| Aaron Epstein | 1 | 8 | 8 |
|
||||
| Peter Vajda | 1 | 7 | 7 |
|
||||
| Gustaf Alströmer | 1 | 7 | 7 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 25 Most Connected)
|
||||
| Person | Connections | Edge Types |
|
||||
|--------|------------:|-----------:|
|
||||
| Garry Tan | 606 | 7 |
|
||||
| Harj Taggar | 532 | 4 |
|
||||
| Stephanie Lim | 499 | 3 |
|
||||
| Jonathan Levy | 348 | 3 |
|
||||
| Lupe Maciel | 326 | 2 |
|
||||
| Diana Hu | 322 | 7 |
|
||||
| Jared Friedman | 320 | 4 |
|
||||
| Paul Graham | 284 | 6 |
|
||||
| Dalton Caldwell | 225 | 3 |
|
||||
| Pete Koomen | 170 | 4 |
|
||||
| Aaron Li | 158 | 6 |
|
||||
| Gustaf Alströmer | 147 | 4 |
|
||||
| Garry | 145 | 1 |
|
||||
| Aaron Epstein | 134 | 4 |
|
||||
| Carolynn Levy | 129 | 4 |
|
||||
| Renee Mars | 127 | 3 |
|
||||
| David Lieb | 126 | 4 |
|
||||
| Verena Prescher | 125 | 3 |
|
||||
| Josh France | 124 | 4 |
|
||||
| Michael Seibel | 124 | 4 |
|
||||
| Casey Muller | 121 | 2 |
|
||||
| Lindsay Selvitelle | 100 | 2 |
|
||||
| Eve Bouffard | 95 | 3 |
|
||||
| Steven Pham | 91 | 3 |
|
||||
| Kirsty Nathoo | 89 | 3 |
|
||||
|
||||
|
||||
## 🕳️ Graph Gaps — Highest Value Enrichment Targets
|
||||
|
||||
### People with many connections but thin pages
|
||||
These people appear everywhere in the graph but their brain pages have almost no content. Enriching them would add the most signal per unit effort.
|
||||
|
||||
| Person | Connections | Chunks | Priority |
|
||||
|--------|------------:|-------:|---------:|
|
||||
| Aaron Li | 158 | 2 | 🔴 HIGH |
|
||||
| Gustaf Alströmer | 147 | 2 | 🔴 HIGH |
|
||||
| Garry | 145 | 2 | 🔴 HIGH |
|
||||
| Group Partners | 73 | 3 | 🔴 HIGH |
|
||||
| Renée Beck | 65 | 3 | 🔴 HIGH |
|
||||
| Jared Hobbs | 40 | 3 | 🟡 MED |
|
||||
| Pegah Saki Payne | 29 | 3 | 🟡 MED |
|
||||
| Sydney Daniels | 28 | 2 | 🟡 MED |
|
||||
| Adele Gower | 27 | 2 | 🟡 MED |
|
||||
| Kim Jabal | 22 | 2 | 🟢 LOW |
|
||||
| Maria Vasina | 21 | 3 | 🟢 LOW |
|
||||
| Ali Rowghani | 21 | 2 | 🟢 LOW |
|
||||
| Matthew Kang | 21 | 3 | 🟢 LOW |
|
||||
| Jamison Mercurio | 20 | 2 | 🟢 LOW |
|
||||
| Brad Flora | 20 | 3 | 🟢 LOW |
|
||||
|
||||
### Companies with many people but no deal page
|
||||
| Company | People Connected | Status |
|
||||
|---------|----------------:|--------|
|
||||
| Y Combinator | 142 | No deal page |
|
||||
| Gmail | 47 | No deal page |
|
||||
| Perplexity | 29 | No deal page |
|
||||
| Initialized Capital | 26 | No deal page |
|
||||
| Stanford | 25 | No deal page |
|
||||
| Anthropic | 16 | No deal page |
|
||||
| YCombinator | 12 | No deal page |
|
||||
| a0.dev | 12 | No deal page |
|
||||
| Airbnb | 11 | No deal page |
|
||||
| Foundation | 10 | No deal page |
|
||||
|
||||
### Island nodes (well-connected but isolated from the main graph)
|
||||
| Person | Own Edges | Shared w/ others |
|
||||
|--------|----------:|------------------:|
|
||||
|
||||
|
||||
## 🔮 Where to Grow the Graph Next
|
||||
|
||||
### Edge type analysis
|
||||
- **Frontmatter edges:** 21912 (typed, high-signal)
|
||||
- **Markdown edges:** 95528 (mentions, lower-signal)
|
||||
- **Ratio:** 22.9% — higher = more structured graph
|
||||
|
||||
### Highest-ROI graph investments
|
||||
|
||||
**1. Meeting attendee edges (currently 1088)**
|
||||
The meeting pages have transcripts and summaries but many don't have `attendees:` in frontmatter. Adding attendees to meeting pages is the single highest-leverage enrichment — each meeting creates N edges (one per attendee) and makes "who was in the room" queries work. The calendar data has this info already.
|
||||
|
||||
**2. Investment edges (currently 236)**
|
||||
Only 236 invested_in edges exist. The brain knows about hundreds of portfolio companies but the investment relationships aren't formalized as edges. Adding `investors:` to company frontmatter would light up the deal flow graph.
|
||||
|
||||
**3. works_at currency (currently 9127)**
|
||||
Many works_at edges are stale (person left the company). Adding `left:` or `former_company:` fields would create a career trajectory graph — who went from BigCo → startup → YC → scaleup.
|
||||
|
||||
### The meta-question: what queries do you WISH worked?
|
||||
The best way to grow the graph is to write the queries you want to run and see where they break. The breaks are the gaps. Some queries that should work but probably don't yet:
|
||||
- "Show me everyone who left Google in the last year and started a company"
|
||||
- "Which P26 founders know each other from before YC?"
|
||||
- "What's the shortest path between [person A] and [person B]?"
|
||||
- "Which investors have the most portfolio overlap with YC?"
|
||||
|
||||
|
||||
## 📋 Edge Type Breakdown
|
||||
| Type | Source | Count |
|
||||
|------|--------|------:|
|
||||
| mentions | markdown | 54596 |
|
||||
| mention | markdown | 28936 |
|
||||
| works_at | frontmatter | 9127 |
|
||||
| works_at | markdown | 6363 |
|
||||
| related_to | frontmatter | 5372 |
|
||||
| founded | markdown | 4413 |
|
||||
| founded | frontmatter | 4132 |
|
||||
| source | frontmatter | 1621 |
|
||||
| attended | frontmatter | 1088 |
|
||||
| attended | markdown | 501 |
|
||||
| attendee | markdown | 456 |
|
||||
| yc_partner | frontmatter | 418 |
|
||||
| invested_in | markdown | 236 |
|
||||
| invested_in | frontmatter | 151 |
|
||||
| advises | markdown | 21 |
|
||||
| involved_in | markdown | 5 |
|
||||
| discussed_in | frontmatter | 2 |
|
||||
| deal_for | markdown | 1 |
|
||||
| led_round | frontmatter | 1 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-report.mjs | Brain: 74155 pages, 117440 edges*
|
||||
@@ -0,0 +1,108 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-04-26 -- 2026-04-26"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-26
|
||||
time: "21:11"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-04-26 -- 2026-04-26 21:11
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-04-26
|
||||
|
||||
## 📊 Graph Overview
|
||||
**74,155** pages · **117,440** edges · **19,552** people · **5,150** companies · **611** meetings
|
||||
**Structured ratio:** 18.7% frontmatter edges (first measurement)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 50+ total
|
||||
**By type:** mentions (29), works_at (16), founded (3), invested_in (2)
|
||||
|
||||
| From | → | To | Type |
|
||||
|------|---|----|----- |
|
||||
| Melissa Khoo | → | Janice Pai | mentions |
|
||||
| Jrkelly Enriched | → | Jason Kelly | mentions |
|
||||
| Olivia Moore Enriched | → | Andreessen Horowitz (a16z) | invested_in |
|
||||
| Olivia Moore Enriched | → | HappyRobot | invested_in |
|
||||
| Bevenky | → | Michael Ricordeau | mentions |
|
||||
| Mark Farrell | → | garrytan | mentions |
|
||||
| Trip Adler | → | Scribd | mentions |
|
||||
| Dan Calle | → | garrytan | mentions |
|
||||
| Eddie Conk Enriched | → | garrytan | mentions |
|
||||
| Christian Garrett | → | 8VC | mentions |
|
||||
| Alex Moore | → | Jin Chang | mentions |
|
||||
| Alex Moore | → | Fieldguide | mentions |
|
||||
| Alexbangash Enriched | → | Alex Bangash | mentions |
|
||||
| Ankit Raparthi | → | Aarav Patel | founded |
|
||||
| Ankit Raparthi | → | Ronit Jain | mentions |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 375 rich / 19177 thin (1.9% enriched)
|
||||
**Companies:** 127 rich / 5023 thin (2.5% enriched)
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count |
|
||||
|------|--------|------:|
|
||||
| mentions | markdown | 54,596 |
|
||||
| mention | markdown | 28,936 |
|
||||
| works_at | frontmatter | 9,127 |
|
||||
| works_at | markdown | 6,363 |
|
||||
| related_to | frontmatter | 5,372 |
|
||||
| founded | markdown | 4,413 |
|
||||
| founded | frontmatter | 4,132 |
|
||||
| source | frontmatter | 1,621 |
|
||||
| attended | frontmatter | 1,088 |
|
||||
| attended | markdown | 501 |
|
||||
| attendee | markdown | 456 |
|
||||
| yc_partner | frontmatter | 418 |
|
||||
| invested_in | markdown | 236 |
|
||||
| invested_in | frontmatter | 151 |
|
||||
| advises | markdown | 21 |
|
||||
| involved_in | markdown | 5 |
|
||||
| discussed_in | frontmatter | 2 |
|
||||
| deal_for | markdown | 1 |
|
||||
| led_round | frontmatter | 1 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types |
|
||||
|--------|------------:|-----------:|
|
||||
| Garry Tan | 606 | 7 |
|
||||
| Harj Taggar | 532 | 4 |
|
||||
| Stephanie Lim | 499 | 3 |
|
||||
| Jonathan Levy | 348 | 3 |
|
||||
| Lupe Maciel | 326 | 2 |
|
||||
| Diana Hu | 322 | 7 |
|
||||
| Jared Friedman | 320 | 4 |
|
||||
| Paul Graham | 284 | 6 |
|
||||
| Dalton Caldwell | 225 | 3 |
|
||||
| Pete Koomen | 170 | 4 |
|
||||
| Aaron Li | 158 | 6 |
|
||||
| Gustaf Alströmer | 147 | 4 |
|
||||
| Garry | 145 | 1 |
|
||||
| Aaron Epstein | 134 | 4 |
|
||||
| Carolynn Levy | 129 | 4 |
|
||||
| Renee Mars | 127 | 3 |
|
||||
| David Lieb | 126 | 4 |
|
||||
| Verena Prescher | 125 | 3 |
|
||||
| Michael Seibel | 124 | 4 |
|
||||
| Josh France | 124 | 4 |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Gustaf Alströmer | 147 | 2 |
|
||||
| Garry | 145 | 2 |
|
||||
| Group Partners | 73 | 3 |
|
||||
| Renée Beck | 65 | 3 |
|
||||
| Jared Hobbs | 40 | 3 |
|
||||
| Pegah Saki Payne | 29 | 3 |
|
||||
| Sydney Daniels | 28 | 2 |
|
||||
| Adele Gower | 27 | 2 |
|
||||
| Kim Jabal | 22 | 2 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
@@ -0,0 +1,96 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-04-27 -- 2026-04-27"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-27
|
||||
time: "17:00"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-04-27 -- 2026-04-27 17:00
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-04-27
|
||||
|
||||
## 📊 Graph Overview
|
||||
**74,175** pages · **117,470** edges · **19,552** people · **5,150** companies · **611** meetings
|
||||
**Δ since yesterday:** +20 pages, +30 edges
|
||||
**Structured ratio:** 18.7% frontmatter edges (was 18.7%)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 31 total
|
||||
**By type:** mentions (31)
|
||||
|
||||
| From | → | To | Type |
|
||||
|------|---|----|----- |
|
||||
| Melissa Khoo | → | Janice Pai | mentions |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 375 rich / 19177 thin (1.9% enriched)
|
||||
**Companies:** 127 rich / 5023 thin (2.5% enriched)
|
||||
**Δ since yesterday:** people: 0 rich, 0 thin · companies: 0 rich, 0 thin
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count | Δ |
|
||||
|------|--------|------:|---:|
|
||||
| mentions | markdown | 54,626 | +30 |
|
||||
| mention | markdown | 28,936 | 0 |
|
||||
| works_at | frontmatter | 9,127 | 0 |
|
||||
| works_at | markdown | 6,363 | 0 |
|
||||
| related_to | frontmatter | 5,372 | 0 |
|
||||
| founded | markdown | 4,413 | 0 |
|
||||
| founded | frontmatter | 4,132 | 0 |
|
||||
| source | frontmatter | 1,621 | 0 |
|
||||
| attended | frontmatter | 1,088 | 0 |
|
||||
| attended | markdown | 501 | 0 |
|
||||
| attendee | markdown | 456 | 0 |
|
||||
| yc_partner | frontmatter | 418 | 0 |
|
||||
| invested_in | markdown | 236 | 0 |
|
||||
| invested_in | frontmatter | 151 | 0 |
|
||||
| advises | markdown | 21 | 0 |
|
||||
| involved_in | markdown | 5 | 0 |
|
||||
| discussed_in | frontmatter | 2 | 0 |
|
||||
| deal_for | markdown | 1 | 0 |
|
||||
| led_round | frontmatter | 1 | 0 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types | Δ |
|
||||
|--------|------------:|-----------:|---:|
|
||||
| Garry Tan | 606 | 7 | — |
|
||||
| Harj Taggar | 532 | 4 | — |
|
||||
| Stephanie Lim | 499 | 3 | — |
|
||||
| Jonathan Levy | 348 | 3 | — |
|
||||
| Lupe Maciel | 326 | 2 | — |
|
||||
| Diana Hu | 322 | 7 | — |
|
||||
| Jared Friedman | 320 | 4 | — |
|
||||
| Paul Graham | 284 | 6 | — |
|
||||
| Dalton Caldwell | 225 | 3 | — |
|
||||
| Pete Koomen | 170 | 4 | — |
|
||||
| Aaron Li | 158 | 6 | — |
|
||||
| Gustaf Alströmer | 147 | 4 | — |
|
||||
| Garry | 145 | 1 | — |
|
||||
| Aaron Epstein | 134 | 4 | — |
|
||||
| Carolynn Levy | 129 | 4 | — |
|
||||
| Renee Mars | 127 | 3 | — |
|
||||
| David Lieb | 126 | 4 | — |
|
||||
| Verena Prescher | 125 | 3 | — |
|
||||
| Michael Seibel | 124 | 4 | — |
|
||||
| Josh France | 124 | 4 | — |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Gustaf Alströmer | 147 | 2 |
|
||||
| Garry | 145 | 2 |
|
||||
| Group Partners | 73 | 3 |
|
||||
| Renée Beck | 65 | 3 |
|
||||
| Jared Hobbs | 40 | 3 |
|
||||
| Pegah Saki Payne | 29 | 3 |
|
||||
| Sydney Daniels | 28 | 2 |
|
||||
| Adele Gower | 27 | 2 |
|
||||
| Kim Jabal | 22 | 2 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-04-28 -- 2026-04-28"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-28
|
||||
time: "17:00"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-04-28 -- 2026-04-28 17:00
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-04-28
|
||||
|
||||
## 📊 Graph Overview
|
||||
**79,527** pages · **123,419** edges · **19,426** people · **5,144** companies · **613** meetings
|
||||
**Δ since yesterday:** +5352 pages, +5949 edges, -126 people, -6 companies, +2 meetings
|
||||
**Structured ratio:** 17.8% frontmatter edges (was 18.7%)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 50+ total
|
||||
**By type:** mentions (50)
|
||||
|
||||
| From | → | To | Type |
|
||||
|------|---|----|----- |
|
||||
| Gleb Chuvpilo | → | Garry Tan | mentions |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 944 rich / 18482 thin (4.9% enriched)
|
||||
**Companies:** 129 rich / 5015 thin (2.5% enriched)
|
||||
**Δ since yesterday:** people: +569 rich, -695 thin · companies: +2 rich, -8 thin
|
||||
✅ **Brain is getting smarter** — 569 pages enriched vs -695 new thin pages.
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count | Δ |
|
||||
|------|--------|------:|---:|
|
||||
| mentions | markdown | 60,386 | +5760 |
|
||||
| mention | markdown | 28,922 | -14 |
|
||||
| works_at | frontmatter | 9,123 | -4 |
|
||||
| works_at | markdown | 6,450 | +87 |
|
||||
| related_to | frontmatter | 5,372 | 0 |
|
||||
| founded | markdown | 4,533 | +120 |
|
||||
| founded | frontmatter | 4,132 | 0 |
|
||||
| source | frontmatter | 1,622 | +1 |
|
||||
| attended | frontmatter | 1,088 | 0 |
|
||||
| attended | markdown | 501 | 0 |
|
||||
| attendee | markdown | 456 | 0 |
|
||||
| yc_partner | frontmatter | 418 | 0 |
|
||||
| invested_in | markdown | 235 | -1 |
|
||||
| invested_in | frontmatter | 151 | 0 |
|
||||
| advises | markdown | 21 | 0 |
|
||||
| involved_in | markdown | 5 | 0 |
|
||||
| discussed_in | frontmatter | 2 | 0 |
|
||||
| deal_for | markdown | 1 | 0 |
|
||||
| led_round | frontmatter | 1 | 0 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types | Δ |
|
||||
|--------|------------:|-----------:|---:|
|
||||
| Garry Tan | 3296 | 7 | +2690 |
|
||||
| Harj Taggar | 532 | 4 | — |
|
||||
| Stephanie Lim | 503 | 3 | +4 |
|
||||
| Jonathan Levy | 348 | 3 | — |
|
||||
| Lupe Maciel | 326 | 2 | — |
|
||||
| Diana Hu | 322 | 7 | — |
|
||||
| Jared Friedman | 320 | 4 | — |
|
||||
| Paul Graham | 284 | 6 | — |
|
||||
| Dalton Caldwell | 225 | 3 | — |
|
||||
| Pete Koomen | 170 | 4 | — |
|
||||
| Aaron Li | 158 | 6 | — |
|
||||
| Gustaf Alstromer | 147 | 4 | — |
|
||||
| Garry | 145 | 1 | — |
|
||||
| Aaron Epstein | 134 | 4 | — |
|
||||
| Carolynn Levy | 129 | 4 | — |
|
||||
| Renee Mars | 127 | 3 | — |
|
||||
| David Lieb | 126 | 4 | — |
|
||||
| Verena Prescher | 125 | 3 | — |
|
||||
| Josh France | 124 | 4 | — |
|
||||
| Michael Seibel | 124 | 4 | — |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Garry | 145 | 2 |
|
||||
| Group Partners | 73 | 3 |
|
||||
| Renée Beck | 65 | 3 |
|
||||
| Jared Hobbs | 40 | 3 |
|
||||
| Pegah Saki Payne | 29 | 3 |
|
||||
| Sydney Daniels | 28 | 2 |
|
||||
| Adele Gower | 27 | 2 |
|
||||
| Kim Jabal | 22 | 2 |
|
||||
| Matthew Kang | 21 | 3 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-04-29 -- 2026-04-29"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-29
|
||||
time: "17:00"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-04-29 -- 2026-04-29 17:00
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-04-29
|
||||
|
||||
## 📊 Graph Overview
|
||||
**79,579** pages · **140,159** edges · **19,332** people · **5,144** companies · **613** meetings
|
||||
**Δ since yesterday:** +52 pages, +16740 edges, -94 people
|
||||
**Structured ratio:** 26.8% frontmatter edges (was 17.8%)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 50+ total
|
||||
**By type:** source (20), attended (18), related_to (7), mentions (3), discussed_in (2)
|
||||
|
||||
| From | → | To | Type |
|
||||
|------|---|----|----- |
|
||||
| Garry Tan | → | Budget Working Group — Jan 2026 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Aug 11, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Oct 22, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Nov 21, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Nov 8, 2024 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Jan 17, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Feb 20, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Mar 28, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Apr 21, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — May 8, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Jun 20, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Jul 18, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Oct 22, 2024 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Sep 19, 2025 | attended |
|
||||
| Garry Tan | → | Budget Working Group — Apr 22, 2026 | attended |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 982 rich / 18350 thin (5.1% enriched)
|
||||
**Companies:** 129 rich / 5015 thin (2.5% enriched)
|
||||
**Δ since yesterday:** people: +38 rich, -132 thin · companies: 0 rich, 0 thin
|
||||
✅ **Brain is getting smarter** — 38 pages enriched vs -132 new thin pages.
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count | Δ |
|
||||
|------|--------|------:|---:|
|
||||
| mentions | markdown | 61,372 | +986 |
|
||||
| mention | markdown | 28,919 | -3 |
|
||||
| works_at | frontmatter | 11,213 | +2090 |
|
||||
| invested_in | frontmatter | 9,138 | +8987 |
|
||||
| works_at | markdown | 6,462 | +12 |
|
||||
| related_to | frontmatter | 5,467 | +95 |
|
||||
| source | frontmatter | 5,099 | +3477 |
|
||||
| founded | markdown | 4,579 | +46 |
|
||||
| founded | frontmatter | 4,193 | +61 |
|
||||
| attended | frontmatter | 1,334 | +246 |
|
||||
| yc_partner | frontmatter | 1,075 | +657 |
|
||||
| attended | markdown | 501 | 0 |
|
||||
| attendee | markdown | 456 | 0 |
|
||||
| invested_in | markdown | 316 | +81 |
|
||||
| advises | markdown | 24 | +3 |
|
||||
| involved_in | markdown | 5 | 0 |
|
||||
| discussed_in | frontmatter | 4 | +2 |
|
||||
| deal_for | markdown | 1 | 0 |
|
||||
| led_round | frontmatter | 1 | 0 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types | Δ |
|
||||
|--------|------------:|-----------:|---:|
|
||||
| Garry Tan | 3337 | 7 | +41 |
|
||||
| Harj Taggar | 536 | 4 | +4 |
|
||||
| Stephanie Lim | 503 | 3 | — |
|
||||
| Paul Graham | 385 | 6 | +101 |
|
||||
| Benjamin | 370 | 2 | +370 |
|
||||
| Jonathan Levy | 348 | 3 | — |
|
||||
| Jared Friedman | 348 | 5 | +28 |
|
||||
| Lupe Maciel | 326 | 2 | — |
|
||||
| Diana Hu | 325 | 7 | +3 |
|
||||
| Dalton Caldwell | 233 | 4 | +8 |
|
||||
| Jared | 225 | 1 | +225 |
|
||||
| Hassan Lantry | 190 | 3 | +190 |
|
||||
| Kulveer Taggar | 190 | 4 | +190 |
|
||||
| JJ Fliegelman | 178 | 5 | +178 |
|
||||
| Pete Koomen | 174 | 4 | +4 |
|
||||
| Michael Seibel | 172 | 5 | +48 |
|
||||
| Index | 167 | 4 | +167 |
|
||||
| Gustaf Alstromer | 166 | 5 | +19 |
|
||||
| Nicolas J. | 159 | 1 | +159 |
|
||||
| Aaron Li | 158 | 6 | — |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Benjamin | 370 | 2 |
|
||||
| Jared | 225 | 2 |
|
||||
| Hassan Lantry | 190 | 3 |
|
||||
| JJ Fliegelman | 178 | 2 |
|
||||
| Index | 167 | 2 |
|
||||
| Nicolas J. | 159 | 2 |
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Aaron | 156 | 2 |
|
||||
| Garry | 147 | 2 |
|
||||
| Diana | 115 | 2 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
@@ -0,0 +1,124 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-04-30 -- 2026-04-30"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-04-30
|
||||
time: "17:00"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-04-30 -- 2026-04-30 17:00
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-04-30
|
||||
|
||||
## 📊 Graph Overview
|
||||
**79,564** pages · **140,018** edges · **19,233** people · **5,149** companies · **615** meetings
|
||||
**Δ since yesterday:** -15 pages, -141 edges, -99 people, +5 companies, +2 meetings
|
||||
**Structured ratio:** 26.9% frontmatter edges (was 26.8%)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 50+ total
|
||||
**By type:** mentions (42), works_at (4), related_to (2), yc_partner (1), founded (1)
|
||||
|
||||
| From | → | To | Type |
|
||||
|------|---|----|----- |
|
||||
| Zach Cohen | → | Efren A. Lamolda | related_to |
|
||||
| Zach Cohen | → | Dominik Middelmann | related_to |
|
||||
| Garry | → | Tweeks.io | yc_partner |
|
||||
| Matt Stallone | → | Tweeks.io | works_at |
|
||||
| Jason Madeano | → | Tweeks.io | works_at |
|
||||
| Anjney Midha | → | AMP Coalition | founded |
|
||||
| Anjney Midha | → | AMP Coalition | works_at |
|
||||
|
||||
|
||||
## 🔗 Emerging Clusters (new co-occurrences in last 5 days)
|
||||
People appearing together in 2+ meetings recently who weren't previously connected:
|
||||
|
||||
| Person A | Person B | Recent Meetings | Historical |
|
||||
|----------|----------|----------------:|-----------:|
|
||||
| Dion Lim | Forrest Liu | 2 | 0 |
|
||||
| Dion Lim | Garry Tan | 2 | 0 |
|
||||
| Dion Lim | Stephanie Lim | 2 | 0 |
|
||||
| Dion Lim | Lily Li | 2 | 0 |
|
||||
| Dominik Middelmann | Efren A. Lamolda | 2 | 0 |
|
||||
| Dominik Middelmann | Garry Tan | 2 | 0 |
|
||||
| Efren A. Lamolda | Garry Tan | 2 | 0 |
|
||||
| Forrest Liu | Stephanie Lim | 2 | 0 |
|
||||
| Forrest Liu | Lily Li | 2 | 0 |
|
||||
| Garry Tan | Jeffrey Morgan | 2 | 0 |
|
||||
| Garry Tan | Michael Chiang | 2 | 0 |
|
||||
| Garry Tan | Lily Li | 2 | 0 |
|
||||
| Stephanie Lim | Lily Li | 2 | 0 |
|
||||
| Jeffrey Morgan | Michael Chiang | 2 | 0 |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 1017 rich / 18216 thin (5.3% enriched)
|
||||
**Companies:** 129 rich / 5020 thin (2.5% enriched)
|
||||
**Δ since yesterday:** people: +35 rich, -134 thin · companies: 0 rich, +5 thin
|
||||
✅ **Brain is getting smarter** — 35 pages enriched vs -134 new thin pages.
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count | Δ |
|
||||
|------|--------|------:|---:|
|
||||
| mentions | markdown | 61,378 | +6 |
|
||||
| mention | markdown | 28,683 | -236 |
|
||||
| works_at | frontmatter | 11,240 | +27 |
|
||||
| invested_in | frontmatter | 9,209 | +71 |
|
||||
| works_at | markdown | 6,468 | +6 |
|
||||
| related_to | frontmatter | 5,469 | +2 |
|
||||
| source | frontmatter | 5,041 | -58 |
|
||||
| founded | markdown | 4,589 | +10 |
|
||||
| founded | frontmatter | 4,194 | +1 |
|
||||
| attended | frontmatter | 1,367 | +33 |
|
||||
| yc_partner | frontmatter | 1,084 | +9 |
|
||||
| attended | markdown | 488 | -13 |
|
||||
| attendee | markdown | 456 | 0 |
|
||||
| invested_in | markdown | 317 | +1 |
|
||||
| advises | markdown | 24 | 0 |
|
||||
| involved_in | markdown | 5 | 0 |
|
||||
| discussed_in | frontmatter | 4 | 0 |
|
||||
| led_round | frontmatter | 1 | 0 |
|
||||
| deal_for | markdown | 1 | 0 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types | Δ |
|
||||
|--------|------------:|-----------:|---:|
|
||||
| Garry Tan | 3348 | 7 | +11 |
|
||||
| Harj Taggar | 535 | 4 | -1 |
|
||||
| Stephanie Lim | 505 | 3 | +2 |
|
||||
| Paul Graham | 385 | 6 | — |
|
||||
| Benjamin | 371 | 2 | +1 |
|
||||
| Jonathan Levy | 348 | 3 | — |
|
||||
| Jared Friedman | 347 | 5 | -1 |
|
||||
| Lupe Maciel | 326 | 2 | — |
|
||||
| Diana Hu | 324 | 7 | -1 |
|
||||
| Dalton Caldwell | 232 | 4 | -1 |
|
||||
| Jared | 226 | 1 | +1 |
|
||||
| Hassan Lantry | 192 | 3 | +2 |
|
||||
| Kulveer Taggar | 191 | 4 | +1 |
|
||||
| JJ Fliegelman | 181 | 5 | +3 |
|
||||
| Pete Koomen | 175 | 4 | +1 |
|
||||
| Michael Seibel | 170 | 5 | -2 |
|
||||
| Gustaf Alstromer | 164 | 5 | -2 |
|
||||
| Nicolas J. | 161 | 1 | +2 |
|
||||
| Aaron Li | 158 | 6 | — |
|
||||
| Aaron | 156 | 2 | +156 |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Benjamin | 371 | 2 |
|
||||
| Jared | 226 | 2 |
|
||||
| Hassan Lantry | 192 | 3 |
|
||||
| JJ Fliegelman | 181 | 2 |
|
||||
| Nicolas J. | 161 | 2 |
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Aaron | 156 | 2 |
|
||||
| Garry | 152 | 2 |
|
||||
| Diana | 116 | 2 |
|
||||
| Paul Buchheit | 105 | 3 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
@@ -0,0 +1,115 @@
|
||||
---
|
||||
title: "Daily Network Intelligence — 2026-05-01 -- 2026-05-01"
|
||||
type: report
|
||||
report_type: network-intelligence
|
||||
date: 2026-05-01
|
||||
time: "17:00"
|
||||
---
|
||||
|
||||
# Daily Network Intelligence — 2026-05-01 -- 2026-05-01 17:00
|
||||
|
||||
# 🧠 Daily Network Intelligence — 2026-05-01
|
||||
|
||||
## 📊 Graph Overview
|
||||
**81,530** pages · **140,351** edges · **19,107** people · **5,150** companies · **617** meetings
|
||||
**Δ since yesterday:** +1966 pages, +333 edges, -126 people, +1 companies, +2 meetings
|
||||
**Structured ratio:** 26.8% frontmatter edges (was 26.9%)
|
||||
|
||||
## 🆕 New Edges (last 24h) — 50+ total
|
||||
**By type:** mentions (49), source (1)
|
||||
|
||||
|
||||
|
||||
## 🔗 Emerging Clusters (new co-occurrences in last 5 days)
|
||||
People appearing together in 2+ meetings recently who weren't previously connected:
|
||||
|
||||
| Person A | Person B | Recent Meetings | Historical |
|
||||
|----------|----------|----------------:|-----------:|
|
||||
| Dion Lim | Forrest Liu | 2 | 0 |
|
||||
| Dion Lim | Garry Tan | 2 | 0 |
|
||||
| Dion Lim | Stephanie Lim | 2 | 0 |
|
||||
| Dion Lim | Lily Li | 2 | 0 |
|
||||
| Dominik Middelmann | Efren A. Lamolda | 2 | 0 |
|
||||
| Dominik Middelmann | Garry Tan | 2 | 0 |
|
||||
| Efren A. Lamolda | Garry Tan | 2 | 0 |
|
||||
| Forrest Liu | Stephanie Lim | 2 | 0 |
|
||||
| Forrest Liu | Lily Li | 2 | 0 |
|
||||
| Garry Tan | Jeffrey Morgan | 2 | 0 |
|
||||
| Garry Tan | Michael Chiang | 2 | 0 |
|
||||
| Garry Tan | Lily Li | 2 | 0 |
|
||||
| Stephanie Lim | Lily Li | 2 | 0 |
|
||||
| Jeffrey Morgan | Michael Chiang | 2 | 0 |
|
||||
|
||||
|
||||
## 🧪 Enrichment Delta
|
||||
**People:** 1039 rich / 18068 thin (5.4% enriched)
|
||||
**Companies:** 129 rich / 5021 thin (2.5% enriched)
|
||||
**Δ since yesterday:** people: +22 rich, -148 thin · companies: 0 rich, +1 thin
|
||||
✅ **Brain is getting smarter** — 22 pages enriched vs -148 new thin pages.
|
||||
|
||||
## 📊 Edge Type Distribution
|
||||
| Type | Source | Count | Δ |
|
||||
|------|--------|------:|---:|
|
||||
| mentions | markdown | 61,748 | +370 |
|
||||
| mention | markdown | 28,668 | -15 |
|
||||
| works_at | frontmatter | 11,233 | -7 |
|
||||
| invested_in | frontmatter | 9,197 | -12 |
|
||||
| works_at | markdown | 6,465 | -3 |
|
||||
| related_to | frontmatter | 5,472 | +3 |
|
||||
| source | frontmatter | 5,042 | +1 |
|
||||
| founded | markdown | 4,587 | -2 |
|
||||
| founded | frontmatter | 4,192 | -2 |
|
||||
| attended | frontmatter | 1,367 | 0 |
|
||||
| yc_partner | frontmatter | 1,084 | 0 |
|
||||
| attended | markdown | 489 | +1 |
|
||||
| attendee | markdown | 456 | 0 |
|
||||
| invested_in | markdown | 316 | -1 |
|
||||
| advises | markdown | 24 | 0 |
|
||||
| involved_in | markdown | 5 | 0 |
|
||||
| discussed_in | frontmatter | 4 | 0 |
|
||||
| led_round | frontmatter | 1 | 0 |
|
||||
| deal_for | markdown | 1 | 0 |
|
||||
|
||||
|
||||
## 🌐 Network Hubs (Top 20)
|
||||
| Person | Connections | Edge Types | Δ |
|
||||
|--------|------------:|-----------:|---:|
|
||||
| Garry Tan | 3352 | 7 | +4 |
|
||||
| Harj Taggar | 536 | 4 | +1 |
|
||||
| Stephanie Lim | 510 | 3 | +5 |
|
||||
| Paul Graham | 386 | 6 | +1 |
|
||||
| Benjamin | 371 | 2 | — |
|
||||
| Jonathan Levy | 349 | 3 | +1 |
|
||||
| Jared Friedman | 347 | 5 | — |
|
||||
| Lupe Maciel | 326 | 2 | — |
|
||||
| Diana Hu | 326 | 7 | +2 |
|
||||
| Dalton Caldwell | 234 | 4 | +2 |
|
||||
| Jared | 226 | 1 | — |
|
||||
| Hassan Lantry | 192 | 3 | — |
|
||||
| Kulveer Taggar | 191 | 4 | — |
|
||||
| JJ Fliegelman | 181 | 5 | — |
|
||||
| Pete Koomen | 176 | 4 | +1 |
|
||||
| Michael Seibel | 170 | 5 | — |
|
||||
| Gustaf Alstromer | 164 | 5 | — |
|
||||
| Nicolas J. | 161 | 1 | — |
|
||||
| Aaron Li | 158 | 6 | — |
|
||||
| Aaron | 156 | 2 | — |
|
||||
|
||||
|
||||
## 🕳️ Top Enrichment Targets (high-edge, thin pages)
|
||||
| Person | Connections | Chunks |
|
||||
|--------|------------:|-------:|
|
||||
| Benjamin | 371 | 2 |
|
||||
| Jared | 226 | 2 |
|
||||
| Hassan Lantry | 192 | 3 |
|
||||
| JJ Fliegelman | 181 | 2 |
|
||||
| Nicolas J. | 161 | 2 |
|
||||
| Aaron Li | 158 | 2 |
|
||||
| Aaron | 156 | 2 |
|
||||
| Garry | 152 | 2 |
|
||||
| Diana | 116 | 2 |
|
||||
| Paul Buchheit | 106 | 3 |
|
||||
|
||||
|
||||
---
|
||||
*Generated by network-intelligence-daily.mjs*
|
||||
+69
-2
@@ -205,6 +205,46 @@ interface LockHandle {
|
||||
refresh: () => Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a PID is a zombie (defunct) process on Linux.
|
||||
* Returns true if the PID exists but its /proc/<pid>/status shows
|
||||
* State: Z (zombie). On non-Linux or if /proc is unavailable, returns false.
|
||||
*/
|
||||
function isZombiePid(pid: number): boolean {
|
||||
try {
|
||||
const status = readFileSync(`/proc/${pid}/status`, 'utf-8');
|
||||
// Match the State line: "State: Z (zombie)" or "State:\tZ ..."
|
||||
return /^State:\s+Z/m.test(status);
|
||||
} catch {
|
||||
// /proc not available (macOS, Windows) or PID doesn't exist.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If the current holder of lock `lockId` is on the same host as us and is
|
||||
* a zombie PID, delete the lock row. Returns true if a zombie was cleared.
|
||||
*/
|
||||
async function clearZombieHolderIfSameHost(
|
||||
sql: any,
|
||||
lockId: string,
|
||||
_ourPid: number,
|
||||
ourHost: string,
|
||||
): Promise<boolean> {
|
||||
const existing: Array<{ holder_pid: number; holder_host: string }> = await sql`
|
||||
SELECT holder_pid, holder_host FROM gbrain_cycle_locks WHERE id = ${lockId}
|
||||
`;
|
||||
if (existing.length === 0) return false;
|
||||
const { holder_pid, holder_host } = existing[0];
|
||||
// Only check PIDs on the same host — we can't inspect /proc on remote hosts.
|
||||
if (holder_host !== ourHost) return false;
|
||||
if (!isZombiePid(holder_pid)) return false;
|
||||
// Zombie confirmed — clear the lock.
|
||||
await sql`DELETE FROM gbrain_cycle_locks WHERE id = ${lockId} AND holder_pid = ${holder_pid}`;
|
||||
process.stderr.write(`[cycle] cleared zombie lock holder PID ${holder_pid} for ${lockId}\n`);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Acquire the Postgres-backed cycle lock.
|
||||
* Returns a LockHandle on success, or null if another live holder has it.
|
||||
@@ -213,6 +253,12 @@ interface LockHandle {
|
||||
* RETURNING *. An empty RETURNING means the existing row is still live.
|
||||
* Crashed holders auto-release: when their TTL expires, the next
|
||||
* acquirer's UPDATE branch fires and takes over.
|
||||
*
|
||||
* v0.23.1: also checks if the holder PID is a zombie (defunct) process.
|
||||
* Zombie PIDs pass kill(pid, 0) liveness checks because they technically
|
||||
* exist in the process table, but they can never release the lock or
|
||||
* refresh the TTL. Without this check, a zombie holder blocks all
|
||||
* cycle runs until the 30-min TTL expires.
|
||||
*/
|
||||
async function acquirePostgresLock(engine: BrainEngine): Promise<LockHandle | null> {
|
||||
const pid = process.pid;
|
||||
@@ -236,7 +282,25 @@ async function acquirePostgresLock(engine: BrainEngine): Promise<LockHandle | nu
|
||||
WHERE gbrain_cycle_locks.ttl_expires_at < NOW()
|
||||
RETURNING id
|
||||
`;
|
||||
if (rows.length === 0) return null; // live holder
|
||||
if (rows.length === 0) {
|
||||
// TTL not expired — but check if holder is a zombie.
|
||||
// Zombies pass kill(pid, 0) but have state 'Z' in /proc.
|
||||
const cleared = await clearZombieHolderIfSameHost(sql, CYCLE_LOCK_ID, pid, host);
|
||||
if (!cleared) return null; // live, non-zombie holder
|
||||
// Zombie cleared — retry acquisition.
|
||||
const retryRows: Array<{ id: string }> = await sql`
|
||||
INSERT INTO gbrain_cycle_locks (id, holder_pid, holder_host, acquired_at, ttl_expires_at)
|
||||
VALUES (${CYCLE_LOCK_ID}, ${pid}, ${host}, NOW(), NOW() + INTERVAL '30 minutes')
|
||||
ON CONFLICT (id) DO UPDATE
|
||||
SET holder_pid = ${pid},
|
||||
holder_host = ${host},
|
||||
acquired_at = NOW(),
|
||||
ttl_expires_at = NOW() + INTERVAL '30 minutes'
|
||||
WHERE gbrain_cycle_locks.ttl_expires_at < NOW()
|
||||
RETURNING id
|
||||
`;
|
||||
if (retryRows.length === 0) return null;
|
||||
}
|
||||
return {
|
||||
refresh: async () => {
|
||||
await sql`
|
||||
@@ -318,11 +382,14 @@ function acquireFileLock(lockPath = getLockFilePathDefault()): LockHandle | null
|
||||
// - error EPERM → process exists but caller can't signal it
|
||||
// (e.g., PID 1/init on unix) → still alive
|
||||
// Any error code OTHER than ESRCH means the PID is alive.
|
||||
//
|
||||
// v0.23.1: also check for zombie PIDs via /proc/<pid>/status.
|
||||
// Zombies pass kill(pid, 0) but can never release the lock.
|
||||
let pidAlive = false;
|
||||
if (existingPid > 0 && existingPid !== pid) {
|
||||
try {
|
||||
process.kill(existingPid, 0);
|
||||
pidAlive = true;
|
||||
pidAlive = !isZombiePid(existingPid); // zombie = not alive
|
||||
} catch (e) {
|
||||
const code = (e as NodeJS.ErrnoException).code;
|
||||
pidAlive = code !== 'ESRCH';
|
||||
|
||||
@@ -217,6 +217,18 @@ async function collectChildPutPageSlugs(
|
||||
childIds: number[],
|
||||
): Promise<string[]> {
|
||||
if (childIds.length === 0) return [];
|
||||
|
||||
// Self-healing: fix double-encoded jsonb strings from pre-v0.23.1 runs.
|
||||
await engine.executeRaw(
|
||||
`UPDATE subagent_tool_executions
|
||||
SET input = (input #>> '{}')::jsonb
|
||||
WHERE job_id = ANY($1::int[])
|
||||
AND jsonb_typeof(input) = 'string'
|
||||
AND (input #>> '{}') IS NOT NULL
|
||||
AND left(input #>> '{}', 1) = '{'`,
|
||||
[childIds],
|
||||
);
|
||||
|
||||
const rows = await engine.executeRaw<{ slug: string }>(
|
||||
`SELECT DISTINCT input->>'slug' AS slug
|
||||
FROM subagent_tool_executions
|
||||
|
||||
@@ -459,6 +459,21 @@ async function collectChildPutPageSlugs(
|
||||
childIds: number[],
|
||||
): Promise<string[]> {
|
||||
if (childIds.length === 0) return [];
|
||||
|
||||
// Self-healing: fix any double-encoded jsonb string values in the input
|
||||
// column from pre-v0.23.1 runs. JSON.stringify() + ::jsonb produced
|
||||
// jsonb strings instead of jsonb objects — input->>'slug' returned null.
|
||||
// This one-time fixup per batch is cheap and idempotent.
|
||||
await engine.executeRaw(
|
||||
`UPDATE subagent_tool_executions
|
||||
SET input = (input #>> '{}')::jsonb
|
||||
WHERE job_id = ANY($1::int[])
|
||||
AND jsonb_typeof(input) = 'string'
|
||||
AND (input #>> '{}') IS NOT NULL
|
||||
AND left(input #>> '{}', 1) = '{'`,
|
||||
[childIds],
|
||||
);
|
||||
|
||||
const rows = await engine.executeRaw<{ slug: string }>(
|
||||
`SELECT DISTINCT input->>'slug' AS slug
|
||||
FROM subagent_tool_executions
|
||||
|
||||
@@ -617,11 +617,14 @@ async function persistToolExecPending(
|
||||
toolName: string,
|
||||
input: unknown,
|
||||
): Promise<void> {
|
||||
// Pass input as-is (object) so postgres driver serialises to jsonb
|
||||
// object, not a jsonb string. JSON.stringify() + ::jsonb double-encodes.
|
||||
const jsonbInput = (input != null && typeof input === 'object') ? input : { _raw: String(input ?? '') };
|
||||
await engine.executeRaw(
|
||||
`INSERT INTO subagent_tool_executions (job_id, message_idx, tool_use_id, tool_name, input, status)
|
||||
VALUES ($1, $2, $3, $4, $5::jsonb, 'pending')
|
||||
ON CONFLICT (job_id, tool_use_id) DO NOTHING`,
|
||||
[jobId, messageIdx, toolUseId, toolName, JSON.stringify(input)],
|
||||
[jobId, messageIdx, toolUseId, toolName, jsonbInput],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -631,11 +634,13 @@ async function persistToolExecComplete(
|
||||
toolUseId: string,
|
||||
output: unknown,
|
||||
): Promise<void> {
|
||||
// Pass output as-is (object) — see persistToolExecPending comment.
|
||||
const jsonbOutput = (output != null && typeof output === 'object') ? output : { _raw: String(output ?? '') };
|
||||
await engine.executeRaw(
|
||||
`UPDATE subagent_tool_executions
|
||||
SET status = 'complete', output = $3::jsonb, ended_at = now()
|
||||
WHERE job_id = $1 AND tool_use_id = $2`,
|
||||
[jobId, toolUseId, JSON.stringify(output)],
|
||||
[jobId, toolUseId, jsonbOutput],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -655,7 +660,9 @@ async function persistToolExecFailed(
|
||||
VALUES ($1, $2, $3, $4, $5::jsonb, 'failed', $6, now())
|
||||
ON CONFLICT (job_id, tool_use_id) DO UPDATE
|
||||
SET status = 'failed', error = EXCLUDED.error, ended_at = now()`,
|
||||
[jobId, messageIdx, toolUseId, toolName, JSON.stringify(input), error],
|
||||
[jobId, messageIdx, toolUseId, toolName,
|
||||
(input != null && typeof input === 'object') ? input : { _raw: String(input ?? '') },
|
||||
error],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user