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 — feat(server): sync and write several experimental spaces in one request by kommander · Pull Request #66694 · anomalyco/opencode

Conversation

@kommander

@kommander kommander commented Nov 26, 2026 •
edited by opencodejr Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Issue for this PR

None; follow-up to #66668.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

One request now syncs or writes several spaces.

  • POST /api/experimental/space/sync (experimental.space.sync): { spaces: [{ space, cursor? }] } → { pages }. 1–100 distinct spaces, read in request order from one 500-row budget; once it is used up the remaining spaces are not read and get no page. Each page is one SQL statement (head and floor as indexed subqueries), so the separate head read and floor re-check are gone. Snapshot continuation pages are now type: "snapshot", so a client can drop keys absent from a snapshot after its last page.
  • POST /api/experimental/space/write (experimental.space.write): { changes: [{ space, key, value }] } → { spaces: [{ space, revision, cursor }] }. One transaction, per-space locks taken in sorted order.
  • Subscribe/unsubscribe: 1–100 distinct spaces; catch-ups share one 500-row budget, the rest get resync.

Removes GET /api/experimental/space/:space and POST /api/experimental/space/:space/write. Experimental, no flag.

How did you verify your code works?

Ported and added core/server space tests (shared budget, one statement per space with its query plan, multi-space atomic write, crossing writes, caps → 400); server suite, space tests 10x, bun run check, typecheck:tsc, migration --check, check:generated.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Public API: replaces the experimental space sync/write routes with batched POST /api/experimental/space/sync and /write, and caps subscribe/unsubscribe at 100 distinct spaces (breaking, experimental only)

Sorry, something went wrong.

Uh oh!

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

All reactions
@kommander
feat(server): sync and write several experimental spaces in one request
85baa47
@github-actions github-actions Bot added the contributor label Nov 26, 2026
opencodejr[bot]
opencodejr Bot reviewed Nov 26, 2026
View reviewed changes

@opencodejr opencodejr 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.

Looks good. I ran the server and space tests and type-checked server, core (with tests) and client: all clean. I also ran opencode serve from this branch and checked with curl: a multi-space write returns per-space heads; sync returns pages in request order from the shared 500-row budget and leaves later spaces without a page once it is used up; continuation pages are type: "snapshot" and are followed by a delta; a repeated space and an empty list return 400.

Public API (experimental space HTTP API and generated clients). This is not backwards compatible:

  • Removed: GET /api/experimental/space/:space and POST /api/experimental/space/:space/write.
  • Added: POST /api/experimental/space/sync ({ spaces: [{ space, cursor? }] } → { pages }) and POST /api/experimental/space/write ({ changes: [{ space, key, value }] } → { spaces: [{ space, revision, cursor }] }).
  • Changed: Space.Change now requires space. Snapshot continuation pages are type: "snapshot" instead of "delta" with an empty deleted. Sync, subscribe and unsubscribe take 1–100 distinct spaces (400 otherwise). Subscribe catch-ups share one 500-row budget.

Existing callers of these experimental endpoints need updating; nothing else in the repo uses them.

No blocking concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@kommander
kommander merged commit 9c3f831 into dev Nov 26, 2026
14 checks passed

Uh oh!

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

@kommander
kommander deleted the space-multi branch November 26, 2026 23:26
@github-actions github-actions Bot mentioned this pull request Nov 27, 2026
📊 AI CLI 工具社区动态日报 2026-11-27 litang9/big_model_radar#766
Open
@Edo771977 Edo771977 mentioned this pull request Nov 27, 2026
chore: merge upstream/dev into the fork Edo771977/opencode#102
Merged
@simonklee simonklee mentioned this pull request Nov 27, 2026
fix(cli-rs): port provider order and the service.json refusal, and fix CI-only test races #66776
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

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

Assignees

No one assigned

Labels

contributor

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

@kommander
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.