-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.trinityPlan
More file actions
132 lines (103 loc) · 4.42 KB
/
.trinityPlan
File metadata and controls
132 lines (103 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Trinity Plan: Railway Docker Build Fix
## Mission Outcome
**ROOT CAUSE IDENTIFIED**: 17GB repository blocks Railway snapshot creation.
Railway fails before build stage: "Deployment does not have an associated build"
## Execution Summary
| Step | Action | Status |
|------|--------|--------|
| 1. Audit Dockerfiles | ✅ Completed | Root /Dockerfile IS source of truth for Zig binary |
| 2. Delete broken file | ✅ Completed | Deleted deploy/Dockerfile.background-agent |
| 3. Fix Dockerfile | ✅ Completed | ubuntu:24.04 runtime, fixed HEALTHCHECK |
| 4. Fix symlinks | ✅ Completed | .trinity/memory/memory, src/vsa/trinity_canvas/docs_embed |
| 5. Extract minimal set | ✅ Completed | deploy/railway-background-agent/ (2.3MB, 67 files) |
| 6. Init minimal repo | ✅ Completed | Git repo initialized, branch renamed to main |
| 7. Push to GitHub | ⏳ BLOCKED | GitHub repo needs manual creation |
| 8. Reconnect Railway | ⏳ PENDING | After repo exists |
| 9. Verify build | ⏳ PENDING | After Railway connected |
## Blocker Resolution
**BLOCKER**: GitHub repo `gHashTag/trinity-railway-agent` doesn't exist
**Solution** (run these commands after authenticating):
```bash
# 1. Authenticate GitHub CLI
gh auth login
# 2. Create repo and push
cd /Users/playra/trinity-w1/deploy/railway-background-agent
gh repo create gHashTag/trinity-railway-agent --public \
--description "Minimal Railway deployment for Trinity Background Agent API (Zig binary)" \
--source=. --remote=origin
git push -u origin main
```
**Alternative** (no gh CLI):
1. Create repo at https://github.com/new
2. Name: `trinity-railway-agent`
3. Run:
```bash
git remote add origin https://github.com/gHashTag/trinity-railway-agent.git
git push -u origin main
```
## Railway Reconnection Steps
After GitHub push:
1. Go to https://railway.app/project/AGENTS
2. Delete `background-agent-railway` service (clears broken state)
3. Click "New Service" → "Deploy from GitHub repo"
4. Select `gHashTag/trinity-railway-agent`
5. Railway auto-detects Dockerfile and railway.json
## What's in the Minimal Repo
```
deploy/railway-background-agent/ (2.3MB, 67 files)
├── Dockerfile # Multi-stage, ubuntu:24.04 runtime
├── railway.json # Railway config
├── build.zig # Zig build system
├── src/
│ ├── background_agent/ # API server
│ └── vsa/ # VSA library
├── vm.zig, hybrid.zig, c_api.zig, science.zig, vsa_jit.zig
└── DEPLOY_PLAN.md # Detailed setup instructions
```
## Files Changed in Main Repo
| File | Action |
|------|--------|
| `/Dockerfile` | Created (root, correct for Zig binary) |
| `deploy/Dockerfile.background-agent` | Deleted (broken duplicate) |
| `.railwayignore` | Expanded (excludes 10GB+ files) |
| `deploy/railway-background-agent/` | Created (minimal deployment context) |
| `tools/railway_deploy.zig` | Created (deployment prep tool) |
| `.trinity/memory/memory` | Fixed (replaced broken symlink) |
| `src/vsa/trinity_canvas/docs_embed` | Fixed (replaced broken symlink) |
## Commits Pushed
```
49a571b873 fix(railway): Dockerfile runtime stage scratch→ubuntu:24.04 (#503)
```
## Commits Ready (in minimal repo, awaiting GitHub)
```
314361e Minimal Railway deployment
d76de9a fix: Simplify Dockerfile - COPY all files at once
51d055e docs: Add deployment plan with manual GitHub setup steps
```
## Rollback (if needed)
```bash
# If Railway deployment fails with minimal repo:
# 1. Reconnect to original repo (will hit 17GB issue again)
# 2. Accept that Railway CLI cannot deploy 17GB repos
# 3. Consider alternative: GitHub Actions → Docker Hub → Railway
```
## Definition of Done
- ✅ Dockerfile fixed (ubuntu:24.04 runtime, not scratch)
- ✅ Minimal deployment extracted (2.3MB)
- ✅ Broken files deleted or fixed
- ⏳ GitHub repo `gHashTag/trinity-railway-agent` created
- ⏳ Minimal repo pushed to GitHub
- ⏳ Railway service reconnected to minimal repo
- ⏳ First successful Railway build verified
- ⏳ API responds on Railway URL
## Next Action (User Required)
**Execute these commands** after authenticating with GitHub:
```bash
gh auth login
cd /Users/playra/trinity-w1/deploy/railway-background-agent
gh repo create gHashTag/trinity-railway-agent --public \
--description "Minimal Railway deployment for Trinity Background Agent API (Zig binary)" \
--source=. --remote=origin
git push -u origin main
```
Then go to Railway dashboard and reconnect service.