refactor(content): move orchestration markers off quick_context to typed jsonb

This commit is contained in:
Renn F
2026-06-21 02:48:07 +02:00
parent 7e74112fcc
commit 0fba4eed01
21 changed files with 270 additions and 316 deletions
@@ -21,6 +21,7 @@ import structlog
from roboco.exceptions import MergeConflictError
from roboco.foundation.policy import lifecycle as spec_module
from roboco.foundation.policy.content import markers
from roboco.services.gateway.choreographer._verb_runner import VerbRunner
from roboco.services.gateway.claim_guards import (
already_active_guard,
@@ -185,14 +186,7 @@ def _extract_original_developer(task: Any) -> str | None:
spec's self-review precondition (a documenter who is also the
original developer cannot self-doc).
"""
qc = getattr(task, "quick_context", None) or ""
marker = "original_developer:"
if marker not in qc:
return None
tail = qc.split(marker, 1)[1].strip()
if not tail:
return None
return tail.split()[0] or None
return markers.get_original_developer(task)
@dataclass(frozen=True)
+2 -8
View File
@@ -40,6 +40,7 @@ from typing import TYPE_CHECKING, Any
from roboco.config import settings
from roboco.foundation.policy import lifecycle as spec_module
from roboco.foundation.policy import tracing as _tr
from roboco.foundation.policy.content import markers
from roboco.models.task import DocRef
from roboco.services.gateway.envelope import Envelope
from roboco.services.gateway.evidence_builder import build_evidence_for_task
@@ -86,14 +87,7 @@ def _extract_original_developer(task: Any) -> str | None:
the spec's self-review block reads ``ctx.original_developer_slug``
and the mixin builds the Context.
"""
qc = getattr(task, "quick_context", None) or ""
marker = "original_developer:"
if marker not in qc:
return None
tail = qc.split(marker, 1)[1].strip()
if not tail:
return None
return tail.split()[0] or None
return markers.get_original_developer(task)
class DocMixin(_Base):
+2 -8
View File
@@ -42,6 +42,7 @@ from typing import TYPE_CHECKING, Any
from roboco.config import settings
from roboco.foundation.policy import lifecycle as spec_module
from roboco.foundation.policy import tracing as _tr
from roboco.foundation.policy.content import markers
from roboco.services.gateway.envelope import Envelope
from roboco.services.gateway.evidence_builder import build_evidence_for_task
@@ -78,14 +79,7 @@ def _extract_original_developer(task: Any) -> str | None:
the spec's self-review block reads ``ctx.original_developer_slug``
and the mixins build the Context.
"""
qc = getattr(task, "quick_context", None) or ""
marker = "original_developer:"
if marker not in qc:
return None
tail = qc.split(marker, 1)[1].strip()
if not tail:
return None
return tail.split()[0] or None
return markers.get_original_developer(task)
class QAMixin(_Base):