Skip to content

Commit 6b7a6ee

Browse files
author
StackMemory Bot (CLI)
committed
chore: bump Node to 24.16.0, add bin build guard, update CI workflows
- .nvmrc: 22.22.0 → 24.16.0 - All workflows: node-version hardcodes → node-version-file .nvmrc - test-shared-context: matrix [20.x, 22.x] → [24.x] - bin/*: add existsSync guard with actionable error before import() - docs/AGENTS.md: add Safety Rules section (rm -rf ban, safe cleanup pattern) - .gitignore: add .venv/ and scripts/gepa/.before-optimize.md
1 parent c439e92 commit 6b7a6ee

16 files changed

Lines changed: 192 additions & 19 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Company OS SOP Compliance
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: company-os-compliance-${{ github.ref }}
12+
cancel-in-progress: false
13+
14+
jobs:
15+
compliance:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 30
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version-file: '.nvmrc'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build provenant
31+
working-directory: packages/provenant
32+
run: npx tsc
33+
34+
- name: Restore Provenant graph database
35+
uses: actions/cache@v4
36+
with:
37+
path: .provenant/company-os.db
38+
key: provenant-company-os-db-${{ github.run_number }}
39+
restore-keys: provenant-company-os-db-
40+
41+
- name: Run Company OS integration tests and log to Provenant
42+
run: npx tsx scripts/log-company-os-results.ts .provenant/company-os.db
43+
44+
- name: Print Company OS SOP compliance report
45+
run: npx tsx packages/provenant/src/cli/index.ts compliance --db .provenant/company-os.db --system company-os-test-run
46+
47+
- name: Upload graph database
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: provenant-graph-company-os-${{ github.run_number }}
51+
path: .provenant/company-os.db
52+
retention-days: 30

.github/workflows/coverage-only.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: '20'
20+
node-version-file: '.nvmrc'
2121
cache: 'npm'
2222

2323
- name: Install dependencies

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '20'
29+
node-version-file: '.nvmrc'
3030
registry-url: 'https://registry.npmjs.org'
3131
cache: 'npm'
3232

.github/workflows/prose-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: '22'
24+
node-version-file: '.nvmrc'
2525
cache: 'npm'
2626

2727
- name: Install dependencies

.github/workflows/provenant-ingest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Setup Node.js
3232
uses: actions/setup-node@v4
3333
with:
34-
node-version: '20'
34+
node-version-file: '.nvmrc'
3535
cache: 'npm'
3636

3737
- name: Install dependencies

.github/workflows/test-shared-context.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
strategy:
3636
matrix:
37-
node-version: [20.x, 22.x]
37+
node-version: [24.x]
3838

3939
steps:
4040
- uses: actions/checkout@v4
@@ -62,14 +62,14 @@ jobs:
6262
env:
6363
CI: true
6464

65-
- name: Generate coverage (Node 20 only)
66-
if: matrix.node-version == '20.x'
65+
- name: Generate coverage (Node 24 only)
66+
if: matrix.node-version == '24.x'
6767
run: npm run test:run -- --coverage
6868
env:
6969
CI: true
7070

7171
- name: Upload coverage reports to Codecov
72-
if: matrix.node-version == '20.x'
72+
if: matrix.node-version == '24.x'
7373
uses: codecov/codecov-action@v5
7474
with:
7575
token: ${{ secrets.CODECOV_TOKEN }}
@@ -97,7 +97,7 @@ jobs:
9797
- name: Setup Node.js
9898
uses: actions/setup-node@v4
9999
with:
100-
node-version: 20.x
100+
node-version: 24.x
101101
cache: 'npm'
102102

103103
- name: Install dependencies

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ __pycache__/
7373
*$py.class
7474
*.egg-info/
7575
.Python
76+
.venv/
7677
venv/
7778
env/
7879
ENV/
@@ -140,6 +141,7 @@ packages/diffmem/
140141

141142
# GEPA runtime state (modified by hooks)
142143
scripts/gepa/.hook-state.json
144+
scripts/gepa/.before-optimize.md
143145
scripts/gepa/results/scores.jsonl
144146
scripts/gepa/state.json
145147
scripts/gepa/results/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.22.0
1+
24.16.0

bin/claude-sm

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,19 @@
33
* Claude-SM CLI Launcher (ESM)
44
* Delegates to built CLI in dist without requiring tsx.
55
*/
6-
import('../dist/src/cli/claude-sm.js');
6+
import { existsSync } from 'fs';
7+
import { fileURLToPath } from 'url';
8+
import { dirname, join } from 'path';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = dirname(__filename);
12+
const target = join(__dirname, '../dist/src/cli/claude-sm.js');
13+
14+
if (!existsSync(target)) {
15+
console.error('Error: StackMemory has not been built.');
16+
console.error(`Missing: ${target}`);
17+
console.error('Run: npm install && npm run build');
18+
process.exit(1);
19+
}
20+
21+
import(target);

bin/claude-smd

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,19 @@
33
* Claude-SM-Danger CLI Launcher (ESM)
44
* Delegates to built CLI in dist without requiring tsx.
55
*/
6-
import('../dist/src/cli/claude-sm-danger.js');
6+
import { existsSync } from 'fs';
7+
import { fileURLToPath } from 'url';
8+
import { dirname, join } from 'path';
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = dirname(__filename);
12+
const target = join(__dirname, '../dist/src/cli/claude-sm-danger.js');
13+
14+
if (!existsSync(target)) {
15+
console.error('Error: StackMemory has not been built.');
16+
console.error(`Missing: ${target}`);
17+
console.error('Run: npm install && npm run build');
18+
process.exit(1);
19+
}
20+
21+
import(target);

0 commit comments

Comments
 (0)