GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(storage): cover restore test-stream route gate cases by Wibias · Pull Request #574 · lidge-jun/opencodex

Conversation

@Wibias

@Wibias Wibias commented Jul 27, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Follow-up for merged #571 / CodeRabbit review:

  • Codex P2s on fix(storage): harden #558 satellite backup writes and zst restore #571 (short-write loop + renameAtomicFile) were already merged in ba53cc0e / squash c573bd9d.
  • Remaining CodeRabbit ask: expand regression coverage for GET /api/storage/trash/restore/test-stream.

Added coverage

  1. Env unset + hooks enabled → JSON 404 { error: "not_available" } (already present; kept)
  2. Env=1 but stream hook null → JSON 404 (new)
  3. Env=1 + enableTestStream → 200 text/plain with chunked body (new)

Test plan

  • bun test tests/storage-restore-job-responsive.test.ts --test-name-pattern test-stream
  • bun run typecheck
  • CI green

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling when restore test streaming is unavailable, returning a clear not-available response.
    • Verified that enabled restore test streaming responds successfully with the expected stream content.
    • Confirmed health and streaming endpoints remain responsive during blocked restore processing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Wibias
test(storage): cover restore test-stream route gate cases
092f199
Address CodeRabbit on #571: assert JSON 404 when the stream hook is null
under OPENCODEX_CLEANUP_TEST_HOOKS=1, and that the enabled stream path returns
the text/plain chunked response.
@Wibias
Wibias requested review from Ingwannu and lidge-jun as code owners July 27, 2026 21:29
@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Jul 27, 2026
@Wibias

Wibias commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up for CodeRabbit on merged #571: adds the null-hook JSON 404 and enabled-stream path coverage.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Wibias, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 17 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ebba8dcc-83a7-410a-bb17-eac2f8f5fa49

📥 Commits

Reviewing files that changed from the base of the PR and between 092f199 and ca9240f.

📒 Files selected for processing (1)
  • tests/storage-restore-job-responsive.test.ts
📝 Walkthrough

Walkthrough

Adds regression coverage for the restore test-stream endpoint’s unavailable response and validates successful plain-text streaming when the cleanup test hook is enabled.

Changes

Restore test-stream coverage

Layer / File(s) Summary
Endpoint availability and streaming assertions
tests/storage-restore-job-responsive.test.ts
Adds assertions for HTTP 404 JSON { error: "not_available" } without enableTestStream, and HTTP 200 text/plain output containing chunk-0 and chunk-7 when enabled.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • lidge-jun/opencodex#558: Adds the restore-job test-hook and endpoint wiring exercised by these tests.
  • lidge-jun/opencodex#571: Updates the endpoint’s disabled-hook response and related test assertions.

Suggested labels: bug

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the new storage test coverage for restore test-stream route gate cases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

coderabbitai[bot]
coderabbitai Bot reviewed Jul 27, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/storage-restore-job-responsive.test.ts`:
- Around line 88-101: Update both restore test cases around
setRestoreTrashJobTestHooks and OPENCODEX_CLEANUP_TEST_HOOKS to save each test’s
prior environment value, then restore it and call
setRestoreTrashJobTestHooks(null) in a nested finally alongside server shutdown.
Ensure cleanup runs on every path so module-level hooks, including
enableTestStream, cannot leak into later tests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e3551c7f-8e5a-44a2-a2df-bc71846bc024

📥 Commits

Reviewing files that changed from the base of the PR and between c573bd9 and 092f199.

📒 Files selected for processing (1)
  • tests/storage-restore-job-responsive.test.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/storage-restore-job-responsive.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
test(storage): isolate restore test-stream route env and hooks
ca9240f
Reset OPENCODEX_CLEANUP_TEST_HOOKS and restore-job hooks in a nested finally
so enableTestStream cannot leak across cases in the responsive suite.
@Wibias
Wibias merged commit 0539705 into lidge-jun:dev Jul 27, 2026
9 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
Wibias deleted the fix/571-test-stream-coverage branch July 28, 2026 00:16
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
test(storage): cover restore test-stream route gate cases (lidge-jun#574
c9433b3
)

* test(storage): cover restore test-stream route gate cases

Address CodeRabbit on lidge-jun#571: assert JSON 404 when the stream hook is null
under OPENCODEX_CLEANUP_TEST_HOOKS=1, and that the enabled stream path returns
the text/plain chunked response.

* test(storage): isolate restore test-stream route env and hooks

Reset OPENCODEX_CLEANUP_TEST_HOOKS and restore-job hooks in a nested finally
so enableTestStream cannot leak across cases in the responsive suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Wibias
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.