Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
71d68d5
feat: [AI-7520] add Altimate LLM Gateway OAuth loopback signup to CLI
saravmajestic Jul 9, 2026
43fc015
feat: [AI-7520] onboarding UX — welcome panel, top-5 picker, inline a…
saravmajestic Jul 9, 2026
9c481ec
feat: [AI-7520] add /auth and /logout TUI commands
saravmajestic Jul 13, 2026
df61fdf
feat: [AI-7520] mark the selected provider with a green ✓ in the picker
saravmajestic Jul 14, 2026
d7f0f2c
refactor: [AI-7520] isolate onboarding into an altimate-owned file (r…
saravmajestic Jul 14, 2026
e46fdd4
fix: [AI-7520] harden CLI gateway loopback (PR review majors)
saravmajestic Jul 16, 2026
f5596b4
fix: [AI-7520] address PR #1001 review minors
saravmajestic Jul 16, 2026
7e7ac7c
feat: [AI-7520] exchange the login_token server-side (no api_key in l…
saravmajestic Jul 16, 2026
40c8036
fix: [AI-7520] PR #1001 re-review — loopback IPv4/UX hardening
saravmajestic Jul 16, 2026
e6ffd25
fix: [AI-7520] show Altimate LLM Gateway first in the full model list
saravmajestic Jul 17, 2026
a4ed360
Merge origin/main into feat/AI-7520-social-signup-authorize
saravmajestic Jul 17, 2026
364460a
feat: [AI-7520] port prototype-v2 scan gate + TUI polish
saravmajestic Jul 21, 2026
98a7deb
feat: [AI-7774] first-run picker gate + slim the welcome header
saravmajestic Jul 23, 2026
2d83c79
feat: [AI-7778] No on scan gate just closes to the chat input
saravmajestic Jul 24, 2026
2779649
fix: [AI-7520] wrap fork code in altimate_change markers (Marker Guard)
saravmajestic Jul 24, 2026
b7102b7
fix: [AI-7520] wrap remaining fork regions in altimate_change markers
saravmajestic Jul 24, 2026
7a898db
fix: [AI-7520] wrap update-gate + AutoMethod local in markers
saravmajestic Jul 24, 2026
70ee02f
fix: [AI-7520] wrap AutoMethod success-state flow in markers
saravmajestic Jul 24, 2026
fec9a33
fix: text changes
saravmajestic Jul 28, 2026
cd60d7a
fix: [AI-7520] make gateway token-exchange API base overridable (ALTI…
saravmajestic Jul 28, 2026
b9332a8
fix: [AI-7520] validate gateway exchange URL + don't re-fire scan gat…
saravmajestic Jul 29, 2026
6f42289
feat: first-run activation menu + bundled dbt sample (#1046)
sahrizvi Jul 29, 2026
082aa3e
fix: [AI-7520] first-run gate keys off sync.status; scan-gate fallbac…
saravmajestic Jul 30, 2026
8349230
fix: [AI-7520] kill CI flake — inject test home via seam, not a globa…
saravmajestic Jul 30, 2026
f8b76e3
fix: [AI-7520] review follow-ups — isTrustedApiUrl dev-host ordering;…
saravmajestic Jul 30, 2026
842848d
Revert "fix: [AI-7520] kill CI flake — inject test home via seam, not…
saravmajestic Jul 30, 2026
c645e5f
fix: [AI-7520] isTrustedApiUrl origin match (no HTTPS→HTTP downgrade)…
saravmajestic Jul 30, 2026
c9f7992
Merge remote-tracking branch 'origin/main' into feat/AI-7520-social-s…
saravmajestic Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ tsconfig.tsbuildinfo
**/.github/meta/pr-body-*.md
.bridge-merge-report.md
/data/

# Rendered VHS demos — regenerable from .tape files, kept out of git
docs/media/*.gif
docs/reviews/AI-7520-code-pr1001-review-threads.md
1 change: 1 addition & 0 deletions packages/dbt-tools/test/fixture/.user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 03b8c7b7-4b26-4408-9876-88d05b7da4f5
12 changes: 12 additions & 0 deletions packages/opencode/sample-projects/jaffle-shop-duckdb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Build/run artifacts that must NOT be committed. `target/*` (not `target/`)
# so the re-include below actually works — git ignores the CONTENTS of target/
# individually, then lets us un-ignore the one pre-compiled artifact we ship.
# Using `target/` here would exclude the directory as a whole and make the
# `!target/manifest.json` line inert (git will not descend into an ignored
# directory to re-include children).
target/*
!target/manifest.json

dbt_packages/
logs/
.user.yml
55 changes: 55 additions & 0 deletions packages/opencode/sample-projects/jaffle-shop-duckdb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Jaffle Shop — altimate-code starter sample

Everything below runs against a local DuckDB file — no cloud warehouse, no
credentials, no network calls.

## What's in here

```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language to the fenced code block.

markdownlint (MD040) flags this fence for missing a language identifier.

📝 Proposed fix
-```
+```text
 dbt_project.yml         dbt project config
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
🧰 Tools
🪛 markdownlint-cli2 (0.23.1)

[warning] 8-8: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/sample-projects/jaffle-shop-duckdb/README.md` at line 8,
Update the fenced code block in the README to include the text language
identifier, changing the opening fence to use ```text while preserving its
contents.

Source: Linters/SAST tools

dbt_project.yml dbt project config
profiles.yml DuckDB profile — path is project-relative
sample-manifest.json version metadata used by altimate-code to detect
stale copies on upgrade
models/
staging/
stg_customers.sql renames raw customer columns to snake_case
stg_orders.sql renames raw order columns
schema.yml column descriptions + unique/not_null tests
marts/
customers.sql one row per customer, joins in order counts
orders.sql one row per order, joins in customer names
schema.yml column descriptions + tests + relationships
seeds/
raw_customers.csv 3 rows of test data
raw_orders.csv 4 rows of test data
target/
manifest.json PRE-COMPILED dbt manifest — ships with the sample so
altimate-code's static workflows (/discover, /review)
work without dbt-core / dbt-duckdb installed
```

## What to try (works with zero external tools)

- `/discover stg_customers` — walk the DAG and see what depends on this model
- `/review models/marts/customers.sql` — run the reviewer against a mart model
- Open any `.sql` file and ask altimate-code to explain the transformation
- Ask altimate-code "what tests would you recommend for `orders`?"

## What to try (needs `dbt-core` + `dbt-duckdb` installed)

```bash
pip install dbt-duckdb
cd ~/altimate-sample-dbt # or wherever you materialized the sample
dbt seed # load the CSVs into DuckDB
dbt build # run models + tests
duckdb target/jaffle.duckdb -c 'select * from customers'
```

Once `dbt-duckdb` is on your `$PATH`, altimate-code detects it automatically
and the "run" workflows appear in `/help`.

## Bringing your own project

When you're ready to switch to your real dbt project, `cd` into it and run
altimate-code again. The scan will pick up your `dbt_project.yml` and offer
to connect its warehouse.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "jaffle_shop"
version: "1.0.0"

profile: "jaffle_shop"

model-paths: ["models"]
seed-paths: ["seeds"]
target-path: "target"
clean-targets: ["target", "dbt_packages"]

models:
jaffle_shop:
staging:
+materialized: view
marts:
+materialized: table
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
select
c.customer_id,
c.first_name,
c.last_name,
count(o.order_id) as order_count,
coalesce(sum(o.amount), 0) as total_amount
from {{ ref('stg_customers') }} c
left join {{ ref('stg_orders') }} o on c.customer_id = o.customer_id
group by c.customer_id, c.first_name, c.last_name
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
select
o.order_id,
o.customer_id,
c.first_name || ' ' || c.last_name as customer_name,
o.order_date,
o.amount
from {{ ref('stg_orders') }} o
join {{ ref('stg_customers') }} c on o.customer_id = c.customer_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2

models:
- name: customers
description: One row per customer with total order count and revenue.
columns:
- name: customer_id
description: Primary key.
data_tests:
- unique
- not_null
- name: order_count
description: Number of orders placed by the customer (0 when none).
data_tests:
- not_null
- name: total_amount
description: Sum of all order amounts (0 when none).
data_tests:
- not_null

- name: orders
description: One row per order with a joined customer name.
columns:
- name: order_id
description: Primary key.
data_tests:
- unique
- not_null
- name: customer_id
description: Foreign key to `stg_customers`.
data_tests:
- not_null
Comment on lines +21 to +32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Missing relationships test on the FK columns, and README overstates what's tested. orders.customer_id is documented as a foreign key but only has a not_null test — no relationships test exists anywhere in the marts schema, even though orders.sql relies on that FK via an inner join and the README claims relationship tests are present.

  • packages/opencode/sample-projects/jaffle-shop-duckdb/models/marts/schema.yml#L21-L32: add a relationships data test on orders.customer_id (to customers.customer_id) so a future data or join change is caught instead of silently dropping rows.
  • packages/opencode/sample-projects/jaffle-shop-duckdb/README.md#L8-L29: once the test above exists, this doc claim is accurate as written; otherwise, adjust the "tests + relationships" line to reflect actual coverage.
📍 Affects 2 files
  • packages/opencode/sample-projects/jaffle-shop-duckdb/models/marts/schema.yml#L21-L32 (this comment)
  • packages/opencode/sample-projects/jaffle-shop-duckdb/README.md#L8-L29
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/sample-projects/jaffle-shop-duckdb/models/marts/schema.yml`
around lines 21 - 32, Add a relationships data test to orders.customer_id in
packages/opencode/sample-projects/jaffle-shop-duckdb/models/marts/schema.yml:21-32,
targeting customers.customer_id while retaining the existing not_null test. In
packages/opencode/sample-projects/jaffle-shop-duckdb/README.md:8-29, keep the
“tests + relationships” claim unchanged once the schema test is added; no direct
README change is required.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2

models:
- name: stg_customers
description: Renamed customer columns from the raw seed.
columns:
- name: customer_id
description: Primary key of the customer.
data_tests:
- unique
- not_null

- name: stg_orders
description: Renamed order columns from the raw seed.
columns:
- name: order_id
description: Primary key of the order.
data_tests:
- unique
- not_null
- name: customer_id
description: Foreign key to `stg_customers`.
data_tests:
- not_null
- relationships:
to: ref('stg_customers')
field: customer_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
select
id as customer_id,
first_name,
last_name
from {{ ref('raw_customers') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
select
id as order_id,
customer_id,
order_date,
amount
from {{ ref('raw_orders') }}
14 changes: 14 additions & 0 deletions packages/opencode/sample-projects/jaffle-shop-duckdb/profiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# DuckDB profile — everything runs locally against a single file at
# `target/jaffle.duckdb` (created on first `dbt build`). No cloud credentials.
# `path:` is unqualified, so dbt-duckdb resolves it against the PROCESS
# working directory at build time — NOT the project directory. Run
# `dbt build` from the materialized sample dir (`cd <sample-path>`) and
# the database lands at `<sample-path>/target/jaffle.duckdb`.
# Run it from anywhere else and dbt writes to `$PWD/target/jaffle.duckdb`.
jaffle_shop:
target: dev
outputs:
dev:
type: duckdb
path: "target/jaffle.duckdb"
threads: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$comment": "Metadata about this sample project. Distinct from dbt's target/manifest.json — this is our own version stamp for conflict detection on the materialized copy at ~/altimate-sample-dbt/. If you edit any source file below, run ./regenerate.sh and commit the refreshed target/manifest.json alongside your change.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: $comment references ./regenerate.sh but the script lives one directory up at ../regenerate.sh. A maintainer following the instruction literally from the jaffle-shop-duckdb/ directory will get a command-not-found error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/opencode/sample-projects/jaffle-shop-duckdb/sample-manifest.json, line 2:

<comment>`$comment` references `./regenerate.sh` but the script lives one directory up at `../regenerate.sh`. A maintainer following the instruction literally from the `jaffle-shop-duckdb/` directory will get a command-not-found error.</comment>

<file context>
@@ -0,0 +1,27 @@
+{
+  "$comment": "Metadata about this sample project. Distinct from dbt's target/manifest.json — this is our own version stamp for conflict detection on the materialized copy at ~/altimate-sample-dbt/. If you edit any source file below, run ./regenerate.sh and commit the refreshed target/manifest.json alongside your change.",
+  "name": "jaffle-shop-duckdb",
+  "version": "1.0.0",
</file context>

"name": "jaffle-shop-duckdb",
"version": "1.0.0",
"kind": "altimate-starter-sample",
"source": "packages/opencode/sample-projects/jaffle-shop-duckdb",
"requires": {
"dbt-core": ">=1.7 <2.0",
"dbt-duckdb": ">=1.7 <2.0"
},
"notes": [
"Renamed profile from the original test fixture: `test_jaffle_shop` → `jaffle_shop`.",
"DuckDB target file resolves project-relative at `target/jaffle.duckdb`; no host paths bake into the profile.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the DuckDB path note.

This says the target resolves project-relative, while profiles.yml documents that it resolves from dbt’s invoking working directory. The shipped metadata will mislead users running dbt outside the sample directory.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/sample-projects/jaffle-shop-duckdb/sample-manifest.json` at
line 13, Update the DuckDB target path note in the sample manifest to state that
the path resolves relative to dbt’s invoking working directory, matching the
behavior documented in profiles.yml, rather than claiming it is
project-relative.

"target/manifest.json ships pre-compiled so static workflows (/discover, /review) work without dbt installed."
],
"$assets_comment": "Single source of truth for the file list shipped to end users. `packages/opencode/src/altimate/onboarding/materialize.ts` copies these into the user's home; `packages/opencode/script/publish.ts` copies the same list into the wrapper npm package at release time; `packages/opencode/test/altimate/onboarding/publish-parity.test.ts` cross-checks both consumers use the same list. Adding a new sample file? Add it here — everything else picks it up automatically.",
"assets": [
{ "from": "README.md", "kind": "file", "required": true },
{ "from": "dbt_project.yml", "kind": "file", "required": true },
{ "from": "profiles.yml", "kind": "file", "required": true },
{ "from": "sample-manifest.json", "kind": "file", "required": true },
{ "from": ".gitignore", "kind": "file", "required": false },
{ "from": "models", "kind": "dir", "required": true },
{ "from": "seeds", "kind": "dir", "required": true },
{ "from": "target/manifest.json", "kind": "file", "required": true }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id,first_name,last_name
1,Alice,Smith
2,Bob,Jones
3,Carol,White
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,customer_id,order_date,amount
1,1,2024-01-15,100
2,1,2024-02-20,200
3,2,2024-01-10,150
4,3,2024-03-05,300
Loading
Loading