Skip to content

fix(ci): stabilize windows advisory checks - #995

Merged
Astro-Han merged 3 commits into
devfrom
codex/fix-windows-advisory-990
May 30, 2026
Merged

fix(ci): stabilize windows advisory checks#995
Astro-Han merged 3 commits into
devfrom
codex/fix-windows-advisory-990

Conversation

@Astro-Han

@Astro-Han Astro-Han commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

Stabilize the merged-dev windows-advisory failures introduced around PR #990. There is no dedicated issue; this follows up the red windows-advisory run on dev SHA 6eb8585008ceb95ec12cc3928c3f829d43862809.

Why

The Windows advisory run failed in three opencode shards:

  • workflow Bun pin assertions compared POSIX expected paths with Windows path.relative() output
  • Windows shard path args such as test/git, test/file, and test/share could prefix-match sibling directories such as test/github, test/filesystem, and test/shared
  • the disabled-tool connect-timeout retry test coupled the core retry assertion to a very tight 20ms live HTTP timing window on Windows runners

The first PR CI pass also exposed a Linux unit-opencode timing fixture issue in global-session-activity-list.test.ts, where the fake Date.now() could be earlier than the synthetic reminder timestamp.

Related Issue

No issue. This is a narrow CI follow-up to the failed merged-dev windows-advisory run after PR #990.

Human Review Status

Pending

Review Focus

Please check the Windows advisory shard command change and the retry test boundary. The intent is to fix deterministic Windows test failures without changing production retry behavior.

Risk Notes

No visible UI or copy changed, so the UI check item is left unticked. Platform impact is limited to the Windows advisory workflow and Windows CI timing sensitivity. No dependency, docs, credential, deletion, or generated-file surface changed.

How To Verify

cd packages/opencode && bun test test/github/bun-version-workflow.test.ts test/github/ci-workflow.test.ts
Result: 16 pass, 0 fail

cd packages/opencode && bun test test/session/run-observability.test.ts
Result: 67 pass, 0 fail

cd packages/opencode && bun test test/session/run-observability.test.ts test/session/processor-effect.test.ts -t "disabled unknown tools"
Result: 2 pass, 0 fail

cd packages/opencode && bun test test/server/global-session-activity-list.test.ts
Result: 6 pass, 0 fail

Screenshots or Recordings

Not applicable. No visible UI changed.

Checklist

  • Type label — this PR carries exactly one of bug, enhancement, task, documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot's choice (or override if wrong), then tick this.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason> (default is Pending; "not required" is restricted to bot-authored low-risk PRs).
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings. Leave unticked only if no visible UI or copy changed.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant. Leave unticked only if none of those surfaces was touched.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

@Astro-Han Astro-Han added bug Something isn't working ci Continuous integration / GitHub Actions P2 Medium priority labels May 30, 2026
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 25 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ed6bd7b-12b9-40be-a6ca-849b6cd9f696

📥 Commits

Reviewing files that changed from the base of the PR and between 6eb8585 and 9c2bee2.

📒 Files selected for processing (6)
  • .github/workflows/windows-advisory.yml
  • packages/opencode/test/github/bun-version-workflow.test.ts
  • packages/opencode/test/github/ci-workflow.test.ts
  • packages/opencode/test/server/global-session-activity-list.test.ts
  • packages/opencode/test/session/processor-effect.test.ts
  • packages/opencode/test/session/run-observability.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-windows-advisory-990

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the harness Model harness, prompts, tool descriptions, and session mechanics label May 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested priority: P3 (only low-risk paths changed (.github/workflows/windows-advisory.yml, packages/opencode/test/github/bun-version-workflow.test.ts, packages/opencode/test/github/ci-workflow.test.ts, packages/opencode/test/session/processor-effect.test.ts, packages/opencode/test/session/run-observability.test.ts)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces cross-platform path normalization for GitHub workflow assertions, increases a connection timeout in a processor-effect test, and adds a test verifying that disabled unknown tools are excluded from retry boundary proofs. It also attempts to resolve a prefix-matching issue in Windows CI shards by targeting a specific test file (test/git/git.test.ts). Feedback suggests using a trailing slash (test/git/) instead of a specific file path to ensure future tests in that directory are executed, and highlights a similar prefix-matching issue with test/file that should be resolved with a trailing slash.

Comment thread packages/opencode/test/github/ci-workflow.test.ts Outdated
@Astro-Han
Astro-Han merged commit d358b18 into dev May 30, 2026
27 of 28 checks passed
@Astro-Han
Astro-Han deleted the codex/fix-windows-advisory-990 branch May 30, 2026 08:01
Astro-Han added a commit that referenced this pull request May 30, 2026
Root cause:
- PR #995 fixed the deterministic Windows advisory shard and path issues, but post-merge verification exposed two remaining Windows-sensitive test assumptions.
- The SessionRunState force-dispose lifecycle test used a fixed 10ms sleep as a startup barrier before force-disposing the instance; on Windows the run could still be outside the active work section, causing the fiber await to hit the 30s test timeout.
- The worktree rollback test used a pre-existing branch to force git worktree add -b to fail; a manual Windows advisory run showed that Git for Windows can hang on that failure path, masking the intended .gitignore rollback assertion.

Change boundary:
- Replace the SessionRunState fixed sleep with a Deferred signal from the run body, preserving the same interrupt-provenance assertion without scheduler timing dependence.
- Replace the worktree test failure trigger with a non-empty target directory, preserving .gitignore rollback coverage while avoiding the hanging existing-branch failure path.
- No production behavior, dependency, generated-file, docs, or UI changes.

Verification:
- cd packages/opencode && bun test test/session/run-state.test.ts -t "annotates runner interrupts caused by force instance disposal" -> 1 pass, 0 fail.
- cd packages/opencode && bun test test/session/run-state.test.ts -> 22 pass, 0 fail.
- cd packages/opencode && bun test test/project/worktree.test.ts -t "restores .gitignore when git worktree add fails" -> 1 pass, 0 fail.
- cd packages/opencode && bun test test/project/worktree.test.ts -> 15 pass, 0 fail.
- cd packages/opencode && bun test --timeout 30000 test/config test/project test/worktree test/file/ test/github test/settings test/settings.test.ts -> 456 pass, 3 skip, 0 fail.
- PR #996 checks all green: ci, codeql, dependency-review, desktop-smoke, e2e-artifacts, dev-dep-audit, pr-title-lint, pr-triage, CodeRabbit, semantic title.
- Manual windows-advisory on codex/fix-windows-run-state-dispose run 26679629780 attempt 2 -> success across all Windows shards.

Follow-up:
- After merge, verify dev post-merge ci and windows-advisory before final cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous integration / GitHub Actions harness Model harness, prompts, tool descriptions, and session mechanics P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant