Skip to content

Add progressive My Soundings previews and history refinement - #261

Draft
bkeepers wants to merge 19 commits into
mainfrom
codex/progressive-my-soundings
Draft

bkeepers wants to merge 19 commits into
mainfrom
codex/progressive-my-soundings

Conversation

@bkeepers

@bkeepers bkeepers commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

A fresh installation or chart-cache rebuild should show useful provisional soundings immediately, prioritize the visible area and recent tracks, and refine the result in place as history acquisition and QC progress.

Draft — release acceptance has not passed. The unpublished v51 candidate is not deployable: external round 3 found ordinary power cuts can wipe preview/acquisition progress.

Published and deployed state

The PR head is c2606d805413cef1f400ef036478cc0bbbd07742. The last verified Pi Docker deployment is progressive-20261125-v48, built from that checkpoint (tarball SHA1 a0a222fbe9e4d14dbc056f335101cb9a366861b2). It uses archive schema 7. Later local changes described below are not in this PR diff and are not installed on the Pi.

The published preview provides a worker-owned compressed observation archive, bounded spatial candidate queries, provisional rendering, segmented History acquisition, cancellation, archive recovery and renderer allocation reductions. The last-year-only history setting is removed; recency weighting is tunable. Whole-history tile pre-rendering remains disabled.

The last loaded Pi gate failed: northern viewport HTTP p95 was 634.9 ms with a timeout; Lake Worth had three timeouts and too few successful probes. Cold viewport failures, swap activity and I/O wait remain unresolved hardware evidence. Idle responses and isolated renderer improvements do not establish acceptance.

Latest-main check: fetched November 26. Main is now f11c71d5 (Actions dependency locking); this branch contains main through f35409ce and still needs the two newer commits integrated before the next published checkpoint.

Local candidate — not yet published

The larger local worktree now routes file-backed charts through canonical live/history selection, separate raw/legacy caches, bounded archive viewport reads and streamed QC snapshots. Schema 8 adds input revisions, bounded migration/recovery, generation-fenced commits and acknowledgements. Current fixes include:

  • Startup cache witnesses detect restoration of an older archive even within the same generation; cache commit stamps and archive acknowledgements are bounded to two cache roles.
  • Streamed reads reuse bounded per-snapshot decoded chunks/origins and enforce a whole-snapshot work budget. Local median read improvements were about 20% for live fixtures and 47% for History fixtures; these are not Pi measurements.
  • Pending indexes leave retryable holes without pinning older acquisition. Warm tide-service startup failure falls back after its grace period.
  • Complete history older than seven days is not downloaded daily. Metadata-incomplete windows use persistent retry cooldowns, without claiming completion: five minutes for recent windows, one day for older windows.
  • Identical recomputed QC output updates provenance/preview coverage without rewriting cells, moments or overviews. A local 500-pass publication benchmark reduced changed rows from 1328 to 3; it excludes archive acknowledgements and is not an SD-byte measurement.
  • The stationary simplifier has bounded worst-case work and preserves interpretation-metadata transitions. Production thinning/compaction is still not implemented; originals are not deleted.

A separately staged schema-7 v49 checkpoint also exists locally and passed its clean-tree checks; signing previously failed. Neither that checkpoint nor the larger schema-8 candidate has been committed/pushed here.

Validation

  • Published/deployed c2606d8: 731 tests/58 files and nine real Signal K E2E tests passed in its clean preview tree; repository and cross-platform CI passed at that checkpoint. Shared plugin integration was explicitly skipped; repository E2E ran separately.
  • Latest larger local full suite before the subsequent captured-preview fix: 939 tests/81 files passed, with build and plugin lint/publint. This run includes the output-write optimization, retry cooldowns and thinning-helper hardening. The subsequent v48 upgrade fixture passed its focused tests; the broader upgrade/store run passed 38 tests.
  • Latest real Signal K E2E: 9/9 passed in 47.40 seconds after the retry/output-write/thinning-helper changes. This is a local server run, not Pi acceptance or a CI result for unpublished code.
  • A fixture generated by the hash-verified deployed v48 tarball upgrades schema 7→8 without rewriting original chunks or partial-acquisition provenance. The actual old worker rejects the upgraded archive, accepts writes after restoring the schema-7 backup, and the separately preserved schema-8 archive retains its post-upgrade observation. These are synthetic package-to-package checks, not tests of the full Pi archive.
  • Pi access currently times out over SSH. No new device acceptance result is available.

Remaining release gates

  1. Publish the reviewed candidate, integrate latest main, and pass CI on that exact head.
  2. Deploy through Docker with verified database/package/config backups; exercise upgrade and rollback against the Pi archive.
  3. Pass cold-start and viewport acceptance while keeping Signal K responsive: first populated tile ≤500 ms, cold nine-tile view after round zero ≤1 s, full-model HTTP p95 <250 ms over at least 30 probes with no errors, repeated z13–15 views and browser workflows.
  4. Finish bounded storage compaction/thinning with configurable spatial/depth tolerance and 60–360 second maximum retained gap. Preserve tide-analysis evidence, define reduced-data weighting/QC semantics, protect snapshots across archive workers, and measure SD writes/RSS.
  5. Finish remaining refresh CPU work, capture/legacy overlap handling, lifecycle/recovery checks and obsolete-cache cleanup. Local passing tests do not close these gates.

Schema 8 deployment requires stopping and draining older archive clients. Rollback must preserve the upgraded archive separately and restore its matching pre-upgrade backup; never lower user_version or let older writers edit the upgraded archive. Independently recorded observations in rollback and preserved upgraded files are not automatically merged.

Review

The unpublished canonical series completed two external Open Waters rounds: round 1 completed Codex, Opus and Sonnet (Copilot failed quota); round 2 completed Opus and Sonnet. Their dependency maps and reports were read in full. Reviews were static and did not run hardware tests. Findings addressed locally include pending-index starvation, repeated decode work, same-generation archive restore, startup tide fallback, pending-reset intent and repeated history refresh. Refresh CPU costs and production storage compaction remain open. Round 3 completed Opus and Sonnet dependency maps and static reports, both read in full. Confirmed blockers: crash/witness mismatch can wipe all preview and acquisition checkpoints; close acknowledgement failure can terminate recovery; location-specific tide errors can pause the entire raw lane; slow tide startup can trigger repeated cache rebuilds. The captured-preview indexing hole found in that round is fixed locally with14 targeted tests and internal review. Conservative thinning metadata equality remains an acknowledged non-production limitation. v51 is marked nondeployable; witness protocol redesign and the other blockers remain open.

Subsequent focused internal reviews checked cache witnesses, retry cooldowns, output-hash publication and the v48 upgrade fixture. Review fixes included malformed witness recovery, moving-tail cooldown keys, and tying upgrade checks to the actual hash-verified tarball. Further production thinning requirements remain open. These checks are not whole-branch release sign-off.

Historical review rounds for published checkpoints

The renderer/correctness series completed three external Open Waters Codex rounds, with independent focused internal reviews. Round 1 found late shorter refinement overwrites, saved-offset GNSS validation bypass, and missing CAN-name-alias quality; all were fixed. Round 2 found no new issues. Internal follow-up caught stale aliases masking fresh samples and unnecessary recomputation of superseded windows; those were fixed and round 3 found no issues. All nine new correctness regressions fail against the respective earlier snapshots and pass after fixes. External reviewers mapped readers/writers and ran in-memory module checks; their read-only sandboxes did not execute Vitest or hardware/browser checks. Other external models were not retried after previously exhausting their account quotas. This is approval of those fixes, not whole-branch release sign-off.

Authorized Open Waters reviews cover the progressive layer, renderer, and archive work. Earlier rounds through 37 and 39–40 are recorded in the plan; round 38 lacked a completed Opus report. Subsequent review series produced fixes for import precedence, recovery, cursor progress, bounded worker reads, optional metadata, and QC parity.

Latest broad archive series: round 50 completed Codex, Opus and Sonnet (Copilot failed quota); rounds 51 and 52 completed Opus and Sonnet. Codex reproduced the obsolete-revision failure in memory; other reports were static. Findings led to canonical refinement ownership, retained origin metadata, preserved legacy ordering, rollback-safe coverage markers, bounded failure tracking, and quarantine that permits capture. The remaining malformed-manifest acquisition finding is fixed with worker-backed regressions.

