Skip to content

Commit 980efaa

Browse files
anandgupta42claude
authored andcommitted
feat: telemetry instrumentation, CI/CD, docs, and CLI improvements
- Comprehensive telemetry instrumentation across session, processor, MCP, auth, and engine - Enhanced telemetry module with event retry, buffer overflow tracking, SHA256 email hashing - Added 15+ new telemetry event types (tool_call, agent_outcome, context_utilization, etc.) - CI/CD pipeline optimization with caching and parallel builds - Command loading resilience (graceful MCP/Skill failure handling) - Postinstall welcome banner and changelog display - TUI worker crash fix (circular dependency resolution) - Build-time constants for engine version and changelog bundling - CLI error handling improvements and telemetry flush on exit - Added discover command for data stack scanning - 15 new test files for telemetry, processor, MCP, bridge, CLI, and install - Full documentation site with 40+ pages covering configuration, usage, and data engineering Co-Authored-By: Kai (Claude Opus 4.6) <noreply@anthropic.com>
1 parent 71ac567 commit 980efaa

111 files changed

Lines changed: 6775 additions & 1312 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ jobs:
1111
name: TypeScript
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1515

16-
- uses: oven-sh/setup-bun@v2
16+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
17+
with:
18+
bun-version: "1.3.9"
19+
20+
- name: Cache Bun dependencies
21+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
22+
with:
23+
path: ~/.bun/install/cache
24+
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
25+
restore-keys: |
26+
bun-${{ runner.os }}-
1727
1828
- name: Configure git for tests
1929
run: |
@@ -27,18 +37,37 @@ jobs:
2737
run: bun test
2838
working-directory: packages/altimate-code
2939

40+
lint:
41+
name: Lint
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
45+
46+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
47+
with:
48+
python-version: "3.12"
49+
50+
- name: Install linter
51+
run: pip install ruff==0.9.10
52+
53+
- name: Lint
54+
run: ruff check src
55+
working-directory: packages/altimate-engine
56+
3057
python:
3158
name: Python ${{ matrix.python-version }}
3259
runs-on: ubuntu-latest
3360
strategy:
3461
matrix:
3562
python-version: ["3.10", "3.11", "3.12"]
3663
steps:
37-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3865

39-
- uses: actions/setup-python@v5
66+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
4067
with:
4168
python-version: ${{ matrix.python-version }}
69+
cache: 'pip'
70+
cache-dependency-path: packages/altimate-engine/pyproject.toml
4271

4372
- name: Install dependencies
4473
run: pip install -e ".[dev,warehouses]"
@@ -47,7 +76,3 @@ jobs:
4776
- name: Run tests
4877
run: pytest
4978
working-directory: packages/altimate-engine
50-
51-
- name: Lint
52-
run: ruff check src
53-
working-directory: packages/altimate-engine

.github/workflows/docs.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2424

2525
- name: Setup Python
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
2727
with:
2828
python-version: "3.12"
29+
cache: "pip"
30+
cache-dependency-path: docs/requirements.txt
2931

3032
- name: Install mkdocs-material
3133
run: pip install mkdocs-material
@@ -34,10 +36,10 @@ jobs:
3436
run: mkdocs build -f docs/mkdocs.yml -d site
3537

3638
- name: Setup Pages
37-
uses: actions/configure-pages@v5
39+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
3840

3941
- name: Upload artifact
40-
uses: actions/upload-pages-artifact@v3
42+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
4143
with:
4244
path: docs/site
4345

@@ -50,4 +52,4 @@ jobs:
5052
steps:
5153
- name: Deploy to GitHub Pages
5254
id: deployment
53-
uses: actions/deploy-pages@v4
55+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/publish-engine.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,23 @@ jobs:
1313
permissions:
1414
id-token: write
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1717

18-
- uses: actions/setup-python@v5
18+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
1919
with:
2020
python-version: "3.12"
21+
cache: "pip"
22+
cache-dependency-path: packages/altimate-engine/pyproject.toml
2123

2224
- name: Install build tools
23-
run: pip install build
25+
run: pip install build==1.2.2
2426

2527
- name: Build package
2628
run: python -m build
2729
working-directory: packages/altimate-engine
2830

