mirror of
https://github.com/boshu2/agentops.git
synced 2026-09-14 15:08:13 +08:00
a999bcbe62
## Main is red — hotfix
`cli/embedded/skills/standards/references/{go,test-pyramid}.md` were
**empty (0 bytes)** on main HEAD; #776's merge truncated them.
`contracts-sync` / `correctness` run the full embedded-sync check on
main-push (changed-files-scoped on PRs, so it slipped through during the
batch drain) → main Validate failed (run on 3df599df, def8fc9b).
## Fix
- Re-synced both embedded files from their sources via the
`cli/Makefile` recipe (`cp ../skills/standards/references/*`).
`scripts/validate-embedded-sync.sh` now reports **All embedded files are
in sync**.
- Corrected that script's stale fix hint: `make sync-embedded` (no such
target) → `make sync-hooks` (the real recipe).
## Evidence
`bash scripts/validate-embedded-sync.sh` → "All embedded files are in
sync."
Bounded-context: BC5-Runtime
Evidence: cli/embedded/skills/standards/references/go.md
43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# validate-embedded-sync.sh — Verify embedded copies match source lib/skills.
|
|
# Exits non-zero if any embedded file is stale (doesn't match source).
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
EMBEDDED="$REPO_ROOT/cli/embedded"
|
|
ERRORS=0
|
|
|
|
check_file() {
|
|
local src="$1" dst="$2"
|
|
if [[ ! -f "$dst" ]]; then
|
|
echo "MISSING: $dst (source: $src)"
|
|
ERRORS=$((ERRORS + 1))
|
|
return
|
|
fi
|
|
if ! diff -q "$src" "$dst" >/dev/null 2>&1; then
|
|
echo "STALE: $dst differs from $src"
|
|
ERRORS=$((ERRORS + 1))
|
|
fi
|
|
}
|
|
|
|
# Check skills/standards/references/*
|
|
for f in "$REPO_ROOT"/skills/standards/references/*; do
|
|
basename=$(basename "$f")
|
|
check_file "$f" "$EMBEDDED/skills/standards/references/$basename"
|
|
done
|
|
|
|
# Check skills/using-agentops/SKILL.md
|
|
check_file "$REPO_ROOT/skills/using-agentops/SKILL.md" "$EMBEDDED/skills/using-agentops/SKILL.md"
|
|
|
|
# Check skills/compile runtime script
|
|
check_file "$REPO_ROOT/skills/compile/scripts/compile.sh" "$EMBEDDED/skills/compile/scripts/compile.sh"
|
|
|
|
if [[ $ERRORS -gt 0 ]]; then
|
|
echo ""
|
|
echo "ERROR: $ERRORS embedded file(s) are out of sync."
|
|
echo "Run 'cd cli && make sync-hooks' to fix."
|
|
exit 1
|
|
fi
|
|
|
|
echo "All embedded files are in sync."
|