Skip to content

ci(q-verify): drop the invented KX_INSTALL_TOKEN; no bearer token is needed - #11

Merged
nandanito merged 1 commit into
mainfrom
ci/q-verify-no-token
Jul 29, 2026
Merged

ci(q-verify): drop the invented KX_INSTALL_TOKEN; no bearer token is needed#11
nandanito merged 1 commit into
mainfrom
ci/q-verify-no-token

Conversation

@nandanito

Copy link
Copy Markdown
Owner

You do not need a KX_INSTALL_TOKEN. I inferred that requirement from licensing-notes.md's
phrase "authenticated curl script with an OAuth bearer token" and never measured it. It's wrong —
and the 401 I cited as confirming it came from my own mistyped URL, missing the
/install_kdb/~latest~/ path segment. A guess that produces a plausible error code is the most
expensive kind.

Measured, unauthenticated

URL Result
…/install_kdb/~latest~/install_kdb.sh 200 — byte-identical to the known-good local copy (63,703 bytes, v1.11.0)
…/kdb-x/~latest~/{l64,m64,l64arm}.zip 200

And the installer's own download_file() uses a bare curl --fail -Lo with no auth header — the
same conclusion from the other direction. The Developer Center pre-populates --oauth2-bearer <token> into the command it hands you, which is what made the download look gated.

So q-verify needs one secret, KX_B64LIC — already set. Nothing here circumvents a licence
check: kc.lic is still required for q to run and is still the secret; only the download
endpoint is open.

The better find: telemetry would have been left to chance

Reading the installer, setup_telemetry() runs q against the licence and tests .z.l[4] for
"tld". If that matches it sets KX_UPLOAD_TELEMETRY=YES before reaching the non-interactive
branch that would otherwise default it to NO.

docs/licensing-notes.md records the decision to decline telemetry, and your local config has it
NO — but on CI that would have been decided by whatever a licence flag happens to say. Now forced
to NO after install and asserted, so the decision is deterministic rather than incidental.

Still not proven

The install has never completed on a runner. Next step is a manual dispatch after merge — that's
the real test, and I'll report what it actually does rather than assume.

🤖 Generated with Claude Code

…telemetry off

The token requirement in the first revision was INFERRED from licensing-notes'
phrase "authenticated curl script with an OAuth bearer token" and never measured.
It is wrong, and the 401 I cited as confirming it came from my own mistyped URL,
which was missing the `/install_kdb/~latest~/` path segment. A guess that produces
a plausible error code is the most expensive kind.

Measured 2026-07-29, unauthenticated:
  .../install_kdb/~latest~/install_kdb.sh   200, byte-identical to the known-good
                                            local copy (63703 bytes, v1.11.0)
  .../kdb-x/~latest~/{l64,m64,l64arm}.zip   200
and the installer's own download_file() uses a bare `curl --fail -Lo` with no auth
header — the same conclusion reached from the other direction. The Developer
Center pre-populates `--oauth2-bearer <token>` in the command it hands you, which
is what made it look gated.

So q-verify now needs ONE secret, KX_B64LIC, which is already set. Nothing here
circumvents a licence check: kc.lic is still required for q to RUN and is still
the secret; only the download endpoint is open.

Also found while reading the installer, and worth more than the token fix:
setup_telemetry() runs q against the licence and tests `.z.l[4]` for "tld"; if that
matches it sets KX_UPLOAD_TELEMETRY=YES *before* reaching the non-interactive
branch that would default it to NO. docs/licensing-notes.md records the decision to
decline telemetry, and the author's local config has it NO — but on CI that would
have been left to whatever a licence flag says. Now forced to NO after install and
asserted, so the decision is deterministic rather than incidental.

Install invocation is `-y --b64lic`, which the script requires together; INSTALL_DIR
defaults to $HOME/.kx, so q lands at $HOME/.kx/bin/q.

Still not observed green end to end — the install has never completed on a runner.
Next step is a manual dispatch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nandanito
nandanito merged commit bef8203 into main Jul 29, 2026
1 check passed
@nandanito
nandanito deleted the ci/q-verify-no-token branch July 29, 2026 00:17
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