text stringlengths 3 8.33k | repo stringclasses 52
values | path stringlengths 6 141 | language stringclasses 35
values | sha stringlengths 64 64 | chunk_index int32 0 273 | n_tokens int32 1 896 |
|---|---|---|---|---|---|---|
---
phase: 15-verification-completeness-reporting
plan: 02
type: execute
wave: 2
depends_on:
- 15-01
files_modified:
- data/sources.json
autonomous: false
requirements:
- VERIFY-01
- VERIFY-02
- VERIFY-03
- VERIFY-04
- VERIFY-05
must_haves:
truths:
- "GitHub scraper discovers all non-fork repos fro... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-02-PLAN.md | Markdown | 33b8368cec5fe9a6451517408d3b9d6a92b3699359e036ff90b6ea8f8fbff3fc | 0 | 896 |
jku-kb verify --source jku_podcasts --json
jku-kb verify --source youtube_jku --json
jku-kb verify --source openalex_jku --json
jku-kb verify --source europe_pmc_jku --json
jku-kb verify --source zenodo_jku --json
jku-kb verify --source wikidata_jku --json
```
If youtube_jku returns 0 items, check if YOUTUBE_API_KEY i... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-02-PLAN.md | Markdown | 6c02137a61bcef47a4b611d964f133b1bf24fcff0aea2c8cc6833ea4c70c144a | 1 | 896 |
/files>
<action>
Present verification results to user for visual confirmation. The user should:
1. Run `jku-kb verify --source github_jku` and confirm the Rich table renders correctly with Source, Status, Expected, Actual, Ratio columns
2. Run `jku-kb verify --source openalex_jku` and confirm expected vs actual looks... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-02-PLAN.md | Markdown | 73635e4e87d76801b84b4ded46b0ddd78e7d0beb03d199fc503bfb3ae8ef0904 | 2 | 484 |
---
phase: 15-verification-completeness-reporting
plan: 02
subsystem: verification
tags: [scrapers, live-verification, sources.json, thresholds, shibboleth, opencast, yt-dlp]
# Dependency graph
requires:
- phase: 15-verification-completeness-reporting
provides: verify CLI command with concurrent live discover, R... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-02-SUMMARY.md | Markdown | 0655871ef45a8151612821fbf4aa4d61cf609b8839dd23b386ef61085e2af0bb | 0 | 896 |
500->15->160:** Original threshold of 500 was set before discovering most episodes require Shibboleth authentication. After adding cookie support, discovery jumped from 19 to 225 episodes. Threshold set to 160 (~80% of 225, accounting for auth session variability).
- **Semantic Scholar threshold 1000->350:** The cross-... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-02-SUMMARY.md | Markdown | 8064084c7f3fbc8aa46f5335069c7bc67af697307eee9dd5215ed3ac1b44bec1 | 1 | 583 |
# Phase 15: Verification & Completeness Reporting - Context
**Gathered:** 2026-03-23
**Status:** Ready for planning
<domain>
## Phase Boundary
Every source is verified against its live endpoint and a new `jku-kb verify` CLI command makes pass/warn/fail status visible at a glance. Sources that fail verification get f... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-CONTEXT.md | Markdown | 6231c5435748b9140fb3a1ee556d6b3759cba818791a02c841e27b8f5343fdb9 | 0 | 896 |
loads sources.json entries — reuse as-is
### Established Patterns
- Typer CLI commands with `@app.command()` decorator and typed options
- Rich console output with `box.ROUNDED`, color-coded status markup
- Async execution via `_run()` wrapper for `asyncio.run()`
- Per-domain rate limiting via token bucket (already en... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-CONTEXT.md | Markdown | 06a7d99c587d7095d2c897f8118e7a4198bb3568efd8d0e512f0f32fd4360c9c | 1 | 260 |
# Phase 15: Verification & Completeness Reporting - Research
**Researched:** 2026-03-23
**Domain:** CLI command implementation, async concurrent scraper execution, Rich terminal UI
**Confidence:** HIGH
## Summary
Phase 15 replaces the existing `jku-kb health` command with a new `jku-kb verify` command that performs ... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 10d7c2a186834455aa7d84cf19634daa5199a62a221ccc967be41667e876174d | 0 | 896 |
None -- discussion stayed within phase scope
</user_constraints>
<phase_requirements>
## Phase Requirements
| ID | Description | Research Support |
|----|-------------|-----------------|
| VERIFY-01 | GitHub scraper verified against actual org repo counts -- all non-fork repos discovered | GitHubScraper iterates 7 or... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 2c707b5e9651e3b81f2f29ce6ac2ae487c5662b5f95842452af14922da32deb2 | 1 | 896 |
runs async verify logic via `_run()` wrapper
**When to use:** The verify command follows the same pattern as discover, fetch, health commands
**Example:**
```python
# Pattern from existing cli.py commands
@app.command()
def verify(
source: str = typer.Option("all", help="Source ID or 'all'"),
json_output: bool ... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 82034297425300964c2260bff95d7801015069c86af2c244a18a61cea61c27b8 | 2 | 896 |
`BaseScraper._request_with_retry()` via `tenacity` | Handles 429, 5xx, timeouts with exponential backoff |
| Health probes | Custom HTTP checks | `run_health_probes()` from `quality.py` | Already async, parallel, with timeout handling |
| Terminal tables | Print statements | `rich.table.Table` with `rich.live.Live` | A... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 927a36dcbdf054ca5d37f4264372e669ac607b5fd205c2f8b81c9c9ef67e7114 | 3 | 896 |
goes wrong:** Removing the `health` command from cli.py will break 7+ existing tests (`test_health_command_table`, `test_health_command_no_manifest`, `test_compute_health_status_*`).
**Why it happens:** Tests reference the `health` command and `_compute_health_status` directly.
**How to avoid:** Update tests to referen... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | b4a2f800c9ef724f5303a7c89da297605db056a836d480f3914c635956850483 | 4 | 896 |
Concurrent discover
sem = asyncio.Semaphore(5)
results = []
async def _verify_one(sid):
async with sem:
try:
scraper = get_scraper(sid, settings)
async with scraper:
items = await scraper.discover()
return sid, len(item... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 12548b638f881fb7daf35094bbc581fbafccc2a8008e89732aedda0939812311 | 5 | 896 |
PodcastScraper | 3 JKU podcast RSS feeds |
| semantic_scholar_jku | SemanticScholarScraper | Semantic Scholar papers |
| europe_pmc_jku | EuropePMCScraper | Europe PMC papers |
| zenodo_jku | ZenodoScraper | Zenodo datasets/publications |
| wikidata_jku | WikidataScraper | Wikidata JKU entities |
**From `source_varian... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 143f2e33b3ffff9c27139d967dbc91133a3426007dde866669a78f49edb9be39 | 6 | 896 |
Recommendation: Either (a) add sources.json entries for `github_jku`, `youtube_jku`, `jku_podcasts` with quality blocks, or (b) handle "source not in sources.json" in the verify code by treating missing threshold as 0. Option (a) is cleaner. Note: some of these DO already have sources.json entries (youtube_jku does not... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | ebfbc28c37acb296d7aa393df7d10c6961a89083cab6b654f161ca1ebc8087e4 | 7 | 896 |
update `test_health_*` tests after health command removal
- [ ] Live verification tests for VERIFY-01 through VERIFY-05 are by nature live tests (`-m live`) and will be validated by running `jku-kb verify` itself
## Sources
### Primary (HIGH confidence)
- Direct code inspection of `src/jku_kb/cli.py` -- health comman... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-RESEARCH.md | Markdown | 2941fbd822ee2e2303c7b0ef10aa855cd7483b230507afbcac24ec2e52b203b6 | 8 | 466 |
---
phase: 15
slug: verification-completeness-reporting
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-24
---
# Phase 15 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-VALIDATION.md | Markdown | eac1df1415c34cab3f25faf51e31d29ddcee90e6321414b15c9f0f6b94659e06 | 0 | 896 |
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ] Wave 0 covers all MISSING references
- [ ] No watch-mode flags
- [ ] Feedback latency < 30s
- [ ] `nyquist_compliant: true` set in frontmatter
**Appr... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-VALIDATION.md | Markdown | 4e5745ebb7eecdfea726f07987b30108d971495f5d955b27f12f18fb7994e861 | 1 | 78 |
---
phase: 15-verification-completeness-reporting
verified: 2026-03-24T12:00:00Z
status: passed
score: 7/7 must-haves verified
---
# Phase 15: Verification & Completeness Reporting -- Verification Report
**Phase Goal:** Every source is verified against its live endpoint and a new `jku-kb verify` CLI command makes pas... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-VERIFICATION.md | Markdown | d9939cd69dc82cb5f7c523a31225f62eacdf23cdf35b00c8db77064ca160c554 | 0 | 896 |
test_verify_command_discover_error. 5 _compute_health_status tests preserved. All 50 CLI tests pass. |
### Key Link Verification
| From | To | Via | Status | Details |
|------|----|-----|--------|---------|
| `src/jku_kb/cli.py` | `jku_kb.scrapers.get_scraper` | verify command calls get_scraper() for each source | WI... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-VERIFICATION.md | Markdown | bec1d852a8e5b9b0fd959f515a7244475b8351b9cc3696cea0499b6077084957 | 1 | 896 |
Human Verification Required
Human verification was completed during Plan 02 execution (Task 2: checkpoint:human-verify, gate=blocking). The user confirmed:
1. Rich table renders correctly with Source, Status, Expected, Actual, Ratio columns
2. Verify command output is clean with proper styling and summary footer
3. `j... | jku-encyclopedia | .planning/phases/15-verification-completeness-reporting/15-VERIFICATION.md | Markdown | b4d0ff84d5fc429977eb33f91909ea41b2c5c776b390f4e151ebd0d72f4ecab3 | 2 | 347 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/scrapers/base.py
- src/jku_kb/scrapers/web_crawl.py
- src/jku_kb/scrapers/html_crawler.py
- src/jku_kb/orchestrator/__init__.py
- tests/unit/test_ba... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-PLAN.md | Markdown | 14689cb82bb56bea22c339d0c65ea6d414ceadda69e6e43cd19bbe0e53d13627 | 0 | 896 |
", url, params=params, **kwargs)
@retry(stop=stop_after_attempt(5), wait=wait_exponential(...), retry=retry_if_exception_type(...))
async def _request_with_retry(self, client, method, url, **kwargs):
response = await client.request(method, url, **kwargs)
if response.status_code == 429:
await asyncio.sl... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-PLAN.md | Markdown | 2443e55346f24e8f1194602766b6809b37c2d22f5575c487b8d21d2a031566b7 | 1 | 896 |
exceeded for {url}",
request=httpx.Request("GET", url),
response=response,
)
```
**Remove or simplify `_request_with_retry`:** Since the retry logic is now inlined into `_rate_limited_get`, remove the `@retry` decorator and the `_request_with_retry` method entirely. The `RateLimitedError` class can... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-PLAN.md | Markdown | 133b4d043fd900db763fcd30c8d0e875d55d97f5b7a8b025b8120ddeee17ce5f | 2 | 896 |
):
```python
if "sitemap" in start_url.lower() and start_url.endswith(".xml"):
```
After:
```python
from urllib.parse import urlparse # already imported at top
parsed_start = urlparse(start_url)
if "sitemap" in parsed_start.path.lower():
```
This correctly matches `sitemap.xml?sitemap=pages&cHash=abc` because the pa... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-PLAN.md | Markdown | 75ae575b84e0795f4adf85b936439886b132e2dd05c084ca601a9969ed6c3cb6 | 3 | 896 |
settings.max_concurrent_sources * self.settings.max_concurrent_requests
async with httpx.AsyncClient(
timeout=httpx.Timeout(30.0, connect=10.0),
follow_redirects=True,
verify=False,
limits=httpx.Limits(max_connections=pool_size, max_keepalive_connections=pool_size // 2),
head... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-PLAN.md | Markdown | a330c9763812007a9eb47060c2feb2a33910f7e9f8545fa4de5c8b097dafbb68 | 4 | 698 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 01
subsystem: scrapers, orchestrator
tags: [rate-limiter, aiolimiter, sitemap, httpx, asyncio, deadlock-fix]
requires:
- phase: 12-web-crawl-infrastructure
provides: crawl_html BFS crawler, WebCrawlScraper, _url_passes_f... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-SUMMARY.md | Markdown | 4f6790c3c2d4f092baf6ca8591249d1ba98fa5ced0e60de06a92ec24ef673c36 | 0 | 896 |
.py` - Added TestRateLimitedGet class with 7 tests (success, 429 retry, 500 retry, network error, limiter ordering, max retries)
- `tests/unit/test_scrapers/test_web_crawl.py` - Added 2 tests for sitemap query-param detection (sitemap and hybrid modes)
## Decisions Made
- **Kept _request_with_retry:** semantic_scholar... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-01-SUMMARY.md | Markdown | 8523ba6653ceef13e6bf1aaf8c8338d57c017907885adc7a972f218595bafcbe | 1 | 480 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/scrapers/opencast.py
- src/jku_kb/config.py
- src/jku_kb/orchestrator/helpers.py
- src/jku_kb/orchestrator/__init__.py
- tests/unit/test_orchestrato... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-PLAN.md | Markdown | 25038ecf4fa3e235ecb1e538b9afcae1ea64be623a6f6595707aacf0bc8e8567 | 0 | 896 |
> None:
"""DEPRECATED: Use ManifestWriter for buffered writes in phase loops."""
record = orjson.dumps({"item_id": item_id, "ts": datetime.now(UTC).isoformat()})
with open(manifest_path, "ab") as f:
f.write(record + b"\n")
```
From src/jku_kb/orchestrator/__init__.py (line 23, re-export):
```python... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-PLAN.md | Markdown | be0abbfe9264bdc9fdaa6bc0ee06016424f5d7431b060a83b0625c5280acfe6e | 1 | 896 |
sites unchanged**, but define `_first` as a local variable in `_episode_to_raw_item`:
```python
def _episode_to_raw_item(episode: dict[str, Any]) -> RawItem | None:
_first = lambda val: (str(val[0]) if val else "") if isinstance(val, list) else (str(val) if val else "")
try:
...
```
This removes it fr... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-PLAN.md | Markdown | 1e260be495817de1b3dd37bdba8c2333b77d9a36b421d0ea87ceb017c219fd12 | 2 | 896 |
src/jku_kb/orchestrator/helpers.py (lines 89-97: _mark_done function)
- src/jku_kb/orchestrator/__init__.py (line 23: _mark_done re-export, line 35: __all__)
- tests/unit/test_orchestrator.py (lines 16, 68-93, 180, 283: _mark_done references)
- tests/unit/test_config.py (line 11, lines 194-221: SourceConfig... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-PLAN.md | Markdown | 152d0ef21c849d210b5f80e60ccfe37b8ffd40e2bfdcdeac25b9f3a317cdc815 | 3 | 896 |
contain `test_mark_done_appends_to_file`
- test_config.py contains `CrawlVariantConfig` and does NOT contain `SourceConfig(`
- `uv run pytest tests/unit/test_orchestrator.py tests/unit/test_config.py -x -q` exits 0
</acceptance_criteria>
<done>No duplicate class names. config.py has CrawlVariantConfig, mode... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-PLAN.md | Markdown | 47e57417a49ddc22e44f6cf196de699b1b408302e375920c11b0b401191ecd2d | 4 | 221 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 02
subsystem: scrapers, config, orchestrator
tags: [dead-code, refactor, naming, opencast, config]
# Dependency graph
requires: []
provides:
- "Clean opencast.py without dead functions"
- "CrawlVariantConfig (renamed from ... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-SUMMARY.md | Markdown | 9ccac9a1c6b1df7f75ac40a666ab2f768266f78965db41854b4055a39692ee27 | 0 | 896 |
Plan 16-02 complete. Ready for remaining plans in phase 16.
- All 87 tests in modified test files pass (24 opencast, 63 orchestrator+config)
- Pre-existing test failure in test_cli.py::test_run_command is unrelated (CLI module refactoring)
---
*Phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-qualit... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-02-SUMMARY.md | Markdown | 16834961a09bc292166e26df9f1509651bbc2d09ec391ec17fb751b3b783046f | 1 | 122 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 03
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/probe.py
- src/jku_kb/storage/dedup.py
- src/jku_kb/scrapers/openalex_xref.py
- pyproject.toml
- data/sources.json
- src/jku_kb/scrapers/pdf_fetch... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-PLAN.md | Markdown | bca41a489343bbd62c632efd2e5825f80ff1d4348990206fa073590ba965297c | 0 | 896 |
From src/jku_kb/storage/dedup.py (lines 100-113):
```python
def _normalize_doi(doi: str) -> str:
doi = doi.strip().lower()
doi = re.sub(r"^https?://doi\.org/", "", doi)
doi = re.sub(r"^doi:", "", doi)
return doi
def _normalize_arxiv_id(arxiv_id: str) -> str:
arxiv_id = arxiv_id.strip()
arxiv_id... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-PLAN.md | Markdown | 6f803473fd044fa3856f7c13b99ec2fbccf3c33ff717fbdf83b970c2168cb085 | 1 | 896 |
) for _ in range(requests_per_level)])
errors = len(error_flags)
...
```
Remove the `nonlocal errors` pattern entirely. Remove the `errors = 0` initialization since it's replaced by `error_flags: list[bool] = []`.
**FIX-23: Deduplicate normalize functions.**
The canonical implementations are in `dedu... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-PLAN.md | Markdown | ed492326069c83c0f168869b308df556fb50cf361b9e1d2a3edbea72a64316f8 | 2 | 896 |
<done>Probe race condition fixed. Normalize functions exist in one place (dedup.py). Unused deps removed from pyproject.toml.</done>
</task>
<task type="auto">
<name>Task 2: Remove dead sources, hardcoded license, fix chunk/embed performance</name>
<read_first>
- data/sources.json (lines 244, 284, 363, 552 — d... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-PLAN.md | Markdown | c8719bef726aa9b8b2713739996fcc055ada00920539f6b039c7f4beeb7bbf79 | 3 | 896 |
within it. Remove `async with sem:` from inside `_embed_one` (line 91) and instead wrap the gather:
```python
sem = asyncio.Semaphore(ctx.settings.max_concurrent_sources)
async def _embed_one_with_sem(source_id: str) -> tuple[str, int]:
async with sem:
return await _embed_one(source_id)
completed = await... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-PLAN.md | Markdown | 41edb19ec05beece6dc245f7cd1a64d044b08c5b9cb75173829357cc718a17b5 | 4 | 613 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 03
subsystem: pipeline, scrapers, storage
tags: [asyncio, dedup, probe, sources, chunk, embed, performance]
# Dependency graph
requires: []
provides:
- Thread-safe probe concurrency counter (list.append pattern)
- Single-s... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-SUMMARY.md | Markdown | 12435a6893e867bcee9e7247f4af594874891dffd6105c255dc50d8180309360 | 0 | 896 |
` - Thread-safe error counting with list.append pattern
- `src/jku_kb/storage/dedup.py` - Public normalize_doi/normalize_arxiv_id (renamed from private)
- `src/jku_kb/scrapers/openalex_xref.py` - Removed duplicate normalize functions
- `src/jku_kb/scrapers/arxiv.py` - Updated import to use dedup.normalize_arxiv_id
- `s... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-03-SUMMARY.md | Markdown | 3b70bafb6d673c2de47e58e9d4a521be84b4ac0f5a2183e564c35956a53a1a11 | 1 | 843 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 04
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/cli.py
- src/jku_kb/cli/__init__.py
- src/jku_kb/cli/dashboard.py
- src/jku_kb/cli/commands.py
- src/jku_kb/cli/verify.py
- src/jku_kb/cli/helpers... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-PLAN.md | Markdown | 0d1bba4e56a55b7c654b9ae5a35c58ccd89a8057ace92c0d8c893d45dd3372ed | 0 | 896 |
>
Current cli.py structure (1136 lines):
```
Lines 1-27: Imports, app/console definition
Lines 29-58: _PHASE_META, _phase_panel
Lines 60-108: _RowState, _build_dashboard_table
Lines 111-243: _compute_eta, _compute_throughput, LiveDashboard class
Lines 245-253: _summary_line
Lines 260-303: _run, _init_pipeline
Lines... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-PLAN.md | Markdown | 22d62264957be22822617e2bfda5332baf4d1c038d6d0e1ad2d19d80c3144384 | 1 | 896 |
_read_manifest_stats,
_run,
_summary_line,
)
from jku_kb.cli.verify import _compute_health_status # noqa: F401, E402
```
**Step 3: Create `src/jku_kb/cli/dashboard.py` (~230 lines).**
Move from cli.py:
- `_PHASE_META` dict and `_phase_panel` function
- `_RowState` dataclass
- `_build_dashboard_table` function... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-PLAN.md | Markdown | 80553791c5a7b3a35e39158769908721625b86ebe3c87e63ef6d42df8e88738d | 2 | 896 |
/__init__.py` and `cli/helpers.py`
The cycle risk: `__init__.py` imports `commands`, `admin`, `verify` for registration. Those modules import from `helpers.py` and `dashboard.py`. Those import from `__init__.py` for `app`/`console`. This IS a circular import.
**Fix the cycle:** Define `app` and `console` in `__init__... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-PLAN.md | Markdown | 14291534e21309122dbc6f98dbc584aef06858fd4ed98bf5e45fc5430da9f0b3 | 3 | 896 |
_RowState(source_id=source_id)
state = self._rows[source_id]
if advance == 0:
# Source started — record per-source start time
state.start_time = time.monotonic()
state.status = "running"
elif advance == -1:
state.status = "ok"
else:
if state.start_time == 0.0:
... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-PLAN.md | Markdown | d8931b838cb7f2a9aadba8af6def1b485610a59d81f3bc16a2c9013d00efc3d0 | 4 | 852 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 04
subsystem: cli
tags: [cli-split, refactor, dashboard, verify, dead-code]
requires: []
provides:
- "cli/ package with 6 focused modules (none over 400 lines)"
- "Per-source dashboard timing (FIX-21)"
- "verify --cached... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-04-SUMMARY.md | Markdown | b2a408c9dee921f0bffeda22ba13d7a473a4d93fbaaad666edf242f7deeb341a | 0 | 557 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 05
type: execute
wave: 2
depends_on: [16-01, 16-02, 16-03, 16-04]
files_modified:
- src/jku_kb/scrapers/opencast.py
- src/jku_kb/scrapers/pdf_fetch.py
- src/jku_kb/scrapers/github.py
- src/jku_kb/scrapers/huggingface.py... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-05-PLAN.md | Markdown | d7eb5e0e34704459b1865cb4173e1c0689cc7bcf19846ded0f09a1447d357abb | 0 | 896 |
obvious logic (e.g., "Lambda default-arg binding to avoid late-binding closure bugs")
- External API quirks (e.g., "OpenCast total field parsed as int() from string")
- Bug references (e.g., "FIX-01: rate limiter starvation fix")
</interfaces>
</context>
<tasks>
<task type="auto">
<name>Task 1: Remove excessive doc... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-05-PLAN.md | Markdown | 563ec784ecfd2a10c5016fa8382746644981caca0bc1547f6c3cf29816c34eea | 1 | 896 |
may return dict instead of list`)
- Lambda binding explanations (`# Default-arg binding to avoid late-binding`)
- TODO/FIXME markers
**FIX-10: Source_id pattern — NO CODE CHANGE.**
The hardcoded source_id pattern (registry decorator + __init__ + converter) is kept as-is per research recommendation. The duplication is ... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-05-PLAN.md | Markdown | eef143ffd85477ac6de51aa3f207057ff03e801a29b4d18e02eb7a70bc655b17 | 2 | 647 |
---
phase: 16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
plan: 05
subsystem: scrapers
tags: [docstrings, comments, cleanup, requirements-closeout]
requires:
- plan: 16-01
provides: "Updated base.py, web_crawl.py, html_crawler.py"
- plan: 16-02
provides: "Clean opencast.py"
-... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-05-SUMMARY.md | Markdown | 8e21056ce7d521919a61087120e0050028d1d5510a7fc2ec55ffd017b460d354 | 0 | 521 |
# Phase 16: Pipeline Bug Fixes & Code Quality - Research
**Researched:** 2026-03-24
**Domain:** Python async pipeline bug fixes, dead code removal, code quality
**Confidence:** HIGH
## Summary
Phase 16 addresses 27 issues discovered during the first full pipeline run of the JKU Knowledge Base. These range from criti... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | f708f2cd1c0a39ee677efd4db07dcb1bd05635cb0a4d520feb826a50a208eae1 | 0 | 896 |
bioinf_teaching, fmv_teaching, ssw_teaching, github_ssw_jku have no scraper |
| FIX-21 | Fix dashboard per-source timing | start_time set from phase init, not per-source "started" signal |
| FIX-22 | Remove dead `_compute_avg_file_size()` | cli.py:366-382 defined but never called |
| FIX-23 | Deduplicate normalize func... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | e5d3d3d831bac312340c15e0c2f9162f7e4b0edf46d1df714146bee4080e53f7 | 1 | 896 |
)
await asyncio.sleep(retry_after) # Sleep OUTSIDE limiter
continue
if response.status_code >= 500:
response.raise_for_status()
return response
raise httpx.HTTPStatusError(...)
```
This means removing the `@retry` decorator from `_request_with_retry` and inlinin... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | f876f6d724ddd4bfc53f2f8b0f315685d7b193529f26fe213dd9db0202390dc0 | 2 | 896 |
.cli:app"` in pyproject.toml must update to `jku_kb.cli:app` (same if `cli/` is a package with `__init__.py` re-exporting `app`).
### FIX-23: Deduplicate Normalize Functions
**Current duplication:**
- `storage/dedup.py:100-113` -- `_normalize_doi()` and `_normalize_arxiv_id()`
- `scrapers/openalex_xref.py:48-82` -- `... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | 1e032b8a19ea19b7175cc330718274be61cc09728c53e2dd12408fd951ac8dff | 3 | 896 |
the retry/limiter pattern in `_rate_limited_get` breaks the retry behavior for non-429 errors (timeouts, 5xx).
**Why it happens:** The current code uses tenacity's `@retry` decorator which handles multiple error types. Inlining the loop requires manually handling all cases.
**How to avoid:** Keep tenacity for non-429 r... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | dc5ca85ae4e598395e84ab3ef65d15f2edc2f212601833fde9969debe3e2a6d8 | 4 | 896 |
xml?cHash=abc`, and `/sitemap/pages.xml`.
### Dashboard Timing Fix (FIX-21)
Current code (cli.py:169-170):
```python
self._phase_start = time.monotonic()
for state in self._rows.values():
state.start_time = self._phase_start # All sources start at phase init
```
Fix in `progress_callback` (cli.py:194-210):
```p... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | 9f003585ee5f147bd403717ca90521d831a4424436f1022a0a60322d184f5e07 | 5 | 896 |
file | pyproject.toml `[tool.pytest.ini_options]` |
| Quick run command | `python -m pytest tests/ -x -q` |
| Full suite command | `python -m pytest tests/ --cov=jku_kb --cov-report=term-missing` |
### Phase Requirements to Test Map
| Req ID | Behavior | Test Type | Automated Command | File Exists? |
|--------|-------... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | 66ebb5678589bcc5539f0a78a39bb86fbf36174aac8cc41e4de172abdd13ef96 | 6 | 896 |
py:15` vs `models.py:100`: both `SourceConfig` classes confirmed with different fields
- `pyproject.toml`: `selectolax`, `polars`, `yt-dlp` confirmed in dependencies
- Grep across `src/`: confirmed zero imports of `selectolax`, `polars`, `yt_dlp`; `ffmpeg` IS used
- `helpers.py:89-97`: `_mark_done` confirmed deprecated... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-RESEARCH.md | Markdown | a600697a314e6356718c656317cf32fbfa373ecff0ae5cc85658ef3bfb2d9c12 | 7 | 330 |
---
phase: 16
slug: fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-24
---
# Phase 16 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Pr... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-VALIDATION.md | Markdown | f609cedfcc5a039765991ba0470a5b66184819aae57218e20efa819293b30a46 | 0 | 896 |
-kb run` and monitor for hangs |
| All 6 web crawl sources discover >0 | FIX-01 | Requires network access | Run discover phase and check counts |
---
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0 dependencies
- [ ] Sampling continuity: no 3 consecutive tasks without automated verify
- [ ... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/16-VALIDATION.md | Markdown | 888eee422fe851baf657f0321aa7a9855dd745204de9a8b05af21e0ded047d08 | 1 | 115 |
# Deferred Items
## Pre-existing test failure in test_cli.py
- **File:** tests/unit/test_cli.py::test_run_command
- **Issue:** `AttributeError: <module 'jku_kb.cli'> does not have the attribute 'get_settings'`
- **Cause:** CLI was refactored from a single module (`cli.py`) to a package (`cli/__init__.py`), and the te... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/deferred-items.md | Markdown | 38b4b6102306add0ed05527147b6b61567949a40d4e48546de16160798f539b9 | 0 | 237 |
# Phase 16: Pipeline Bug Fixes & Code Quality
## CRITICAL BUGS (must fix)
1. **Rate limiter starvation kills web crawl** (`base.py:186-187`): `_rate_limited_get` holds rate limiter token during entire retry cycle including `asyncio.sleep(retry_after)` on 429s. BFS crawler calls this sequentially per-URL, so crawlers s... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/REQUIREMENTS.md | Markdown | baea219370e1ec98d9ff2aff7dad067f7db92dd8862b3a2ea13e00935a0c3500 | 0 | 896 |
**: Remove `bioinf_teaching`, `fmv_teaching`, `ssw_teaching`, `github_ssw_jku` entries that have no scraper.
21. **Fix dashboard per-source timing**: Set `start_time` from "started" callback (advance==0), not phase init.
22. **Remove dead `_compute_avg_file_size()`** from cli.py.
23. **Deduplicate normalize functions**... | jku-encyclopedia | .planning/phases/16-fix-all-broken-pipeline-bugs-deadlocks-dead-code-and-code-quality-issues/REQUIREMENTS.md | Markdown | 9402120c5b0fa812ab6a25621c1bd6f8c53e67686ecf5010f26bc2d5cda0a046 | 1 | 319 |
# Architecture: Multimodal Pipeline Integration
**Domain:** Media discovery, download, and embedding within existing 5-phase pipeline
**Researched:** 2026-03-24
**Overall confidence:** HIGH (based on direct codebase analysis)
## Current Architecture Summary
The pipeline follows a strict 5-phase sequential model:
``... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | 784b6c9c89ef25b0588f99df11e28a264bb87af5ddb6de65f5fb2d6d928d8656 | 0 | 896 |
| Multimodal embed via file upload | No change -- already handles all modalities | NONE |
| Storage (Qdrant/Neo4j) | Stores vectors and graph nodes | No change -- modality-agnostic | NONE |
### What Does NOT Need to Change
This is the critical architectural observation: **chunk, embed, and link phases already handle ... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | e59aec2f3dc4bfc48e1890cc8e7c4918c5d445430b38753a38ab79be93138d25 | 1 | 896 |
[RawItem]:
"""Read media_discovery.jsonl from all web crawler cache dirs."""
# Scan cache_dir.parent for */media_discovery.jsonl files
# Deduplicate by normalized URL
# Return RawItem per unique media URL with correct Modality
async def _do_fetch(self, item: RawItem) -> FetchResult:... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | 0a3e40d5a97051a6bd925c4653a19975e7de9b094fbb2a4e6bd017fea91dc8ab | 2 | 896 |
edges
```
### Phase Ordering and the Two-Run Requirement
**Important architectural constraint:** In the current `run_all()` flow, discover runs for ALL sources, then fetch runs for ALL sources. This means `media_fetch.discover()` runs BEFORE `web_crawl._do_fetch()` has written `media_discovery.jsonl`.
On a fresh run... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | df780499c8c58d2f1b50b45e569f04cd528d31bcac663d258c553123eabb92c7 | 3 | 896 |
handle downloads with its own rate limiting, streaming, and resume.
### Anti-Pattern 3: Modifying Chunk or Embed Phases
**What:** Adding media-specific logic to `orchestrator/chunk.py` or `orchestrator/embed.py`.
**Why bad:** These phases already dispatch correctly by modality via `_guess_modality()` and the `Modali... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | c33bf965df65236ed4a40910e88124a8b86194a4c0e96517ca8a200859c4ec0d | 4 | 896 |
. This likely reduces 500K raw URLs to 5K-20K meaningful content images.
## Build Order
| Step | Component | Depends On | Enables | Risk |
|------|-----------|-----------|---------|------|
| 1 | `_extract_media_links_from_html()` in web_crawl.py | Nothing new | Steps 2-3 | LOW -- follows PDF extraction pattern |
| 2 ... | jku-encyclopedia | .planning/research/ARCHITECTURE.md | Markdown | 18ac96e1853d1a5275f89039af18414044eae9796a710266cd3a5ceb850cdc11 | 5 | 404 |
# Feature Landscape
**Domain:** Multimodal content discovery, download, and embedding pipeline for academic knowledge base
**Researched:** 2026-03-24
**Milestone:** v3.0 Multimodal Pipeline
## Table Stakes
Features the pipeline must have to fulfill the v3.0 multimodal promise. Missing any of these means the "every p... | jku-encyclopedia | .planning/research/FEATURES.md | Markdown | 34e2b3c40c58e906428230f95157e31ca3065793914f54e0fa0495c79674d2ea | 0 | 896 |
Current segment length needs verification. | Low | `AudioChunker` | Verify AudioChunker segment length is <=80s. If currently set to 90s (matching video), reduce to 75s with 10s overlap for safety margin. |
| **PDF page count capping at 6 pages** | Gemini Embedding 2 accepts max 6 PDF pages. PdfChunker already uses 6-p... | jku-encyclopedia | .planning/research/FEATURES.md | Markdown | df3e5bcbe7be0a168ba73fcb7732f644c18a193cbb678ef6c5e781734eab3076 | 1 | 896 |
relevance for image chunks. |
| **Thumbnail/icon filtering** | Intelligently skip images that are UI elements (logos, icons, spacers, navigation arrows) rather than academic content. Heuristics: file size < 10KB, filename contains "icon", "logo", "arrow", "spacer", "button". | Medium | None (new) | Reduces noise signif... | jku-encyclopedia | .planning/research/FEATURES.md | Markdown | 26b4964bc96e338a2965faa5e842ddf0e99b83d9c250deb7bd589edfce714c5d | 2 | 896 |
SVGs are XML code, not raster images. Gemini Embedding 2 does not natively handle SVGs. Converting SVG to PNG adds ImageMagick/Cairo dependency and rendering complexity. | Skip SVGs entirely. They are usually diagrams that appear alongside text content which is already embedded as TEXT modality. |
| **DOCX/PPTX/XLSX em... | jku-encyclopedia | .planning/research/FEATURES.md | Markdown | 5a1a12adb79e3d04659604a4f424cbc9f6d376d379280d3b3adbc1b880a7bc48 | 3 | 896 |
- should work naturally, verify after data exists
## Gemini Embedding 2 API Constraints (reference)
| Modality | Max Input | Supported Formats | Processing Notes |
|----------|-----------|-------------------|------------------|
| Text | 8,192 tokens | Plain text string | Combined token limit across all modalities in ... | jku-encyclopedia | .planning/research/FEATURES.md | Markdown | 22dabe7a280bec801f2f5345375193b9764ff8c0e4e89742193b568aa9531fcf | 4 | 786 |
# Domain Pitfalls: Adding Multimodal Media to an Existing Text Pipeline
**Domain:** Multimodal media discovery, download, and embedding for a text-only async ingestion pipeline
**Researched:** 2026-03-24
**Overall confidence:** HIGH (based on direct codebase analysis + official Gemini API docs + community patterns)
#... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 9f04f0946a3a203769eecd2e90c46ff50fbd44b4393e31eacc11b5d055ac43b3 | 0 | 896 |
per-source embedding cost before starting (item count x modality cost estimate)
- Implement a dry-run mode that reports what would be embedded without calling the API
- Process text embeddings first (cheap), then images, then audio, then video (most expensive) -- fail-fast on budget
**Detection:** Track API call count... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 0874b58b8923d13fbc26ca0539e8437521478dcace522431ab07e02f4f4b4dc9 | 1 | 896 |
large downloads can exhaust the connection pool
**Prevention:**
- Create a separate timeout profile for media downloads: longer total timeout (e.g., 600s), but keep the connect timeout at 10s
- Fix the rate limiter pattern in `_download_file`: acquire limiter only for the initial connection, not the entire stream
- Im... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 21da5e78ab0325c21e4200a542e9b9f0c8f34d93b02173ad7281ddfea7573247 | 2 | 896 |
ending in `.jpg` actually serves HTML (redirect to login page). A URL with no extension serves a binary image. The `_guess_modality` function in helpers.py relies entirely on file extension, which is unreliable for web-discovered media. The `_guess_mime` function in gemini.py maps extensions to MIME types, but never va... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 2385e49f426f68da2eb4247c397a3d94566447229daf2812ec46b44ec233b14a | 3 | 896 |
crashes mid-batch (OOM, network failure, Ctrl+C), uploaded files remain as orphans. The Files API has a 20GB per-project storage limit. After multiple crash-recovery cycles, orphaned files accumulate and the next run fails with "storage quota exceeded" before embedding any content.
**Why it happens:** The `startup_swe... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | e26a0b7e46ae95339120b3bc708c5a877c3e674149cca969ca22e136c75a080a | 4 | 896 |
end verification phase. Quality of life improvement, not a correctness issue.
## Phase-Specific Warnings
| Phase Topic | Likely Pitfall | Mitigation |
|-------------|---------------|------------|
| Dead source removal | Removing sources breaks existing manifests | Delete cache dirs for removed sources; update sources... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 52a4cd1e8644b4210a23d15263c9c3ea150ca7c4d15db70f78250edbad4bed48 | 5 | 896 |
[Gemini API File Size Update (January 2026)](https://blog.google/innovation-and-api/technology/developers-tools/gemini-api-new-file-limits/) - Updated inline and Files API limits
- Direct codebase analysis of `html_crawler.py`, `base.py`, `gemini.py`, `batch.py`, `video_chunker.py`, `audio_chunker.py`, `orchestrator/he... | jku-encyclopedia | .planning/research/PITFALLS.md | Markdown | 622eb500ad644c8897bf9b92f914864d4557e384918672922c8c3ad219cedb9e | 6 | 112 |
# Stack Research: v3.0 Multimodal Pipeline Additions
**Domain:** Multimodal content discovery, download, and embedding
**Researched:** 2026-03-24
**Confidence:** HIGH (Gemini limits verified via official docs; library versions via PyPI)
> This document covers ONLY new dependencies and configuration needed for v3.0.
>... | jku-encyclopedia | .planning/research/STACK.md | Markdown | c4140176d6b6b54b4207847e6b39b45cf5e59dd11373ef42dc4e44c4bddcb9c0 | 0 | 896 |
** The existing `ImageChunker` does zero validation beyond `stat().st_size > 0`. For multimodal embedding, we need to:
1. Verify the image is not corrupt (Pillow `Image.open().verify()`)
2. Read dimensions to decide if resizing is needed (Gemini scales to 3072x3072 internally but sending a 20MP image wastes upload band... | jku-encyclopedia | .planning/research/STACK.md | Markdown | 84fa71f6fe5a77361062a21fbec196e655e330e1b40abef7287cab9557201c47 | 1 | 896 |
, `image/webp`, `image/gif` | GIF treated as static image |
| Video | `video/mp4`, `video/quicktime`, `video/mpeg`, `video/webm`, `video/x-flv`, `video/3gpp` | MP4 is primary target |
| Audio | `audio/mp3`, `audio/wav`, `audio/aac`, `audio/flac`, `audio/ogg`, `audio/m4a`, `audio/mpeg`, `audio/opus` | MP3/WAV most commo... | jku-encyclopedia | .planning/research/STACK.md | Markdown | ed05383dfe6cd777459f9c569589e6080e1fca0343ac7213628eb008246065d8 | 2 | 896 |
JS rendering not needed — media discovery extracts from already-crawled HTML | BeautifulSoup on fetched HTML |
| `opencv-python` | Video frame analysis not needed — Gemini handles raw video | ffmpeg-python for chunking |
| `librosa` / `pydub` | Audio analysis not needed — Gemini handles raw audio | ffmpeg-python for ch... | jku-encyclopedia | .planning/research/STACK.md | Markdown | 7519a53a50026d2b46f07149e3589bf3ef4de67fd601f295348e48a47aec0f44 | 3 | 896 |
project/filetype/) -- pure Python magic-number detection
- [Pillow documentation](https://pillow.readthedocs.io/) -- v12.1.1 stable, Python 3.12 support
- [Python mimetypes docs](https://docs.python.org/3/library/mimetypes.html) -- stdlib extension-based MIME guessing
---
*Stack research for: v3.0 Multimodal Pipeline ... | jku-encyclopedia | .planning/research/STACK.md | Markdown | b060c4c2beaf64979fb6f3900063d15fc5c97ae323e6a309283bd81210543ff7 | 4 | 97 |
# Research Summary: v3.0 Multimodal Pipeline
**Domain:** Media discovery, download, and embedding extension to existing pipeline
**Researched:** 2026-03-24
**Overall confidence:** HIGH
## Executive Summary
The v3.0 milestone extends the existing 5-phase pipeline (discover -> fetch -> chunk -> embed -> link) to handl... | jku-encyclopedia | .planning/research/SUMMARY.md | Markdown | 533808ccf2ddb3cfb9679f46369b310828570c31c1d9f7db9c4a7fb32ca6c0f2 | 0 | 896 |
directly to media discovery |
| Pitfalls | HIGH | Image spam filtering is the main risk, well-understood mitigation |
## Gaps to Address
- Gemini API cost for batch image embedding at 5K-50K images -- needs estimation during planning
- Exact filtering heuristics for decorative images vs content images -- needs tuning... | jku-encyclopedia | .planning/research/SUMMARY.md | Markdown | b56fdc6e6917be0bcb018a7e624617a8a66e3c1845d10bd0bba53762d0acac47 | 1 | 89 |
{
"50": {"name": "International Office", "faculty": "central"},
"54": {"name": "Quality Management", "faculty": "central"},
"61": {"name": "Legal / Satzung", "faculty": "central"},
"88": {"name": "Medical Faculty Admin", "faculty": "MED"},
"103": {"name": "Inst. für Betriebliche Finanzwirtschaft", "faculty": ... | jku-encyclopedia | data/gruppen_mapping.json | JSON | 6c482f02151cb9e9ba4d48dd5db75d9891c98a08d8ae9517aaae0f8137291e36 | 0 | 572 |
{"count": 450198}
| jku-encyclopedia | data/meta_cache.json | JSON | 1c668920274ad304d7fa5f9613681e36b1e71625c06c066594c439ab8d52627e | 0 | 7 |
{
"edges": [
{
"source_id": "github_ml_jku",
"target_id": "arxiv_jku",
"edge_type": "IMPLEMENTS",
"confidence": 1.0,
"notes": "ml-jku repos implement arXiv papers"
},
{
"source_id": "github_cpjku",
"target_id": "arxiv_jku",
"edge_type": "IMPLEMENTS",
"... | jku-encyclopedia | data/seed_edges.json | JSON | 22020071a42cd5c9372a5cd0dd0a5fcd5a987eb92b22c85a69e7086b0bd3c1c8 | 0 | 555 |
(lecture scripts)",
"210": "Unknown (Gruber teaching list)",
"219": "LIT (Linz Institute of Technology - Lecture Series)",
"336": "Conference/Event Materials",
"338": "Institut für Strafrecht (Criminal Law - Gottfried)"
},
"scraping_notes": "Enumerate all gruppen numbers via:... | jku-encyclopedia | data/sources.json | JSON | 1fb36d2a8dd8134ee3ae5d04721098c44ea47b42f57a658c37160ceafc3c5f44 | 2 | 896 |
"scraping_notes": "Crawl the course directory. Each course folder typically contains lecture slides (PDF), exercise sheets, and sometimes solution PDFs. Also check the RISC Portal at portal.risc.jku.at and moodle.risc.jku.at for publicly accessible course content.",
"quality": {
"expected_min_items": 0,
... | jku-encyclopedia | data/sources.json | JSON | 29f0ac0428db0d0e256251284520d747ceb91b1466211464000518ba43867111 | 3 | 896 |
token_windows",
"estimated_item_count": 60,
"language": "en",
"license": "mixed",
"robots_txt_compliant": true,
"rate_limit_delay_seconds": 1,
"requires_javascript": false,
"file_types": [
"py",
"md",
"ipynb"
],
"priority": "high",
"scr... | jku-encyclopedia | data/sources.json | JSON | d7073a23b8150e5cdf5d6b7e29f2bccc1d541d6c9bb18b1775dacaaa047d559c | 4 | 896 |
: true,
"rate_limit_delay_seconds": 1,
"requires_javascript": false,
"file_types": [
"java",
"py",
"md"
],
"priority": "medium",
"scraping_notes": "Data & Knowledge Engineering group.",
"quality": {
"expected_min_items": 0,
"min_text_leng... | jku-encyclopedia | data/sources.json | JSON | 2a6e2e71408e77eedda20c67c17a11902ca390c5d9b552f8e95dd4ae14918d68 | 5 | 896 |
",
"category": "video",
"url": "https://www.youtube.com/@JKULinz",
"quality": {
"expected_min_items": 698,
"min_text_length": 0,
"health_url": "https://www.youtube.com/@JKULinz"
}
},
{
"source_id": "jku_podcast_alumni",
"name": "JKU Alumni Podcast - Hö... | jku-encyclopedia | data/sources.json | JSON | d7f8edf97c4fe61427d86846127ee58009e6f755cbf9d8f82f2ff4ffa06a420c | 6 | 896 |
": 0,
"min_text_length": 0
}
},
{
"source_id": "openalex_jku",
"name": "OpenAlex JKU Works",
"category": "metadata",
"url": "https://api.openalex.org/works?filter=institutions.ror:052r2xn60",
"listing_mechanism": "api",
"auth_required": false,
"embedding_m... | jku-encyclopedia | data/sources.json | JSON | 23d72556326184f499273ed174587fac8b225673e16c7b7ebbcd966d610a7d83 | 8 | 896 |
"embedding_modality": "text",
"chunking_strategy": "token_windows",
"estimated_item_count": 35000,
"language": "mixed",
"license": "mixed",
"robots_txt_compliant": true,
"rate_limit_delay_seconds": 1,
"requires_javascript": false,
"file_types": [
"json"
],
... | jku-encyclopedia | data/sources.json | JSON | 2577d46733bc96bf7c5f7104e0a938bc7587fa1e2ab815c3ec19f01cc3492c69 | 9 | 896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.