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): opt-in auto-cleanup policy (phase 3, #42) by Wibias · Pull Request #559 · 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

  • Adds opt-in archived auto-cleanup policy (storageCleanupPolicy, default enabled: false) with config persistence and GET/PUT /api/storage/cleanup-policy plus POST .../run.
  • Policy engine selects oldest archives (percent or reduce-to), runs Phase 2 executeArchivedCleanup in quarantine/permanent mode, defers on codex_busy, and records lastRun/nextRun; hooks startup + hourly schedule tick.
  • Storage page controls (enable/threshold/target/schedule/mode/Run now), docs + i18n; no Phase 2.1 restore UI.

Depends on Phase 2 (#529, merged). Independent of Phase 2.1 restore. Closes / toward #42 Phase 3.

Test plan

  • bun test tests/storage-policy.test.ts tests/api-storage-policy.test.ts
  • bun test tests/storage-cleanup.test.ts tests/api-storage-cleanup.test.ts (Phase 2 regression)
  • bun run typecheck
  • Manual: Storage page shows policy default OFF; enable + Run now quarantines oldest when over threshold
  • Manual: busy Codex defers without deleting; permanent mode shows GUI warning

Summary by CodeRabbit

  • New Features
    • Added an optional archived storage auto-cleanup policy that’s opt-in and disabled by default.
    • Added Storage page controls for thresholds, targets, schedule (manual/startup/daily/weekly), and quarantine vs permanent mode.
    • Included a “Run now” action with live status, last/next run details, and completion/skipped outcomes.
  • Documentation
    • Updated the Storage dashboard guide and configuration reference across supported languages to clarify the policy behavior.
  • Tests
    • Expanded automated coverage for the policy API, job concurrency, and UI responsiveness.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Wibias
feat(storage): add opt-in auto-cleanup policy (phase 3)
55e780a
Persist a default-OFF archived cleanup policy, evaluate it on startup/schedule/manual runs via Phase 2 helpers, and surface controls on the Storage page.
@Wibias
Wibias requested review from Ingwannu and lidge-jun as code owners July 27, 2026 15:38
@coderabbitai

This comment was marked as outdated.

Sign in to view
@github-actions github-actions Bot added the enhancement New feature or request label Jul 27, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

@Wibias
fix(storage): address phase-3 policy review and GUI lint
1ee3be6
Keep live config synced after background policy runs, execute exact
reduceToBytes candidate sets, preserve nextRun on unchanged schedules,
and harden the Storage policy UI against invalid drafts and raw errors.
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

@Wibias
fix(storage): harden phase-3 policy review tip findings
5b3e597
Reject cleared thresholds, fail closed on malformed targets, tear down scheduler on shutdown, and defer startup policy off the microtask queue.
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Wibias added 3 commits July 27, 2026 18:55
@Wibias
fix(storage): run cleanup policy off the proxy event loop
ee95740
Move archive scan/FS/SQLite cleanup into a Bun Worker behind a single-flight job controller so POST /run returns immediately and /healthz stays responsive.
@Wibias
fix(storage): avoid Windows CI timeouts in cleanup/policy tests
8c3c349
Replace the 100-file FS fixture with synthetic over-select math plus a small exact-path check, and raise timeouts on concurrent satellite restore cases that measure multi-second on Windows runners.
@Wibias
fix(storage): merge run metadata into latest cleanup policy on comple…
521232d
…tion

Reload persisted policy before saving lastRun/nextRun so concurrent PUTs during a long worker run are not silently reverted.
coderabbitai[bot]

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

@Wibias
fix(storage): settle aborted policy workers and harden Run-now UX
eeeabc5
Abort/reset now cancel the active worker promise and generation-guard late completions; GUI distinguishes already_running, aborts poll on unmount, and test-stream returns 404 when disabled.
@Wibias
Wibias merged commit 9dbcc24 into lidge-jun:dev Jul 27, 2026
9 checks passed

Uh oh!

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

@coderabbitai coderabbitai Bot mentioned this pull request Jul 27, 2026
fix(storage): harden #558 satellite backup writes and zst restore #571
Merged
3 of 4 tasks
@Wibias
Wibias deleted the feat/storage-phase3-auto-policy branch July 28, 2026 00:16
This was referenced Jul 30, 2026
fix(gui): denser Storage, API Access, Subagents, Usage, and Claude layouts #741
Merged
fix(storage): await Worker join in test beforeEach under isolate #827
Merged
test(storage): cap macOS isolate worker churn to avoid Bun segfault #849
Merged
agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
Merge pull request lidge-jun#559 from Wibias/feat/storage-phase3-auto…
706bff7
…-policy

feat(storage): opt-in auto-cleanup policy (phase 3, lidge-jun#42)
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
@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[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

enhancement New feature or request

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.