Skip to content

Point solve + telemetry defaults at production - #233

Merged
jack-champagne merged 1 commit into
mainfrom
feat/point-defaults-at-prod
Jul 29, 2026
Merged

jack-champagne merged 1 commit into
mainfrom
feat/point-defaults-at-prod

Conversation

@jack-champagne

Copy link
Copy Markdown
Member

Flips both client defaults to the production account, together, and pins them with a test.

Why

The single token in ~/.amico/cloud.json authenticates both the solve API and the run-corpus ingest. Each AWS account has its own harmoniqs-api-credentials table, and the ingest hashes the token and looks it up in its own account's table — so a token minted in the other account is rejected on every batch (401) while the UI still reports capture as enabled.

Nothing enforced that coupling. It broke for real today: a user holding a prod-minted credential against the staging ingest default produced ~1265 rejected batches in one morning, capturing nothing. Diagnosed via the harmoniqs-run-corpus-staging-ingest-rejected alarm.

What

default was now
DEFAULT_CLOUD_URL (cloud_key.ts) qy2gwqy5s5 (staging solves) vsaje7ynp5 (prod solves)
amicode.telemetry.endpoint (package.json) 4pbhrnv2… (staging ingest) bld42qbg… (prod ingest)

Both endpoints verified live against AWS. Manifest bumped 0.1.00.1.1 for release.yml's version guard.

New test the solve and telemetry defaults point at the SAME account (production) pins the pair and rejects either staging URL, so a one-sided edit fails CI rather than silently shipping.

Consequences

  • Every existing staging-minted token stops working and must be re-minted in prod: raghav-internal, jacktest, jack-piccolissimo, jack, aaron.
  • Capture now lands in the prod corpus, alongside the traces already there.
  • Prod also has real headroom: Lambda concurrency 400 vs staging's 10 (AWS floor, shared across 7 functions).

Testing

pnpm --filter amicode test810 passed, 80 files, 0 failed.

The one token in ~/.amico/cloud.json authenticates BOTH the solve API and
the run-corpus ingest, and each AWS account has its own credentials table:
the ingest hashes the token and looks it up in ITS account's table, so a
token minted in the other account is rejected on every batch — 401, while
the UI still reports capture as enabled.

Nothing enforced that coupling, and it broke for real: a user holding a
prod-minted credential against the staging ingest default produced ~1265
rejected batches in one morning, capturing nothing.

Flip both defaults together:
  DEFAULT_CLOUD_URL          -> vsaje7ynp5 (prod solves)
  amicode.telemetry.endpoint -> bld42qbg…  (prod run-corpus ingest)

Add a test pinning the pair so a one-sided edit fails CI instead of
shipping. Bump the manifest to 0.1.1 to satisfy release.yml's version
guard for the v0.1.1 tag.

Every existing staging-minted token must be re-minted in prod.
@jack-champagne
jack-champagne merged commit 7bb9e47 into main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant