Repository navigation
refactor(dashboard): share durable storage types - #1418
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 6:51 AM ET / 10:51 UTC. ClawSweeper reviewWhat this changesThe PR consolidates seven identical dashboard Durable Object storage type declarations into a shared type-only module and rewires those consumers to import it. Merge readiness✅ Ready for maintainer review This is a coherent, type-only cleanup: the shared definition preserves the seven consumers’ identical storage contract, and the submitted build and focused behavior evidence is strong. Keep it open for normal member-authored PR review rather than auto-closing it. Priority: P3 Review scores
Verification
How this fits togetherThe dashboard Worker uses Cloudflare Durable Object SQL storage for review lifecycle, publication, telemetry, snapshots, and writer coordination. This shared compile-time contract describes the storage interface passed into those components without changing their queries or runtime behavior. flowchart TD
A[Dashboard Worker] --> B[Durable Object storage]
B --> C[Shared storage type contract]
C --> D[Review lifecycle and publication]
C --> E[Telemetry and snapshots]
D --> F[Canonical records and GitHub publishing]
E --> G[OpenClaw Bay status]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Land the shared type-only contract after normal maintainer review, retaining the deliberately narrow scope around the seven matching consumers. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes compile-time declarations only; its submitted proof compares Worker output and exercises the affected dashboard stores. Is this the best way to solve the issue? Yes: one shared type-only declaration removes repeated contracts while preserving each consumer’s existing storage interface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 70a0a787eaf8. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(dashboard): share durable storage types This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What Problem This Solves
Seven dashboard storage modules independently declared the same structural Durable Object storage types, creating avoidable drift risk when that internal contract is maintained.
Why This Change Was Made
This change moves the exact existing
SqlStorageandDurableStoragestructural declarations into one type-only dashboard module and imports that type from the seven reviewed consumers. It changes no methods, SQL, classes, storage schemas, telemetry behavior, queues, Worker code, or runtime exports.The matching declarations in active failure-telemetry and queue work are intentionally excluded to avoid colliding with those in-flight branches; this is bounded collision avoidance, not an incomplete runtime migration. Their type shape and behavior remain unchanged.
User Impact
There is no user-visible or runtime behavior change. Dashboard storage typing now has one shared definition across the reviewed modules, reducing maintenance drift.
OpenClaw Bay Impact
OpenClaw Bay is unaffected. This is a type-only refactor with no dashboard data-contract, status, telemetry, public API, storage schema, or runtime change.
Documentation Impact
No documentation or changelog update is needed.
AGENTS.md,CONTRIBUTING.md, andVISION.mdwere reviewed; their runtime and operational contracts remain accurate because this is a pure internal type refactor.Evidence
7ca7921deddc2eac2454d10e6619860cfbfd3189git diff --checkpasses.origin/main: clean, no actionable findings.worker.jsmodules, 2,343,844 bytes each, SHA-256ea5311a80bd2f4cba4a340bbe8da1b88717a9698c15ff9da9d6e15827f5bd9b4. Parsed metadata was also identical with SHA-256e0d517989f901dcab9c22e5a7800a92374afb32ca1e2f182a35135a912f7c0e5. Raw transport hashes differed only because Undici generated different multipart boundary delimiters; application JavaScript was not normalized.run_4e8a06f5711f, leasecbx_ca0cd6d6f17a, Linuxc7a.8xlarge, Node.js 24.18.1, pnpm 11.10.0. Formatting, active-surface checks, dashboard boundary/strict checks, documentation checks, limits, all builds, and all lint targets passed. The test suite reported 4,824 passed, 1 failed, and 18 skipped. The sole failure was environmental: Crabbox's raw sync directory omitted.git, whiletest/apply-drift-refresh.test.tsinvokesgit rev-parse HEAD. The exact failed surface was rerun at the committed Git head in a Git checkout and passed 1/1 in 11.3 seconds. The lease was released.Real Behavior Proof
Claim
Consolidating the duplicate structural types does not change the generated dashboard Worker or the behavior exercised by the affected storage modules.
Exercised surface
Dashboard Worker build output plus lifecycle/publication, publication-batch, GitHub-egress, snapshot, and state-writer behavior.
Scenario or fixture
The unmodified base and committed candidate were built separately. Wrangler's multipart upload payload was parsed structurally with
Response.formData(), then the raw module bytes and metadata were compared. Focused repository fixtures exercised the seven affected storage consumers.Command and environment
node:testsuites.deploy --dry-runonly for baseline and candidate.run_4e8a06f5711f: Linux, Node.js 24.18.1, pnpm 11.10.0, fullpnpm run check.Observable result
The candidate Worker module and metadata exactly match the baseline. All 199 focused assertions passed. The full remote gate passed every static, build, lint, and product test except one checkout-dependent test that could not read absent Git metadata; that exact test passed from the committed Git checkout.
Artifact or trace
ea5311a80bd2f4cba4a340bbe8da1b88717a9698c15ff9da9d6e15827f5bd9b4e0d517989f901dcab9c22e5a7800a92374afb32ca1e2f182a35135a912f7c0e5run_4e8a06f5711fcbx_ca0cd6d6f17a(released)Limits
No live Cloudflare deployment was performed. The runtime proof is a pinned dry-run bundle identity comparison plus controlled repository tests. No live apply, close, queue, workflow, or GitHub mutation path was exercised. No Rank-up move applies to this bounded type-only refactor.