Skip to content

Add support for new data - #211

Merged
fank merged 9 commits into
OCAP2:mainfrom
YetheSamartaka:new-data
Oct 17, 2026
Merged

fank merged 9 commits into
OCAP2:mainfrom
YetheSamartaka:new-data

Conversation

@YetheSamartaka

Copy link
Copy Markdown
Contributor

Stores and exports the new recording data from OCAP2/addon#128

Added

  • Commands for gear, medical, stamina and radio snapshots.
  • Custom icons and rotation for placed objects.

Fixed

  • Radio transmissions missing from JSON exports.
  • Recordings ending before their last event or time sample.

@fank
fank self-requested a review October 17, 2026 16:18
@fank

fank commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Ratatoskr reviewed this pull request.

Changes requested on 6a64adc2. See the review.

Finished 2026-10-17 16:28 UTC.

@fank fank left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REQUEST_CHANGES — 2 correctness findings, including silent loss of placed-object data.

Review details

Reviewed head 6a64adc251c4e27f413b08f96bcfe3e6a5793076.

  1. [P2] Persist the new placed-object fields through the database converter. internal/model/model.go:624–625: adding the columns is insufficient because CoreToPlacedObject (internal/model/convert/to_gorm.go:305–319) never copies Direction or MarkerIcon. PostgreSQL calls that converter in AddPlacedObject, and SQLite embeds the same backend. Consequently every trench recorded through either database backend silently loses its heading and custom icon. A conversion repro with Direction:137.5, MarkerIcon:"trench_long" returns 0, "". Copy both fields and add a converter regression test.

  2. [P2] Include the remaining exported timestamps in the new mission-end calculation. internal/storage/memory/export/v1/frames.go:38–44: this checks top-level hit events but omits hits nested under PlacedObjects, which both exporters separately emit. With the last soldier state at internal frame 10 and a placed-object hit at frame 40, Build produces endFrame:9 alongside a hit event at frame 39, still outside playback. Projectile hits/trajectory points and marker changes are also absent from this scan. Account for the timestamps emitted by those paths and pin the late nested-event case for both Build and Stream.

Verification

  • PATH=/tmp/go1272/go/bin:$PATH go test ./internal/... — passed.
  • Two focused regression tests in an external copy (/tmp/ocap211-repro), run with go test ./internal/model/convert ./internal/storage/memory/export/v1 -run TestReview -count=1 — failed as expected, reproducing the exact values above. The reviewed checkout was not modified.
  • Full go test ./... could not build cmd/ocap_recorder and pkg/a3interface: this environment has CGO_ENABLED=0 and no GCC. Docker fallback was unavailable because access to its daemon socket is denied.
  • GitHub test and build checks passed. The failed coverage-report job ends with Resource not accessible by integration (addComment); that is a reporting-permissions failure, not evidence of a code defect.
  • GraphQL review-thread enumeration returned no threads (hasNextPage:false); there are no earlier discussions to resolve or continue.

Database backends dropped placed-object direction and icon, and the v1 end frame stopped before placed-object hits, projectile samples and marker moves.
@YetheSamartaka
YetheSamartaka requested a review from fank October 17, 2026 19:53
@fank

fank commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Ratatoskr reviewed this pull request.

Approved on d6ed4dd6. See the review.

Finished 2026-10-17 19:58 UTC.

@fank fank left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — 0 blocking findings.

Review details

Reviewed head d6ed4dd62ab0ca3036c8aaef3292e9a7241f7239 against the base, including surrounding parser, worker, storage and export code and the addon sender contract.

  • Snapshot commands retain the existing general-event storage path; snapshot diffOf references are rebased consistently with exported event frames.
  • Both exporters include radio transmissions and placed-object icons/headings. Shared frame accounting includes late events, time samples and nested marker/projectile timestamps. Tests cover legacy placed-object calls, snapshot rebasing, late timestamps and exporter equivalence.
  • No existing review threads were returned by the GraphQL review-thread query (pagination exhausted); none resolved or skipped.

Verification: With /tmp/go-toolchain/go/bin prepended to PATH, go vet ./internal/... passed. go test ./... passed all internal packages and pkg/core, but failed overall in the CGo-dependent entry-point/interface packages with CGo disabled. Retrying with CGO_ENABLED=1 could not compile because gcc is unavailable. Docker access is also denied, so native DLL/shared-library builds were not run locally. No checkout files were modified.

GitHub test and build jobs passed. The coverage-report job failed while posting its report (Resource not accessible by integration (addComment)), not from a test or coverage assertion failure.

@fank
fank merged commit e48654e into OCAP2:main Oct 17, 2026
2 of 3 checks passed
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.

2 participants