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(storage): add offline database inspection, backup and vacuum by romanilyin · Pull Request #1 · romanilyin/opencode

Conversation

@romanilyin

@romanilyin romanilyin commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Issue for this PR

Related: anomalyco#54618, anomalyco#41711. This fork PR is for v2 experiments while upstream design approval is pending.

Type of change

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

What does this PR do?

Add typed db inspect, db backup and db vacuum CLI commands behind a lazy Server facade. Maintenance opens only explicitly named existing files, without application bootstrap or migrations.

Backup includes committed WAL and verifies SQLite integrity/FKs. Vacuum requires --apply, a new verified recovery copy and exclusive ownership; an active WAL connection is rejected. The Bun readonly adapter also stops attempting to enable WAL.

This adapts the physical-maintenance foundation of anomalyco#41711 and credits Chris Huber in the commit. Logical event pruning, Storage UI and online jobs remain future work.

How did you verify your code works?

  • 14 Core tests / 59 assertions, 3 CLI tests / 16 assertions, and one import-boundary test passed.
  • Coverage includes WAL snapshots, table/payload parity, active-owner exclusion, NTFS/WSL aliases and preservation of existing backup sidecars.
  • Core/Server/CLI typechecks and root bun run check passed on WSL with Bun 1.4.2.
  • Root check used the target contents of two tracked custom-elements.d.ts symlinks; checkout bytes were restored before commit.

Next, I can verify native Windows/Node, measure copied v2/migrated databases, and refine the interface after design feedback. I would open the upstream PR after design approval.

Screenshots / recordings

Not applicable; this adds CLI commands.

Checklist

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@romanilyin @chubes4
feat(storage): add offline database maintenance
cf74739
Adapt inspection, verified backups and physical vacuum from anomalyco#41711 at
adaf4b8 to the V2 database, server facade and CLI command structure.
Require explicit file paths and exclusive database ownership for vacuum.
Preserve logical rows and event histories; leave retention to a V2 design.

Co-authored-by: Chris Huber <[email protected]>
@romanilyin romanilyin mentioned this pull request Oct 11, 2026
[FEATURE]: V2 offline SQLite inspection, verified backups and vacuum anomalyco/opencode#54618
Closed
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

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