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 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user