DevPlace CI / test (push) Failing after 2m13s
Implement a new `SeoMetaService` subservice that generates clean SEO title/description/keywords for published content items, distinct from the existing SEO diagnostics auditor. Add `seo_metadata` polymorphic table with soft-delete support, batch query methods, and usage tracking. Extend the CLI with `seo-meta prune` and `seo-meta clear` commands for job row lifecycle management. Wire `schedule_seo_meta_for_table` into content creation and editing flows in `content.py`. Document the new service in `AGENTS.md` and `README.md`, including the `extra_head` site setting for custom `<head>` injection.
43 lines
987 B
Python
43 lines
987 B
Python
# retoor <retoor@molodetz.nl>
|
|
|
|
from devplacepy.services.jobs.deepsearch.phases import (
|
|
PHASE_ANALYSIS,
|
|
PHASE_CRAWLING,
|
|
PHASE_INDEXING,
|
|
PHASE_LABELS,
|
|
PHASE_ORDER,
|
|
PHASE_PLANNING,
|
|
PHASE_SEARCHING,
|
|
PHASE_SYNTHESIS,
|
|
TOTAL_PHASES,
|
|
phase_index,
|
|
)
|
|
|
|
|
|
def test_phase_order_is_full_pipeline_in_sequence():
|
|
assert PHASE_ORDER == [
|
|
PHASE_PLANNING,
|
|
PHASE_SEARCHING,
|
|
PHASE_CRAWLING,
|
|
PHASE_INDEXING,
|
|
PHASE_ANALYSIS,
|
|
PHASE_SYNTHESIS,
|
|
]
|
|
assert TOTAL_PHASES == len(PHASE_ORDER)
|
|
|
|
|
|
def test_phase_index_matches_position():
|
|
assert phase_index(PHASE_PLANNING) == 0
|
|
assert phase_index(PHASE_INDEXING) == 3
|
|
assert phase_index(PHASE_SYNTHESIS) == TOTAL_PHASES - 1
|
|
|
|
|
|
def test_phase_index_unknown_falls_back_to_zero():
|
|
assert phase_index("not-a-phase") == 0
|
|
assert phase_index("") == 0
|
|
|
|
|
|
def test_every_phase_has_a_label():
|
|
for phase in PHASE_ORDER:
|
|
assert PHASE_LABELS.get(phase)
|