mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
refactor(content): move orchestration markers off quick_context to typed jsonb
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user