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 |
|---|---|---|---|---|---|---|
be imported from `html_crawler`. Add to imports: `from jku_kb.scrapers.html_crawler import _normalize_url` (only needed if tests call it directly; the production code import will be in web_crawl.py).
</action>
<verify>
<automated>cd C:/Development/Private/jku-encyclopedia && python -m pytest tests/unit/test_scr... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-02-PLAN.md | Markdown | 33611b0d3d1a4b053767874a75bc50c719aa8539c2fef78f9dea74b1f6019339 | 3 | 896 |
pdf_links:
self._append_pdf_links(pdf_links)
```
Add these two lines immediately after:
```python
media_links = _extract_media_links_from_html(response.text, item.url)
if media_links:
self._append_media_links(media_links)
```
The complete `if "html"` block in _do_fetch shoul... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-02-PLAN.md | Markdown | d77d1e6efce71466d4c9221ca545021e8f33889b3af66ac541387476dbcb395b | 4 | 863 |
---
phase: 18-media-discovery
plan: 02
subsystem: scrapers
tags: [jsonl, dedup, web-crawl, media-discovery, integration]
# Dependency graph
requires:
- phase: 18-media-discovery
plan: 01
provides: "_extract_media_links_from_html() pure function, constants, helpers"
provides:
- "_append_media_links() method... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-02-SUMMARY.md | Markdown | 9fa512cce99cfa2fc7753b2a1b2e2dd951dc9d0e6f27483edc8256f0de1ff7f9 | 0 | 730 |
# Phase 18: Media Discovery - Research
**Researched:** 2026-03-24
**Domain:** HTML media link extraction, JSONL side-effect pattern, BeautifulSoup media tag parsing
**Confidence:** HIGH
## Summary
Phase 18 adds media link extraction as a side-effect of the existing web crawl fetch phase. The codebase already impleme... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 2dcfad072c4b97d8d81921538263e4d70e9b63417742308e60686ff7fac65719 | 0 | 896 |
video>`, `<audio>`, `<source>` tag extraction | Already used in `web_crawl.py` and `html_crawler.py` |
| orjson | >=3.10 | JSONL serialization for `media_discovery.jsonl` | Already used in `_append_pdf_links()` and throughout codebase |
| lxml | >=5.3 | BeautifulSoup parser backend | Already used as default parser in a... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 6f8dc83cccda135f3da6c0db72165d23743713400b5994a97ed2c36d72c0fb8f | 1 | 896 |
modality,
alt_text, tag.
"""
```
### Pattern 3: JSONL Append Method
**What:** Instance method that opens the discovery file in append-binary mode and writes each entry as a line.
**Existing example:**
```python
def _append_pdf_links(self, pdf_links: list[dict[str, str]]) -> None:
discovery_path = self.ca... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | b0dce71d061c1a912260bc75c4552063ce29bb1df23e9a1c6d27485c620f70dd | 2 | 896 |
handles scheme/host lowering, fragment stripping, trailing slash |
| JSONL serialization | json.dumps per line | `orjson.dumps(entry) + b"\n"` | Project standard, binary-mode append, 10x faster |
**Key insight:** This phase is purely additive code following an existing, proven pattern. The risk is LOW because the PDF ... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 69b132127904a8def93f2853c6c48bc3882a0a0cebdc010994b0c4edda2f23e5 | 3 | 896 |
* Match against URL path segments or filename stem, not arbitrary substrings. Use word-boundary matching or match only the filename component.
**Warning signs:** Research content images missing from discovery output.
## Code Examples
### Media Extension Constants
```python
# Source: project convention, aligned with S... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 7868fe5b816100e8453258723baceff4868eb9fedf39d85fafb3f0359a6d1cbf | 4 | 896 |
continue
_add_media(media_links, seen_urls, full_url, page_url,
str(page_title), modality, "", "a")
except Exception:
pass # Graceful: media extraction is non-critical side-effect
return media_links
```
### Decorative Image Filter
```python
def _is_decorative(url: ... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 0c6ac037bbb91a43c3becb3dc34aa713043dfd9461ddd9381094faaa4b80298a | 5 | 896 |
during discovery, or defer size filtering to Phase 19?
- Recommendation: Defer size filtering to Phase 19 (FETCH-02 already specifies "images: 10KB-20MB" size limits). Filename-based decorative filtering in Phase 18 catches the majority of decorative images. Adding HEAD requests would significantly slow down the fet... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | e6d7e2e7903010d2c0e744232ff96f0e4f738bedb40f08c6884f91c80f0dec41 | 6 | 896 |
.
## Sources
### Primary (HIGH confidence)
- **Project codebase** -- `web_crawl.py`, `html_crawler.py`, `base.py`, `models.py` -- direct inspection of existing patterns
- **Existing test suite** -- `test_web_crawl.py`, `test_html_crawler.py` -- 67+ tests demonstrating project testing conventions
- **Phase 17 research... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-RESEARCH.md | Markdown | 87c89f45b0de9f3856244a82ba1b141671f805b3b6e5715b8781628fcdeacf42 | 7 | 287 |
---
phase: 18
slug: media-discovery
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-24
---
# Phase 18 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | p... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-VALIDATION.md | Markdown | ff3feed4d5be15508b56055b974387c00b2e6085bd5e1f583d87c1e4e1a0b2d9 | 0 | 896 |
---
phase: 18-media-discovery
verified: 2026-03-25T02:15:00Z
status: passed
score: 15/15 must-haves verified
re_verification: false
---
# Phase 18: Media Discovery Verification Report
**Phase Goal:** Web crawl extracts media links (images, video, audio, documents) from HTML pages as side-effects, writing them to medi... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-VERIFICATION.md | Markdown | dccc5ca45b04c84eb1bb2f1db6deaeec875282b73fd0e07da44f06b57e0be4d8 | 0 | 896 |
/web_crawl.py` | _seen_media_urls attribute | VERIFIED | Line 95: initialized as set() in __init__ |
| `src/jku_kb/scrapers/web_crawl.py` | def _append_media_links | VERIFIED | Line 237: JSONL append with dedup via _normalize_url |
| `src/jku_kb/scrapers/web_crawl.py` | _extract_media_links_from_html call in _do_fetch ... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-VERIFICATION.md | Markdown | 7c8dd29e4b073a0b9a1832e72590cfd8dac220430c85bbe5cd9d8873f0d077bd | 1 | 896 |
critical side-effect, documented |
No TODOs, FIXMEs, placeholders, or stub implementations found. No empty returns or console.log-only handlers.
### Roadmap Success Criteria
| # | Criterion | Status | Evidence |
|---|-----------|--------|----------|
| 1 | img, video, audio, source, and media a href tags extracted du... | jku-encyclopedia | .planning/milestones/v3.0-phases/18-media-discovery/18-VERIFICATION.md | Markdown | 58e74e9c69025dd3511cb89697f69be450834d3233d8afefc622c797df22e51e | 2 | 383 |
---
phase: 19
plan: 19-01
title: "Media Fetch Scraper — Discovery, Download, and Validation"
wave: 1
depends_on: []
files_modified:
- src/jku_kb/scrapers/media_fetch.py
- src/jku_kb/scrapers/__init__.py
- data/sources.json
- pyproject.toml
requirements:
- FETCH-01
- FETCH-02
- FETCH-03
- FETCH-04
autono... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-01-PLAN.md | Markdown | 021aa24812ed26a3c8a8c5e6e23f7c3ebee33e212e4b8e912e0e5e3c26e81ee6 | 0 | 896 |
video": Modality.VIDEO, "audio": Modality.AUDIO}
return mapping.get(modality_str, Modality.IMAGE)
def _file_extension_for_item(url: str) -> str:
"""Get file extension from URL for saving."""
ext = Path(urlparse(url).path).suffix.lower()
return ext if ext else ".bin"
@register_scraper('media_fetch')
... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-01-PLAN.md | Markdown | 13ac02c2b025c8845fd1b5d000d1fb2e85c8cb063528a04768b1bdb544126a53 | 1 | 896 |
expected_modality is not None and expected_modality != modality:
dest.unlink()
return FetchResult(
item_id=item.item_id,
source_id=self.source_id,
fetch_status=FetchStatus.FAILED,
error_message=f"MIME mismatc... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-01-PLAN.md | Markdown | 9b79d76ae197e662e4f970df3e5bc81579dd06d36e9bf013407f250e9f3f37b3 | 2 | 896 |
``
</action>
<acceptance_criteria>
- `data/sources.json` contains an entry with `"source_id": "media_fetch"`
- Entry has `"category": "media"` and `"listing_mechanism": "discovery_file"`
- Entry has `"secondary_modalities": ["video", "audio"]`
- JSON file is valid (parseable without error)
</acceptance_criteria>
## V... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-01-PLAN.md | Markdown | 6112386e098a8ec045707f9758112ce1407c5055a0acd3596e5ab903190aa963 | 3 | 316 |
---
phase: 19-media-download-storage
plan: 01
subsystem: scraping
tags: [media, filetype, mime-validation, streaming-download, jsonl-discovery]
# Dependency graph
requires:
- phase: 18-media-discovery
provides: media_discovery.jsonl files from web crawl sources
provides:
- MediaFetchScraper registered scraper ... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-01-SUMMARY.md | Markdown | 810555d86ebd6f734ce1741dc2261595f449efbb9c06f3a3e448a60293790e7a | 0 | 870 |
---
phase: 19-media-download-storage
verified: 2026-03-25T01:15:00Z
status: passed
score: 7/7 must-haves verified
must_haves:
truths:
- "media_fetch scraper class exists, registered, and reads media_discovery.jsonl"
- "Downloads use streaming via BaseScraper._download_file"
- "Size limits enforced: images... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-VERIFICATION.md | Markdown | 5e7aae8436536fec8a9338f81cb3cc4571da12e8c8afe7843c9f2ed021cb8506 | 0 | 896 |
| VERIFIED | metadata dict on lines 111-116 includes `discovered_from`, `page_title`, `tag`, `alt_text` from JSONL entries |
| 6 | Downloaded files appear in fetch manifest with correct modality | VERIFIED | `_do_fetch()` returns `FetchResult` with `local_path`, `file_size_bytes`, `content_hash`, `FetchStatus.FETCHED` ... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-VERIFICATION.md | Markdown | e6193b2d10043df5ac6de71141260429537a886ab41c3bb0c9c1867eada8d9e7 | 1 | 896 |
triggers FAILED status and file deletion |
| FETCH-04 | 19-01 | Media source attribution -- track which crawled page each media item was discovered from | SATISFIED | metadata dict in RawItem includes discovered_from (source page URL) and page_title |
No orphaned requirements found. REQUIREMENTS.md maps FETCH-01 throu... | jku-encyclopedia | .planning/milestones/v3.0-phases/19-media-download-storage/19-VERIFICATION.md | Markdown | 3d1fdec77ea8f734a1f89cad4648fcc000a2c4ec04008f1331701e06bff17bad | 2 | 542 |
---
phase: 20-multimodal-embedding-verification
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/chunkers/audio_chunker.py
- src/jku_kb/chunkers/video_chunker.py
- src/jku_kb/embedders/gemini.py
- tests/unit/test_chunkers.py
- tests/unit/test_embedders/test_gemini.py
- tests/integr... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | bb49ec35bec634550797d815290ad4c455a137943023084c1eed53252cddf494 | 0 | 896 |
, overlap_seconds: float = 15.0) -> None:
```
From src/jku_kb/chunkers/video_chunker.py:
```python
class VideoChunker(BaseChunker):
modality = Modality.VIDEO
def __init__(self, segment_seconds: float = 90.0, overlap_seconds: float = 15.0) -> None:
async def chunk(self, item: RawItem, local_path: Path, outp... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 8c2600a8f1e403e54afb38615c448db93c885cc4b6e9d33d1d387ed24c87edf6 | 1 | 896 |
effective_segment, self.overlap_seconds)`
3. Update module docstring from "90s segments" to "audio-aware segments (75s with audio, 110s video-only)"
**test_chunkers.py changes:**
1. Add import: `from jku_kb.chunkers.video_chunker import _has_audio_track` (alongside existing imports)
2. Add to TestAudio... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | e991192a78cea81e0ecf5174590b3e6f568ffce0aeff77bea000c88868f2d18b | 2 | 896 |
chunker unit tests pass.</done>
</task>
<task type="auto" tdd="true">
<name>Task 2: Add task_type=RETRIEVAL_DOCUMENT to all embedding calls</name>
<files>
src/jku_kb/embedders/gemini.py
tests/unit/test_embedders/test_gemini.py
</files>
<read_first>
src/jku_kb/embedders/gemini.py
tests/unit/test... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 044504277e269ad4542fa2db049415df54bc1f04f1c845c24b7fdebeb681d8d0 | 3 | 896 |
embedders/gemini.py
src/jku_kb/chunkers/audio_chunker.py
src/jku_kb/chunkers/video_chunker.py
tests/integration/test_gemini_live.py
tests/unit/test_embedders/test_gemini.py
</read_first>
<behavior>
- Test: Text chunk embeds to EmbeddingResult with EMBEDDED status and positive dimension
- Tes... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 0d1c3c57be1fa67fa0f626c90d7af05260184be7eabf774b8dea5cd3eaa1385a | 4 | 896 |
, item_id="i1",
modality=Modality.DOCUMENT, local_path=str(media_files["pdf"]),
chunk_index=0, chunk_total=1,
)
file_ref = MagicMock()
file_ref.name = "files/int-doc"
async def fake_tt(fn, *args, **kwargs):
if fn is embedder... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 3f49f479ed445b8df1c4e8866e1a5691973468f882590b13cc845b8a3d358a02 | 5 | 896 |
),
chunk_index=0, chunk_total=1),
Chunk(chunk_id="dim-img", source_id="s1", item_id="i1",
modality=Modality.IMAGE, local_path=str(media_files["png"]),
chunk_index=0, chunk_total=1),
Chunk(chunk_id="dim-vid", source_id="s1"... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 749e68cc5ad9fa84437c36e02fdc75eaf8a37f8f151da0e41afcc1fcddc24737 | 6 | 896 |
.</done>
</task>
</tasks>
<verification>
After all tasks complete:
1. Full unit test suite: `python -m pytest tests/unit/test_chunkers.py tests/unit/test_embedders/test_gemini.py -x -q`
2. Integration test: `python -m pytest tests/integration/test_embed_multimodal.py -x -q`
3. Full test suite: `python -m pytest test... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-PLAN.md | Markdown | 6aec17308f71b554da3374da798eba9f039cd499593919c8522c61c41265eb5d | 7 | 315 |
---
phase: 20-multimodal-embedding-verification
plan: 01
subsystem: embedders
tags: [gemini, embedding, ffmpeg, audio-chunker, video-chunker, multimodal, task-type]
# Dependency graph
requires:
- phase: 18-media-pipeline-chunkers
provides: AudioChunker, VideoChunker, GeminiEmbedder infrastructure
provides:
- A... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-SUMMARY.md | Markdown | 69a13f7f3ee3f7fd359ba95d4cdcd7fa991f3d5416759dd61744e5a54cd163fb | 0 | 896 |
s alongside segment change (maintains ~13% overlap ratio)
- _has_audio_track returns True on ffprobe error (conservative: assumes audio present, uses shorter segment)
- EMBED_CONFIG defined as module-level constant rather than per-call instantiation for consistency
## Deviations from Plan
### Auto-fixed Issues
**1. ... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-01-SUMMARY.md | Markdown | 661466b65201a3f1607b4699a52c9cfdec0e1234a9874a6f41931efe08bebd1b | 1 | 386 |
# Phase 20: Multimodal Embedding Verification - Research
**Researched:** 2026-03-25
**Domain:** Gemini Embedding API multimodal integration, audio/video chunking, embedding configuration
**Confidence:** HIGH
## Summary
Phase 20 addresses four requirements for making the existing multimodal embedding pipeline product... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-RESEARCH.md | Markdown | 551ec84fc0b7514fdbc9f99754d0f2abe9ed607242889e51ddcc90ac67c5a651 | 0 | 896 |
()
-> chunks_manifest.jsonl
-> orchestrator/embed.py: read chunks -> GeminiEmbedder.embed_chunk()
-> BatchEmbedder -> Qdrant + Neo4j
```
### Pattern 1: Audio Chunker Segment Duration Change
**What:** Change `AudioChunker.__init__` default `segment_seconds` from 90.0 to 75.0
**When to use:** EMBED-01
**Fi... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-RESEARCH.md | Markdown | f880560bf4025f2f5261e14aa97f94bf055dd4c2dfa70582ece3369ebdd08a2f | 1 | 896 |
to _compute_segments, so changing the default is sufficient.
- **Extracting audio from videos for separate embedding:** This is out of scope (Phase 21 INT-04 covers cross-modal edges). Phase 20 focuses on making existing chunkers/embedders correct.
## Don't Hand-Roll
| Problem | Don't Build | Use Instead | Why |
|---... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-RESEARCH.md | Markdown | 1c5afd33f66cc8d6709c7cf731d020251a6f1f6d4a938202da665cae811a49e9 | 2 | 896 |
(path))
return any(
s.get("codec_type") == "audio"
for s in probe.get("streams", [])
)
except ffmpeg.Error:
return True # conservative default
```
### Video Chunker with Audio-Aware Duration
```python
# VideoChunker.chunk method modification
async def chunk(self, it... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-RESEARCH.md | Markdown | 2b24f54c43aa6af409a8dc7030505e2a4f25c30f6c72ee603f97187b80ca8cb5 | 3 | 896 |
command | `python -m pytest tests/ -x -q` |
### Phase Requirements -> Test Map
| Req ID | Behavior | Test Type | Automated Command | File Exists? |
|--------|----------|-----------|-------------------|-------------|
| EMBED-01 | AudioChunker defaults to 75s segments | unit | `python -m pytest tests/unit/test_chunkers.... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-RESEARCH.md | Markdown | 1beab8d1b2effba8fcd0adc7afc6706ee08b5baa2d28349638ca8f45e7c197a6 | 4 | 806 |
---
phase: 20
slug: multimodal-embedding-verification
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-25
---
# Phase 20 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
|... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-VALIDATION.md | Markdown | f876bbf47189130b3729dbbb5bfb009ecbd538664682b5c3bbdbc38bcb8dbb66 | 0 | 896 |
-----------|-------------------|
| Real crawled media embeds without errors | EMBED-04 | Requires live Gemini API key and real media files | Run `python -m pytest tests/integration/test_gemini_live.py -x -m live` with GEMINI_API_KEY set |
---
## Validation Sign-Off
- [ ] All tasks have `<automated>` verify or Wave 0... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-VALIDATION.md | Markdown | 6ff6ca441e430c91193fe99c28e9dbc47277a65d973ea5a984397d9cbbdbfcc7 | 1 | 158 |
---
phase: 20-multimodal-embedding-verification
verified: 2026-03-25T03:15:00Z
status: passed
score: 4/4 must-haves verified
re_verification: false
must_haves:
truths:
- "Audio segments never exceed 75s (within Gemini's 80s limit)"
- "Video segments use 75s when audio track present, 110s when video-only"
... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-VERIFICATION.md | Markdown | 6ee519c9aabd445317dc252dfadf4fb1374e06540d181eddabb3e7b438f62f84 | 0 | 896 |
, and `test_all_embed_calls_include_retrieval_document_config`; all 89 tests pass |
**Score:** 4/4 truths verified
### Required Artifacts
| Artifact | Expected | Status | Details |
|----------|----------|--------|---------|
| `src/jku_kb/chunkers/audio_chunker.py` | AudioChunker with 75s segment default | VERIFIED |... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-VERIFICATION.md | Markdown | 9b9bd05fc475055734153078672519a41f280d5e1c780a7c03199665fa2d85f1 | 1 | 896 |
| EMBED-02 | 20-01-PLAN | Video chunker checks for audio track presence, adjusts duration | SATISFIED | `_has_audio_track()` function; `effective_segment` logic with 75s/110s caps; unit tests for detection and chunk count |
| EMBED-03 | 20-01-PLAN | task_type=RETRIEVAL_DOCUMENT set for all chunk embedding | SATISFIED |... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/20-VERIFICATION.md | Markdown | 1b750a89e2b7ca88df6388cec35d354be9bcb1b92dec12aef8236e89bdd09d73 | 2 | 590 |
# Deferred Items - Phase 20
## Pre-existing Test Failure
- **File:** `tests/unit/test_registry.py::test_register_scraper_all_sources_registered`
- **Issue:** Test expects 13 scrapers but registry now has 14 (includes `media_fetch` from phase 19). Test assertion needs updating to include `media_fetch`.
- **Origin:** P... | jku-encyclopedia | .planning/milestones/v3.0-phases/20-multimodal-embedding-verification/deferred-items.md | Markdown | 50c6ff1481ea1c3afa26e8b07348d5169b208de0d0c38fe1d5ca3bfe0460ad83 | 0 | 109 |
---
phase: 21-integration-reporting
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
- src/jku_kb/cli/helpers.py
- src/jku_kb/cli/verify.py
- src/jku_kb/graph/similarity.py
- src/jku_kb/orchestrator/link.py
- tests/unit/test_cli.py
autonomous: true
requirements: [INT-01, INT-04]
must_haves:
tr... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | 5267960b79c5b4d7ee2316f021d74e5d3077796647a1c26a69d22625cbba1330 | 0 | 896 |
/jku_kb/cli/helpers.py:
```python
def _run(coro: Any) -> Any: ...
def _read_manifest_stats(cache_dir: Path, source_id: str, phase: str) -> dict[str, Any]: ...
```
From src/jku_kb/cli/verify.py:
```python
_STATUS_MARKUP_VERIFY = {"pass": ..., "warn": ..., "fail": ..., "error": ..., "pending": ...}
def _build_verify_tab... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | fcf558d71f5e06715608525c691b5d6f051a57bca9ced1a4c26dbfa861dd297c | 1 | 896 |
, "video", "audio", "code"]
def _format_modality_counts(counts: dict[str, int]) -> str:
"""Format modality counts as compact string: '500 txt, 45 img, 12 vid'."""
parts: list[str] = []
for modality in _DISPLAY_ORDER:
count = counts.get(modality, 0)
if count > 0:
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | 2aff4f190f5d7d9ecd4388aa91d4d623f113f6c688c88a340a6d036e3259d2c0 | 2 | 896 |
-modal row needs 6 values if show_modality is True (source + status + expected + actual + ratio + modality = 6 columns, but "Cross-modal edges" fills source, count fills status, then 4 empties). Actually count it properly: Source, Status, Expected, Actual, Ratio = 5 columns. With Modality = 6 columns. So the cross-moda... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | d324273131f1f0dd3ffd6ade9e3a9c37e2b721dfc3036bd240b7124748892874 | 3 | 896 |
remains a plain list for backward compatibility.
**E. graph/similarity.py -- Return dict with cross-modal count:**
Add a counter after `total_edges = 0`:
```python
total_edges = 0
cross_modal_edges = 0
```
In the edge_batch building loop, after `edge_batch.append((src, tgt, score, cross_m... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | 0dc469e51b335ae1409c29fb514f0b56bd5ab51b445ee3ebd449b45cbb9dbc40 | 4 | 896 |
import UTC, datetime
manifest_data = {**results}
if "cross_modal_edges" not in manifest_data:
manifest_data["cross_modal_edges"] = cross_modal_edges if 'cross_modal_edges' in dir() else 0
```
Actually, cleaner approach:
```python
cross_modal_count = 0 # Initialize at top of function
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | 024153caf6ef464e15a8985813709ce569bbd12b554eb65e131098113408a3e0 | 5 | 896 |
{"text": 500, "image": 45, "video": 12}) == "500 txt, 45 img, 12 vid"
assert _format_modality_counts({}) == "\u2014"
assert _format_modality_counts({"text": 0, "image": 5}) == "5 img"
assert _format_modality_counts({"text": 1, "document": 2, "image": 3, "video": 4, "audio": 5, "code": 6}) == "1 ... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | 25a43a87aa34011c73b38b7cca752ba5d538d51b4a01e094e21115bf36754a84 | 6 | 896 |
": 15}`. Invoke `["verify", "--cached"]`. Assert output contains "Cross-modal edges" and "15".
</action>
<verify>
<automated>cd "C:/Development/Private/jku-encyclopedia" && python -m pytest tests/unit/test_cli.py::test_format_modality_counts tests/unit/test_cli.py::test_count_source_modalities tests/unit/test_c... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-PLAN.md | Markdown | d77902dcbb69f0cd294bbd56b78eb68fbfa2a1f3469f9429d587841aa355156b | 7 | 643 |
---
phase: 21-integration-reporting
plan: 01
subsystem: cli
tags: [rich-table, modality, cross-modal, verify, jsonl-manifest, similarity-engine]
# Dependency graph
requires:
- phase: 20-multimodal-embedding-verification
provides: Multimodal embedding pipeline with modality tracking in chunks
provides:
- Modali... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-SUMMARY.md | Markdown | aefa4df4bf9482bc4a2e71242b5d946f1dd086632c848f0deb129ee5a0d903e2 | 0 | 896 |
for backward compatibility
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 1 - Bug] Rich Live table width truncation in test environment**
- **Found during:** Task 2 (verify modality column cached test)
- **Issue:** CliRunner captures Rich Live output at 80-column width, truncating the 6-column table and hi... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-01-SUMMARY.md | Markdown | 2d54c197fecba51b390413f3e71f7ad37c8f2f22508237575f1741f1dde82308 | 1 | 301 |
---
phase: 21-integration-reporting
plan: 02
type: execute
wave: 2
depends_on: [21-01]
files_modified:
- src/jku_kb/cli/dashboard.py
- src/jku_kb/orchestrator/helpers.py
- src/jku_kb/orchestrator/chunk.py
- src/jku_kb/orchestrator/embed.py
- src/jku_kb/orchestrator/__init__.py
- src/jku_kb/cli/commands.py
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | d6f32ad4d48e8379c6e989714ae80b802e9819577e17a245f56e50550a3e1885 | 0 | 896 |
audio", "code"]
def _format_modality_counts(counts: dict[str, int]) -> str: ...
```
From src/jku_kb/cli/dashboard.py (current):
```python
@dataclasses.dataclass
class _RowState:
source_id: str
status: str = "pending"
items: int = 0
start_time: float = 0.0
error: str = ""
def _build_dashboard_table... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | 52e35bcff47f5d2075e7449f5a3e86d67bee53ff1676dffdc6fd0fb1f7134754 | 1 | 896 |
to the `_RowState` dataclass:
```python
@dataclasses.dataclass
class _RowState:
source_id: str
status: str = "pending"
items: int = 0
start_time: float = 0.0
error: str = ""
modality_counts: dict[str, int] = dataclasses.field(default_factory=dict)
```
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | 19cb1a9e783d0429953414fa3eb178339f41f504eb825f4b1dffd6ac542a9fd0 | 2 | 896 |
`:
```python
__all__ = [
"PipelineOrchestrator",
"_phase_manifest_path",
"_load_done_ids",
"_guess_modality",
"ProgressCallback",
"ErrorCallback",
"ModalityCallback",
"ManifestWriter",
"PipelineContext",
]
```
Add `modality_cal... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | 8b0d0aaa92caaf3abe6963804508cf4db95e00b385285c18f20006735e8f2943 | 3 | 896 |
modality_callback=dashboard.modality_callback,
))
```
And the standalone `embed()` command:
```python
with LiveDashboard(console, effective_ids, "embed") as dashboard:
result = _run(orchestrator.run_phase_embed(
source_ids,
progress_callback=dashboard.progress_ca... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | b557f2bc72fd9d736d8c716940d286a6c6122c258ebe82efb83a3b79657e64b1 | 4 | 896 |
}
```
**Test 2: test_dashboard_modality_column_chunk_phase**
```python
def test_dashboard_modality_column_chunk_phase():
"""_build_dashboard_table shows Modality column when show_modality=True."""
from jku_kb.cli.dashboard import _RowState, _build_dashboard_table
rows = {
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | cb81abbf8655528274c07451243616d761e3c27b6a1e4e36702ca30804ca07c9 | 5 | 896 |
.orchestrator.helpers import ModalityCallback; print(ModalityCallback)"` -- ModalityCallback type exists
- `grep -n "modality_callback" src/jku_kb/orchestrator/chunk.py` -- chunk phase uses modality_callback
- `grep -n "modality_callback" src/jku_kb/orchestrator/embed.py` -- embed phase uses modality_callback
- `grep -... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-PLAN.md | Markdown | 5d99892e810c3939ecc958dd0fe3d78a73f94023d7895dd208c8668e16133ea2 | 6 | 232 |
---
phase: 21-integration-reporting
plan: 02
subsystem: cli
tags: [rich, dashboard, modality, callback, pipeline]
# Dependency graph
requires:
- phase: 21-01
provides: "_format_modality_counts helper and _MODALITY_ABBREV constants"
provides:
- "LiveDashboard with conditional Modality column for chunk/embed pha... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-SUMMARY.md | Markdown | 762703bcf325dfc0fa2e48c97c8dc9485823f7c756e72c9a39a976f5e189c7ab | 0 | 896 |
-batch modality aggregation to minimize callback invocations
## Deviations from Plan
None - plan executed exactly as written.
## Issues Encountered
None
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- Dashboard modality column and callback wiring complete, ready ... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-02-SUMMARY.md | Markdown | 79b866bb8b7ad1999bb59c56721debd21d1c970287338cc54f765e3698f944ed | 1 | 113 |
---
phase: 21-integration-reporting
plan: 03
type: execute
wave: 2
depends_on: [21-01]
files_modified:
- tests/integration/test_pipeline_e2e.py
autonomous: true
requirements: [INT-03, INT-04]
must_haves:
truths:
- "E2E pipeline test with bioinf_jku produces chunks with 3+ distinct modalities"
- "Cross-moda... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | 0e2c95b82a8f4b5dde4fecb00f84fb7747a6a5002487b54a4e57197896d82906 | 0 | 896 |
:
```python
class Settings(BaseSettings):
cache_dir: Path = Path("cache")
sources_path: Path = Path("sources.json")
# ... many other fields with defaults
```
From tests/integration/test_embed_multimodal.py (pattern reference):
```python
# Uses MagicMock for Gemini client
# Uses patch("asyncio.to_thread", .... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | c8b1c6742de554ac36232641ee25c4da07e0c764832e01936b07205ff37093fa | 1 | 896 |
"img1", source_id="bioinf_jku", url="https://bioinf.jku.at/photo.jpg",
title="Photo", fetch_status=FetchStatus.FETCHED, local_path=str(img_file)),
]
manifest_path = source_dir / "manifest.jsonl"
with open(manifest_path, "wb") as f:
for entry in entries:
... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | 4a184abd2020ca1b946238f9036343d570b716829f604766cad3937c6f8ddb6c | 2 | 896 |
str(code_file)),
```
This ensures at least text + image + code = 3 modalities even if PDF chunker fails.
</action>
<verify>
<automated>cd "C:/Development/Private/jku-encyclopedia" && python -m pytest tests/integration/test_pipeline_e2e.py::TestBioinfMultimodalE2E -x -q 2>&1 | tail -10</automated>
</v... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | b8a7db3ea596d1e1228039d6d76d263a1e67782cfa566789a86a18eda9a553a9 | 3 | 896 |
), ("img_chunk_2", 0.78, "image")]
if vector == [0.4] * 10:
return [("img_chunk_1", 0.78, "image")]
return []
mock_qdrant.search_similar_with_modality = fake_search
# Mock Neo4j
mock_neo4j = AsyncMock()
mock_neo4j.crea... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | d28d913ce55d17ce221b0cff8130be953d4c6cc353a8b170946f0c986f50edcc | 4 | 896 |
py -x -q` -- both E2E tests pass
- `python -m pytest tests/ -x -q --ignore=tests/e2e` -- full test suite green
- `grep -n "TestBioinfMultimodalE2E" tests/integration/test_pipeline_e2e.py` -- E2E class exists
- `grep -n "TestCrossModalEdges" tests/integration/test_pipeline_e2e.py` -- cross-modal class exists
- `grep -n ... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-PLAN.md | Markdown | 356d28803c21f32a172398eee8cc3b133c0e2e0f7d9d25a4513bcb8bb7544bf7 | 5 | 232 |
---
phase: 21-integration-reporting
plan: 03
subsystem: testing
tags: [integration-test, e2e, multimodal, cross-modal, similarity, chunk-pipeline, bioinf-jku]
# Dependency graph
requires:
- phase: 21-integration-reporting
plan: 01
provides: Similarity engine dict return type with cross_modal count, link_mani... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-SUMMARY.md | Markdown | 5515e585e96df29f5fcdfad87ca196f916951e566812a40146cfbd9fc2c0259f | 0 | 896 |
** Task 2 (full suite verification)
- **Issue:** Plan 01 changed compute_similarity_backlinks return type from int to dict, but 5 test mocks in test_orchestrator.py and test_similarity.py still returned integers, causing TypeError on `result["total"]`
- **Fix:** Updated mock return values from `return_value=N` to `retu... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-03-SUMMARY.md | Markdown | 5d5997f331a0606ddb5be5418ff1957381f0521246d1d7734fc9e784e35a2c69 | 1 | 329 |
# Phase 21: Integration & Reporting - Context
**Gathered:** 2026-03-25
**Status:** Ready for planning
<domain>
## Phase Boundary
End-to-end multimodal pipeline verification with modality-aware CLI reporting. Extends `jku-kb verify` with per-modality counts, extends the dashboard with modality breakdown during chunk/... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-CONTEXT.md | Markdown | fd690532eb83dcd4586ab9f82daefeae744bfe5b29cefd66496defebec29e9a5 | 0 | 896 |
- `Modality` StrEnum in models.py: TEXT, DOCUMENT, IMAGE, VIDEO, AUDIO, CODE — use for modality counting and display
- `_build_verify_table()` in verify.py: Rich table builder — extend with Modality column
- `_build_dashboard_table()` in dashboard.py: Rich table builder — extend with Modality column for chunk/embed
- `... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-CONTEXT.md | Markdown | 95fac49bec4a2d0a388d851931804cf491b8390d36fc97b47ecc952f52da6263 | 1 | 441 |
# Phase 21: Integration & Reporting - Research
**Researched:** 2026-03-25
**Domain:** CLI reporting, dashboard extension, E2E integration testing, cross-modal verification
**Confidence:** HIGH
## Summary
Phase 21 is a pure integration and reporting phase -- no new libraries, no new infrastructure. All building block... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | fe8cc8135182bb137dec4727a61d76fb494ebb0aee4869f21ae8518fc3e65b80 | 0 | 896 |
---------------|
| INT-01 | `jku-kb verify` extended with modality-aware counts | Verify table builder `_build_verify_table()` takes row dicts -- add `modality_str` field; chunks_manifest.jsonl parsing for modality aggregation |
| INT-02 | CLI dashboard shows per-modality progress during pipeline runs | `_RowState` dat... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | 9c37a35026fe6fe2b997ba1a6bd6fa75a8aace0f7db70abdaddff88e5a84adce | 1 | 896 |
# Display order: txt first (usually largest), then doc, img, vid, aud, code
_DISPLAY_ORDER = ["text", "document", "image", "video", "audio", "code"]
def _format_modality_counts(counts: dict[str, int]) -> str:
"""Format modality counts as compact string: '500 txt, 45 img, 12 vid'."""
parts = []
for modality... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | d188c8cb286a4deb996f2ac35210993946b475fed694d59beb11382143dec20a | 2 | 896 |
orjson.dumps(link_stats))
```
**Note:** `compute_similarity_backlinks` currently returns total edges but does not separately count cross-modal edges. Need to add a return value or callback for the cross-modal count.
### Anti-Patterns to Avoid
- **Breaking the progress_callback signature:** Do NOT change `Callable[[s... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | a5960970b0e307ce3eab348644218af1a4ab7244ca42326ff5fa31ca37582729 | 3 | 896 |
*Why it happens:** The function was written before cross-modal reporting was needed.
**How to avoid:** Either: (a) modify `compute_similarity_backlinks` to also return cross-modal count (return a tuple or dict), or (b) track cross-modal count in the link phase by having the similarity engine call a callback, or (c) pos... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | 4c771bc14013f128236073df2283d18be1e7c1823b9b9a1398d446da87227f3f | 4 | 896 |
mod] = counts.get(mod, 0) + 1
except Exception:
continue
return counts
```
### Extending PipelineContext with Modality Callback
```python
# Source: helpers.py (extend existing frozen dataclass)
# Type alias for modality callback
ModalityCallback = Callable[[str, str, int], None] | None... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | 816e90a4083bafa91f672562c7be0e09147f41f49d27d238e9d737f8675fdb81 | 5 | 896 |
on chunk phase | unit | `python -m pytest tests/unit/test_cli.py::test_dashboard_modality_chunk_phase -x` | Wave 0 |
| INT-02 | Dashboard hides modality column on discover phase | unit | `python -m pytest tests/unit/test_cli.py::test_dashboard_no_modality_discover_phase -x` | Wave 0 |
| INT-02 | Modality callback updat... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | c5098ca1dbbd6c3fb2a7e3c20b7780528e34b888766b05c84199ba657039c37e | 6 | 896 |
jku_kb/models.py` -- Modality enum, Chunk model, Edge model with cross_modal
- `src/jku_kb/orchestrator/chunk.py` -- Chunk phase with _guess_modality, progress_callback usage
- `src/jku_kb/orchestrator/embed.py` -- Embed phase with progress_callback usage
- `src/jku_kb/orchestrator/helpers.py` -- PipelineContext (froze... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-RESEARCH.md | Markdown | 7210061df501924b55b1272cf81f3e54808f6182501c7edb68dee2b78e46d160 | 7 | 350 |
---
phase: 21
slug: integration-reporting
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-25
---
# Phase 21 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VALIDATION.md | Markdown | 27c17bded49ac4abd319ce83fa203465e7d244d29ddc7d5fd3b6365ae50e0f16 | 0 | 896 |
tests)
- [ ] `tests/unit/test_cli.py` — add INT-02 dashboard modality tests (3 new tests)
- [ ] `tests/unit/test_cli.py` — add INT-04 verify cross-modal count test (1 new test)
- [ ] `tests/integration/test_pipeline_e2e.py` — new file: INT-03 bioinf E2E + INT-04 cross-modal edges (2 new tests)
No new framework install... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VALIDATION.md | Markdown | 8fe32b7e7e22fb1e7faa3547278fd3bac20370035f2a9ae95c29b10c630afe56 | 1 | 200 |
---
phase: 21-integration-reporting
verified: 2026-03-25T04:15:00Z
status: passed
score: 4/4 must-haves verified
re_verification: false
---
# Phase 21: Integration & Reporting Verification Report
**Phase Goal:** End-to-end multimodal pipeline run verified, dashboard and verify command extended with modality-aware rep... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VERIFICATION.md | Markdown | 9fdf927d849e925785655592a7e232b1d2746aa9cec21f140a5e37cdf5f2b92e | 0 | 896 |
[str, int]` (line 59); `cross_modal_edges = 0` init (line 81); cross-modal counting per edge (lines 134-135); returns `{"total": total_edges, "cross_modal": cross_modal_edges}` (line 156) |
| `src/jku_kb/orchestrator/link.py` | Link phase writing link_manifest.jsonl | VERIFIED | Unpacks `sim_result["total"]` (line 47);... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VERIFICATION.md | Markdown | 39a2dcf6ecf83dfbe21800fd6df2b0de4c8b1d46a7044e6576f6acb1ec2a31e2 | 1 | 896 |
modality_callback and calls it | `ctx.modality_callback` | WIRED | chunk.py lines 121-122 |
| `embed.py` -> `helpers.py` | embed phase reads ctx.modality_callback and calls it | `ctx.modality_callback` | WIRED | embed.py lines 103-106 |
| `test_pipeline_e2e.py` -> `chunk.py` | E2E test runs chunk phase | `run_phase_chu... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VERIFICATION.md | Markdown | abb0c8ab320986de252c4dfe7157be665a2f915c77bfe92d48f44e76e1938437 | 2 | 896 |
actual CLI invocation end-to-end with real settings
### Gaps Summary
No gaps found. All 4 success criteria from ROADMAP.md are verified through a combination of:
- Direct code inspection confirming implementations are substantive (not stubs)
- Key link verification confirming all pieces are wired together
- 64 passin... | jku-encyclopedia | .planning/milestones/v3.0-phases/21-integration-reporting/21-VERIFICATION.md | Markdown | f315ed8f4fe4c2f8262008866091b0130ddae25834c5f7c24620c434e24ce691 | 3 | 124 |
---
phase: 12-web-crawl-infrastructure
plan: 01
type: tdd
wave: 1
depends_on: []
files_modified:
- src/jku_kb/scrapers/html_crawler.py
- tests/unit/test_scrapers/test_html_crawler.py
autonomous: true
requirements: [CRAWL-01]
must_haves:
truths:
- "BFS crawl discovers pages from an HTML start URL without requ... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-PLAN.md | Markdown | a251cce50010365b9f04b772157db7e870e58d6f06576ca8a16c98f79a4db013 | 0 | 896 |
/test_scrapers/test_html_crawler.py</files>
<read_first>
- tests/unit/test_scrapers/test_web_crawl.py (existing test patterns: respx mocking, pytest-asyncio, fixture usage)
- tests/conftest.py (available fixtures: settings, mock_http_client)
- src/jku_kb/scrapers/web_crawl.py (reusable patterns for _extra... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-PLAN.md | Markdown | db2bbe6236c0d917533757fcbf7d6145eeb30f61b22aed536135985016b91aab | 1 | 896 |
"}, request=httpx.Request("GET", original_url))` but set the response url via the constructor or by creating a response that has `.url` pointing to the final URL).
HTML fixtures for crawl tests:
```python
PAGE_A = '<html><body><a href="/page-b">B</a><a href="/page-c">C</a><a href="https://other.com/ext">Ext</a></body>... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-PLAN.md | Markdown | d9c7ba5412a98ad1d6a19fdfd2bc8e343d0cb1446f33a8992441ffb5366a45b3 | 2 | 896 |
len(discovered) < max_pages`:
a. Pop URL from queue
b. Check robots.txt: fetch `{scheme}://{domain}/robots.txt` once per domain, cache in `robots_cache`, use `can_fetch("JKU-Knowledge-Base/0.1.0", url)`. On fetch error, treat as allow-all.
c. Check `url_passes_filter(url)` -- skip if False
d. Fetch ... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-PLAN.md | Markdown | dd5b47956a41b20c8dd1e3fd547c34fae78bde22b9fd43fcda4abf42f9e4b5b2 | 3 | 896 |
same-domain scoping, max_pages cap, robots.txt respect
- URL normalization handles fragments, trailing slashes, case
- All unit tests pass (15+ test cases)
- Full test suite green (no regressions)
</success_criteria>
<output>
After completion, create `.planning/phases/12-web-crawl-infrastructure/12-01-SUMMARY.md`
</ou... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-PLAN.md | Markdown | 1ffff6d7984958ae14cb994ee280716c256df36019a4a193f15c5c8f248c80af | 4 | 79 |
---
phase: 12-web-crawl-infrastructure
plan: "01"
subsystem: scrapers
tags: [web-crawl, bfs, robots-txt, url-normalization, html-parsing, tdd]
dependency_graph:
requires: []
provides: [html_crawler.crawl_html, html_crawler._normalize_url, html_crawler._extract_links]
affects: [web_crawl.WebCrawlScraper.discover]
... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-01-SUMMARY.md | Markdown | b1db7d04fb3795f5cd34c7281529bcfebc0a8a6f73ed6e305feaf48aaa670a12 | 0 | 706 |
---
phase: 12-web-crawl-infrastructure
plan: 02
type: execute
wave: 2
depends_on: ["12-01"]
files_modified:
- src/jku_kb/config.py
- src/jku_kb/scrapers/__init__.py
- src/jku_kb/scrapers/web_crawl.py
- tests/unit/test_config.py
- tests/unit/test_scrapers/test_web_crawl.py
autonomous: true
requirements: [CRAWL... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | 605b2c02053a2879d234e63cc6dd3294525b32e43571bdbbd5511b4c05479591 | 0 | 896 |
/scrapers/html_crawler.py:
```python
async def crawl_html(
start_url: str,
fetch: Callable[[str], Awaitable[httpx.Response]],
url_passes_filter: Callable[[str], bool],
max_pages: int = 500,
) -> list[str]:
"""BFS crawl from start_url; return list of same-domain, filter-passing URLs."""
```
<!-- Cur... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | 48b5d1f97652831f850c25f7f8cb0e8a6ee162718520daa94598c86b2c7cd505 | 1 | 896 |
the current discover() URL collection loop with crawl_mode branching:
```python
async def discover(self) -> list[RawItem]:
"""Discover pages via sitemap, recursive crawl, or hybrid; apply URL filters."""
urls: set[str] = set()
for start_url in self.start_urls:
if self.crawl_mode == 'sitemap':
... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | c8e7fa1d71842db0dd9aa3cdf90a7bb0df4b381d62bd535e0668e995edfee57c | 2 | 896 |
/scrapers/web_crawl.py contains `elif self.crawl_mode == 'recursive':`
- src/jku_kb/scrapers/web_crawl.py contains `elif self.crawl_mode == 'hybrid':`
- src/jku_kb/scrapers/__init__.py contains `crawl_mode=variant.crawl_mode`
- Running `python -c "from jku_kb.config import Settings; Settings()"` succeeds (n... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | 130a8540fc4ca7b3a1ab2e4227ad4f1a8540bb89cd4ec94a484f50042b558cc6 | 3 | 896 |
, f"{name} should default to recursive"
assert s.source_variants[name].js_rendering is False, f"{name} should default to js_rendering=False"
```
Add `from jku_kb.config import SourceConfig` to the imports at the top of test_config.py (alongside the existing `Settings` import).
**2. Add to tests/unit/test_... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | 2397e8f14c218b04ffb324861b16bc1615366a6142b9b2e8e95102ab5cfcc213 | 4 | 896 |
sitemap.xml",
"https://www.jku.at/about/",
],
include_patterns=[],
exclude_patterns=[],
crawl_mode="hybrid",
)
items = await scraper.discover()
await scraper.close()
urls = {item.url for item... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-PLAN.md | Markdown | 11a2bf40869058b48e6d5a7492a1efbbd9882fddb10c539f998b0cca5942515b | 5 | 799 |
---
phase: 12-web-crawl-infrastructure
plan: 02
subsystem: scrapers/config
tags: [crawl-mode, bfs-crawler, web-crawl, integration, config-extension]
dependency_graph:
requires: [12-01]
provides: [CRAWL-01]
affects: [src/jku_kb/config.py, src/jku_kb/scrapers/web_crawl.py, src/jku_kb/scrapers/__init__.py]
tech_stac... | jku-encyclopedia | .planning/phases/12-web-crawl-infrastructure/12-02-SUMMARY.md | Markdown | 8a5b8b405cd3d5e1572bf82a0855c29f40330f0732821724fac1eb37eb10a9be | 0 | 896 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.