Running gitlab-duo.test.ts in a build permanently overwrites auth.json #7711

Open
opened 2026-02-16 18:07:59 -05:00 by yindo · 1 comment
Owner

Originally created by @krisvandebroek on GitHub (Jan 27, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I wanted to contribute to the docs of opencode. As a good citizen, I ran the tests in opencode to make sure that I did not break any linting rules.

Shortly afterwards, I noticed that my credentials did not work in opencode.
I checked ~/.local/share/opencode/auth.json and instead of my api keys, it contains:

{"gitlab":{"type":"api","key":"glpat-test-pat-token"}}

One of the running tests was gitlab-duo-tests.ts. According to my AI coding Agent that test overwrites the auth.json but does not revert that change like amazon-bedrock.test.ts correctly does.

Can you correct this gitlab-duo-tests.ts file?

Plugins

No response

OpenCode version

1.1.36

Steps to reproduce

I think it was bun run lint that ran the tests and caused the issue.

Screenshot and/or share link

No response

Operating System

macOS 15.7.2

Terminal

Ghostty

Originally created by @krisvandebroek on GitHub (Jan 27, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I wanted to contribute to the docs of opencode. As a good citizen, I ran the tests in opencode to make sure that I did not break any linting rules. Shortly afterwards, I noticed that my credentials did not work in opencode. I checked ~/.local/share/opencode/auth.json and instead of my api keys, it contains: {"gitlab":{"type":"api","key":"glpat-test-pat-token"}} One of the running tests was gitlab-duo-tests.ts. According to my AI coding Agent that test overwrites the auth.json **but does not revert that change** like amazon-bedrock.test.ts correctly does. Can you correct this gitlab-duo-tests.ts file? ### Plugins _No response_ ### OpenCode version 1.1.36 ### Steps to reproduce I think it was `bun run lint` that ran the tests and caused the issue. ### Screenshot and/or share link _No response_ ### Operating System macOS 15.7.2 ### Terminal Ghostty
yindo added the bug label 2026-02-16 18:07:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 27, 2026):

This issue might be a duplicate of an existing issue. Please check:

  • #10370: [BUG] Tests overwrite user auth.json - This appears to be the same root cause issue where tests were overwriting user auth.json instead of using a test sandbox

Feel free to ignore if your specific case differs from the linked issue.

@github-actions[bot] commented on GitHub (Jan 27, 2026): This issue might be a duplicate of an existing issue. Please check: - #10370: [BUG] Tests overwrite user auth.json - This appears to be the same root cause issue where tests were overwriting user auth.json instead of using a test sandbox Feel free to ignore if your specific case differs from the linked issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7711