Skip to content

fix: remove access token logging from examples - #244

Open
volcano-staging[bot] wants to merge 1 commit into
mainfrom
volcano/lavaflow/776d2b79-f766-4b18-becf-06b2b57226a0
Open

volcano-staging[bot] wants to merge 1 commit into
mainfrom
volcano/lavaflow/776d2b79-f766-4b18-becf-06b2b57226a0

Conversation

@volcano-staging

@volcano-staging volcano-staging Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

For VOL-1831: the code examples no longer print bearer or refresh tokens. The access-token logs in the database quick-start, the authentication quickstart and the SDK refresh example now log a user ID, a check of whether a session exists, or a refresh success message. Full session objects in the JavaScript SDK error-handling examples are no longer logged. Authorization headers and SDK calls are unchanged.

Requested change. Implements the reporter's request.

Choices to confirm. This fix decides behavior beyond stopping the error. Read each choice with volcano cloud lavaflow show 776d2b79-f766-4b18-becf-06b2b57226a0 --json and confirm it before you merge.

Reviewer observations. LavaFlow's reviewers left 3 observations that don't hold this fix. Read them with volcano cloud lavaflow show 776d2b79-f766-4b18-becf-06b2b57226a0 --json.

Verification. Check the run details for recorded checks and this pull request for GitHub CI results. A test added or changed is not a claim that it passed.


An AI model wrote this change from a report and the repository files at a verified revision. The repository's configured CI can run on this pull request. A person reviews and merges this change.

LavaFlow run 776d2b79-f766-4b18-becf-06b2b57226a0. Run details.

Volcano LavaFlow run 776d2b79-f766-4b18-becf-06b2b57226a0.
@volcano-staging volcano-staging Bot added the Volcano LavaFlow Opened by Volcano LavaFlow label Nov 19, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@volcano-staging volcano-staging Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LavaFlow is reviewing this draft at c345fe1. Findings appear inline where the pull-request diff permits. See the run details for the complete review.

After the token log is removed, the sign-up example still destructures session from signUp() but never uses it. Readers may wonder why it is there. Suggested change: Destructure only what the example uses: const { user } = await volcano.auth.signUp({...}).

After removing the token log, the SDK signup example still destructures session from signUp() but never uses it, leaving a dangling variable in the snippet readers copy. The original line also carried the only note that the token is applied to queries automatically. Suggested change: Either destructure only { user } or keep a short comment such as // session tokens are stored and sent on queries automatically so the unused binding is explained.

@volcano-staging
volcano-staging Bot marked this pull request as ready for review November 19, 2026 19:31
@volcano-staging

Copy link
Copy Markdown
Contributor Author

LavaFlow won't merge this fix; it needs a person.

Why:

  • LavaFlow's fix makes 2 choices beyond stopping the error. Read each one in the LavaFlow run's choices, which volcano cloud lavaflow show lists with --json. Confirm each one, then merge the fix.

Review it, then merge or close it. LavaFlow won't push to, update, or merge it again.

LavaFlow run 776d2b79-f766-4b18-becf-06b2b57226a0.

@github-actions

Copy link
Copy Markdown
Contributor

AI review: no P0-P2 findings

Reviewed c345fe1. Run log

Docs-only change: the JavaScript examples in four pages now log a user ID, whether a session exists, or a short success message, where they used to print access tokens or whole session objects. The edits are correct and low risk. I searched the rest of content/ and found no other examples that print access or refresh tokens.

⚪ P3

  • content/platform/databases/quick-start.md:51 session is still destructured from signUp but is no longer used

🟣 Pre-existing

  • content/platform/authentication/quickstart.md:48 Sign-up quickstarts assume signUp returns a user and session, but content/sdk/js/authentication.md says it does not
  • content/sdk/js/durable-functions.md:739 A durable start example still logs data.client_token, a bearer credential for the execution

Not checked: The AI review read the diff, the code, and the PR's text; it ran no tests or builds and read nothing outside this repository.

Human review: not needed

@@ -46,7 +46,7 @@ if (error) {
}

console.log('User created:', user.id);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟣 Pre-existing: Sign-up quickstarts assume signUp returns a user and session, but content/sdk/js/authentication.md says it does not

content/sdk/js/authentication.md:47 says sign-up is session-less: it returns no user and no session unless signInWhenAllowed: true is passed. The authentication quickstart (here) and the database quick-start (content/platform/databases/quick-start.md:56) call signUp without that option and then read user.id. A reader following them gets a TypeError on a null user. The JSON block below this example also shows a session with tokens in the sign-up response. This PR rewrites the lines next to these but did not introduce the problem. A follow-up should add signInWhenAllowed: true or sign in before reading user.

Found by claude-opus-5-5

This branch has not been deployed

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

Labels

Volcano LavaFlow Opened by Volcano LavaFlow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant