feat: dream roadmap — robustness, async, crawl intelligence, AI-ready outputs, plugins, MCP - #68
Open
obeone wants to merge 36 commits into
Open
feat: dream roadmap — robustness, async, crawl intelligence, AI-ready outputs, plugins, MCP#68obeone wants to merge 36 commits into
obeone wants to merge 36 commits into
Conversation
…ntry-point registry
Owner
Author
|
Please massively improve documentation! |
Owner
Author
|
Addressed both review comments on this branch: Documentation (massive improvement):
CodeQL — workflow token permissions:
All pushed to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
End-to-end implementation of the "dream roadmap" (
.omc/plans/dream-roadmap.md), executed in quality-gated phases (P0 → P3 subset). Every phase landed with tests green andruffclean before the next began. 31 commits, atomic and conventional.Test suite grew 40 → 115 (all green; bare CI env stays green via
importorskip/monkeypatch on optional extras).What changed, by phase
P0 — Foundation (hygiene + real defect fixes + tooling)
session.getwas unguarded → one network error crashed the whole crawl. Now wrapped + every request has a timeout._cleanup_markdownran per page on the whole growing doc) → now a single pass.__del__→ now context manager + explicitclose()+ WAL.logging.getLogger(__name__); logging configured inmain(), not at import.old/+.history/removed;.gitignorehardened; CI workflow added (ruff + pytest on 3.10–3.12); dev extras declared; README title fixed.P1 — Robustness
Retry with exponential backoff + jitter (429/5xx/
Retry-After),--timeout, content-hash upsert (fetched_at, only rewrites on change), crawl bounds (--max-pages/--max-depth/--max-time), canonical URL dedup (tracking-param stripping, port/trailing-slash normalization). Legacy SQLite caches migrated additively.P1.5 — Async concurrency
httpx.AsyncClientengine behind--concurrency N(N=1 = byte-for-byte sync path, retained). SQLite touched only from the main coroutine; network runs concurrently under a semaphore. Parity test asserts identical corpus sync vs async.P2 — Crawl intelligence + AI-ready outputs
robots.txt(default on,--ignore-robots),--user-agent,--sitemap,--extract readability(extra),--render(extra, Playwright),--header/--cookie/--auth,--allow-types(PDF/docx via MarkItDown). Applied to both sync + async paths.--export-jsonl,--export-llms(llms.txt + llms-full.txt), YAML frontmatter, token-aware RAG chunking (extra), token accounting, Parquet vector export (extra), end-of-run summary.P2.5 — Plugin system
Entry-point registry +
Formatter/Filter/Processor/Fetcherprotocols. Formatters wired live (output byte-identical); other groups have protocols + first-party impls + an example third-party plugin proven via a test. Seedocs/plugins.md.P3 (subset) — Interfaces
crawl|export|mcpwith backward-compat (crawler-to-md --url …still works);crawler-to-md.tomlconfig (CLI overrides file).from crawler_to_md import crawl(...)→CrawlResult, no CLI side effects; shared orchestration incore.py.crawler-to-md mcp, extramcp) exposingcrawlandfetch_as_markdowntools.Optional extras
readability(trafilatura),render(playwright),rag(tiktoken),vector(pyarrow),mcp,dev. Core install stays light; all gated features lazy-import with a clear error if the extra is missing.Deferred / follow-ups (intentional, for honesty)
filter/processor/fetcherplugin protocols exist + are tested but are not yet consumed by the live crawl loop (deferred to avoid regression risk).ElementTree; considerdefusedxml(or a size/depth guard) for untrusted input.Verification
ruff check .clean.pytest: 115 passed with all extras installed; bare dev env green (optional-extra tests skip/guard).--urlinvocation still work.