merge: reconcile main with reviewed development integration
Preserve current prompt, policy and release-security behavior while incorporating main history. Make the migration gate regression test follow the workflow's real unique heads instead of stale revision constants.
This commit is contained in:
@@ -893,7 +893,7 @@ def test_contract_review_selects_and_renders_domain_prompt_asset() -> None:
|
||||
assert "{{" not in audit["prompt_preview"]
|
||||
|
||||
|
||||
def test_contract_review_prompt_candidates_cover_v1_business_domains() -> None:
|
||||
def test_contract_review_prompt_candidates_cover_packaged_business_domains() -> None:
|
||||
expected = {
|
||||
"investment-agreement": "contract_review_investment_finance",
|
||||
"shareholder-resolution": "contract_review_corporate_governance",
|
||||
@@ -908,7 +908,7 @@ def test_contract_review_prompt_candidates_cover_v1_business_domains() -> None:
|
||||
assert candidates[-2:] == ("contract_review_default", "contract_review.default")
|
||||
|
||||
|
||||
def test_render_contract_review_prompt_supports_v1_asset_json() -> None:
|
||||
def test_render_contract_review_prompt_supports_packaged_asset_json() -> None:
|
||||
repository = InMemoryAiPlatformRepository()
|
||||
created = repository.upsert_prompt_template(
|
||||
PromptTemplateCreate(
|
||||
|
||||
@@ -67,8 +67,8 @@ def _workflow_step(workflow: str, name: str) -> str:
|
||||
|
||||
def test_ci_migration_steps_track_real_unique_heads_and_use_empty_sqlite() -> None:
|
||||
workflow = WORKFLOW_PATH.read_text(encoding="utf-8")
|
||||
assert _migration_heads(CONTRACT_MIGRATIONS) == {"20260909_0079"}
|
||||
assert _migration_heads(AI_MIGRATIONS) == {"20260826_0028"}
|
||||
assert len(_migration_heads(CONTRACT_MIGRATIONS)) == 1
|
||||
assert len(_migration_heads(AI_MIGRATIONS)) == 1
|
||||
|
||||
contract_step = _workflow_step(workflow, "Verify Contract API empty-database migrations")
|
||||
assert "sqlite+pysqlite:////tmp/yuqei-contract-api-ci.sqlite3" in contract_step
|
||||
@@ -81,8 +81,11 @@ def test_ci_migration_steps_track_real_unique_heads_and_use_empty_sqlite() -> No
|
||||
"python -m alembic upgrade head",
|
||||
"python -m alembic downgrade 20260710_0030",
|
||||
"python -m alembic upgrade head",
|
||||
'python -m alembic current | grep -F "20260909_0079 (head)"',
|
||||
]
|
||||
assert 'expected_head="$(python -m alembic heads |' in contract_step
|
||||
assert '| wc -l)" -eq 1' in contract_step
|
||||
assert 'actual_head="$(python -m alembic current |' in contract_step
|
||||
assert 'test "$actual_head" = "$expected_head"' in contract_step
|
||||
|
||||
ai_step = _workflow_step(workflow, "Verify AI Platform API empty-database migrations")
|
||||
assert "sqlite+pysqlite:////tmp/yuqei-ai-platform-api-ci.sqlite3" in ai_step
|
||||
@@ -94,8 +97,11 @@ def test_ci_migration_steps_track_real_unique_heads_and_use_empty_sqlite() -> No
|
||||
if line.strip().startswith("python -m alembic")
|
||||
] == [
|
||||
"python -m alembic upgrade head",
|
||||
'python -m alembic current | grep -F "20260826_0028 (head)"',
|
||||
]
|
||||
assert 'expected_head="$(python -m alembic heads |' in ai_step
|
||||
assert '| wc -l)" -eq 1' in ai_step
|
||||
assert 'actual_head="$(python -m alembic current |' in ai_step
|
||||
assert 'test "$actual_head" = "$expected_head"' in ai_step
|
||||
|
||||
assert '20260826_0073 (head)' not in workflow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user