2931
- name: Publish to PyPI
30-
uses: pypa/gh-action-pypi-publish@release/v1
32+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
3133
with:
3234
packages-dir: packages/altimate-engine/dist/
35+
skip-existing: true

.github/workflows/release.yml

Lines changed: 58 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,43 @@ on:
55
tags:
66
- "v*"
77

8-
permissions:
9-
contents: write
10-
id-token: write
8+
concurrency:
9+
group: release
10+
cancel-in-progress: false
1111

1212
env:
1313
GH_REPO: AltimateAI/altimate-code
1414

1515
jobs:
1616
build:
17-
name: Build
17+
name: Build (${{ matrix.os }})
1818
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [linux, darwin, win32]
1925
steps:
20-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
27+
28+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
29+
with:
30+
bun-version: "1.3.9"
2131

22-
- uses: oven-sh/setup-bun@v2
32+
- name: Cache Bun dependencies
33+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
34+
with:
35+
path: ~/.bun/install/cache
36+
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
37+
restore-keys: |
38+
bun-${{ runner.os }}-
2339
2440
- name: Install dependencies
2541
run: bun install
2642

27-
- name: Build all targets
28-
run: bun run packages/altimate-code/script/build.ts
43+
- name: Build ${{ matrix.os }} targets
44+
run: bun run packages/altimate-code/script/build.ts --targets=${{ matrix.os }}
2945
env:
3046
OPENCODE_VERSION: ${{ github.ref_name }}
3147
OPENCODE_CHANNEL: latest
@@ -34,28 +50,41 @@ jobs:
3450
MODELS_DEV_API_JSON: test/tool/fixtures/models-api.json
3551

3652
- name: Upload build artifacts
37-
uses: actions/upload-artifact@v4
53+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
3854
with:
39-
name: dist
55+
name: dist-${{ matrix.os }}
4056
path: packages/altimate-code/dist/
4157

4258
publish-npm:
4359
name: Publish to npm
4460
needs: build
4561
runs-on: ubuntu-latest
62+
permissions:
63+
contents: read
4664
steps:
47-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
4866

49-
- uses: oven-sh/setup-bun@v2
67+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2
68+
with:
69+
bun-version: "1.3.9"
70+
71+
- name: Cache Bun dependencies
72+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
73+
with:
74+
path: ~/.bun/install/cache
75+
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
76+
restore-keys: |
77+
bun-${{ runner.os }}-
5078
5179
- name: Install dependencies
5280
run: bun install
5381

54-
- name: Download build artifacts
55-
uses: actions/download-artifact@v4
82+
- name: Download all build artifacts
83+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5684
with:
57-
name: dist
85+
pattern: dist-*
5886
path: packages/altimate-code/dist/
87+
merge-multiple: true
5988

6089
- name: Configure npm auth
6190
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
@@ -89,30 +118,33 @@ jobs:
89118
GH_REPO: ${{ env.GH_REPO }}
90119
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
91120

121+
# Engine publish runs without waiting for build — it builds from source and
122+
# doesn't need CLI binary artifacts. This allows it to run in parallel.
92123
publish-engine:
93124
name: Publish engine to PyPI
94-
needs: build
95125
runs-on: ubuntu-latest
96126
environment: pypi
97127
permissions:
98128
contents: read
99129
id-token: write
100130
steps:
101-
- uses: actions/checkout@v4
131+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
102132

103-
- uses: actions/setup-python@v5
133+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
104134
with:
105135
python-version: "3.12"
136+
cache: 'pip'
137+
cache-dependency-path: packages/altimate-engine/pyproject.toml
106138

107139
- name: Install build tools
108-
run: pip install build
140+
run: pip install build==1.2.2
109141

110142
- name: Build package
111143
run: python -m build
112144
working-directory: packages/altimate-engine
113145

114146
- name: Publish to PyPI
115-
uses: pypa/gh-action-pypi-publish@release/v1
147+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
116148
with:
117149
packages-dir: packages/altimate-engine/dist/
118150
skip-existing: true
@@ -124,7 +156,7 @@ jobs:
124156
permissions:
125157
contents: write
126158
steps:
127-
- uses: actions/checkout@v4
159+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
128160
with:
129161
fetch-depth: 0
130162

