File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Drift check
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [main]
7+
8+ jobs :
9+ scan :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+
16+ - name : Scan for forbidden patterns
17+ run : |
18+ set -e
19+
20+ PATTERNS=(
21+ 'aeoess-private'
22+ '/Users/tima'
23+ 'MODEL-CITIZEN-CANON'
24+ 'MODEL_CITIZEN_CANON'
25+ 'THE-SYNTHESIS'
26+ 'THE_SYNTHESIS'
27+ 'ERIK-NEWTON'
28+ 'ERIK_NEWTON'
29+ 'OPEN-COMMITMENTS'
30+ 'OPEN_COMMITMENTS'
31+ 'CC-PROMPT-TEMPLATES'
32+ 'CC_PROMPT_TEMPLATES'
33+ 'DAILY-UPDATE-RHYTHM'
34+ 'DAILY_UPDATE_RHYTHM'
35+ 'MUTUAL-MODE'
36+ 'MUTUAL_MODE'
37+ 'canary watch'
38+ 'UPDATE-PROPAGATION-SPEC'
39+ 'CONSILIUM-FORENSIC'
40+ 'CONSILIUM-BRIEFING'
41+ 'ROME-COMPLETE'
42+ )
43+
44+ # Files we deliberately allow these patterns in (the workflow itself,
45+ # any scripts that intentionally enumerate the patterns to check for).
46+ EXCLUDE_PATHS='(\.github/workflows/check-drift\.yml|scripts/check-drift\.sh)'
47+
48+ violations=0
49+ for pat in "${PATTERNS[@]}"; do
50+ # Search tracked files only, excluding self-references
51+ hits=$(git ls-files | grep -v -E "$EXCLUDE_PATHS" | xargs grep -l -F "$pat" 2>/dev/null || true)
52+ if [ -n "$hits" ]; then
53+ echo "::error::Forbidden pattern '$pat' found in:"
54+ echo "$hits" | sed 's/^/ /'
55+ violations=$((violations + 1))
56+ fi
57+
58+ # Also check filenames themselves
59+ file_hits=$(git ls-files | grep -F "$pat" || true)
60+ if [ -n "$file_hits" ]; then
61+ echo "::error::Forbidden pattern '$pat' in filename(s):"
62+ echo "$file_hits" | sed 's/^/ /'
63+ violations=$((violations + 1))
64+ fi
65+ done
66+
67+ if [ "$violations" -gt 0 ]; then
68+ echo ""
69+ echo "::error::Drift check failed: $violations pattern violation(s)."
70+ exit 1
71+ fi
72+
73+ echo "✓ Drift check passed."
Original file line number Diff line number Diff line change 99* .egg
1010.venv /
1111venv /
12+
13+ # ─────────────────────────────────────────────────
14+ # AEOESS drift prevention — never commit these patterns.
15+ # These complement the pre-commit hook and CI scan.
16+ # ─────────────────────────────────────────────────
17+ specs /cc-prompts /
18+ specs /consilium /
19+ specs /briefings /
20+ specs /CONSILIUM- *
21+ specs /ROME-COMPLETE- *
22+ specs /DAILY- *
23+ specs /CC-PROMPT- *
24+ specs /OPEN-COMMITMENTS *
25+ specs /MODEL-CITIZEN *
26+ specs /MUTUAL-MODE *
27+ specs /THE-SYNTHESIS *
28+ specs /ERIK-NEWTON *
29+ /tmp- * .md
30+ /scratch- * .md
31+ * .private.md
You can’t perform that action at this time.
0 commit comments