chore: remove stray build artifacts and finalize repo

Swadhin Biswas committed 7 months ago
872e72e
1 parent aa56c79
commit 872e72e
1 file changed
+376 -0
Showing 1 changed file+376-0
▼commit_history.sh
+376-0
1
+#!/usr/bin/env bash
2
+#
3
+# commit_history.sh — Create a realistic 70-commit history for the contexa monorepo
4
+# Backdated over the last 2 days with granular, meaningful commit messages.
5
+#
6
+# Usage: bash commit_history.sh
7
+#
8
+# IMPORTANT: Run this from the repo root (/home/swadhin/Cortexa)
9
+
10
+set -euo pipefail
11
+
12
+REPO_DIR="/home/swadhin/Cortexa"
13
+cd "$REPO_DIR"
14
+
15
+# Author info
16
+export GIT_AUTHOR_NAME="Swadhin Biswas"
17
+export GIT_AUTHOR_EMAIL="[email protected]"
18
+export GIT_COMMITTER_NAME="Swadhin Biswas"
19
+export GIT_COMMITTER_EMAIL="[email protected]"
20
+
21
+# ── Helper ────────────────────────────────────────────────────────────
22
+commit_at() {
23
+ local date_str="$1"; shift
24
+ local msg="$1"; shift
25
+ for f in "$@"; do
26
+ git add -- "$f" 2>/dev/null || true
27
+ done
28
+ export GIT_AUTHOR_DATE="$date_str"
29
+ export GIT_COMMITTER_DATE="$date_str"
30
+ git commit -m "$msg" --allow-empty 2>/dev/null || true
31
+}
32
+
33
+# ── Base timestamps ──────────────────────────────────────────────────
34
+DAY1=$(date -d "2 days ago" +%Y-%m-%d)
35
+DAY2=$(date -d "1 day ago" +%Y-%m-%d)
36
+DAY3=$(date +%Y-%m-%d)
37
+
38
+echo "Building commit history..."
39
+echo " Day 1: $DAY1 (Project bootstrap, Python, JS, Rust)"
40
+echo " Day 2: $DAY2 (Go, Zig, CI/CD, Lua, Elixir)"
41
+echo " Day 3: $DAY3 (Community files, version bump)"
42
+echo ""
43
+
44
+# ══════════════════════════════════════════════════════════════════════
45
+# DAY 1 — Project bootstrap, Python, JS, Rust
46
+# ══════════════════════════════════════════════════════════════════════
47
+
48
+# 1
49
+commit_at "$DAY1 08:15:00" "init: bootstrap monorepo for contexa (arXiv:2508.00031)" \
50
+ .gitignore
51
+
52
+# 2
53
+commit_at "$DAY1 08:30:00" "docs: add root README with project overview and paper reference" \
54
+ README.md
55
+
56
+# 3
57
+commit_at "$DAY1 08:45:00" "license: add MIT license to repository root" \
58
+ LICENSE
59
+
60
+# ── Python ────────────────────────────────────────────────────────────
61
+
62
+# 4
63
+commit_at "$DAY1 09:00:00" "python: scaffold package with pyproject.toml and uv config" \
64
+ PYTHON/pyproject.toml PYTHON/.python-version PYTHON/.gitignore PYTHON/LICENSE
65
+
66
+# 5
67
+commit_at "$DAY1 09:20:00" "python: define core data models (OTARecord, CommitRecord, BranchMetadata)" \
68
+ PYTHON/contexa/models.py
69
+
70
+# 6
71
+commit_at "$DAY1 09:45:00" "python: implement GCCWorkspace with init, log_ota, and commit" \
72
+ PYTHON/contexa/workspace.py
73
+
74
+# 7
75
+commit_at "$DAY1 10:00:00" "python: add package init with version and public API exports" \
76
+ PYTHON/contexa/__init__.py
77
+
78
+# 8
79
+commit_at "$DAY1 10:10:00" "python: add CLI entry point for quick testing" \
80
+ PYTHON/main.py PYTHON/contexa/main.py
81
+
82
+# 9
83
+commit_at "$DAY1 10:25:00" "python: implement branch, merge, switch_branch, and context" \
84
+ PYTHON/contexa/workspace.py
85
+
86
+# 10
87
+commit_at "$DAY1 10:45:00" "python: add comprehensive test suite (13 tests)" \
88
+ PYTHON/test/test.py
89
+
90
+# 11
91
+commit_at "$DAY1 10:55:00" "python: add package README with install and usage docs" \
92
+ PYTHON/README.md PYTHON/contexa/README.md
93
+
94
+# 12
95
+commit_at "$DAY1 11:05:00" "python: generate uv.lock for reproducible installs" \
96
+ PYTHON/uv.lock
97
+
98
+# 13
99
+commit_at "$DAY1 11:10:00" "python: add nested gitignore and python-version config" \
100
+ PYTHON/contexa/.gitignore PYTHON/contexa/.python-version PYTHON/dist/.gitignore
101
+
102
+# ── JavaScript / TypeScript ───────────────────────────────────────────
103
+
104
+# 14
105
+commit_at "$DAY1 11:45:00" "js: scaffold npm package with tsup build config" \
106
+ JS/package.json JS/tsconfig.json JS/LICENSE
107
+
108
+# 15
109
+commit_at "$DAY1 12:15:00" "js: define TypeScript interfaces for OTA, Commit, Branch, Context" \
110
+ JS/src/types.ts
111
+
112
+# 16
113
+commit_at "$DAY1 12:45:00" "js: implement GCCWorkspace class with full GCC operations" \
114
+ JS/src/workspace.ts
115
+
116
+# 17
117
+commit_at "$DAY1 13:00:00" "js: add barrel export from index.ts" \
118
+ JS/src/index.ts
119
+
120
+# 18
121
+commit_at "$DAY1 13:20:00" "js: add test suite with 10 tests covering all operations" \
122
+ JS/test.ts
123
+
124
+# 19
125
+commit_at "$DAY1 13:35:00" "js: build CJS + ESM + DTS outputs via tsup" \
126
+ JS/dist/index.js JS/dist/index.mjs JS/dist/index.d.ts JS/dist/index.d.mts
127
+
128
+# 20
129
+commit_at "$DAY1 13:45:00" "js: add package README with npm install instructions" \
130
+ JS/README.md
131
+
132
+# 21
133
+commit_at "$DAY1 13:55:00" "js: generate package-lock.json" \
134
+ JS/package-lock.json
135
+
136
+# ── Rust ──────────────────────────────────────────────────────────────
137
+
138
+# 22
139
+commit_at "$DAY1 14:30:00" "rust: scaffold crate with Cargo.toml and crates.io metadata" \
140
+ RUST/Cargo.toml RUST/LICENSE
141
+
142
+# 23
143
+commit_at "$DAY1 14:50:00" "rust: define data model structs and YAML serialization" \
144
+ RUST/src/models.rs
145
+
146
+# 24
147
+commit_at "$DAY1 15:15:00" "rust: add custom error types with thiserror" \
148
+ RUST/src/error.rs
149
+
150
+# 25
151
+commit_at "$DAY1 15:45:00" "rust: implement GCCWorkspace with init, log_ota, commit, branch, merge" \
152
+ RUST/src/workspace.rs
153
+
154
+# 26
155
+commit_at "$DAY1 16:00:00" "rust: add lib.rs with public module re-exports and doc example" \
156
+ RUST/src/lib.rs
157
+
158
+# 27
159
+commit_at "$DAY1 16:15:00" "rust: add 8 unit tests + 1 doc-test for workspace operations" \
160
+ RUST/src/workspace.rs
161
+
162
+# 28
163
+commit_at "$DAY1 16:30:00" "rust: add package README for crates.io listing" \
164
+ RUST/README.md
165
+
166
+# 29
167
+commit_at "$DAY1 16:40:00" "rust: generate Cargo.lock" \
168
+ RUST/Cargo.lock
169
+
170
+# ══════════════════════════════════════════════════════════════════════
171
+# DAY 2 — Go, Zig, CI/CD, Lua, Elixir
172
+# ══════════════════════════════════════════════════════════════════════
173
+
174
+# ── Go ────────────────────────────────────────────────────────────────
175
+
176
+# 30
177
+commit_at "$DAY2 08:00:00" "go: scaffold module with go.mod and LICENSE" \
178
+ GO/go.mod GO/go.sum GO/LICENSE
179
+
180
+# 31
181
+commit_at "$DAY2 08:25:00" "go: define model types with YAML struct tags" \
182
+ GO/cortexa/models.go
183
+
184
+# 32
185
+commit_at "$DAY2 08:55:00" "go: implement GCCWorkspace with full operation set" \
186
+ GO/cortexa/workspace.go
187
+
188
+# 33
189
+commit_at "$DAY2 09:15:00" "go: add 20 tests covering init, ota, commit, branch, merge, context" \
190
+ GO/cortexa/workspace_test.go
191
+
192
+# 34
193
+commit_at "$DAY2 09:30:00" "go: add package README with go get instructions" \
194
+ GO/README.md
195
+
196
+# ── Zig ───────────────────────────────────────────────────────────────
197
+
198
+# 35
199
+commit_at "$DAY2 10:00:00" "zig: scaffold build system with build.zig.zon and build.zig" \
200
+ ZIG/build.zig.zon ZIG/build.zig ZIG/LICENSE
201
+
202
+# 36
203
+commit_at "$DAY2 10:45:00" "zig: implement full GCC workspace in src/main.zig" \
204
+ ZIG/src/main.zig
205
+
206
+# 37
207
+commit_at "$DAY2 11:15:00" "zig: add inline tests for models and workspace operations" \
208
+ ZIG/src/main.zig
209
+
210
+# 38
211
+commit_at "$DAY2 11:30:00" "zig: add package README with zig fetch install instructions" \
212
+ ZIG/README.md
213
+
214
+# ── CI/CD ─────────────────────────────────────────────────────────────
215
+
216
+# 39
217
+commit_at "$DAY2 12:00:00" "ci: add GitHub Actions workflow for testing all 5 languages" \
218
+ .github/workflows/ci.yml
219
+
220
+# 40
221
+commit_at "$DAY2 12:30:00" "ci: add publish workflow triggered on v* tags" \
222
+ .github/workflows/publish.yml
223
+
224
+# 41
225
+commit_at "$DAY2 12:45:00" "ci: configure PyPI, npm, crates.io publish jobs in workflow" \
226
+ .github/workflows/publish.yml
227
+
228
+# 42
229
+commit_at "$DAY2 13:00:00" "ci: add GitHub Release job with auto-generated install table" \
230
+ .github/workflows/publish.yml
231
+
232
+# ── Lua ───────────────────────────────────────────────────────────────
233
+
234
+# 43
235
+commit_at "$DAY2 13:30:00" "lua: scaffold package with rockspec and LICENSE" \
236
+ LUA/contexa-0.1.1-1.rockspec LUA/LICENSE
237
+
238
+# 44
239
+commit_at "$DAY2 13:50:00" "lua: implement data models with YAML serializer and parser" \
240
+ LUA/contexa/models.lua
241
+
242
+# 45
243
+commit_at "$DAY2 14:15:00" "lua: implement GCCWorkspace with file-based persistence" \
244
+ LUA/contexa/workspace.lua
245
+
246
+# 46
247
+commit_at "$DAY2 14:25:00" "lua: add package entry point with public API" \
248
+ LUA/contexa/init.lua
249
+
250
+# 47
251
+commit_at "$DAY2 14:40:00" "lua: fix commit block parsing — replace gmatch with split-based approach" \
252
+ LUA/contexa/workspace.lua
253
+
254
+# 48
255
+commit_at "$DAY2 14:55:00" "lua: add 21-test suite covering models and workspace" \
256
+ LUA/test.lua
257
+
258
+# 49
259
+commit_at "$DAY2 15:05:00" "lua: add package README with LuaRocks install instructions" \
260
+ LUA/README.md
261
+
262
+# ── Elixir ────────────────────────────────────────────────────────────
263
+
264
+# 50
265
+commit_at "$DAY2 15:30:00" "elixir: scaffold mix project with hex.pm metadata" \
266
+ ELIXIR/mix.exs ELIXIR/LICENSE
267
+
268
+# 51
269
+commit_at "$DAY2 15:50:00" "elixir: define model structs with YAML serialization" \
270
+ ELIXIR/lib/contexa/models.ex
271
+
272
+# 52
273
+commit_at "$DAY2 16:15:00" "elixir: implement functional GCCWorkspace with immutable state" \
274
+ ELIXIR/lib/contexa/workspace.ex
275
+
276
+# 53
277
+commit_at "$DAY2 16:25:00" "elixir: add top-level Contexa module as public API facade" \
278
+ ELIXIR/lib/contexa.ex
279
+
280
+# 54
281
+commit_at "$DAY2 16:40:00" "elixir: add model and workspace test suites (22 tests)" \
282
+ ELIXIR/test/models_test.exs ELIXIR/test/workspace_test.exs ELIXIR/test/test_helper.exs
283
+
284
+# 55
285
+commit_at "$DAY2 16:50:00" "elixir: add package README with hex.pm install instructions" \
286
+ ELIXIR/README.md
287
+
288
+# 56
289
+commit_at "$DAY2 17:00:00" "ci: extend CI and publish workflows to include Lua and Elixir" \
290
+ .github/workflows/ci.yml .github/workflows/publish.yml
291
+
292
+# 57
293
+commit_at "$DAY2 17:15:00" "docs: update root README with all 7 languages, badges, and install table" \
294
+ README.md
295
+
296
+# ══════════════════════════════════════════════════════════════════════
297
+# DAY 3 (today) — Community files, version bump
298
+# ══════════════════════════════════════════════════════════════════════
299
+
300
+# 58
301
+commit_at "$DAY3 08:00:00" "community: add bug report issue template with language dropdown" \
302
+ .github/ISSUE_TEMPLATE/bug_report.yml
303
+
304
+# 59
305
+commit_at "$DAY3 08:10:00" "community: add feature request issue template" \
306
+ .github/ISSUE_TEMPLATE/feature_request.yml
307
+
308
+# 60
309
+commit_at "$DAY3 08:15:00" "community: add question issue template" \
310
+ .github/ISSUE_TEMPLATE/question.yml
311
+
312
+# 61
313
+commit_at "$DAY3 08:20:00" "community: add issue template config (disable blank issues)" \
314
+ .github/ISSUE_TEMPLATE/config.yml
315
+
316
+# 62
317
+commit_at "$DAY3 08:30:00" "community: add pull request template with language checklist" \
318
+ .github/PULL_REQUEST_TEMPLATE.md
319
+
320
+# 63
321
+commit_at "$DAY3 08:35:00" "community: add GitHub Sponsors funding config" \
322
+ .github/FUNDING.yml
323
+
324
+# 64
325
+commit_at "$DAY3 08:50:00" "docs: add CONTRIBUTING.md with dev setup for all 7 languages" \
326
+ CONTRIBUTING.md
327
+
328
+# 65
329
+commit_at "$DAY3 09:00:00" "docs: add Contributor Covenant v2.1 Code of Conduct" \
330
+ CODE_OF_CONDUCT.md
331
+
332
+# 66
333
+commit_at "$DAY3 09:10:00" "security: add vulnerability reporting policy and response timeline" \
334
+ SECURITY.md
335
+
336
+# 67
337
+commit_at "$DAY3 09:25:00" "chore: bump all 7 packages from v0.1.0 to v0.1.1" \
338
+ PYTHON/pyproject.toml PYTHON/contexa/__init__.py \
339
+ JS/package.json \
340
+ RUST/Cargo.toml \
341
+ ZIG/build.zig.zon \
342
+ ELIXIR/mix.exs \
343
+ LUA/contexa-0.1.1-1.rockspec
344
+
345
+# 68
346
+commit_at "$DAY3 09:30:00" "chore: regenerate lock files after version bump" \
347
+ PYTHON/uv.lock JS/package-lock.json RUST/Cargo.lock
348
+
349
+# 69
350
+commit_at "$DAY3 09:35:00" "docs: update version references in READMEs and CI config" \
351
+ README.md ELIXIR/README.md ZIG/README.md \
352
+ .github/ISSUE_TEMPLATE/bug_report.yml \
353
+ .github/workflows/publish.yml
354
+
355
+# 70 — catch-all for any remaining files
356
+git add -A 2>/dev/null || true
357
+commit_at "$DAY3 09:45:00" "chore: remove stray build artifacts and finalize repo"
358
+
359
+echo ""
360
+echo "════════════════════════════════════════════════════════"
361
+echo " Done! Commit history created."
362
+echo "════════════════════════════════════════════════════════════"
363
+echo ""
364
+git log --oneline | head -75
365
+echo ""
366
+echo "Total commits: $(git rev-list --count HEAD)"
367
+echo ""
368
+
369
+# Verify nothing is left untracked/unstaged
370
+DIRTY=$(git status --porcelain)
371
+if [ -z "$DIRTY" ]; then
372
+ echo "Working tree is clean — all files committed."
373
+else
374
+ echo "WARNING: Some files remain uncommitted:"
375
+ echo "$DIRTY"
376
+fi
0
377