Skip to content

Commit de6ccee

Browse files
committed
Merge develop into vm_multi-pass: Resolve conflicts
- Merged .env.example: Keep both SSL/TLS config and Tailscale config - Merged .gitignore: Keep both test reports and artifacts patterns - Merged vite.config.ts: Keep both HTTPS support and Tailscale hosts All features from both branches preserved.
2 parents 3e3f3d7 + 50a6c88 commit de6ccee

File tree

227 files changed

+60925
-9547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+60925
-9547
lines changed

.env.example

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
PORT=4127
33
NODE_ENV=development
44

5+
# SSL/TLS Configuration
6+
SSL_ENABLED=false
7+
# Set to true to enable HTTPS/TLS encryption
8+
# SSL_KEY_PATH=./certs/dev-key.pem
9+
# SSL_CERT_PATH=./certs/dev-cert.pem
10+
# HTTPS_PORT=4128
11+
512
# Database Configuration
613
NEO4J_URI=bolt://localhost:7687
714
NEO4J_USER=neo4j
@@ -31,8 +38,12 @@ CLIENT_URL=http://localhost:3127
3138
VITE_API_URL=http://localhost:4127
3239
VITE_WS_URL=ws://localhost:4127
3340

41+
# HTTPS Development URLs (when SSL_ENABLED=true)
42+
# VITE_GRAPHQL_URL=https://localhost:4128/graphql
43+
# VITE_GRAPHQL_WS_URL=wss://localhost:4128/graphql
44+
3445
# Tailscale Configuration (for VM mesh networking)
3546
# Get your auth key from: https://login.tailscale.com/admin/settings/keys
3647
# IMPORTANT: Use an ephemeral key for security
3748
# Example: tskey-auth-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
38-
TAILSCALE_AUTH_KEY=
49+
TAILSCALE_AUTH_KEY=

.githooks/commit-msg

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/bin/sh
2+
# Commit-msg hook to block Co-Authored-By lines
3+
# GraphDone does not use pair programming and maintains clean git logs
4+
5+
# First argument is the commit message file
6+
COMMIT_MSG_FILE="$1"
7+
8+
# Read the commit message
9+
if [ ! -f "$COMMIT_MSG_FILE" ]; then
10+
exit 0
11+
fi
12+
13+
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
14+
15+
# Function to check for co-author patterns
16+
check_coauthor_patterns() {
17+
echo "$1" | grep -iE "(co-authored-by:|co-author:|coauthor:|pair[- ]programm)" >/dev/null 2>&1
18+
}
19+
20+
# Check for Co-Authored-By and related patterns
21+
if check_coauthor_patterns "$COMMIT_MSG"; then
22+
echo ""
23+
echo "════════════════════════════════════════════════════════════════════"
24+
echo " ❌ COMMIT BLOCKED "
25+
echo "════════════════════════════════════════════════════════════════════"
26+
echo ""
27+
echo "Co-authorship attribution detected in commit message."
28+
echo ""
29+
echo "GraphDone policy: Individual commits only (no pair programming)"
30+
echo ""
31+
echo "Found in your commit message:"
32+
echo "────────────────────────────────────────────────────────────────────"
33+
echo "$COMMIT_MSG" | grep -iE "(co-authored-by:|co-author:|coauthor:|pair[- ]programm)" | head -5
34+
echo "────────────────────────────────────────────────────────────────────"
35+
echo ""
36+
echo "Please remove:"
37+
echo " • Co-Authored-By: <name> <email>"
38+
echo " • Co-Author: ..."
39+
echo " • References to pair programming"
40+
echo " • Any collaborative attribution"
41+
echo ""
42+
echo "Each commit should have a single author for:"
43+
echo " ✓ Clear accountability"
44+
echo " ✓ Clean git history"
45+
echo " ✓ Accurate contribution tracking"
46+
echo ""
47+
echo "To fix: Edit your commit message and remove co-authorship lines"
48+
echo "════════════════════════════════════════════════════════════════════"
49+
echo ""
50+
exit 1
51+
fi
52+
53+
# Also check for specific AI assistant attributions that might slip through
54+
if echo "$COMMIT_MSG" | grep -iE "(claude.*anthropic|generated.*by.*claude|claude.*ai|noreply@anthropic)" >/dev/null 2>&1; then
55+
echo ""
56+
echo "════════════════════════════════════════════════════════════════════"
57+
echo " ⚠️ AI ATTRIBUTION DETECTED "
58+
echo "════════════════════════════════════════════════════════════════════"
59+
echo ""
60+
echo "Found AI assistant attribution in commit message."
61+
echo ""
62+
echo "While AI tools may assist with code, commits should be"
63+
echo "attributed only to the human developer who reviewed and"
64+
echo "submitted the code."
65+
echo ""
66+
echo "Please remove any lines like:"
67+
echo " • Co-Authored-By: Claude <noreply@anthropic.com>"
68+
echo " • Generated with Claude"
69+
echo " • AI-assisted attribution"
70+
echo ""
71+
echo "════════════════════════════════════════════════════════════════════"
72+
echo ""
73+
exit 1
74+
fi
75+
76+
# Check for suspiciously formatted email addresses that might be bots
77+
if echo "$COMMIT_MSG" | grep -iE "co-authored-by:.*<.*(bot|action|automated|ci-cd|pipeline).*@.*>" >/dev/null 2>&1; then
78+
echo ""
79+
echo "⚠️ WARNING: Automated co-author detected"
80+
echo " Blocking bot/automation co-authorship attributions"
81+
echo ""
82+
exit 1
83+
fi
84+
85+
# All checks passed
86+
exit 0

.githooks/pre-commit

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/bin/sh
2+
# Pre-commit hook to block Co-Authored-By lines
3+
# GraphDone does not use pair programming and maintains clean git logs
4+
5+
# Get the commit message file path
6+
COMMIT_MSG_FILE="$1"
7+
8+
# Check if we're in the middle of a commit (not a merge/rebase)
9+
if git rev-parse --verify HEAD >/dev/null 2>&1; then
10+
# Get the staged commit message from git
11+
COMMIT_MSG=$(git diff --cached --diff-filter=A -z --name-only | xargs -0 cat 2>/dev/null | grep -i "co-authored-by:" || true)
12+
13+
# If no staged message, check for message passed via -m flag
14+
if [ -z "$COMMIT_MSG" ] && [ -n "$GIT_EDITOR" ]; then
15+
COMMIT_MSG=$(echo "$GIT_EDITOR" | grep -i "co-authored-by:" || true)
16+
fi
17+
18+
# Check the commit message template if it exists
19+
if [ -z "$COMMIT_MSG" ] && [ -f ".gitmessage" ]; then
20+
COMMIT_MSG=$(grep -i "co-authored-by:" .gitmessage 2>/dev/null || true)
21+
fi
22+
23+
# For checking the actual commit message being prepared
24+
# This catches -m flag commits and editor commits
25+
if git diff --cached --quiet; then
26+
# No staged changes, skip
27+
exit 0
28+
fi
29+
fi
30+
31+
# Function to check commit message
32+
check_commit_message() {
33+
# Check for Co-Authored-By in various formats
34+
if echo "$1" | grep -iE "(co-authored-by:|co-author:|coauthor:|pair[- ]programm)" >/dev/null 2>&1; then
35+
echo ""
36+
echo "❌ ERROR: Commit blocked - Co-Authored-By detected"
37+
echo ""
38+
echo "GraphDone maintains individual attribution in git logs."
39+
echo "Please remove any of the following from your commit message:"
40+
echo " • Co-Authored-By: ..."
41+
echo " • Co-Author: ..."
42+
echo " • References to pair programming"
43+
echo ""
44+
echo "Each commit should have a single author for clear accountability."
45+
echo ""
46+
return 1
47+
fi
48+
return 0
49+
}
50+
51+
# Main pre-commit check
52+
# This will be called during the actual commit process
53+
# The commit message will be checked in the commit-msg hook
54+
# Here we just set up the environment
55+
56+
# Check if there are any Co-Authored-By lines in staged files' content
57+
# (in case someone accidentally committed a file with Co-Authored-By in it)
58+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
59+
if [ -n "$STAGED_FILES" ]; then
60+
for FILE in $STAGED_FILES; do
61+
# Skip binary files and this hook file itself
62+
if [ "$FILE" = ".githooks/pre-commit" ] || [ "$FILE" = ".githooks/commit-msg" ]; then
63+
continue
64+
fi
65+
66+
# Only check text files for accidental Co-Authored-By content
67+
if file --mime "$FILE" 2>/dev/null | grep -q "text/"; then
68+
if git show ":$FILE" 2>/dev/null | grep -iE "^[^#]*co-authored-by:" >/dev/null 2>&1; then
69+
echo ""
70+
echo "⚠️ WARNING: File '$FILE' contains 'Co-Authored-By' text"
71+
echo " This may be intentional (documentation, etc.) but please verify."
72+
echo ""
73+
# Don't block, just warn for file content
74+
fi
75+
fi
76+
done
77+
fi
78+
79+
# Pre-commit passes, actual message check happens in commit-msg hook
80+
exit 0

0 commit comments

Comments
 (0)