168 Commits

Author SHA1 Message Date
Codex
6b42476962 ♻️ Make annotator deletion handoffs recoverable 2026-11-11 03:51:18 -08:00
Codex
f4e147e355 🐛 Enforce V4 delivery for legacy release runs 2026-11-08 10:00:31 -08:00
Codex
d6dac755b9 🐛 Fix human release sweeper timeouts and duplicate unstarted capture prefix conflicts 2026-11-03 09:35:03 -08:00
Codex
7b7da08a44 ⚡ Decouple Capture status reconciliation from source discovery 2026-11-02 10:09:18 -08:00
Codex
db4182217f ⚡ Avoid unchanged Capture reconciliation writes 2026-11-02 09:51:53 -08:00
Codex
63714753a9 🛡️ Gate invalid source tasks and fix complete review pool search 2026-11-02 02:36:30 -08:00
d-robotics
63512da71f 🐛 Preserve confirmed annotation frames and enforce v4 time evidence 2026-10-22 12:54:08 +08:00
d-robotics
a777c42c4e 🚀 Prepare isolated v4 activation with safe workflow handoff and tag seeding 2026-10-22 00:58:27 +08:00
d-robotics
1469e1d9e1 🛡️ Harden classification saves and recover frozen delivery selections 2026-10-21 09:57:40 +08:00
d-robotics
9546810895 ✨ Preserve accepted classifications and separate private delivery audits 2026-10-21 09:24:44 +08:00
d-robotics
7be23604d7 📦 Publish immutable delivery index batches with native v3 packages 2026-10-20 12:14:56 +08:00
d-robotics
04e872ac85 ✨ Add gated source-backed slice revisions and capacity verification 2026-10-17 00:47:52 +08:00
d-robotics
23087c63b8 🐛 Advance materialization cleanup fairly across queues and pages 2026-10-15 13:52:00 +08:00
d-robotics
a76390da86 ✨ feat: materialization generation cleanup (maintenance-backlog#01, B06 §11.1)
- worker maintenance job (hourly, batch of 3 tasks/tick): terminal-only
  (accepted/rejected) tasks keep the newest K=2 materialized generations,
  older generation directories are reclaimed from disk
- ownership filter by artifact ID marker prevents cross-task deletion;
  path traversal rejected at identifier level (Join-cleaning-proof) plus
  reconstructed-path prefix containment
- source video artifacts, rework baselines (embedded data), and formal
  records are never touched; artifact records stay as tombstones per
  spec §7 graceful-degradation semantics; rescans are idempotent no-ops
- tests: K=2 retention + source/other-task isolation, non-terminal and
  shallow-history skips, traversal rejection - all green
2026-10-13 07:33:24 +05:30
d-robotics
0c5f34f79a 🐛 Fix part-index delivery: unbounded payload peek, no pose frames, explicit re-delivery for migrated parts 2026-10-09 02:23:20 -07:00
d-robotics
7b5604f9e0 🧾 Deliver one part index JSON instead of sliced directories
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.
2026-10-09 00:28:50 -07:00
d-robotics
05f2dc1499 🚦 Prioritize bounded recovery runs 2026-10-01 03:08:27 -07:00
d-robotics
d6576f6d1c 🔀 Resolve PR #29 conflicts with current dev 2026-09-30 02:44:25 -07:00
d-robotics
dc81aaf5fe 🐛 Preserve deployed worker retry protections before scheduler rollout
(cherry picked from commit 6f8b6a7f01bfdbb55f501c60e121ede64d52c5a4)
2026-09-29 08:54:35 -07:00
d-robotics
4a364b1352 🐛 Fix review binding races and unblock worker dispatch
(cherry picked from commit ea9dd2fc79cac1a3c2c02fe34ad9491119a4a848)
2026-09-29 08:54:35 -07:00
d-robotics
8888bac685 ✨ Add scoped supplier project authorizations and public task pool 2026-09-27 09:06:33 -07:00
d-robotics
949daabd02 🔒 Enable scoped internal test slicing and delivery 2026-09-27 07:09:58 -07:00
eust-w
21277a1887 ✨ Archive old terminal runs to bound org-wide scan cost
An organization's run history grows unbounded and nothing ever shrinks
it — completed/failed/cancelled runs stay in the runs collection
forever, only removed if their whole project is later deleted. That
made every org-wide scan (most notably validateDeletionReferences'
deletion-safety check, and any other query through
ListRunArtifactsByOrganization) get proportionally slower over time as
an org's run count kept climbing, independent of the size of whatever
was actually being operated on. Live on Fanyu this showed up as project
deletion getting slower every day, driven entirely by an unrelated
capture-processing backlog continuously adding new runs to the same
organization.

Adds RunRecord.ArchivedAt and a periodic worker sweep
(archiveTerminalRuns, mirroring the existing orphan-runtime
reconciliation's throttle pattern) that marks completed/failed/cancelled
runs whose EndedAt is older than WORKER_RUN_ARCHIVE_MIN_AGE_SECONDS
(default 30 days) as archived, checking at most every
WORKER_RUN_ARCHIVE_CHECK_INTERVAL_SECONDS (default 1 hour). Archiving
never deletes anything — ListRunArtifactsByOrganization now excludes
archived runs so the hot-path org-wide scans stay bounded, but
ListRunArtifactsForProject (used when a project is actually being
deleted) still includes them, since a project's own deletion must still
clean up every run it ever had regardless of archive state. A run's
data is only actually removed when its project is deleted, unchanged
from today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 14:02:34 +08:00
eust-w
106235bb02 ✨ Remove Email field, complete phone-only account identity (ticket 05)
Contract step of the account-phone-login expand-migrate-contract rollout.
Phone is now the sole account identifier end to end:

- domain.UserRecord/CreateUserInput: delete Email, drop Phone's omitempty
  (required going forward).
- store: delete email_unique Mongo index; phone_unique is now non-sparse
  (unique, not sparse) since every account creation path requires a phone.
  Delete FindUserByEmail, ensureUserEmailAvailableLocked, and
  ErrDuplicateUserEmail (confirmed dead via grep - all real call sites were
  already migrated to the *Phone equivalents by tickets 01-03). Mongo
  duplicate-key fallback and the account-mutation-guard's stale-write
  snapshot/filter now key off Phone instead of Email.
- api: drop the now-impossible ErrDuplicateUserEmail branch in
  renderUserMutationError. The account-hierarchy audit endpoint and the
  supplier-deletion receipt struct both switch their identifying field from
  Email to Phone, since both are populated fresh from current account state
  (not frozen historical snapshots) - continuing to read a "email" key would
  silently go blank for every account created after this change.
- frontend: src/types.ts User.phone is now required (email removed);
  AccountHierarchyIssue.email -> .phone in services/api/users.ts and
  pages/Users.tsx to match the backend audit endpoint's renamed field.
- Rewrote the wide blast radius of Go test fixtures that constructed users
  by email across internal/api/*_test.go and internal/store/*_test.go,
  including the two dedicated memory-store uniqueness tests (merged into
  phone-only equivalents) and several opt-in "live" acceptance-fixture
  tests gated behind env vars for real Fanyu deployments.

Repo-wide grep of Go and TS/TSX for Email/email/邮箱 turned up no remaining
account-identifier references outside of a few harmless test-only cosmetic
labels (e.g. "Email Tenant" as an org display name in a seed helper) and
assertions that explicitly check "邮箱" text is absent from API responses.

go build/vet clean. go test ./internal/api/... ./internal/store/...
./internal/domain/... : 75 failures, identical test names to the
pre-ticket-05 baseline (diffed against a throwaway worktree at the prior
tip). npm run lint:web (tsc --noEmit) clean. npm run test:frontend:
599/586/13, matching the stated baseline exactly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-22 14:30:50 +08:00
eust-w
e48c4ccab3 🐛 Stabilize worker readiness and verify multi-supplier delivery 2026-09-21 12:36:08 +08:00
eust-w
c92bca168d 👥 Unify supplier account management and enforce single account roles 2026-09-21 11:30:03 +08:00
d-robotics
142210d28c 🐛 Preserve durable slice jobs during legacy timeout recovery 2026-09-18 15:25:30 +08:00
eust-w
cc0202d40d ⚡ Persist frame indices and isolate resumable annotation processing 2026-09-17 18:40:06 +08:00
eust-w
7e09c53c8f 🛡️ Guard capture synchronization when a release child is unavailable 2026-09-16 23:36:52 +08:00
eust-w
2fa717348f 🩹 Finalize capture status after delivery without an active listener 2026-09-16 23:34:34 +08:00
eust-w
257732105b 🩹 Preserve accepted-run delivery ownership across release-child retries 2026-09-16 23:11:09 +08:00
eust-w
cc67db916c 🩹 Isolate delivery staging objects for safe publication retries 2026-09-16 23:04:44 +08:00
eust-w
d1717c4530 🩹 Accept canonical BOS metadata headers during delivery verification 2026-09-16 22:27:08 +08:00
eust-w
29ed9d2475 🗂️ Add reviewable slice discard policy and filtered delivery 2026-09-16 20:44:46 +08:00
eust-w
62b5737d71 ✨ Add isolated raw-data human-loop delivery template 2026-09-11 18:06:30 +08:00
eust-w
d95a7520c7 ✨ Enable independent multi-part Capture deliveries 2026-09-11 03:49:03 +08:00
eust-w
169fb5d60c ✨ Publish Capture deliveries to configured project directories 2026-09-10 23:21:44 +08:00
eust-w
cd5bfdb409 ✨ Support legacy and isolated part Capture admission 2026-09-10 20:46:38 +08:00
eust-w
7cfae772e8 🐛 Recognize segmented Capture IMU filenames during intake 2026-09-09 15:03:13 +08:00
eust-w
1a450bab0d 🛠️ Use required files only for all Capture admission 2026-09-08 18:29:26 +08:00
eust-w
640b703c91 🛠️ Add resumable project cascade deletion with scoped cleanup and audit 2026-09-08 16:46:51 +08:00
eust-w
c72170f4eb 🐛 Recheck intake state before admitting each Capture 2026-09-08 13:41:31 +08:00
eust-w
7000f68af5 ♻️ Retire single-run execution in favor of continuous Capture production 2026-09-08 13:17:03 +08:00
eust-w
ce79557df2 🧪 Align recovery and responsive playback regressions 2026-09-08 02:54:00 +08:00
eust-w
b65ab9948d 🐛 Unify responsive layouts and workflow lifecycle status 2026-09-08 02:44:47 +08:00
eust-w
93cccafc70 🐛 Retain WiLoR frame counts across artifact compaction 2026-09-07 23:15:54 +08:00
eust-w
5486821d4c 🧪 Verify policy-based delivery without synthetic acceptance reviews 2026-09-07 22:58:44 +08:00
eust-w
5c07a0a6ce 🐛 Keep sampling exemptions distinct from human acceptance reviews 2026-09-07 22:57:05 +08:00
eust-w
95a9ccacdb 🐛 Preserve Capture sampling lineage and validate PTS before processing 2026-09-07 22:38:47 +08:00
eust-w
38881f9b76 ⚙️ Apply approved Fanyu CPU and memory resource floors 2026-09-07 17:22:55 +08:00