mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
Feat/v0.13.0 (#270)
* feat(release): add release-manager feature flag (default off) * feat(release): change classification + semver-bump derivation * feat(release): readiness audit (changelog/version-ref/docs/migration/gate) * feat(release): release-manager engine proposes a gated release * feat(release): fail-closed release executor (bump, gate, publish) * feat(release): CEO approve/reject release-proposal surface * docs(release): document the gated release manager * feat(memory): add org-memory feature flags (default off) * feat(memory): add playbooks table + status enum + migration * feat(memory): playbook service with auditor curation transitions * feat(memory): playbooks RAG index plugin * feat(memory): index a playbook into RAG on approval * feat(memory): distill a high-signal lesson at task completion * feat(memory): keep private journal reflections out of the shared RAG corpus * feat(memory): draft_playbook verb + auditor curation verbs * fix(ci): resolve mypy tests/ errors blocking the gate (UUID casts, annotations) * feat(memory): auto-inject similar lessons/playbooks into the briefing * feat(memory): auditor playbook review queue (api + panel) * docs(memory): document the org-memory loop + playbook verbs * fix(provisioning): idempotent pitch provisioning (reuse product/project by slug on re-approval) * fix(memory): add chunks_playbooks to the chunk schema + isolate release route tests - Migration 030's CHUNK_TABLES was missing chunks_playbooks, breaking the IndexType<->migration parity guard once the PLAYBOOKS index landed. The upgrade is ALTER ... IF EXISTS so adding it is safe on any DB shape. - The release-route fixture's approve/reject paths call db.commit() (real behavior), so a held proposal outlived the per-test rollback and leaked into engine tests that read the global list_open_release_proposals(). Tear down source=release_manager rows after each test. - Make the gather_snapshot real-repo smoke version-agnostic (semver match) so it stops pinning the literal repo version. * chore(release): 0.13.0 * ++ --------- Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -8,8 +8,8 @@ gets at most one open fix task even across its cell-projects.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from uuid import uuid4
|
||||
from typing import TYPE_CHECKING, cast
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import pytest
|
||||
from roboco.db.tables import AgentTable, ProjectTable
|
||||
@@ -89,7 +89,7 @@ async def _make_ci_watch_task(
|
||||
task_type=TaskType.CODE,
|
||||
nature=TaskNature.TECHNICAL,
|
||||
estimated_complexity=Complexity.MEDIUM,
|
||||
project_id=project.id,
|
||||
project_id=cast("UUID", project.id),
|
||||
status=TaskStatus.PENDING,
|
||||
source=source,
|
||||
confirmed_by_human=True,
|
||||
|
||||
@@ -7,8 +7,8 @@ monorepo gets at most one open dependency-update task across its cell-projects.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from uuid import uuid4
|
||||
from typing import TYPE_CHECKING, cast
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import pytest
|
||||
from roboco.db.tables import AgentTable, ProjectTable
|
||||
@@ -87,7 +87,7 @@ async def _make_task(
|
||||
task_type=TaskType.CODE,
|
||||
nature=TaskNature.TECHNICAL,
|
||||
estimated_complexity=Complexity.MEDIUM,
|
||||
project_id=project.id,
|
||||
project_id=cast("UUID", project.id),
|
||||
status=TaskStatus.PENDING,
|
||||
source=source,
|
||||
confirmed_by_human=True,
|
||||
|
||||
@@ -8,8 +8,8 @@ once per cell-project after a re-point). Re-review on a new head SHA still works
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING, Any
|
||||
from uuid import uuid4
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import pytest
|
||||
from roboco.db.tables import AgentTable, ProjectTable
|
||||
@@ -72,12 +72,18 @@ async def test_sibling_project_same_pr_is_deduped(db_session: AsyncSession) -> N
|
||||
svc = get_task_service(db_session)
|
||||
|
||||
first = await svc.ingest_external_pr(
|
||||
project_id=fe.id, pr=_pr("abc123"), created_by=SYSTEM_UUID, team=Team.FRONTEND
|
||||
project_id=cast("UUID", fe.id),
|
||||
pr=_pr("abc123"),
|
||||
created_by=SYSTEM_UUID,
|
||||
team=Team.FRONTEND,
|
||||
)
|
||||
assert first is not None # first review opens
|
||||
# Same PR + same head, sibling project on the SAME repo → no second review.
|
||||
dup = await svc.ingest_external_pr(
|
||||
project_id=be.id, pr=_pr("abc123"), created_by=SYSTEM_UUID, team=Team.BACKEND
|
||||
project_id=cast("UUID", be.id),
|
||||
pr=_pr("abc123"),
|
||||
created_by=SYSTEM_UUID,
|
||||
team=Team.BACKEND,
|
||||
)
|
||||
assert dup is None
|
||||
|
||||
@@ -88,12 +94,16 @@ async def test_exists_is_repo_scoped(db_session: AsyncSession) -> None:
|
||||
be = await _seed(db_session, "gca-backend", _REPO)
|
||||
svc = get_task_service(db_session)
|
||||
await svc.ingest_external_pr(
|
||||
project_id=fe.id, pr=_pr("abc123"), created_by=SYSTEM_UUID, team=Team.FRONTEND
|
||||
project_id=cast("UUID", fe.id),
|
||||
pr=_pr("abc123"),
|
||||
created_by=SYSTEM_UUID,
|
||||
team=Team.FRONTEND,
|
||||
)
|
||||
|
||||
# The sibling project sees the existing review (the fix); a new head SHA does not.
|
||||
assert await svc.external_review_task_exists(be.id, 131, "abc123") is True
|
||||
assert await svc.external_review_task_exists(be.id, 131, "newsha") is False
|
||||
be_id = cast("UUID", be.id)
|
||||
assert await svc.external_review_task_exists(be_id, 131, "abc123") is True
|
||||
assert await svc.external_review_task_exists(be_id, 131, "newsha") is False
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -102,11 +112,17 @@ async def test_different_repo_not_deduped(db_session: AsyncSession) -> None:
|
||||
other = await _seed(db_session, "other", _OTHER_REPO)
|
||||
svc = get_task_service(db_session)
|
||||
await svc.ingest_external_pr(
|
||||
project_id=fe.id, pr=_pr("abc123"), created_by=SYSTEM_UUID, team=Team.FRONTEND
|
||||
project_id=cast("UUID", fe.id),
|
||||
pr=_pr("abc123"),
|
||||
created_by=SYSTEM_UUID,
|
||||
team=Team.FRONTEND,
|
||||
)
|
||||
|
||||
# A genuinely different repo with the same PR number is reviewed independently.
|
||||
created = await svc.ingest_external_pr(
|
||||
project_id=other.id, pr=_pr("abc123"), created_by=SYSTEM_UUID, team=Team.BACKEND
|
||||
project_id=cast("UUID", other.id),
|
||||
pr=_pr("abc123"),
|
||||
created_by=SYSTEM_UUID,
|
||||
team=Team.BACKEND,
|
||||
)
|
||||
assert created is not None
|
||||
|
||||
@@ -7,8 +7,8 @@ operator can't opt a project in.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
from uuid import uuid4
|
||||
from typing import TYPE_CHECKING, cast
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import pytest
|
||||
from roboco.db.tables import AgentTable, ProjectTable
|
||||
@@ -55,7 +55,7 @@ async def test_update_sets_autonomy_opt_ins(db_session: AsyncSession) -> None:
|
||||
svc = get_project_service(db_session)
|
||||
|
||||
await svc.update(
|
||||
project.id,
|
||||
cast("UUID", project.id),
|
||||
ProjectUpdate(
|
||||
ci_watch_enabled=True,
|
||||
ci_watch_workflow="ci.yml",
|
||||
@@ -64,7 +64,7 @@ async def test_update_sets_autonomy_opt_ins(db_session: AsyncSession) -> None:
|
||||
),
|
||||
)
|
||||
|
||||
reloaded = await svc.get(project.id)
|
||||
reloaded = await svc.get(cast("UUID", project.id))
|
||||
assert reloaded is not None
|
||||
assert reloaded.ci_watch_enabled is True
|
||||
assert reloaded.ci_watch_workflow == "ci.yml"
|
||||
|
||||
Reference in New Issue
Block a user