Repository navigation
trunk-merge/pr-1314/d8dbb2f9-acdf-431a-9216-54003b3524f5 - #1334
Closed
trunk-io[bot] wants to merge 7 commits into
Closed
trunk-io[bot] wants to merge 7 commits into
trunk-io[bot] wants to merge 7 commits into
Conversation
…-23372) analytics-cli 1.0.0 reads what `--token` / `TRUNK_API_TOKEN` holds before it calls Trunk: - `trunk_v2_...` is a v2 API key, sent as `Authorization: Bearer` for the gateway to exchange. - Three non-empty base64url segments is a Trunk JWT, sent on `x-trunk-token` (#1293's header) and never as a bearer. - Anything else is the organization token, refused before any call with how to create a v2 key (Settings → Developer → API Keys), the Upload test results permission it needs, and the 0.17.x pin. `upload` and `test` exit with an error, and `test` refuses before running the tests. The fork lane's `GITHUB_TOKEN` exchange is unchanged. On the three CLI endpoints, a 403 `INSUFFICIENT_PERMISSIONS` names the missing `upload_test_results` permission group and how to grant it, and a 401 for a JWT says it is expired or invalid (with its `exp` when past) and to re-run `trunk login --api-key` or pass an API key. The error report shows that explanation in place of the generic org-slug hint. A Trunk JWT lasts 15 minutes (auth-hydra's `ttl.access_token`), which a long `test` run or a plugin that looks up quarantine early and uploads late can outlive. The CLI does not refresh it; the 401 message and the docs say to mint it right before the upload step. `test_report` and the rspec gem apply the same rule: the gem asks the native extension (`RSpec::Trunk.token_refusal`) and stays off with a warning for an organization token. Telemetry is unchanged and still sends the token on `x-api-token`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…UNK-23916) `trunk login --api-key` was canceled. A Trunk JWT now reaches analytics-cli from `trunk flakytests upload`, exchanged from a key stored with `trunk auth api-key set`, and can have about a minute left, so the help text, the expired-JWT message and the docs point there instead of telling users to mint a 15-minute JWT themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… comment TRUNK-23371 is canceled; the JWT now comes from `trunk flakytests upload`, and a gem run should use a v2 API key (see the README's Credentials). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…149) analytics-cli 1.x refuses the organization token, so every step that runs the built CLI or the rspec gem now uses TRUNK_PROD_API_V2_TOKEN and TRUNK_STAGING_API_V2_TOKEN. The Dynamic CI filter steps keep TRUNK_PROD_ORG_API_TOKEN: they don't run analytics-cli. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-token pin (TRUNK-23149) Review follow-up. Messages, the --token help and the README link to https://app.trunk.io/settings/developer/api-tokens, which the web app sends to the viewer's org. The organization token keeps working on 0.17.x until December 1, 2027. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests ubuntu-latest is now ubuntu-26.04, where qemu-user-static is a virtual package with no installation candidate, so apt-get exits 100 before the smoke test runs. qemu-user-binfmt provides the user-mode emulators and registers binfmt_misc on both 24.04 and 26.04. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1334 +/- ##
==========================================
+ Coverage 85.76% 86.05% +0.29%
==========================================
Files 84 85 +1
Lines 19381 19538 +157
==========================================
+ Hits 16622 16814 +192
+ Misses 2759 2724 -35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
trunk-io
Bot
deleted the
trunk-merge/pr-1314/d8dbb2f9-acdf-431a-9216-54003b3524f5
branch
November 17, 2026 13:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was created and is being managed by Trunk Merge for the main merge queue.
This pull request is based on the main branch at SHA 31300453b14b11c7ec7a045a92fabd7d32b5a85c.
See more details here.
When CI completes, this pull request will be closed automatically.
Pull Requests Being Tested
This pull request is testing the changes from pull request 1314.