ci: fix failing bun test in ci.yml test job #2
Labels
No labels
bug
in-progress
needs-decompose
quickfix
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/oh-my-opencode-compression#2
Loading…
Add table
Add a link
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
ci.yml test job consistently fails at ~4 min on a real bun test failure (not CI plumbing). Repo has zero successful CI runs in its history. Forgejo 13.0.4 has no /actions/jobs/{id}/logs endpoint and run pages 404 within hours, so failure must be reproduced locally.
Approach
Acceptance
ci.yml workflow on Mark/oh-my-opencode-compression main produces a success run on Forgejo Actions with all jobs (block-main-pr skipped, test, typecheck, build, draft-release skipped) reporting success.
Substrate note
The kilo-gsd pre-dispatch gate (.gsd/gates/pre-dispatch.sh) was already installed on main in commit
c9cf4f06.References t_495c93e9.
Resolution
CI is now green on commit
cc54a70d. Run #39 reportssuccesson all jobs:block-main-pr: skipped (expected)test: success in 2m22stypecheck: success in 2m24sbuild: success in 2m30sdraft-release: skipped (expected; only runs ondev)Three commits closed the loop:
48d97a8a— fix(env-cleaner): bun 1.4+ coercesprocess.env.X = undefinedto the string"undefined"when iterated viaObject.entries(older bun stored null and was skipped by the=== undefinedcheck). ThecreateCleanMcpEnvironmentcleaner only handled the latter, so theskips undefined values from process.envtest inenv-cleaner.test.tsreceived the literal string"undefined"and failed under bun 1.4+. Fix: also skip the literal string.ab32f611— test(background-agent): spy onreadConnectedProvidersCacheandreadProviderModelsCachein theBackgroundManager.handleEvent - session.errordescribe block to returnnull, making the retry-path tests hermetic. Same pattern assrc/tools/delegate-task/category-resolver.test.ts.cc54a70d— fix(package): removed the orphaned self-referencing@oh-my-opencode/compressiondep that was inpackage.jsonbut unused (no imports anywhere in src/, bin/, script/). On bun 1.3.x this resolution fails outright; on bun 1.4+ it forces every CI run to re-resolve the upstream forgejo URL just to drop it on the next lockfile sync. Removing it lets the install match the committed lockfile and decouples CI from upstream forgejo reachability.Reproduction that confirms the fix:
bun --version 1.4.2 (744846f84)fromoven-sh/setup-bun@v2.1.3 bun-version: latest, install + full CI test command on the runner image produces 2198 pass / 0 fail in 64s.Refs t_495c93e9.