Why: Replace repeated submodule source pointers with consumer-owned language versions and fixed application sources, keeping independent repository edits and existing branches intact. Evidence: SELF task receipts contain startup/sync evidence, real Go and npm consumption, Native overlay/unlink, safe transition/ref preservation, credential boundary and historical build regressions. Exact committed full composition and RDM checks follow this checkpoint; formal acceptance and GATE CI remain pending. Impact: Add isolated build/test composition, source provenance and safe owner refresh, adapt governance and service build callers, remove replaced index links while retaining original Git metadata, and adopt reusable dependency standards. Refs: Documents approved dependency-workspace r1/R1-R15 and U1-U7 implementation plan; feature/dependency-workspace task card.
28 lines
873 B
Bash
Executable File
28 lines
873 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 分层棘轮:新增依赖边失败,消失的边只告警。
|
|
# 负例:注入一条基线里没有的边,必须失败。
|
|
set -euo pipefail
|
|
root=$(cd "$(dirname "$0")/.." && pwd)
|
|
base="$root/policy/architecture-baseline.json"
|
|
tool=(env GOWORK=off go run "$root/scripts/lint-architecture.go" -root "$root" -baseline "$base")
|
|
|
|
( cd "$root/scripts" && "${tool[@]}" )
|
|
|
|
probe=$(mktemp)
|
|
trap 'rm -f "$probe"' EXIT
|
|
set +e
|
|
( cd "$root/scripts" && "${tool[@]}" -inject 'backend/store->backend/__architecture_probe__' ) >"$probe" 2>&1
|
|
code=$?
|
|
set -e
|
|
if [ "$code" -eq 0 ]; then
|
|
echo "architecture: injected edge was accepted" >&2
|
|
cat "$probe" >&2
|
|
exit 1
|
|
fi
|
|
if ! grep -q '__architecture_probe__' "$probe"; then
|
|
echo "architecture: injected edge did not fail for the expected reason" >&2
|
|
cat "$probe" >&2
|
|
exit 1
|
|
fi
|
|
echo "architecture negative ok"
|