Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
844214a
feat: add managed-memory agent panel via app-templates submodule + Ve…
zuckerberg-db Jul 11, 2026
e943848
fix: harden Vercel-native agent proxy embedding and build
zuckerberg-db Jul 11, 2026
6083938
docs: add Agent Panel solution page and document agent panel
zuckerberg-db Jul 11, 2026
fe30b89
fix(agent): git init agent-build so bundle deploy syncs files
zuckerberg-db Jul 11, 2026
59daa82
docs: make agent build/deploy self-sufficient in README
zuckerberg-db Jul 11, 2026
79172a9
docs: document agent proxy runtime prerequisites
zuckerberg-db Jul 11, 2026
c9c150d
docs: close agent build/deploy documentation gaps
zuckerberg-db Jul 11, 2026
8064cd7
docs: document agent service-principal data-access prerequisite
zuckerberg-db Jul 11, 2026
45ebcfb
fix(agent): bundle-native config + memory-store setup; correct deploy…
zuckerberg-db Jul 11, 2026
347a69e
fix(auth): conditionally init okta plugin; document guest API + CORS fix
zuckerberg-db Jul 12, 2026
ea9f2f1
docs: add harness-agnostic interactive bootstrap runbook
zuckerberg-db Jul 12, 2026
b6869ed
docs(bootstrap): add guest SP provisioning phase (Phase 6b)
zuckerberg-db Jul 12, 2026
f781520
docs(bootstrap): split env vars into guest vs admin tiers; fix Phase …
zuckerberg-db Jul 12, 2026
e91322d
fix(bootstrap): address all NG-1 through NG-13 live-run findings
zuckerberg-db Jul 12, 2026
833a45d
docs(readme): add Quick Start section linking BOOTSTRAP.md and bootst…
zuckerberg-db Jul 12, 2026
5207f43
docs(readme): add Open in Cursor badge
zuckerberg-db Jul 12, 2026
36397c9
fix(readme): use cursor.com redirect for Open in Cursor badge
zuckerberg-db Jul 12, 2026
70f34bb
fix(readme): use verified cursor.com/link/prompt for Open in Cursor b…
zuckerberg-db Jul 12, 2026
933ee97
docs(bootstrap): make Phase 0 blocking; default REPO_DIR to cwd
zuckerberg-db Jul 12, 2026
2a98595
docs(bootstrap): Genie data check, guest app CAN_USE, issue filing
zuckerberg-db Jul 12, 2026
999a8e2
docs: add solutions index and fix Agent Panel discoverability
zuckerberg-db Jul 13, 2026
3d58220
fix(bootstrap): parse Neon project id from nested project.id
zuckerberg-db Jul 21, 2026
0ddea10
fix(bootstrap): parse only the .vercel.app URL from deploy output
zuckerberg-db Jul 21, 2026
4503667
fix(bootstrap): apply catalog/schema via bundle --var instead of manu…
zuckerberg-db Jul 21, 2026
6ed8cfa
fix(bootstrap): install Vercel CLI before vercel login
zuckerberg-db Jul 21, 2026
284d61e
fix(bootstrap): push clone to user's GitHub fork for Vercel linking
zuckerberg-db Jul 21, 2026
0c772b1
fix(bootstrap): prompt for TLS/CA bundle behind intercepting proxies
zuckerberg-db Jul 21, 2026
dc92db7
fix(bootstrap): install pnpm first; add non-Homebrew gh install; neon…
zuckerberg-db Jul 21, 2026
542acb8
fix(bootstrap): two-phase Vercel deploy so BETTER_AUTH_URL matches re…
zuckerberg-db Jul 21, 2026
5527df2
Merge branch 'fix/neon-project-id-16' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
2f7bf66
Merge branch 'fix/catalog-bundle-var-12' into integration/bootstrap-f…
zuckerberg-db Jul 21, 2026
86f7299
Merge branch 'fix/vercel-github-fork-17' into integration/bootstrap-f…
zuckerberg-db Jul 21, 2026
33f4412
Merge branch 'fix/tls-pem-prompt-13' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
90aa282
Merge branch 'fix/phase1-order-9' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
f0fa3a0
Merge branch 'fix/two-phase-auth-url-19' into integration/bootstrap-f…
zuckerberg-db Jul 21, 2026
6399a08
fix(bootstrap): replace keyring with gitignored state.env for secrets…
zuckerberg-db Jul 21, 2026
c7915ab
Merge branch 'fix/state-env-14' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
8d0dbfc
fix(bootstrap): auto-install databricks CLI and uv (no Homebrew) (#21)
zuckerberg-db Jul 21, 2026
667be39
Merge branch 'fix/prereq-clis-21' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
4ac8611
fix(bootstrap): persist inputs and offer to reuse them on re-run (#18)
zuckerberg-db Jul 21, 2026
9a3e9c4
Merge branch 'fix/persist-inputs-18' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
d678690
fix(bootstrap): default the per-phase confirm prompt to Yes
zuckerberg-db Jul 21, 2026
df72399
Merge branch 'fix/phase-confirm-default-yes' into integration/bootstr…
zuckerberg-db Jul 21, 2026
f99531f
fix(bootstrap): make Phase 2 clone idempotent (safe re-run) (#18)
zuckerberg-db Jul 21, 2026
827941e
Merge branch 'fix/idempotent-clone-18b' into integration/bootstrap-fixes
zuckerberg-db Jul 21, 2026
7d2f437
fix(bootstrap): auto-detect + fingerprint-confirm proxy CA, set UV_SY…
zuckerberg-db Jul 21, 2026
713fa61
fix(bootstrap): bridge corporate pip index into uv (UV_DEFAULT_INDEX)…
zuckerberg-db Jul 21, 2026
1d9fe6a
Merge #13 TLS auto-derive+UV_SYSTEM_CERTS into integration
zuckerberg-db Jul 21, 2026
370ada3
Merge #35 uv pip-index bridge into integration
zuckerberg-db Jul 21, 2026
c5fb1cc
Integrate #37 (skip Vercel/Neon re-auth) + #38 (forward --app-name)
zuckerberg-db Jul 21, 2026
5ebfea0
Integrate #41: reuse existing Lakebase project on re-run
zuckerberg-db Jul 21, 2026
56e24cf
Integrate: make UC wheels volume create idempotent on re-run
zuckerberg-db Jul 21, 2026
e1793e5
Integrate: reuse existing guest SP + Neon project on re-run (silent-d…
zuckerberg-db Jul 21, 2026
dd5b9ac
Integrate: pin pnpm 10 (packageManager) + bridge corepack npm registry
zuckerberg-db Jul 21, 2026
815479a
Integrate: reword prompt to 'Re-execute Phase N?' for completed phases
zuckerberg-db Jul 21, 2026
5f3c492
Integrate: skip-forward phase resume (#18)
zuckerberg-db Jul 21, 2026
9754141
Integrate: connect Vercel Git to the fork non-interactively
zuckerberg-db Jul 21, 2026
dec0818
Integrate: drop 'vercel git connect', link non-interactively only (#50)
zuckerberg-db Jul 21, 2026
d4f0ce7
Integrate: export ~/bin + ~/.local/bin on PATH every run (skip-forwar…
zuckerberg-db Jul 21, 2026
9149f33
Integrate: non-interactive+idempotent 'vercel env add' (--value --for…
zuckerberg-db Jul 21, 2026
5c3d8c1
Integrate: set Vercel framework=nextjs after link + CURL_CA_BUNDLE fo…
zuckerberg-db Jul 22, 2026
2564917
Integrate: default REPO_DIR to $HOME/firefly, not $PWD
zuckerberg-db Jul 22, 2026
c4e8055
Integrate: sanitize DATABRICKS_HOST to scheme://host
zuckerberg-db Jul 22, 2026
c40aab6
Integrate: pre-activate pnpm@10.34.5 via corepack + strip registry tr…
zuckerberg-db Jul 22, 2026
6c60513
Integrate: 3-way TLS proxy-CA prompt (trust copied CA / own PEM / no …
zuckerberg-db Jul 22, 2026
90e101e
Integrate: pre-create Vercel project so link never triggers Git connect
zuckerberg-db Jul 22, 2026
99f2cc2
docs: sync BOOTSTRAP.md runbook with all bootstrap.sh fixes
zuckerberg-db Jul 22, 2026
5f74619
fix(guest-login): clear error screen for invalid/expired/used login l…
zuckerberg-db Jul 22, 2026
6fa37ed
fix(#20): env-driven guest catalog allowlist + bootstrap sets it from…
zuckerberg-db Jul 22, 2026
a4b6833
fix(#20): drive guest catalog allowlist purely from UC_CATALOG (Phase…
zuckerberg-db Jul 22, 2026
1d93d2a
feat(bootstrap): FIREFLY_BRANCH override for the Phase 2 clone (defau…
zuckerberg-db Jul 22, 2026
913d777
test(TEMP): default FIREFLY_BRANCH to integration/bootstrap-fixes
zuckerberg-db Jul 22, 2026
708df40
docs(BOOTSTRAP.md): DATABRICKS_ACCOUNT_ID is a UUID, not numeric
zuckerberg-db Jul 22, 2026
b5ecbea
bootstrap: fix guest-login 500 (stale JWKS), Phase 2 fork-push refspe…
zuckerberg-db Jul 22, 2026
8393a18
Merge pull request #61 from databrickslabs/integration/bootstrap-fixes
zuckerberg-db Jul 22, 2026
160842e
fix: drop vestigial GitHub fork push from Phase 2 (#62)
zuckerberg-db Jul 22, 2026
53cc5a7
fix(assemble): pin transitive greenlet==3.5.3 in assembled pyproject …
zuckerberg-db Jul 22, 2026
bbf8292
fix: publish guest login URL prominently in the final deployment summ…
zuckerberg-db Jul 22, 2026
9fcbfc6
harden(#64): pin whole dep graph via UV_CONSTRAINT exported from uv.l…
zuckerberg-db Jul 22, 2026
7c03a1b
fix(bootstrap): install pnpm via pinned npm, not corepack; make Phase…
zuckerberg-db Jul 25, 2026
0b9835a
docs: encode the ENV-0 invariant where agents and reviewers will see …
zuckerberg-db Jul 25, 2026
2810c71
fix: use production URL for guest auth
zuckerberg-db Jul 25, 2026
ef8e389
fix: pin Vercel CLI to a tested floor
zuckerberg-db Jul 25, 2026
7b49eee
fix(corp-network): make the library sourceable from zsh, not just bas…
zuckerberg-db Jul 25, 2026
c488081
test(bootstrap): port #67's fresh-HOME regression, reframed to assert…
zuckerberg-db Jul 25, 2026
19c9274
Merge pull request #70: install pnpm via pinned npm, not corepack (#69)
zuckerberg-db Jul 25, 2026
2c0cfda
Merge pull request #71 from databrickslabs/fix/better-auth-url-prod-p…
zuckerberg-db Jul 25, 2026
564959b
fix: refuse dead pypi-proxy.dev in pip/uv bridge and Phase 4
zuckerberg-db Jul 25, 2026
83e5a04
test: hermetic e2e coverage for PyPI .dev proxy guards
zuckerberg-db Jul 25, 2026
19a4a9e
fix(pypi-guard): correct the "dead host" claim; warn on config, stay …
zuckerberg-db Jul 25, 2026
caa7317
Merge pull request #74: guard the unsanctioned pypi-proxy.dev index (…
zuckerberg-db Jul 25, 2026
9aa69c6
fix(bootstrap): resolve the Vercel origin from the API, deploy once (…
zuckerberg-db Jul 25, 2026
c87f376
test(bootstrap): guard Phase 8 origin resolution against a third regr…
zuckerberg-db Jul 25, 2026
041ec6f
Merge pull request #73: resolve the Vercel origin from the API, deplo…
zuckerberg-db Jul 25, 2026
aac6139
Merge pull request #75: guard Phase 8 origin resolution against a thi…
zuckerberg-db Jul 25, 2026
4ef793b
fix(bootstrap): close the fresh-install defects found on 2026-07-25
zuckerberg-db Jul 25, 2026
7fb90bb
fix(bootstrap): make Phase 3a prove quickstart finished
zuckerberg-db Jul 25, 2026
f527977
Merge pull request #77 from databrickslabs/fix/fresh-install-findings…
zuckerberg-db Jul 25, 2026
e1bf5dd
Close three fresh-install gaps found by the E2E harness (#80)
zuckerberg-db Jul 26, 2026
26355bf
fix(app): attribute workspace network blocks to the network, not to t…
zuckerberg-db Jul 26, 2026
78836ad
feat(bootstrap): give an expired guest link a runnable remint (#82)
zuckerberg-db Jul 26, 2026
a2d3f4d
test(bootstrap): add the live Phase 8 origin test that caught the re-…
zuckerberg-db Jul 26, 2026
70a5217
feat(bootstrap): offer sample-data seeding and Genie space setup at P…
zuckerberg-db Jul 27, 2026
84a4185
fix(bootstrap): the Phase 5 preflight could not detect the state it e…
zuckerberg-db Jul 27, 2026
7a9747c
fix(bootstrap): "not readable" was hiding a race, not a permissions p…
zuckerberg-db Jul 27, 2026
8cfd7f1
fix(app): drop the Genie One attribution link from the guest panel
zuckerberg-db Jul 27, 2026
66b8a72
fix(bootstrap): uv was installing an unverified binary on macOS 14 an…
zuckerberg-db Jul 27, 2026
9c0664e
fix(bootstrap): Phase 3a reported a Lakebase project that was never c…
zuckerberg-db Jul 27, 2026
1429f82
fix(bootstrap): two tools were telling readers the wrong thing
zuckerberg-db Jul 27, 2026
c04fd16
fix(bootstrap): finish the Lakebase reconcile — persist it, and warn …
zuckerberg-db Jul 27, 2026
a33d5b2
docs(bootstrap): explain the vercel "Error:" line that is not an error
zuckerberg-db Jul 27, 2026
5a7d4a2
fix(bootstrap): surface the IP allowlist at Phase 0, and stop present…
zuckerberg-db Jul 27, 2026
b9ecd1a
fix(bootstrap): the allowlist check I added to Phase 0 could not run …
zuckerberg-db Jul 27, 2026
cd2d567
fix(bootstrap): stop reporting JSONDecodeError instead of the real cause
zuckerberg-db Jul 27, 2026
9744c65
fix(bootstrap): never report "no IP allowlist" for a check that never…
zuckerberg-db Jul 27, 2026
65ca91f
fix(bootstrap): a tier with no allowlist feature is an answer, not a …
zuckerberg-db Jul 27, 2026
6059379
fix(bootstrap): put $HOME/bin and $HOME/.local/bin on PATH where Phas…
zuckerberg-db Jul 27, 2026
f2171e1
fix(bootstrap): pre-empt quickstart's first-run "does not exist or is…
zuckerberg-db Jul 27, 2026
49feb49
fix(bootstrap): stop the allowlist helper from killing the phase it w…
zuckerberg-db Jul 28, 2026
4e99604
fix(bootstrap): let Phase 4's deployment finish before Phase 6c redep…
zuckerberg-db Jul 28, 2026
a3162aa
fix(bootstrap): show how to persist Phase 0 answers without inventing…
zuckerberg-db Jul 28, 2026
2552902
fix(genie): stop discarding a Genie space because one read failed
zuckerberg-db Jul 28, 2026
a2f9534
fix(bootstrap): stop Phase 6 depending on a shell that may be gone
zuckerberg-db Jul 28, 2026
d3b0f5d
fix(genie): grant the guest SP on a Genie space we created ourselves
zuckerberg-db Jul 28, 2026
8b6fd66
fix(genie): honour GRANT_GUEST_SPACE_ACCESS instead of overriding it
zuckerberg-db Jul 28, 2026
a1d7bcf
fix(bootstrap): stop a lost shell variable from destroying or misrepo…
zuckerberg-db Jul 28, 2026
970cc2d
fix(bootstrap): recover a secret before re-storing it
zuckerberg-db Jul 28, 2026
c6457bb
fix(bootstrap): stop telling the link recipient to run an operator-on…
zuckerberg-db Jul 28, 2026
322b3e2
docs(genie): rename Genie One to Genie Agent, and say "workspace-wide…
zuckerberg-db Jul 28, 2026
bb5f152
fix(bootstrap): survive the merge that deletes the branch this runboo…
zuckerberg-db Jul 28, 2026
06423d6
refactor(links): one place builds GitHub URLs; README badge stops nam…
zuckerberg-db Jul 28, 2026
0e26fda
docs: bring back the Cursor link, with the branch as a fallback not a…
zuckerberg-db Jul 28, 2026
7c3975a
docs(bootstrap): VERCEL_TELEMETRY_DISABLED does not silence the dist-…
zuckerberg-db Jul 28, 2026
4c9fc86
docs: ask for the branch instead of inferring it, default main
zuckerberg-db Jul 28, 2026
a11b878
fix(links): the "view source" links were 404ing; add a make target fo…
zuckerberg-db Jul 28, 2026
87ba962
fix(genie): one resolver decides the Genie backend, and the default i…
zuckerberg-db Jul 29, 2026
af77ade
fix(inputs): storing the same answer twice duplicated it; add the mis…
zuckerberg-db Jul 29, 2026
43a03db
refactor(bootstrap): create the Genie space before the app deploys, n…
zuckerberg-db Jul 29, 2026
c4be845
runbook: a phase that cannot grant yet must not report the answer as …
zuckerberg-db Jul 29, 2026
01d8716
runbook: stop reporting 'not this phase' as the operator's decision
zuckerberg-db Jul 29, 2026
5130ee2
runbook: Phase 6 restore looked in one store and guessed about the other
zuckerberg-db Jul 29, 2026
ae7ac7f
runbook: Phase 1d says the Vercel install is slow, not stalled
zuckerberg-db Jul 29, 2026
eafe2f6
runbook: a grant loop that reports only its successes hides an unread…
zuckerberg-db Jul 29, 2026
2ebd5c0
runbook: do not put a number on the Vercel install that the next run …
zuckerberg-db Jul 29, 2026
17564a3
runbook: Phase 8 names the Vercel success text that points at the wro…
zuckerberg-db Jul 29, 2026
34434c0
docs: correct the Genie documentation to what actually ships
zuckerberg-db Jul 29, 2026
37746c7
agent: the two Genie backends do not expose the same tools
zuckerberg-db Jul 29, 2026
daf2bbb
runbook: a lookup that cannot answer must not fall through to creatin…
zuckerberg-db Jul 29, 2026
ffee3de
runbook: an empty spaces list is not evidence of an empty workspace
zuckerberg-db Jul 29, 2026
92470b7
runbook: the CLI installer must not die on a GitHub rate limit
zuckerberg-db Jul 29, 2026
1092c5e
runbook: the Genie API appends a timestamp to the title, so equality …
zuckerberg-db Jul 29, 2026
a3756fd
runbook: the spaces list was never empty, my reader could not parse it
zuckerberg-db Jul 29, 2026
33fc179
agent: a denied tool call reached the model whenever the database was…
zuckerberg-db Jul 29, 2026
f20eee2
agent: one denied tool stalled every later continuation in the conver…
zuckerberg-db Jul 29, 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
37 changes: 34 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,23 @@ BETTER_AUTH_SECRET=your_better_auth_secret_here

# Better Auth URL (base URL for auth endpoints)
# Development: http://localhost:3000
# Production: https://your-domain.com
# Production: https://your-domain.com (must match the Databricks OAuth redirect URI)
BETTER_AUTH_URL=http://localhost:3000
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3000

# NEXT_PUBLIC_BETTER_AUTH_URL — client-side auth base URL.
#
# ⚠️ DO NOT set this for Vercel preview deployments.
# Preview URLs are dynamic (e.g. https://my-app-<hash>-team.vercel.app) and
# this variable is baked in at build time. If it is set to a different origin
# than the page serving the request, the browser blocks auth API calls with a
# CORS error. Leave it unset: the auth client automatically uses
# window.location.origin, which is always correct for any deployment URL.
#
# Only set this if you have a stable, canonical URL (e.g. a custom domain
# attached to every deployment) AND that URL is also registered as a
# Databricks OAuth redirect URI.
#
# NEXT_PUBLIC_BETTER_AUTH_URL=https://your-domain.com

# Encryption key for OAuth token storage (AES-256-GCM)
# Must be a 32-byte hex-encoded string (64 characters)
Expand All @@ -54,6 +68,21 @@ DATABRICKS_APP_URL=https://your-code-editor-app.databricksapps.com
# Databricks notebook editor app URL (Marimo)
DATABRICKS_NOTEBOOK_APP_URL=https://your-notebook-editor-app.databricksapps.com

# =============================================================================
# Agent Panel Configuration (managed-memory OpenAI agent)
# =============================================================================

# Toggle the slide-out Agent panel in the SSO-SPN org view.
# Set to "true" to show the panel; anything else hides it.
NEXT_PUBLIC_AGENT_ENABLED=false

# Deployed Databricks App URL for the managed-memory agent (Genie + memory).
# The Vercel-native reverse proxy at /api/agent-proxy forwards to this app,
# minting the current user's (or guest's) mapped SPN token as a bearer. No Go
# proxy / Cloud Run is required for the agent. Build/deploy the app from the
# vendor/app-templates submodule via scripts/assemble_agent.sh.
DATABRICKS_AGENT_APP_URL=https://your-agent-app.databricksapps.com

# =============================================================================
# Embedded Dashboard Configuration
# =============================================================================
Expand Down Expand Up @@ -85,7 +114,9 @@ SPN_AUTH_DATABRICKS_ACCOUNTS_URL=https://accounts.cloud.databricks.com
# Databricks Workspace URL for SPN tokens
SPN_AUTH_DATABRICKS_WORKSPACE_URL=https://your-workspace.cloud.databricks.com

# Okta OAuth Configuration for SPN Auth
# Okta OAuth Configuration for SPN Auth (optional — leave unset if not using Okta)
# When all three are set, an Okta provider is registered for SPN identity mapping.
# When any are absent, the provider is skipped (no build error).
SPN_AUTH_OKTA_CLIENT_ID=your_okta_client_id
SPN_AUTH_OKTA_CLIENT_SECRET=your_okta_client_secret
SPN_AUTH_OKTA_ISSUER=https://your-tenant.okta.com/oauth2/default
Expand Down
33 changes: 33 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## What & why

<!-- What changed, and the problem it solves. Link the issue: Closes #NNN -->

## Bootstrap / runbook changes

<!-- Delete this whole section if you did not touch BOOTSTRAP.md, README.md,
scripts/bootstrap.sh, or scripts/lib/**. -->

GitHub Actions is currently disabled on this repo, so the invariant guard does **not** run
automatically. Run it locally and paste the result:

```bash
bash scripts/check-runbook-invariants.sh
```

- [ ] Guard passes (or this PR does not touch the runbook/bootstrap)
- [ ] pnpm is still installed via `npm install -g pnpm@<pinned>` — **not** `corepack enable`/`prepare` (ENV-0, #69)
- [ ] Phase 0 of `BOOTSTRAP.md` still has runnable commands, not prose-only guidance
- [ ] Corporate-network logic still lives only in `scripts/lib/corp-network.sh`, sourced by both consumers
- [ ] `README.md` and `BOOTSTRAP.md` still agree on the pnpm install method

> Why these exist: the corepack guard was deleted once and then silently reintroduced by a
> docs-sync commit, breaking setup for everyone on a network that blocks public npm. See
> `AGENTS.md` → "Bootstrap invariants".

## Testing

<!-- What you ran, and what you did NOT verify. Be explicit about the gaps. -->

## Risk / rollback

<!-- Blast radius, and how to revert if this misbehaves. -->
21 changes: 21 additions & 0 deletions .github/workflows/phase8-origin-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Phase 8 origin guard

on:
pull_request:
branches:
- genie-agent
push:
branches:
- genie-agent

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Run hermetic Phase 8 origin tests
run: bash tests/test_phase8_origin.sh
21 changes: 21 additions & 0 deletions .github/workflows/pypi-proxy-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PyPI proxy guard

on:
pull_request:
branches:
- genie-agent
push:
branches:
- genie-agent

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Run hermetic proxy guard tests
run: bash tests/test_pypi_proxy_guard.sh
63 changes: 63 additions & 0 deletions .github/workflows/runbook-invariants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: runbook invariants

# Guards the ENV-0 regression: the runbook must not require corepack (blocked wherever
# public npm is blocked), and the corporate-network bridges must stay reachable from
# BOOTSTRAP.md rather than living only in bootstrap.sh.

on:
pull_request:
paths:
- BOOTSTRAP.md
- README.md
- package.json
- scripts/**
- .github/workflows/runbook-invariants.yml
push:
branches: [genie-agent]
workflow_dispatch:

jobs:
invariants:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep

- name: Check runbook invariants
run: bash scripts/check-runbook-invariants.sh

- name: Shell syntax check
run: |
bash -n scripts/bootstrap.sh
bash -n scripts/lib/corp-network.sh
bash -n scripts/check-runbook-invariants.sh

# BOOTSTRAP.md Phase 0a asks users to source the library from their own shell, and
# zsh is the macOS default. Verify it is genuinely portable, not just bash-valid.
- name: Install zsh
run: sudo apt-get install -y zsh

- name: Library must be sourceable from zsh
run: |
zsh -n scripts/lib/corp-network.sh
zsh -c "source scripts/lib/corp-network.sh; ok ok; note note; warn warn; fail fail"

# Behavioural counterpart to the static checks above. Adapted from the fresh-HOME test on
# fix/corepack-mkdir-home-bin (#67) and reframed to assert the outcome rather than the
# install mechanism. Runs on macOS because that is what the runbook targets.
# NOTE: GitHub runners have unrestricted npm access, so this covers fresh-HOME and the
# version pin — NOT the blocked-registry case, which needs a corporate-network VM.
phase1a-fresh-home:
runs-on: macos-15
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install ripgrep
run: brew install ripgrep
- name: Fresh-HOME Phase 1a regression
run: bash scripts/test-bootstrap-phase1a.sh
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,14 @@ go/databricks-proxy
go/proxy
# Local skills and personal tooling
.local/

# Assembled agent (ephemeral, from vendor submodule + agent/ overlay)
agent-build/

# Python build artifacts
__pycache__/
*.pyc
.env*

# Bootstrap runner local state (secrets, resume markers)
.firefly-bootstrap/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/app-templates"]
path = vendor/app-templates
url = https://github.com/databricks/app-templates.git
5 changes: 5 additions & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Agent build inputs/outputs are not part of the Next.js frontend build.
# Leading slash anchors to repo root so we DON'T exclude src/components/agent/.
/agent/
/agent-build/
/vendor/
64 changes: 63 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,66 @@
- Custom API attribution/user-agent logic appears in `databricks-apps/code-editor/app.py` via explicit `User-Agent` headers.
- Pipeline Studio encodes Databricks SQL AI functions (`ai_query`, `ai_extract`), Delta Change Data Feed, and three-level UC table names in `src/lib/pipeline-to-sql.ts`.
- Unity Catalog Volumes are first-class in the product via `src/lib/databricks-volumes-api.ts`, including `catalog.schema.volume` parsing and `/Volumes/...` path generation.
- The repo exposes Databricks pipelines via REST API routes, but there is no obvious repository-local IaC or CI/CD automation checked in.
- The repo exposes Databricks pipelines via REST API routes. The only checked-in CI is `.github/workflows/runbook-invariants.yml`; GitHub Actions is currently **disabled at the repository level**, so it does not run — the invariants below are enforced by convention and by running the guard script manually.
- The managed-memory Agent panel embeds a Databricks App (Genie + memory) via a Vercel-native reverse proxy at `src/app/api/agent-proxy/[[...path]]/route.ts` (mints the user/guest SPN token, forwards HTTP + SSE to `DATABRICKS_AGENT_APP_URL`) — distinct from the Go proxy used by the code/notebook editors. UI: `src/components/agent/agent-panel.tsx` (gated by `NEXT_PUBLIC_AGENT_ENABLED`).
- The agent app source is the `vendor/app-templates` git submodule (`agent-openai-agents-sdk` + `e2e-chatbot-app-next`) plus the local `agent/` overlay, merged by `scripts/assemble_agent.sh` into the gitignored `agent-build/`. Keep `vendor/**` pristine; put deltas in `agent/`.

## Bootstrap invariants — do not regress (ENV-0, #69)

Read this before editing `BOOTSTRAP.md`, `README.md`, or `scripts/bootstrap.sh`.
Verify any change with `bash scripts/check-runbook-invariants.sh`.

- **Never require `corepack enable` or `corepack prepare`.** corepack fetches its package
manager from `registry.npmjs.org` and ignores the configured npm registry, so it fails
wherever public npm is blocked or blackholed. Install pnpm with
`npm install -g pnpm@<pinned-version>`, which honors the user's own registry. The version
**must** be pinned: pnpm's `latest` dist-tag has shipped a 12.x alpha that ignores
`onlyBuiltDependencies` (`ERR_PNPM_IGNORED_BUILDS`).
- **Phase 0 of `BOOTSTRAP.md` must contain runnable commands, not prose.** Corporate-network
handling lives in `scripts/lib/corp-network.sh` and is sourced by *both* `bootstrap.sh` and
the Phase 0a block in `BOOTSTRAP.md`. Describing a bridge without giving the reader a
command to run it is the exact defect that caused #69 — the runbook is followed
top-to-bottom by agents (that is what the README's "Open in Cursor" badge launches), so an
unexecuted prose bridge means the install runs unbridged.
- **Never duplicate the bridge logic.** One implementation in `scripts/lib/corp-network.sh`;
both consumers source it. Two copies drift, and the drift is invisible until someone on a
restricted network runs the doc path.
- **`README.md` and `BOOTSTRAP.md` must agree** on how pnpm is installed. They contradicted
each other for months (README said "not corepack" while the runbook required corepack).
- **Never probe a registry with `npm ping`.** Corporate mirrors proxy package routes but not
service endpoints — `npm-proxy.dev.databricks.com` returns HTTP 404 for `/-/ping` while
serving `npm view pnpm@10.34.5 version` fine. Probe the real operation instead.
- **Never work around a blocked registry** with `--registry https://registry.npmjs.org`, by
disabling TLS verification, or by editing `/etc/hosts`. Bridge the user's own configured
mirror; never hardcode a mirror URL.
- **Every helper `BOOTSTRAP.md` calls must be defined in a `scripts/lib/*.sh` that the
runbook itself sources.** Not in `bootstrap.sh`, not left to the reader. The runbook
called `store_secret` / `read_secret` for ten days with no definition anywhere in the
file, while `bootstrap.sh`'s version took `(VARNAME, _, KEY)` and every runbook call site
used `$(read_secret KEY)` — so even copying it across did not work. A headless agent
invented its own, used bash-only `${!key}`, and got `bad substitution` under zsh.
- **Runnable blocks must parse under bash *and* zsh.** zsh is the macOS default and the
reader pastes these into their own shell. No `${!var}`, no `declare -F` as a function
test, no `mapfile`/`readarray` (macOS also ships bash 3.2).
- **A code block must do what it looks like it does.** `command -v X || { # install X }`
and `{ : ; }` shipped as the Phase 1b/1e installers: they read as installs and are
no-ops, which is invisible on any machine that already has the tool.
- **Never parse structured output with `grep`.** The `sync.exclude` list opens with a
comment naming `pyproject.toml` and `vendor-wheels/`, so `grep -q pyproject.toml` reports
it excluded when it is not — `bootstrap.sh` failed a correct config that way, and an
agent's `-\s` regex read the same list as empty and passed. Use
`check_sync_exclude_rules`. Same rule for CLI JSON: use the shared parsers.
- **Never derive an id from a `create` response you then act on.** `neonctl projects
create` succeeds server-side before any parse of its output can fail, so a parse bug
orphans a real project. Create, then look the id up by name; fail closed if it is empty.

Historical note: this regressed once already. `e91322d` deleted the "do not use corepack"
guard and its rationale, then `99f2cc2` — a docs-sync commit — reintroduced corepack as the
first executable command in the runbook. Deleting the reason is what made reintroducing the
bug look reasonable. Keep the rationale attached to the rule.

The same `99f2cc2` is also the origin of three of the defects listed above: it back-ported
`bootstrap.sh`'s *idempotency* fix for Neon while dropping the *parsing* fix from the same
block, replaced self-contained `keyring` one-liners with calls to functions it did not
carry across, and added the two comment-only installers. Blanket "sync the docs to the
script" commits are how this class of bug arrives. Edit the shared library instead.
Loading