fix(gitea): surface all product dev prod repo truth
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m12s
CD Pipeline / build-and-deploy (push) Successful in 4m52s
CD Pipeline / post-deploy-checks (push) Successful in 1m47s

This commit is contained in:
Your Name
2026-07-03 08:38:04 +08:00
parent 0dc9e62b6d
commit fbd3ad2ca4
9 changed files with 1286 additions and 144 deletions

View File

@@ -102,9 +102,79 @@ def test_delivery_closure_workbench_uses_gitea_private_inventory_lane():
assert lanes["gitea_private_inventory"]["metric"]["private_inventory_source"] == "gitea"
assert lanes["gitea_private_inventory"]["metric"]["gitea_repo_inventory_status"] == "ok"
assert lanes["gitea_private_inventory"]["metric"]["gitea_visibility_scope"] == "admin_export"
assert lanes["gitea_private_inventory"]["metric"]["expected_product_count"] == 11
assert lanes["gitea_private_inventory"]["metric"]["present_product_row_count"] == 11
assert lanes["gitea_private_inventory"]["metric"]["gitea_public_repo_count"] == 6
assert lanes["gitea_private_inventory"]["metric"]["gitea_ssh_verified_repo_count"] == 12
assert (
lanes["gitea_private_inventory"]["metric"][
"gitea_private_or_auth_only_repo_count"
]
== 6
)
assert lanes["gitea_private_inventory"]["metric"]["expected_product_count"] == 12
assert lanes["gitea_private_inventory"]["metric"]["present_product_row_count"] == 12
assert lanes["gitea_private_inventory"]["metric"]["missing_product_row_count"] == 0
assert lanes["gitea_private_inventory"]["metric"]["ssh_verified_product_repo_count"] == 12
assert (
lanes["gitea_private_inventory"]["metric"][
"main_branch_present_product_repo_count"
]
== 12
)
assert (
lanes["gitea_private_inventory"]["metric"][
"dev_branch_present_product_repo_count"
]
== 12
)
assert (
lanes["gitea_private_inventory"]["metric"][
"dev_prod_environment_split_ready_count"
]
== 12
)
assert (
lanes["gitea_private_inventory"]["metric"][
"public_visible_product_repo_count"
]
== 6
)
assert (
lanes["gitea_private_inventory"]["metric"][
"private_or_auth_only_product_repo_count"
]
== 6
)
assert (
lanes["gitea_private_inventory"]["metric"][
"tokenless_http_404_private_or_auth_product_repo_count"
]
== 6
)
assert lanes["gitea_private_inventory"]["metric"]["missing_product_repo_count"] == 0
assert (
lanes["gitea_private_inventory"]["metric"][
"missing_main_branch_product_repo_count"
]
== 0
)
assert (
lanes["gitea_private_inventory"]["metric"][
"missing_dev_branch_product_repo_count"
]
== 0
)
assert (
lanes["gitea_private_inventory"]["metric"][
"all_expected_product_repos_have_ssh_refs"
]
is True
)
assert (
lanes["gitea_private_inventory"]["metric"][
"all_expected_product_repos_have_dev_and_main"
]
is True
)
assert (
lanes["gitea_private_inventory"]["metric"][
"authenticated_inventory_single_preflight_intake_ready"
@@ -124,7 +194,7 @@ def test_delivery_closure_workbench_uses_gitea_private_inventory_lane():
lanes["gitea_private_inventory"]["metric"][
"authenticated_inventory_payload_skeleton_repo_count_floor"
]
== 4
== 6
)
assert (
lanes["gitea_private_inventory"]["metric"][
@@ -520,9 +590,74 @@ def _assert_delivery_workbench_shape(data: dict):
assert data["summary"]["gitea_private_inventory_active_blocker_count"] == 0
assert data["summary"]["gitea_private_inventory_repo_inventory_status"] == "ok"
assert data["summary"]["gitea_private_inventory_visibility_scope"] == "admin_export"
assert data["summary"]["gitea_private_inventory_expected_product_count"] == 11
assert data["summary"]["gitea_private_inventory_present_product_row_count"] == 11
assert data["summary"]["gitea_private_inventory_public_repo_count"] == 6
assert data["summary"]["gitea_private_inventory_ssh_verified_repo_count"] == 12
assert data["summary"]["gitea_private_inventory_private_or_auth_only_repo_count"] == 6
assert data["summary"]["gitea_private_inventory_expected_product_count"] == 12
assert data["summary"]["gitea_private_inventory_present_product_row_count"] == 12
assert data["summary"]["gitea_private_inventory_missing_product_row_count"] == 0
assert data["summary"]["gitea_private_inventory_ssh_verified_product_repo_count"] == 12
assert (
data["summary"][
"gitea_private_inventory_main_branch_present_product_repo_count"
]
== 12
)
assert (
data["summary"][
"gitea_private_inventory_dev_branch_present_product_repo_count"
]
== 12
)
assert (
data["summary"][
"gitea_private_inventory_dev_prod_environment_split_ready_count"
]
== 12
)
assert (
data["summary"][
"gitea_private_inventory_public_visible_product_repo_count"
]
== 6
)
assert (
data["summary"][
"gitea_private_inventory_private_or_auth_only_product_repo_count"
]
== 6
)
assert (
data["summary"][
"gitea_private_inventory_tokenless_http_404_private_or_auth_product_repo_count"
]
== 6
)
assert data["summary"]["gitea_private_inventory_missing_product_repo_count"] == 0
assert (
data["summary"][
"gitea_private_inventory_missing_main_branch_product_repo_count"
]
== 0
)
assert (
data["summary"][
"gitea_private_inventory_missing_dev_branch_product_repo_count"
]
== 0
)
assert (
data["summary"][
"gitea_private_inventory_all_expected_product_repos_have_ssh_refs"
]
is True
)
assert (
data["summary"][
"gitea_private_inventory_all_expected_product_repos_have_dev_and_main"
]
is True
)
assert data["summary"]["gitea_private_inventory_accepted_payload_count"] == 1
assert (
data["summary"][
@@ -549,7 +684,7 @@ def _assert_delivery_workbench_shape(data: dict):
data["summary"][
"gitea_private_inventory_authenticated_payload_skeleton_repo_count_floor"
]
== 4
== 6
)
assert (
data["summary"][