Repository navigation
Upgrade Go to 1.27 - #625
Conversation
Merging this branch will not change overall coverage
Coverage detailsCompared to commit 1979cd5 (run #46477815413)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
|
Ratatoskr reviewed this pull request. Approved on Finished 2026-11-30 22:13 UTC. |
fank
left a comment
There was a problem hiding this comment.
APPROVE — 0 blocking findings.
Review details
Reviewed head 91f1bb64a0368dca5f88be4f0f62c57418e9f824 against base 1979cd51bb45af5af54b5cff76912e732e2a94bd, including the recording changes beyond the title. No actionable correctness or safety defects identified.
- Traced protobuf-only finalization and failure propagation (
internal/server/handler_stream.go:933), legacy download reconstruction (internal/ingestion/export_v1_from_v2.go:20), and the bounded/cancellable download path (internal/server/recording_download.go:28). Existing JSON downloads retain priority. The registered non-root-prefix viewer-route test covers authorization and native export, including missing/corrupt artifacts (internal/server/route_access_test.go:86). - Reviewed capture-delay rounding, visitor-based position conversion, and transactional v16 indexes plus iteration-error handling. New tests exercise conversion parity, cancellation, rollback, and downstream results.
- Inspected CI run 46521814329: Go 1.27.4, embedded frontend build,
go test -coverprofile=cover.raw -coverpkg=./cmd/...,./internal/... ./..., and backend build succeeded. Downloaded coverage confirms 196/196 statements in the exporter, 36/36 in recording downloads, 292/292 in the v1 parser, and 309/309 in the operation repository. - Local
go version,go test ./..., andgo run ./cmd/ocap-testkit run stream-recovery --racecould not execute:go: command not found. No local test or race success is claimed. No UI source changed; no browser rendering or deployed-producer acceptance was performed. - GraphQL review-thread enumeration returned no threads (
hasNextPage: false): none to resolve, keep open, or skip. Authenticated reviewer:fank.
The reviewed checkout was left unchanged. Approval is the code-review verdict, not a bypass of required checks.
Streamed native v2 recordings are saved as before: with a v1 .json.gz copy and the debug manifest.json, and from the v1 JSON when writing v2 fails. Two settings opt out: - streaming.protobufOnly stores them without the copy and manifest.json; downloads convert them to v1 JSON on request. - streaming.disableV1Fallback fails the save instead of falling back and deletes a v1 copy written for it. The producer gets no acknowledgement, and a resumable extension resends the mission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ratatoskr reviewed this pull request. Approved on Finished 2026-12-01 09:05 UTC. |
fank
left a comment
There was a problem hiding this comment.
APPROVE — 0 blocking findings.
Review details
Reviewed fb49ee08af38cffb9affb5957bc12f77c1bb3dc6 against 1979cd51bb45af5af54b5cff76912e732e2a94bd. No concrete correctness, data-loss, or authorization regression found after tracing finalization failures, download reconstruction, registered viewer access, and legacy conversion consumers.
Local verification (Go 1.27.4, PATH=/tmp/gotool/go/bin:$PATH):
go test -count=1 -coverprofile=/tmp/pr625-coverage.out ./internal/ingestion ./internal/storage ./internal/conversion ./internal/maptool— passed; each package reports 100% statement coverage. Inspected affected-function coverage withgo tool cover -func=/tmp/pr625-coverage.out.go test ./...— unsuccessful locally: SQLite-dependent server, webserver, and convert CLI tests cannot initialize SQLite because this environment lacks a C compiler and usesCGO_ENABLED=0. This is a verification limitation, not evidence of a PR defect. Local CGO-dependent integration, race, and stream-recovery testkit checks remain unverified; native map pipeline tooling was not independently exercised.- GitHub's current
testandCode coverage reportchecks both succeeded. No UI source changes; no visual verification performed.
Earlier discussions: GraphQL review-thread enumeration returned no threads (hasNextPage: false). Resolved: 0; still open: 0; skipped: 0. No discussion mutations were needed. Confirmed the PR head remained unchanged before publication; reviewed checkout left unmodified.
go.mod). The README now states the real requirement; it said Go 1.26+..json.gzcopy and the debugmanifest.json, and if writing v2 fails the mission is saved from the v1 JSON instead.streaming.protobufOnly(OCAP_STREAMING_PROTOBUFONLY, defaultfalse): store native v2 recordings without the v1 copy andmanifest.json.streaming.disableV1Fallback(OCAP_STREAMING_DISABLEV1FALLBACK, defaultfalse): if writing the v2 recording fails, the save fails instead of falling back to v1 JSON. The producer gets no acknowledgement, the recording is marked failed, and a resumable extension sends the mission again from its spool. Any v1 copy written for that save is deleted./data/<name>.json.gz) still serves stored v1 JSON files. For a native v2 recording stored without its v1 copy, it generates v1 JSON from the protobuf when downloaded, one export at a time so parallel downloads can't exhaust memory.connected/disconnectedevents, matching the extension's v1 format.operations(date)andoperations(conversion_status, id). The mission list is explicitly ordered by id, and errors during row iteration are reported instead of returning partial results.testing/synctest, fixing data races. New tests cover the export, the download route through the prefixed mux, both storage settings (saves, v2 failures with and without the fallback) and the migration.setting.json.example, streaming architecture and testkit docs and cases updated. AGENTS.md describes the default storage and the two settings.Go 1.27 features used (benchmarks: synthetic recording of 100 entities over 1,000 frames, Go 1.26.11 vs 1.27.4, benchstat, n=12):
compress/flatewas rewritten in Go 1.27. Re-tuned for it, precompressed playback sidecars use default gzip compression instead of best: conversion went from 563 ms to 193 ms (−66%) and the gzip files were 4.7% smaller. On Go 1.27 the default level compresses this data better than the best level.encoding/json/v2is available by default in Go 1.27, withoutGOEXPERIMENT. The v2 to v1 download writes JSON straight into the gzip stream withMarshalWritein v1-compatible mode, instead of building it in memory first.The
goroutineleakprofile is always available in Go 1.27 (Go 1.26 neededGOEXPERIMENT). An optional stream-recovery diagnostic uses it (OCAP_STREAM_LEAK_PROFILE=1).Tests use
httptest.NewTestServer, new in Go 1.27.Trade-off: on Go 1.27,
encoding/jsonruns on the new v2 engine, so legacy JSON conversion makes 33% more allocations, uses 10% more memory and takes about 5% longer than on Go 1.26. The web has used this engine since moving to 1.27.2. This PR streams parsed positions straight into chunk buckets, which cuts conversion memory by 8.6%; the number of allocations is unchanged.Verified locally: Go statement coverage 100% in every changed package, race detector clean on the server, ingestion, storage, conversion and maptool packages, testkit
stream-recoverycase passes.