Commit Graph

43 Commits

Author SHA1 Message Date
will.anderson aedb14f86c ci: commit dev.yaml with elb + ci-base approach (was written but not staged)
Dev — Build & local smoke test / build-smoke (pull_request) Failing after 45s
2026-05-07 02:35:02 -05:00
will.anderson 3e377e2bb6 ci: replace build-stage.sh concatenation with elb build from ci-base
- stage.yaml and deploy.yaml now extract El SDK from ci-base (docker cp /opt/el) and run elb build to produce dist/neuron-landing
- JS El sources compiled via elc --target=js in a dedicated step, matching dev.yaml exactly
- build-stage.sh replaced with thin elb wrapper for local dev use
- Removes the broken "Set up El SDK" stub (echo EL_HOME) and old build-stage.sh invocation from both workflows
2026-05-07 01:55:08 -05:00
will.anderson 9e77c3cbf0 Merge pull request 'Enforce dev-only source on stage' (#12) from fix/stage-source-enforcement into dev
Dev — Build & local smoke test / build-smoke (push) Failing after 17m6s
2026-05-07 06:09:40 +00:00
will.anderson 042b9b2b2f Enforce dev-only source on stage — reject PRs from non-dev branches 2026-05-07 01:07:20 -05:00
will.anderson 494f4ef585 Merge stage fixes into dev — HAVE_CURL, free-tier checkout, Stripe dedup, escaped styles 2026-05-07 01:05:36 -05:00
will.anderson d546c9563e ci: pass --elc path explicitly to elb (elc not in container PATH) 2026-05-05 14:52:56 -05:00
will.anderson 92676731cc elb: pass --runtime to locate el_runtime.c in ci-base 2026-05-05 14:08:28 -05:00
will.anderson 83555f5f32 Switch CI from build-stage.sh to elb — no OOM
elb compiles each .el source independently (per-file codegen),
avoiding the exponential memory growth from concatenating all sources
into main-combined.el and feeding it to elc in one shot.

- dev.yaml: replace build-stage.sh with elb build + per-file JS elc
- Dockerfile.stage: COPY dist/neuron-landing (elb binary) directly
  instead of compiling from pre-generated main.c. soul-demo stays as
  cc compilation (small file, no risk).
2026-05-05 13:59:06 -05:00
will.anderson 33fa14935b ci: use pre-installed El SDK from ci-base image
Remove fallback download logic in dev.yaml — El SDK v1.2.1 is now baked
into the ci-base image at /opt/el, so EL_HOME just needs to be pointed there.
2026-05-05 13:13:19 -05:00
will.anderson d2c5370f55 ci: fallback El SDK download if not pre-installed in runner image 2026-05-05 13:05:02 -05:00
will.anderson 3509dda67c ci: use pre-installed El SDK from ci-base image 2026-05-05 12:48:54 -05:00
will.anderson 2854b89e35 ci: restore El SDK v1.2.1 release download (repo clone uses incompatible elc) 2026-05-05 11:33:04 -05:00
will.anderson b5eecc94ff ci: use elc-linux-amd64 from El repo, fix EL_HOME to lang/ across all workflows 2026-05-05 09:45:20 -05:00
will.anderson 46f4be83fd ci: add sudo to apt-get (runner is non-root) 2026-05-05 09:13:18 -05:00
will.anderson aa6c354d58 ci: fix elc link flags (libcurl install + gcc ordering) 2026-05-05 09:09:55 -05:00
will.anderson 14cae0dcb5 ci: compile elc.c from El repo source for linux/amd64 support
The El repo only has a darwin arm64 elc binary. The v1.2.1 linux
binary predates native HTML template syntax. Compile elc.c (the
committed C source of the El compiler) on linux/amd64 in CI to
get a native binary that supports the new syntax.
2026-05-05 09:07:45 -05:00
will.anderson 62f0fc054f ci: clone El repo for native HTML template support
v1.2.1 elc (282KB) cannot compile native HTML template syntax
introduced in feat/native-el-templates. Clone El repo depth=1
to get the latest elc (486KB) that supports it. Set EL_HOME
to lang/ subdir.
2026-05-05 06:45:07 -05:00
will.anderson 28c47c11c9 ci: fix EL_HOME to use lang/ subdirectory for El repo clone
El repo is organized under lang/ — runtime and dist/platform binaries
are at lang/el-compiler/runtime/ and lang/dist/platform/, not at root.
Setting EL_HOME=$DEST/lang makes RUNTIME_SRC resolve correctly so
build-stage.sh can cp el_runtime.{c,h,js} from the right location.
2026-05-05 11:01:47 +00:00
will.anderson 9d264cb506 ci: download el_runtime.js from El SDK v1.2.1 release 2026-05-05 10:49:56 +00:00
will.anderson 1127dcd278 fix(ci): download El SDK from release assets instead of cloning repo 2026-05-05 09:52:51 +00:00
will.anderson 7c8bf444ca fix(ci): ensure dist/platform dir exists before elc download 2026-05-05 09:49:20 +00:00
Will Anderson 8a8762ad4f ci: trigger stage CI after API merge 2026-05-05 04:46:30 -05:00
Will Anderson 94f6e749a0 Add El source files for all client-side JS
Recovers original JS from git history and ports it into proper El source
files under src/js/. Each file wraps the original JS in a native_js call
inside a main() function, making it valid El that compiles to a
self-contained IIFE via elc --target=js --bundle.

Files added:
  src/js/account-auth.el       - Supabase OTP magic-link (sendMagicLink)
  src/js/account-dashboard.el  - Account dashboard: session, plan card, family
  src/js/chat-widget.el        - Demo chat widget (neuronDemoToggle/Send/Reset)
  src/js/checkout-auth.el      - Checkout auth: OAuth, email sign-in/up
  src/js/checkout-free.el      - Free plan: auth-badge watch -> payment reveal
  src/js/checkout-stripe.el    - Stripe Payment Element (reads NEURON_CFG)
  src/js/enterprise.el         - Enterprise inquiry form + headcount filter
  src/js/environmental.el      - Efficiency calculator slider
  src/js/gallery.el            - Gallery nav, search/sort, Supabase voting
  src/js/main.el               - Share page voting + copyForPlatform
  src/js/marketplace.el        - Developer interest form
  src/js/nav.el                - Nav hamburger + Mission dropdown
  src/js/styles.el             - Landing: nav scroll, reveal, founding counter
2026-05-04 11:23:21 -05:00
Will Anderson 0e51225564 ci: trigger dev smoke test on any workflow file change
Dev — Build & local smoke test / build-smoke (push) Successful in 2m50s
2026-05-04 09:01:25 -05:00
Will Anderson 23ba7b8ec5 ci: enforce branch protection + source-branch rules
- Gitea branch protection enabled on stage and main:
  - Direct pushes disabled (non-admin)
  - stage requires "Dev — Build & local smoke test / build-smoke" to pass
  - main requires "Stage — Build, push & deploy to marketing-stage / deploy-stage" to pass

- Enforcement step added to stage.yaml and deploy.yaml:
  - stage only accepts merges from dev
  - main only accepts merges from stage
  - workflow_dispatch exempt (allows manual redeploy)
  - Direct non-admin pushes are blocked at the Gitea layer before CI runs
2026-05-04 08:18:09 -05:00
Will Anderson c75d8a9563 ci: add gitflow — dev/stage/main branches with CI workflows
Dev — Build & local smoke test / build-smoke (push) Successful in 2m51s
Stage — Build, push & deploy to marketing-stage / deploy-stage (push) Successful in 2m52s
Deploy marketing to Cloud Run / deploy (push) Successful in 3m37s
- dev.yaml: build + local docker smoke test only (no push, no deploy)
- stage.yaml: build + push + deploy to marketing-stage + smoke test (stops here)
- deploy.yaml: add HTML placeholder touch step before docker build

Proper human gate between stage and prod: the stage→main merge decision.
2026-05-03 11:28:43 -05:00
Will Anderson 254afd2fb2 fix(ci+chat): drop docker buildx flags + style chat code blocks
Deploy marketing to Cloud Run / deploy (push) Failing after 2m27s
CI: gitea runner ships docker without the buildx plugin, so
`docker buildx build --platform linux/amd64 --load` exits 125
("unknown flag: --platform") in both the full build (build-stage.sh)
and the asset-only fast path (deploy.yaml). Runner host is already
linux/amd64, so explicit --platform is redundant. Switch both call
sites to plain `docker build`. This unblocks the pipeline — every
run since the workflow was added (~26 runs) has failed at this
exact step.

Chat: the live chat bubble renders marked.parse() output via
innerHTML, but .demo-msg-ai .demo-msg-bubble only had CSS rules
for p/ul/ol/li/strong. Fenced code blocks rendered as <pre><code>
with no styling — they appeared as wrapped plaintext, hard to
distinguish from prose. Add rules for code (inline and block),
pre, blockquote, em, h1-h4, and a, mirroring the share-card
styling (which always had them) so chat code blocks finally get
the monospace + tinted-background treatment users expect.
2026-05-03 10:15:24 -05:00
Will Anderson 44c7621c85 ci: use neuron-marketing-sa for stage service (fixes secret access)
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
2026-05-03 03:52:17 -05:00
Will Anderson cac0b0d9dc ci: use pre-built elc-linux-amd64 from El SDK v1.2.1 release
Deploy marketing to Cloud Run / deploy (push) Failing after 48s
Replaces the three-step apt install + GCS cache probe + gcc build sequence
with a single curl download of the pre-built binary. Eliminates build-time
C toolchain dependency and shaves ~2-3 minutes off every full build.
2026-05-03 02:02:29 -05:00
Will Anderson adf780b1a6 ci: add test Stripe publishable key to stage env vars
Deploy marketing to Cloud Run / deploy (push) Failing after 51m20s
2026-05-02 19:26:56 -05:00
Will Anderson 12ec770392 ci: gate prod deploy behind stage smoke test
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
Nothing reaches prod without deploying to marketing-stage first and
passing a 90s HTTP smoke test. Stage uses test Stripe keys
(stripe-secret-key-stage) so checkout can be exercised safely.

Set STRIPE_PUBLISHABLE_KEY on the stage service manually once:
  gcloud run services update marketing-stage --region us-central1 \
    --project neuron-785695 \
    --update-env-vars STRIPE_PUBLISHABLE_KEY=pk_test_...
2026-05-02 19:02:17 -05:00
Will Anderson baba6fbb71 ci: add asset-only fast path (<5min for PNG changes)
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
- Detect asset-only changes (src/assets/, src/shares/, static HTML, llms.txt)
  and skip El compilation, C build deps, and Docker full build entirely
- Fast path pulls :latest as base and rebuilds only the assets layer
- Gate clone-el, install-C-deps, elc-cache, build-elc, build-image, push-image
  behind asset_only != 'true'; deploy steps run unconditionally
- Switch build-stage.sh from registry cache driver (requires docker-container
  buildx driver) to inline cache backed by :latest — compatible with default
  docker driver on the runner
2026-05-02 18:08:43 -05:00
Will Anderson b83504c837 ci: raise timeout to 60min for cold elc cache warm-up
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
2026-05-02 17:31:49 -05:00
Will Anderson a185b8ae69 ci: cache elc binary + Docker layers, asset changes from 42min to ~5min
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
- deploy.yaml: restore elc from GCS (gs://neuron-ci-cache) keyed on
  source SHA; only compile on cache miss, then upload for future runs
- Dockerfile.stage: pre-compile el_runtime.o as its own layer so the
  expensive object is cached when only main.c changes between runs
- build-stage.sh: add --cache-from/--cache-to pointing at Artifact
  Registry so apt-get + compilation layers survive across cold builds
2026-05-02 17:30:18 -05:00
Will Anderson 5bf7b18f06 ci: update el repo clone URL (engram-lang renamed to el)
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
2026-05-02 15:14:34 -05:00
Will Anderson 7a7f2970e5 ci: build elc from dist/platform/elc.c with system curl/ssl headers
Deploy marketing to Cloud Run / deploy (push) Has been cancelled
elc-bootstrap.c isn't committed to engram-lang; the actual C source
is dist/platform/elc.c. Add libcurl4-openssl-dev/libssl-dev install
step so cc has the right headers.
2026-05-02 13:01:36 -05:00
Will Anderson 138e1cde64 ci: compile elc from elc-bootstrap.c instead of looking for build.sh
Deploy marketing to Cloud Run / deploy (push) Failing after 10s
engram-lang doesn't have a build.sh in its tree; bootstrap is via
dist/elc-bootstrap.c + el-compiler/runtime/el_runtime.c.
2026-05-02 13:00:45 -05:00
Will Anderson 483408611c ci: always rebuild elc on the runner (committed binary may be cross-arch)
Deploy marketing to Cloud Run / deploy (push) Failing after 10s
The committed dist/platform/elc was an arm64 binary from the local dev
box; runner is linux/amd64 and got 'cannot execute binary file: Exec
format error'. Always rebuild.
2026-05-02 12:59:46 -05:00
Will Anderson 654b977796 ci: fall back to GCP_SA_KEY (Gitea doesn't inject OIDC request token)
Deploy marketing to Cloud Run / deploy (push) Failing after 1m2s
Gitea Actions doesn't currently inject ACTIONS_ID_TOKEN_REQUEST_TOKEN /
ACTIONS_ID_TOKEN_REQUEST_URL into job env, so google-github-actions/auth
can't mint a federated token. The WIF infrastructure stays in Terraform
so we can flip back once that gap closes; the JSON key in GCP_SA_KEY is
the working path today.
2026-05-02 12:58:06 -05:00
Will Anderson 00a63a202c ci: replace second actions/checkout with raw git clone for engram-lang
Deploy marketing to Cloud Run / deploy (push) Failing after 5s
act_runner v0.6 host-mode hits a 'permission denied' error on
.git/objects/pack/*.idx when running two checkout steps in the same
job. Drop down to a plain git clone of engram-lang and pin EL_HOME
outside the workspace.
2026-05-02 12:57:25 -05:00
Will Anderson 4629796a75 ci: use CHECKOUT_TOKEN repo secret for cross-repo engram-lang checkout
Deploy marketing to Cloud Run / deploy (push) Failing after 6s
The auto-issued GITHUB_TOKEN is scoped to the current repo only, so
cross-repo actions/checkout needs an explicit token. CHECKOUT_TOKEN
holds an admin-scoped Gitea API token; long-term we should switch to
a dedicated read-only PAT.
2026-05-02 12:54:35 -05:00
Will Anderson 248ff89230 ci: use GITHUB_TOKEN for cross-repo engram-lang checkout
Deploy marketing to Cloud Run / deploy (push) Failing after 37s
Gitea Actions auto-issues GITHUB_TOKEN per workflow run; the previous
GITEA_TOKEN reference evaluated to literal text and broke the checkout.
2026-05-02 12:52:49 -05:00
Will Anderson b29ac61005 ci: add Gitea Actions deploy workflow for Cloud Run
Deploy marketing to Cloud Run / deploy (push) Failing after 28s
Push to main triggers build-stage.sh, push to Artifact Registry,
parallel deploy to all 3 marketing prod regions, traffic flip,
verify. Auth via Workload Identity Federation against the
Gitea OIDC provider — no long-lived keys on the runner.

Falls back to GCP_SA_KEY repo secret if WIF doesn't work end
to end against this Gitea instance.
2026-05-02 12:44:51 -05:00