Round 53 is a focused follow-up against the completed round-52 snapshot, covering that acquisition fix and the genuine-v2 CI fixture; it is not another full-PR review. Codex and Sonnet completed their dependency maps; Opus and Copilot failed quota and are not counted. Codex found no issues. Sonnet identified that a malformed exact manifest still prevents publication: this remains an explicit recovery limitation, because replacing it with a possibly pruned provider response would discard unknown owned coverage. New originals are preserved, but automatic replay recovery is not claimed. Low findings about broad recovery catches, concurrent retry behavior, and limited fixture coverage remain documented; the fixture is supplemented by corruption regressions and real-module Pi rollback checks. Sonnet’s claim that rollback restrictions were undocumented was checked against the existing explicit backup/preserve/restore instructions. Known limits above remain open; reviews and passing unit tests do not establish release acceptance.

A subsequent three-round focused startup review found that sequential stored-first reads could block recent content (Codex/Opus/Sonnet), and that paged pan-return could retain an incomplete in-memory marker (Opus). Both were fixed with regressions that fail before the fixes. First round: Codex and Opus completed full maps; Sonnet provided a partial map, and Copilot failed quota. Second round: Opus and Sonnet completed maps. Third round: Opus and Sonnet completed maps and found no high/medium issues. Opus’s low findings led to one additional spatial-hint pan test and clearer timeout documentation; no production code changed after that review. The 30 preview tests pass. A persistent non-timeout stored-index failure can still delay temporal backfill while the healthy sibling renders; this remains a known limitation. No schema change is introduced by the startup fix. Local synthetic worker/archive replay (18,000 observations) reached first preview in 22–28 ms while recent acquisition stalled; this is not Pi or browser acceptance evidence. After access resumed, the real v39-to-v43 upgrade/rollback check passed in Docker, and the same synthetic startup fixture reached first preview in 120–138 ms on the Pi. v43 is active; loaded viewport/HTTP acceptance still fails.

A further three-round bounded-acquisition review completed with external Codex dependency maps in all three rounds, supplemented by the focused code-reviewer (including cancellation reproductions and targeted tests). Claude Opus/Sonnet and Copilot attempts failed account quotas and are not counted. Findings fixed: healthy segmented hours exceeded the old total deadline; destroying an outer reader could continue acquisitions and publish completeness; empty/partial history deleted unmatched local preview rows (later refinement visibility remains unresolved); rollback could delete local cells while leaving a new completion marker. Regressions failed before the corresponding fixes. Round3 and the supplementary final review found no new high/medium issues in those fixes. Full local validation after fixes is 706 tests/57 files and nine E2E tests; committed production code matches the reviewed snapshot. Hardware acceptance and canonical routing remain open. The full review also reproduced cell/hour live-pass suppression of distinct historical evidence; this is explicitly unresolved and requires canonical observation selection before QC, not an approximate ledger deduplication. Internal segmented imports beyond the current hourly/1 Hz History contract can hit the 196-chunk limit and remain an unsupported extension.

The capture-index foundation at fdd43fb completed two further mapped external Codex rounds and independent internal review. The broad round reproduced open canonical overlap/revision blockers and additionally identified unmatched local preview retirement above. Internal review found identical-original retry failing to repair derived time headers, and same-day queries scanning candidates before their limit. Both were fixed with regressions that failed beforehand; the focused external follow-up and internal verification found no new issues in those fixes. External read-only probes covered all acquisition kinds, transactional repair rollback, out-of-order dateline pagination and a 100,000-candidate same-day query. The subsequent third external Codex round found no new issues in bounded import candidates. After it, internal review exposed the 64-page replay caller limit; the fix passed a failing-before 10,000-window offline regression and cancellation test, and an independent focused review. No fourth external round was run. This post-review fix is included in 3552ad1. Other external models were not rerun because their prior attempts exhausted account quotas. User-owned untracked upload scripts inspected by the external reviewer are outside this PR and remain untouched. The new index is not yet a production chart input, and original-ID reuse after future pruning plus older-writer rollback must be addressed before pruning is enabled.

Implementation plan · Performance evidence

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
crowd-depth-api c2606d8 Commit Preview URL

Branch Preview URL
Nov 25 2026, 10:11 PM

@pkg-pr-new

pkg-pr-new Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/crowd-depth@c2606d8

commit: c2606d8

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant