Dockerfiles bake DROBOTICFLOW_IMAGE_BUILD_COMMIT from a build-arg that
defaults to 'unknown', and the API prefers it over the deployment stamp, so
release images built without the arg reported buildCommit 'unknown'.
Add scripts/release-build-api-image.sh for release.py builds: it refuses
uncommitted tracked changes, passes the checkout commit and UTC build time,
pushes, and prints the digest reference for prepare --image. The general
build-and-push script now passes both args too. Document the step in the
release README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The physical source-index export failed the whole delivery for any kept slice
with zero exported IMU rows, even when its certificate's sampleCount was also
0 (a short slice or an IMU gap). Compare counts only, and write a
header-only imu.csv so every kept slice keeps the same file layout. A real
count mismatch is still rejected. operator-repos copy regenerated; the
package operator image must be rebuilt for this to reach deliveries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading a delivered index through the replica API (object storage disabled,
payload resolved from a workspace file) recognised the document and projected
the full split classification but exposed zero members, because the single
deliverable was only emitted for a durable object ref. The one output of this
delivery mode was therefore not downloadable in that situation. Fall back to the
dataRef payload path when no object ref exists.
Verify against the local replica for the first time: with the API running on the
snapshot Mongo, the members endpoint returns the kept and discarded slices with
their boundaries, action counts and discard reason, and the member content
endpoint returns part.json byte-identical to the delivered file. The delivery
package contents endpoint lists part.json as a final export artifact.
Add a boundary test over real materialization output: the Go acceptance test
builds genuine 60s stereo media (80 frames per slice) and slices it with ffmpeg;
the new test consumes that same revision and asserts the review layer keeps all
seven evidence files per slice while the delivered index contains no media
reference at all. It is opt-in behind FANYU_PART_INDEX_MATERIALIZATION_CONTEXT.
The replica fixture helper lives under the untracked local-data path; it tags and
removes exactly the records it creates and never touches object storage.
Add scripts/part_index_migration.py, which produces the missing part.json for a
part that was delivered in the directory form. It reuses the package operator's
own builder by loading the operator source the way the runner does, so a
migrated index is structurally identical to an online package and
byte-identical to what the same evidence would have produced, apart from a
lineage.migratedFrom marker. A test compares both routes on one evidence set to
keep the two from forking.
The tool never writes object storage: publication has to go through the
API/Worker path so the owner marker, conditional create and no-overwrite
guarantees stay in effect. It refuses to run when the delivery directory lacks a
completion manifest, when a slice has an unknown disposition, when the revision
has no per-slice disposition evidence, and when the part already has a part.json
with different bytes.
Also fix a leak found while building this: the index wrote the operator's
absolute workspace path into calibration[].path. It now records the logical
delivery-relative path, matching the directory form's packages-manifest, and
keeps the local location out of customer-facing output.
Verification: 19 operator and migration tests pass. tests/backend failure set is
identical to the HEAD baseline (25 failed, 829 subtests passed, 516 vs 525
passing), so no regression.
Add a PART_INDEX_DELIVERY mode to the package operator (default off): a part
delivers a single part.json carrying both split levels, the task-level slice
boundaries and the action-level segments, plus a classification for every
reviewed interval. Kept intervals land in slices[], discarded intervals in
discardedSlices[] with their discard evidence, which deliberately makes the
discard reason part of the customer deliverable. Media, PTS, IMU, pose and
calibration bytes are no longer published; downstream packaging resolves them
from the pinned materialization revision.
The worker publishes the index through the same frozen-destination path as the
directory form. Extract prepareDeliveryTarget so single-file and directory
publication share one owner marker, overlap guards, delegated-scope check,
conditional create, sha256 verification, idempotent retry and the refusal to
overwrite another delivery. A part index also refuses to adopt a destination
that holds files without an owner marker, so additive migration cannot claim a
legacy directory by accident.
The API and download control plane recognise the new schema, project the split
classification for the browser, and treat a part index as a first-class final
delivery. Cross-language contract tests read the operator's own schema and
field literals so a one-sided rename fails a test.
Verification: 10 operator tests, 8 worker tests and 3 API tests for the new
behaviour pass. Failure sets match the HEAD baseline name-for-name for
internal/api (75), internal/worker (4), tests/backend and the frontend suite;
no regression. The end-to-end local replica stack was not exercised: it needs
image builds and the opt-in Go materialization fixture, so the Go to operator
handoff is covered by the contract tests instead.