Skip to content

docs: SK-3253: Document automatic retry on 401 for expired bearer tokens - #450

Open
promptless[bot] wants to merge 2 commits into
mainfrom
promptless/sk-3253-bearer-token-401-retry
Open

promptless[bot] wants to merge 2 commits into
mainfrom
promptless/sk-3253-bearer-token-401-retry

Conversation

@promptless

@promptless promptless Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Open in Promptless

Documents the automatic one-time retry on 401 for expired SDK-generated bearer tokens, added in #449 (SK-3253). That PR merged into flowvault-release/26.10.28; publish this to main alongside or after that release reaches main.

Why

  • SK-3253:Add gated retry on 401 status code for flowvault SDK. #449 makes vault and Detect calls (skyvault) and all vault calls (flowvault) regenerate an SDK-generated bearer token once and resend a request that fails with 401 when the token is at or within 60 seconds of expiry.
  • The skyvault "Bearer token expiry edge case" section told readers to retry every such request themselves. That advice is now only needed for connection calls and setToken tokens.
  • The flowvault README didn't cover mid-call expiry, which affects bulk calls that send many batches under one token check.

Goal

  • skyvault/README.md: rewrites "Bearer token expiry edge case" to describe the automatic retry and when it applies, and to keep manual handling for connection calls and setToken. Replaces the detokenize retry example with a connection-call retry and fixes its sample link to the skyvault/samples path.
  • skyvault/samples/.../BearerTokenExpiryExample.java: updated to match the README example.
  • flowvault/README.md: adds "Bearer token expiry during a call" under Authenticate, including how the retry relates to timeout and maxRetries, what happens to the remaining batches when token generation fails, plus a TOC entry.
  • docs/api_reference.md: adds the new public Token.isExpiringWithin(String, long) method.
  • Non-goals: no CHANGELOG entry (release notes live in GitHub Releases).

Testing

  • Claims checked against BaseVaultClient, Token, both VaultClient classes, and ConnectionClient at the merged PR head d82f4f1d, including the follow-up change that stops retrying a token whose regeneration already failed.
  • cspell passes on the changed files with the repo's .cspell.json. The sample wasn't compiled; it uses the same APIs as the existing InvokeConnectionExample.

Trigger Events

@github-actions

Copy link
Copy Markdown

✅ Gitleaks Findings: No secrets detected. Safe to proceed!

Comment thread skyvault/README.md Resolved
Comment thread flowvault/README.md Resolved
Comment thread docs/api_reference.md Resolved
Comment thread flowvault/README.md Resolved
Comment thread flowvault/README.md Resolved
Comment thread skyvault/README.md Resolved
Comment thread skyvault/README.md Resolved
Comment thread skyvault/README.md Resolved
@github-actions

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.04%. Comparing base (e210d03) to head (4c02b17).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #450      +/-   ##
============================================
+ Coverage     91.00%   91.04%   +0.04%     
- Complexity        0      545     +545     
============================================
  Files           174      174              
  Lines          7350     7350              
  Branches       1013     1013              
============================================
+ Hits           6689     6692       +3     
+ Misses          437      435       -2     
+ Partials        224      223       -1     
Flag Coverage Δ
common 89.45% <ø> (ø)
flowvault 87.93% <ø> (ø)
skyvault 94.95% <ø> (+0.10%) ⬆️
unittests-flowvault 89.45% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Module: common 89.45% <ø> (ø)
Module: skyvault 94.95% <ø> (+0.10%) ⬆️
Module: flowvault 87.93% <ø> (ø)
Service Account 87.36% <ø> (ø)
Vault Data 90.81% <ø> (ø)
Vault Tokens 99.03% <ø> (ø)
Vault Connection 100.00% <ø> (ø)
Vault Controller 82.75% <ø> (ø)
Detect 100.00% <ø> (ø)
Audit 100.00% <ø> (ø)
BIN Lookup 100.00% <ø> (ø)
Config 96.26% <ø> (ø)
Utils 90.53% <ø> (+0.12%) ⬆️
Errors 100.00% <ø> (ø)
Enums 100.00% <ø> (ø)
Logs 95.60% <ø> (ø)
see 1 file with indirect coverage changes

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e210d03...4c02b17. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@promptless
promptless Bot marked this pull request as ready for review October 28, 2026 05:24
@github-actions

Copy link
Copy Markdown

✅ Gitleaks Findings: No secrets detected. Safe to proceed!

Comment thread flowvault/README.md Resolved
Comment thread flowvault/README.md Resolved
@github-actions

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants