os-backlog tests run with the real FORGEJO_TOKEN and GITHUB_TOKEN #1728
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1728
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The os-backlog test process inherits the real
FORGEJO_TOKENandGITHUB_TOKENfromENV.Backlog::Host::Forgejo.newandBacklog::Host::GitHub.newdefault toenv: ENV. They build a real client whenclient:is nil. When a defect drops the test client, a test builds a real authenticated client.WebMock now blocks the request (commit
2cd91dd8d). ButWebMock::NetConnectNotAllowedErrorprints the request headers. So the real token values appear in the test output.Observed on 2026-11-12: a hand run of the suite with line 26 of
lib/backlog/project.rbremoved printedAuthorization: token ...with the real values.Reproduce
Remove line 26 of
plugins/os-backlog/lib/backlog/project.rb(@connection = context.except(:state_dir, :git)). Run the os-backlog suite. Read the output of the failing tests.Do not copy any token value from the output.
Approach
Leave open which fix to use: the tests give the hosts a fake env, or the test helper starts with fake token values.
Required work: none beyond the acceptance criteria.
Acceptance criteria
Origin
VERDICT: CREATE (ticket-skeptic, 2026-11-12): no open ticket covers this work.
Resolution
Done: Backlog::Host::Forgejo and Backlog::Host::GitHub now default to env: {} instead of env: ENV. Library code never reads ENV; the bin/ scripts pass env: ENV as before.
Evidence: main
4e89450c7. Reproduction (project.rb:26 removed) with fake sentinel tokens in ENV: sentinels in 155 output lines before the fix, 0 after; 0 Authorization lines. Full suite 820 runs, 0 failures.Follow-ups: none