fix: validate external navigation pointers by repository

This commit is contained in:
冰朔 2026-09-08 13:43:45 +08:00
commit 3b70703315
2 changed files with 4 additions and 1 deletions

View file

@ -2,7 +2,7 @@ schema: tcs.module-lock/v1
module_id: MOD-TCS-MOTHER-ROOT-NAVIGATOR-001 module_id: MOD-TCS-MOTHER-ROOT-NAVIGATOR-001
module_source_sha256: eb299410bacd0247bc43732154fac0f74f181bab6a5e4e5714937d1b90b24688 module_source_sha256: eb299410bacd0247bc43732154fac0f74f181bab6a5e4e5714937d1b90b24688
module_gir_sha256: bb3246fbfc69a39b3e5412e41271aeb7c66e37a2539902b5dab2291e38a04800 module_gir_sha256: bb3246fbfc69a39b3e5412e41271aeb7c66e37a2539902b5dab2291e38a04800
runtime_sha256: decf7355a421618b5d9767e07b0999e1c75b4150ff6e789b27b4c6cc96a34149 runtime_sha256: 3ed60af78874936883559e349e20c914cc7f9a31b6a9615f40ee3e4e01f89824
root_map_sha256: 2f5c4b7a4dc49edb4d83787ea68a0a8d88dff79ef78215550cd2f209e7732e88 root_map_sha256: 2f5c4b7a4dc49edb4d83787ea68a0a8d88dff79ef78215550cd2f209e7732e88
compiler_sha256: 5ad6f0c43d8db80677cad7091e6a3b706e701307b2537446dc13635e89499942 compiler_sha256: 5ad6f0c43d8db80677cad7091e6a3b706e701307b2537446dc13635e89499942
update_rule: CURRENT_DIRECT_LANGUAGE_TCS_PLUS_NUMBER_IMPACT_PLUS_COMMITTED_READBACK update_rule: CURRENT_DIRECT_LANGUAGE_TCS_PLUS_NUMBER_IMPACT_PLUS_COMMITTED_READBACK

View file

@ -109,6 +109,9 @@ def build(repo: Path, commit: str | None = None) -> dict[str, Any]:
if not relative: if not relative:
continue continue
relative = safe_relative(relative) relative = safe_relative(relative)
if item.get("repository_id") not in (None, "REPO-012"):
registered_maps.append({"key": key, "path": relative, "id": item.get("id"), "version": item.get("version"), "repository_id": item.get("repository_id"), "sha256": None, "state": "EXTERNAL_REPOSITORY_POINTER"})
continue
body = commit_bytes(repo, commit, relative) body = commit_bytes(repo, commit, relative)
registered_maps.append({ registered_maps.append({
"key": key, "key": key,