Fixes found by investigating the live lobste.rs run:
- Comments came back 0: the learner probed the external article, not the
discussion page. A comments_url field (RSS <comments>, JSON key, or an HTML
"comments" anchor) now drives comment learning; the article is still used
for the post body.
- HTML id selectors collapsed every story into one identity (constant /login
vote link). Id/url selectors must now be distinct; no distinct selector
rejects the feed.
- Over-long posts were rejected; title, post and comment are truncated to the
sync limits and reported as a warning.
- A failed article fetch is a warning, not a run error.
- A gate refusal (sync disabled, origin not allowed, aliasing off) ends the run
as skipped and no longer counts toward the failure floor.
- The same story from two feeds becomes one post, comments attached to it.
- HTML comments follow rel=next up to max_comment_pages.
- A dry run now predicts an unknown-record tombstone as unchanged, like a live
run.
- /nodes is exempt from the happy-404 decoy so a missing download is a real 404.
Sync log (admin): every run stores a verdict, exact per-outcome counts and one
row per record needing an explanation, with the reason in plain words, at
/admin/communities/{slug}/ledger (HTML, JSON, Devii tool, docs entry).
Bounded: 2000 routine + 2000 problem rows per run, 50 per page, detail kept for
the 10 newest runs, four indexes matching every ORDER BY (asserted by an
EXPLAIN QUERY PLAN test). Measured worst case 37 ms at the 40000-row ceiling.
Also: privacy disclosure for imported community content, status colour channel
tokens, and tests/unit/cli/nodes.py renamed to fix a duplicate-basename
collection error.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
66 lines
1.4 KiB
TOML
66 lines
1.4 KiB
TOML
[project]
|
|
name = "devplacepy"
|
|
version = "1.1.3"
|
|
description = "DevPlace - The Developer Social Network"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi",
|
|
"uvicorn[standard]",
|
|
"jinja2",
|
|
"python-multipart",
|
|
"dataset",
|
|
"passlib[bcrypt]",
|
|
"python-dotenv",
|
|
"aiofiles",
|
|
"httpx[http2]",
|
|
"curl_cffi",
|
|
"brotli",
|
|
"zstandard",
|
|
"cryptography",
|
|
"PyJWT",
|
|
"multiavatar",
|
|
"locust",
|
|
"Pillow",
|
|
"imagehash",
|
|
"uuid_utils",
|
|
"mistune",
|
|
"emoji",
|
|
"pypdf",
|
|
"playwright",
|
|
"playwright-stealth",
|
|
"chromadb",
|
|
"weasyprint",
|
|
"cairosvg",
|
|
"sqlglot",
|
|
"curl_cffi",
|
|
"faker",
|
|
"defusedxml",
|
|
"stealthii @ git+https://retoor.molodetz.nl/retoor/stealthii.git",
|
|
]
|
|
|
|
[project.scripts]
|
|
devplace = "devplacepy.cli:main"
|
|
devii = "devplacepy.services.devii.cli:main"
|
|
devplace-xmlrpc = "devplacepy.services.xmlrpc.server:main"
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest", "playwright", "requests", "coverage"]
|
|
bots = ["playwright", "faker"]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.metadata]
|
|
allow-direct-references = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests/unit", "tests/api", "tests/e2e"]
|
|
python_files = ["*.py"]
|
|
addopts = "--tb=line -rf -p no:xdist"
|
|
filterwarnings = [
|
|
"ignore:'crypt' is deprecated",
|
|
"ignore:Using `httpx` with `starlette.testclient` is deprecated",
|
|
"ignore:invalid escape sequence",
|
|
]
|