@@ -177,14 +209,15 @@ jobs:
177209
GH_REPO: ${{ env.GH_REPO }}
178210
CURRENT_TAG: ${{ github.ref_name }}
179211

180-
- name: Download build artifacts
181-
uses: actions/download-artifact@v4
212+
- name: Download all build artifacts
213+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
182214
with:
183-
name: dist
215+
pattern: dist-*
184216
path: packages/altimate-code/dist/
217+
merge-multiple: true
185218

186219
- name: Create GitHub Release
187-
uses: softprops/action-gh-release@v2
220+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2
188221
with:
189222
body_path: notes.md
190223
draft: false

CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,75 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.4] - 2026-03-04
9+
10+
### Added
11+
12+
- E2E tests for npm install pipeline: postinstall script, bin wrapper, and publish output (#50)
13+
14+
## [0.2.3] - 2026-03-04
15+
16+
### Added
17+
18+
- Postinstall welcome banner and changelog display after upgrade (#48)
19+
20+
### Fixed
21+
22+
- Security: validate well-known auth command type before execution, add confirmation prompt (#45)
23+
- CI/CD: SHA-pin all GitHub Actions, per-job least-privilege permissions (#45)
24+
- MCP: fix copy-paste log messages, log init errors, prefix floating promises (#45)
25+
- Session compaction: clean up compactionAttempts on abort to prevent memory leak (#45)
26+
- Telemetry: retry failed flush events once with buffer-size cap (#45, #46)
27+
- Telemetry: flush events before process exit (#46)
28+
- TUI: resolve worker startup crash from circular dependency (#47)
29+
- CLI: define ALTIMATE_CLI build-time constants for correct version reporting (#41)
30+
- Address 4 issues found in post-v0.2.2 commits (#49)
31+
- Address remaining code review issues from PR #39 (#43)
32+
33+
### Changed
34+
35+
- CI/CD: optimize pipeline with caching and parallel builds (#42)
36+
37+
### Docs
38+
39+
- Add security FAQ (#44)
40+
41+
## [0.2.2] - 2026-03-05
42+
43+
### Fixed
44+
45+
- Telemetry init: `Config.get()` failure outside Instance context no longer silently disables telemetry
46+
- Telemetry init: called early in CLI middleware and worker thread so MCP/engine/auth events are captured
47+
- Telemetry init: promise deduplication prevents concurrent init race conditions
48+
- Telemetry: pre-init events are now buffered and flushed (previously silently dropped)
49+
- Telemetry: user email is SHA-256 hashed before sending (privacy)
50+
- Telemetry: error message truncation standardized to 500 chars across all event types
51+
- Telemetry: `ALTIMATE_TELEMETRY_DISABLED` env var now actually checked in init
52+
- Telemetry: MCP disconnect reports correct transport type instead of hardcoded `stdio`
53+
- Telemetry: `agent_outcome` now correctly reports `"error"` outcome for failed sessions
54+
55+
### Changed
56+
57+
- Auth telemetry events use session context when available instead of hardcoded `"cli"`
58+
59+
## [0.2.1] - 2026-03-05
60+
61+
### Added
62+
63+
- Comprehensive telemetry instrumentation: 25 event types across auth, MCP servers, Python engine, provider errors, permissions, upgrades, context utilization, agent outcomes, workflow sequencing, and environment census
64+
- Telemetry docs page with event table, privacy policy, opt-out instructions, and contributor guide
65+
- AppInsights endpoint added to network firewall documentation
66+
- `categorizeToolName()` helper for tool classification (sql, schema, dbt, finops, warehouse, lineage, file, mcp)
67+
- `bucketCount()` helper for privacy-safe count bucketing
68+
69+
### Fixed
70+
71+
- Command loading made resilient to MCP/Skill initialization failures
72+
73+
### Changed
74+
75+
- CLI binary renamed from `altimate-code` to `altimate`
76+
877
## [0.2.0] - 2026-03-04
978

1079
### Added

0 commit comments

Comments
 (0)