Replace complementary journal scans with bounded seek pages and scoped primary-key problem refill. Preserve legacy/in-flight evidence, memory boundaries and original query/build deadlines. Cover scoped plans, source parity, cancellation, real refresh cadence and restart.
Preserve legacy system suggestions and unreadable saved content across workspace writers. Compare explicit dictionary snapshots and normalize empty optional evidence during save readback; keep transient autosave failures retryable. Cover recovery entry points, source shapes, failed saves and stale-snapshot rejection with isolated HTTP and browser regressions.
Vite's dependency discovery keeps server.close() pending after the test
is done: node --test then waits forever on Node 24/26 (until a protected
check is killed) and fails the test on Node 22. The test checks the
transform pipeline, not pre-bundling, so discovery is off.
- The work-buffer poll resolved each item's project, workflow and capture
labels by reading the full run document (up to 6MB) every 3s. Cache the
resolved labels per item for 2 minutes.
- Slots whose item the active scan already counted keep their slot without
rereading the item and its claim receipt (same outcome as before).
- Draft, review-draft, review-session and work-buffer saves no longer flush
the dashboard response cache; they change nothing a dashboard counts.
Local perf DB with a 6MB run: poll total p50 141ms -> 7ms (enrich 131 -> 0),
byte-identical response. Admin dashboard stays cached across draft and
session saves and is still recomputed after other writes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 poll listed every item the annotator ever authored (assignedUserId OR
latestAuthorUserId), so its cost grew with history, and it bumped the CAS
ledger version on every 3s read. Use the active annotation view, a superset
of the occupancy predicate, and return without writing when capacity and
slots are unchanged and nothing is reserved.
Local perf DB, 12k authored items: store_ms p50 279ms -> 2ms, total 288ms ->
11ms; 41 polls no longer change the ledger version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A quality review that loses its edit lease no longer falls through to the
annotator's slice-confirmation bar; it shows its own read-only footer with a
takeover hint. The task-scoped connection-diagnostics link joins the subnav,
work-page or focus-heading row instead of taking a line of its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Bare `border` utilities rendered near-black under Tailwind v4 inside the
workbenches; colourless borders now use the panel tone (controls one step
darker), scoped to .annotation-operations-page.
- Normal review layout: the tall QC side panel no longer stretches the camera
row and the playback bar; extra height goes to a trailing flexible row.
- Focused review: collapse the 150px column reserved for an action list that
review never renders.
- Focused acceptance: the side-panel aside rule no longer squeezes the nested
"current slice / current annotation" panel into overlapping 7px lines.
- Pool cards (annotation and acceptance): capture names wrap after
underscores instead of mid-word, status badge moves next to the time range,
9-10px text raised to 11px.
- Light-theme fixes for dark-only leftovers: stage/status chips, refresh and
sampling buttons, leave-guard and reslice dialogs.
- Refresh icon keeps its own track instead of stretching across a 1fr column.
- Consistent heights, hover feedback and pressed states for the pool toolbar,
focused review heading and camera toolbar; soft focus ring on workbench roots;
the unstyled "保存进度" button gets the sibling button style.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The production overview and supplier output pages add QC and acceptance
sections beside annotators in the same card and table style. Reviews
count every formal decision per part, so rework re-reviews count again
and are listed as re-reviews; an aggregate acceptance counts each part
once. Every role gets video hours per person-day as efficiency, and all
durations now display in hours with one decimal.
Work facts are computed once per shared snapshot (schema v2) and only
filtered in memory per query; the loader reads three more identity
fields and no new collections.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Acceptance attribution and legacy rejections scanned every review or
event per source; per-task lookups keep the calculation linear as
re-reviews lengthen review history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recovered from uncommitted work in the dev-mainline worktree (written
2026-10-19/20, never committed). Revises ADR 0004 and the spec/map: the
lane verifies annotation → QC → final acceptance only, uses node-local
storage with no BOS credentials, and promotes the same image to
production. Adds the two domain terms and tickets 06–15. Docs only; no
code, configuration or cluster changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Squashes b10f843c and 630c180e from codex/review-trace-preview-20261026
(never pushed). The sample task title is replaced with a synthetic name
because the original looked like a real capture identifier. Standalone
HTML with synthetic data: not part of the app build, no API calls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One branch per task from origin/dev with a task card, agents push their own
task branches freely, PR creation needs the user's approval, deploy only
commits in dev. scripts/agent_status.py lists every branch against dev and
the newest deployed release across all worktree ledgers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the production overview section, make readiness gates and error banners readable in the light theme, round the success rate, unify card styles and minimum text size; label the sidebar toggle and profile dialog close button, close the dialog on Escape, and pause health polling while the tab is hidden.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reuse the wording of each page's status filter; the raw status stays available as a tooltip and unknown values fall back to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show a loading message instead of a false empty state on the projects page, keep the runs table from squeezing its columns, format durations over an hour as hours, align stat cards and table text with the dashboard, and let the POC acceptance card follow the app theme.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Untracked source copies under local-data/ ship their own index.html and node_modules; scanning them made the dev server load a second React and render a blank page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the full-width source strip; show source fields, version/return
chips and the latest two transitions in one collapsible card at the top
of the review side column. Record post-release validator capacity evidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Administrator counters were derived from the stage-filtered first human-item page, while annotators used an aggregate. Add authorized whole-pool counters with a five-second bounded cache, page human items before joining task summaries, and search older metadata on the server. Cancel stale reads and preserve existing non-admin scope behavior. Cover permissions, mixed stages, real Mongo parity, old-page search, categories, pagination, stale responses and claim invalidation.
Slice-phase quick edits with pending actions were canceled before history recording because conflict rendering and teardown were annotation-only. Preserve the actions and use the existing atomic application and restoration flow in both editing phases. Compare complete live editor drafts without derived completion status, and keep discarded-slice evidence and opinions visible.
The quick path validated raw actions before archiving and bypassed the server slice application. Share its archive-aware validation and authoritative save with panel edits, await Enter confirmation, retain failed choices, and preserve pre-drag persisted undo. Cover both directions, recovery, and keyboard/mouse confirmation through the real page and HTTP API.
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>
The 我的任务 count for annotators (active and 已送检 views) is the number of
items loaded so far; with more pages it read as an exact total, e.g. 500 of
800. Show "500+" while another sidebar page exists, matching the load-more
label. A true total needs a server count for this view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
annotationReadCache handed the same *HumanItemRecord to every lookup in a
request, and write handlers mutate the item they load (version, status,
assignment, payload keys) before the versioned write. After a failed or
conflicting write, later lookups in that request would see unsaved state.
Keep the single store read per request but return a copy per lookup, with
the payload, assignment and processing-job input maps cloned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first "my tasks" sidebar page was read with only project and view, while
"load more" continued from its cursor with the URL's workflow/run added. With
a workflow or run in the URL, page 1 listed every workflow and later pages
only the requested one, so other workflows' tasks past page 1 were
unreachable. Pass the same workflow/run scope to the first page; requests
without one are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixed-rate check allowed only 0.1ms between each frame time and
n*duration/count, so a constant 30fps camera muxed with a 1/1000 track
timescale (frame times 0, 0.033, 0.067, ...) was rejected as variable-rate
at frame 1. Allow half a time-base tick, never less than 0.1ms: fine time
bases (all local captures: 1/10240, 1/15360) are checked exactly as before,
and a genuinely dropped frame is still rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A revision waiting for source validation was requeued every 2s with no limit,
re-reading the task and run and recomputing the source fingerprint each time;
with no validation-role process it spun forever. Wait with exponential
backoff (2s doubling to 1m) and fail the job, edits kept, after one hour of
waiting. Waiting still does not consume a crash retry. The two new job fields
are optional and absent on existing records.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The readiness poll re-ran seekTrack on every pending target, and seekTrack
reloads errored media. A track whose error event never reached onError (it
fired before dispatch, or onError filtered it) was therefore reloaded five
times a second with no limit, e.g. a pinned source answering 409. The poll
now sends an errored track through the same bounded recovery as onError
(failTrack: at most two delayed retries per camera, then pause) and never
reloads media itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The index heartbeat cancelled the job on any TouchAnnotationIndex error, so
a Mongo failover or timeout during a long source validation aborted it and
burned one of its five attempts; five blips marked a healthy source as
failed. Cancel only when the lease is provably lost, or when renewal errors
persist until the claimed lease is within a safety margin of lapsing, so
another processor never reclaims a job that is still running. Renewal
starts from the lease the claim actually stored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In barrier/striped mode an ordinary write to a guarded collection outside
the striped set (annotationRevisions, worklog events, stage attempts, ...)
fell through to the exclusive path and took the gate plus all 32 stripes:
33 lock round-trips per write, and it stalled every striped writer in the
project. Such records never share a stripe, so take just the gate, which
every exclusive operation also takes first. Nested striped writes still take
their stripe (without re-taking the held gate in barrier mode); taking the
gate while holding a stripe, or upgrading from it, is rejected to keep the
gate-then-stripes order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
routes.go keeps only the global middleware chain, the shared business-role
sets, and one mount call per domain: system, dashboard, acceptance, human
loop, annotation, projects, organization, workflows, runs, delivery, data
platform, and object sync. Role-only groups become withRoles/With on the
routes they guard, so each route's permission sits next to it instead of in
a role-shaped group far from the rest of its domain.
No route, handler, or access change: testdata/routes.golden (generated from
the pre-split router) is byte-identical, the Go known-failure gate passes,
and a live API smoke against a throwaway DB matched the access matrix for
every parameter-free GET route across six identities.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure move: NewHandlerWithConfig now only assembles the server and returns
server.routes(). Route snapshot unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Walks the chi router and records, per method+pattern, the middleware chain
above the global middlewares, the endpoint function, and an access matrix
(anon, API token, super admin, and each business role) produced by running
the route's real middleware chain in front of a stub endpoint. Closure names
drop Go's "func" prefix, which flips with inlining. Guards the upcoming split
of route registration out of server.go: any route, handler, or permission
change shows up as a golden diff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same-project saves queued behind one project lock. Add default-off record stripes while deletion, authorization and claim operations retain exclusive protection across all stripes. Require a complete barrier rollout before striped activation. Verify local Mongo deletion, revocation, crash recovery and two 100-user HTTP runs with save p95 below 400ms.
- opinionCardScopes: three cards (slice/action/timestamp), same visual spec
(role=option + aria-selected highlight, click enters target editing)
- timestamp card entries = timestamp opinions owned by the current action,
atSeconds ascending; current action resolved from the same position data
as the D5 target model (new reviewPositionAction in review-navigation.js,
range reported with ReviewPosition by the viewing surface)
- timestampProblemsOfAction pure helper in review-opinions.ts, table-driven
tests; slice identity guards cross-slice leakage in slice-seconds basis
- remove the all-task flat timestamp list from ReviewProblemPanel (G-jump
and timeline markers keep the full-task set from the hook)
- entry click keeps selectProblem anchoring; J/K focus emphasis preserved on
in-card entries; anchored-target entry stays emphasized
- names: timestamp -> 当前时间点意见 (no task revival)
- server: handleSliceResetCreate splits on submission history using the
established isRework signals (task revision fence, rework status, human
annotation revision via fanyuV5CombinedSubmissionIsRework); first pass
runs the original reset write path with sliceResetHistory audit, history
keeps 409 slice_reset_disabled with in-place guidance (spec D1 revised)
- table tests pin both classes incl. the system-suggestion edge; the four
retired-contract test files flip to split-flow assertions
- frontend: restore the reslice button, warning dialog with both reset
modes, and authoritative reconciliation from f980696f~1; entry is gated
client-side by the same signals (resliceEligible), normal and focused
layouts share the restored footer entry; E-mode changes untouched
- dev preview regains the entry; two retirement-era nail assertions flip
back with the gate asserted in their place
D1: single-slice tasks open the slice-edit panel on E (panel supports
adding boundaries); the slice-edit-unavailable toast branch is deleted
outright (key table context, notice state, dispatch and UI).
D6: J/K landing on slice problems auto-opens/switches the panel target
(reworkLocatePlan now carries a sliceEdit intent on jump plans); landing
on action/timestamp problems collapses the panel with pendingSlices
stashed and restored on reopen while the workspace is unchanged; Esc
remains the explicit full discard. Panel-open J/K passes through to the
rework navigator instead of locking; conflict-list J/K stays locked and
mouse-path locks are untouched (jump selects bypass the click lock via
an explicit flag only).
- mergeDegenerateProducts: straddle pieces within EPS merge into a
same-status neighbour (coverage unchanged) so degenerate boundary
structures can no longer persist invisible zero-width segments that
intervalStyle renders as display:none
- scanSliceEditConflicts now returns autoFollows (silently-following
edge-glued invalid actions) + conflictAutoFollowHint derivation for
the collapsed conflict-list hint row (panel and drag quick paths)
- invalid track blocks get a min-width visibility marker so needle-width
invalid intervals stay visible on the track
- 5 new engine tests (guard x3, autoFollows, hint); workbench source
guards updated to pin the corrected wiring; repro record updated with
post-fix matrix
D7 layout fixes, zero interaction changes: a panel-scoped rule
neutralizes the shared inset:0 dictionary base (it covered boundary
rows and every panel button because the panel root is the nearest
positioned ancestor), the panel header and Enter-apply footer become
sticky within the panel's own scroll container, and the compact
disposition dialog ends 138px above the viewport bottom so it clears
the 126px submit rail instead of overlapping its top. Pin tests guard
the scoped rule, the sticky edges, the unchanged Esc/Ctrl+Enter key
contract, and the compact dialog offset.
A quality rejection reassigns the ORIGINAL annotation task, whose
createdAt keeps the original import date. The task list pages
org-wide newest-first and then role-filters each window, so once newer
import waves fill the window with unreadable foreign tasks the
annotator's own returned task can no longer be fetched: each page
filtered to empty, and the filtered-empty response dropped the
continuation cursor so paging stopped for good (production incident
2026-10-14: reviewer saw the return, annotator saw nothing).
- server: authorization-empty pages now carry the store window's
nextCursor/hasMore (taskPageCursor helper shared with the success
path) so limited consumers can always continue paging
- client: non-manager workspaces (annotators included, previously
review-only) fetch tasks by pool legacyTaskIds via the existing
ids= join instead of the newest-first window, mirroring the
任务关联数据缺失 fix
- tests: Go windowed-paging contract test (empty page keeps cursor,
page 2 returns the rework task, ids join reaches it directly) and a
frontend source pin for the ids-join condition
Clicking an unclaimed row in the claimable pool wrote its id into the URL,
which an effect misread as ownership and flipped the list to My Tasks; the
selection sync then dropped the previewed task entirely. Gate the flip on
confirmed assignment (pools.mine / task detail), and start review
workspaces on the claimable pool for URL arrivals, so owned deep links
still land in My Tasks via the ownership effect. Claim-without-preview
keeps preserving the current list view.
The captions-visibility static guard pinned '((isQualityReview || captionsViewable)'
byte-for-byte. Prettier's paren wrapping for that expression depends on the
surrounding line-width context; after the acceptance-fix edits it now emits the
single-paren form (both are valid prettier output — HEAD's double-paren form was
also clean). The assertion now pins the condition composition, not the paren
shape. No behavior change.
User: 「shift 左右能改变切片或标注动作的边界…这个也没有做」. The global map
returned null for every shift+arrow outside the panel (line ~68), and in
continuousActions mode the early adjust-boundary return fired regardless of
whether an action editor was open — startBoundaryHold then silently no-oped
without editingAnnotation, so the key looked dead in both shapes.
- annotation-shortcuts: shift+arrows in annotate phase now resolve to
coarse-nudge-boundary unless (continuousActions && actionEditor) keeps the I3
action-boundary binding; slice-phase behaviour unchanged either way; repeats
consume; modifiers still fall through natively.
- workbench dispatch: coarseNudgeSliceBoundary nudges the selected slice's
boundary 0.5s (selectedBoundary if one was clicked/dragged, else the panel's
default-focus rule: selected slice end, last slice falls back to start) and
commits through onSliceBoundaryChange — the same committed pipeline the slice
phase uses (clean → immediate apply, conflict → the ticket 04 list,
Esc = nudge never happened).
- help table: new annotate row for the slice-boundary nudge; the continuous
context relabels it to the dual semantics; the old continuous extra row is now
slice-phase only.
- keyboard guide: the committed-nudge paragraph and the panel prerequisites
(drafts no longer block opening; apply still requires them) updated.
Tests: annotation-shortcuts (new dispatch matrix incl. no cross-talk with the
panel table, editable inert, modifiers) + continuous-shortcuts pins updated to
the actionEditor-aware contract.
User: E almost never opened (「E 老是按不出来,操作暂时没有完成」). Two defects:
1) openSliceEditPanel hard-blocked on outstandingDrafts — but parked drafts are
the normal state during continuous annotation, so E was almost always dead.
The blocked notice also never reached the user: it starts with 请, and
userErrorMessage's instructive-copy rule replaces such messages with the
generic 「操作暂时未完成」 fallback.
Design change (ticket 04): OPEN despite parked drafts. New
onSliceEditSessionChange channel tells the page when the panel session is
open; the page extends the autosave isBlocked gate (panel session OR any
conflict list) so drafts stay in workbench state and the structure snapshot
reference stays stable, then flushes once immediately on release
(slice-edit-close edge via sliceEditSessionFlushEdge). Guards kept:
slices<2, and the non-continuous active-editor block with unchanged copy.
The apply-time drafts guard stays (applying structure edits while draft
intervals reference the pre-apply layout can orphan content); the docs now
spell out that split.
2) The E-panel sanity walk exposed a pre-existing dead Enter: the
applySliceEditPanel workspace-drift guard compared prop references against
panel.snapshot.slices/actions, but snapshotSliceEditWorkspace deep-copies, so
Enter was ALWAYS rejected with 「面板期间工作区发生了其它修改」. The guard now
compares by value (same sorted-JSON convention as the preview-equality check
below it); genuine external changes still fail the check.
Verified live (probe-e-walk): E open → ←/→ nudge (red block) → Shift coarse →
Enter → conflict list → 1+Enter applied → E reopen → Esc; task A structure
round-trips byte-identically.
User reported the two timeline tracks nearly overlapping in the QC review view at
narrower viewports. Reproduced in the review-focused layout (reviewFocus=1): the
workbench grid pinned row 4 (slice timeline editor) at 66px and row 5 (action
timeline) at 90px — both smaller than their content (slider + heading + 46px slice
track ≈ 104px; action timeline min-h-40 = 160px). Flex children with min-height:0
were crushed (heading ≈ 4px, banner slot 32→18px, slice track 46→42px) and the
slice blocks overflowed onto the action blocks: 24px container gap, ~6px block
overlap at every viewport ≥1413. Same family as ticket 01's focused-mode
regression (fixed-height rows + absolutely positioned tracks + a dead slot).
- rows 4/5 now content-driven (auto); the video row (1fr) absorbs the difference.
- the slice-edit banner slot is display:none under [data-review-focused]: both
notices are unreachable in review (E and the panel are gated by the review
keymap), so the slot is dead weight there; annotator-side constant-slot
semantics in capture-workspace.css are untouched.
- measured gap after: 44px at 1680/1440/1366/1280 (focused), 173px unfocused;
evidence under .scratch/slice-edit-ux-rework/probe-out/fix-afterB-*.json
Acceptance finding (ticket 09 scope 5): the QC review view showed no action rail —
and neither did the annotator side. Root cause was NOT a review-phase render gate:
continuousActionsForItem derives task.continuousActions from
batch.processingProfile === raw_human + the three-role stage list, and the seeded
ise-demo(-b) batches never set the profile, so the workbench gate
continuousActions && phase === annotate was false everywhere.
- seed: perCapture.batch now carries processingProfile: raw_human (stages already
matched IsFanyuV58ThreeRoleHumanLoop).
- new static test pins the demo-data contract (ise-demo-seed.test.mjs).
- live stack patched in-place (db.humanBatches updateMany on ise-demo-batch /
ise-demo-b-batch) so the user's in-flight acceptance progress is preserved.
Removed with no feature flags: sliceEditActive state + auto-exit effect,
enter/exit/nudge/switch boundary helpers, the sliceEditShortcut dispatch
branch + key table + help rows, the slice-edit-mode-banner render, and the
in-mode highlighted-boundary overlay. E opens the 04 reconfig panel only
(toggle-slice-edit / slice-edit-unavailable dispatch unchanged); the batch-0
constant slot stays and still hosts the single-slice E notice and the
panel lock notice with zero layout shift.
Keymap finalized per ticket 04's judgments, pinned by tests: panel-internal
E = cancel; panel keys C/G/arrows/Enter/Esc; list keys up/down/1/2/3/Enter/
Esc; outside-mode keys unchanged incl. Shift+arrow action boundary (I3).
Grep evidence: src/ tests/ scripts/ have zero sliceEditActive /
sliceEditShortcut / slice-edit-mode-banner / enterSliceEditMode /
nudgeSliceEditBoundary / slice-edit-highlighted-boundary references outside
the anti-resurrection guard test and one explanatory comment.
Gates: tsc exit 0; frontend 774/760/14 — failure set identical to the
pre-change baseline by name (14 known upstream debts).
Removed with no feature flags: SliceTriageCard.tsx, slice-triage-card.js,
slice-triage-card-types.ts, slice-boundary-triage.js, the sliceTriage page
state + applySliceTriage/choose/dismiss, workbench card render + key-swallow
dispatch + props, triageCardShortcut/Help key tables, and the .slice-triage-*
CSS block. Commit-style boundary moves (slice-phase </>arrows and Shift+arrows)
now route through planSliceEditDragRelease into the 04 conflict list — the
same single disposition entry as drag release / hover+split / trash merge.
Grep evidence: src/ tests/ scripts/ have zero slice-boundary-triage /
slice-triage-card / SliceTriageCard / triageCardShortcut / triageCardAnchor /
sliceTriage / applySliceTriage / classifyBoundaryMove / applyBoundaryMove /
slice-triage references outside the new anti-resurrection guard test.
Dead helpers commitSliceBoundaryDraft / stepSliceBoundaryByFrame (unreferenced
since the numeric-draft sidebar was removed) deleted with their state.
Gates: tsc exit 0; frontend 775/760/15 — failure set identical to baseline by
name except the intentionally-red ticket-06 guard (old E-mode still present,
next commit).
R1-Q8/R2-Q7 (spec slice-edit-ux-rework, seam ②):
- planQualityReviewDecision now builds the next rework baseline as
unresolved prior opinions (same entry IDs, QC still-problem notes
merged into the original text) followed by this round's new opinions;
resolved opinions never enter the new baseline
- rework-baseline reads (any round) and the acceptance source-opinions
baseline projection narrow to unresolved-only via the frozen round's
review confirmations; frozen records stay untouched (B02)
- legacy fallback: missing confirmations mean unresolved and opinions
keep carrying (documented + tested); missing prior baseline keeps the
first-round fresh-only behavior
- ADR 0008 records the decision, consequences and the rejected
collapsed-display alternative
One command now rebuilds TWO tasks sharing the org/accounts: task A
(unchanged, round-1 rework returned to the annotator) and new task B
on a second ise-demo-b-* capture driven through the full loop — first
submit, QC 8 opinions, reject, partial rework via real endpoints
(split S1 @15s, discard S3 via dictionary reason, act-07 description,
act-13 invalid), resubmit ending round-2 submitted awaiting QC
re-review with structureChangeSummary split=1/discarded=1. Deliberately
unresolved act-17, both timepoints and the overall opinion keep the QC
receive view red/gray mixed out of the box. Walkthrough §0 becomes a
two-task table and case-2 points at task B directly (manual path via A
kept as an optional note).
- remove the two annotate-phase stage locks in canonicalSliceDispositionState:
boundary moves of discarded slices and explicit merges are now edited in
place, first pass and rework share one server path (spec §3.4, R2-Q7:a)
- keep the bottom line untouched: every action must fall fully inside exactly
one slice and carry a whitelisted status (annotation_operations.go /
annotation_contiguous.go), pinned by new table-driven cases incl. half
actions and the three triage products
- retire the reslice write endpoint: POST /slice-reset now answers 409
slice_reset_disabled pointing at in-place editing and never writes;
sliceResetHistory evidence and reads stay intact (R3-2:a)
- reset-family tests flipped to the disabled contract; historical post-reset
invariants still covered via a legacy-state fixture helper
- new ReworkOpinionRail: all opinions in a scrollable right-column mini window
(focused/compact layout only), grouped red → skipped → gray → old, click to locate
- jumpOrder extended from red-only to full navigation order with per-entry state;
J/K walk the full list in both layouts (red first), gate dialog filters red
- focused layout: per-slice cards under the slice track removed (no stacking),
summary strip slimmed to one line pointing at the rail
- docs: manual + ADR 0006 wording updated for the new J/K semantics
- thin marker strip atop the review slice timeline: orange dots at
capture-seconds positions; near-neighbours (<0.8% track width) cluster
into a count badge; single marker click seeks via reviewController,
cluster click expands a popover listing each opinion (time + text)
- parent slices are never painted red (markers live on their own strip,
visually distinct from the playhead)
- data flows through the new reviewTimestampOpinions prop mapped from
reviewDraft.timestampProblems (same source as G-jump and locate)
- browser-verified on the replica stack: two nearby opinions (0.09s/
0.14s) cluster into one '2 条' marker, expansion lists both; frontend
regressions identical to baseline (14), tsc clean
- 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
Default proxy.golang.org is unreachable from some networks; the env value
now flows into the Dockerfile ARG (goproxy.cn mirror used for this
release build). No behavior change when GOPROXY is unset.
- c3 rework-first: drop the Limit-20 newest-first window that could bury an
old returned task under newer claims (review finding: silent priority
loss); full personal-item scan is the documented correct behavior
- c4 timestamp jump: per-source ordering (current source first, cycle
within source before moving on) - never interleaves seconds from
different sources on one axis (spec §4.3)
- c5 unresolved confirmation now requires an explicit note (spec §5.3
明确引用; the any-opinion loophole closed)
- a1 D1 downgrade: opinions with saved handling feedback render amber
有修改,待复核 instead of full red; unhandled keep the strong alert
- a2 reviewer-side structural comparison: ReworkComparisonPanel now also
mounts beside the review panel for re-review rounds (§5.3)
- a3 D4 counters: reviewer header shows 待处理 N / 待复核 M (non-blocking)
- a5 confirmation-only autosave: idle flush now carries confirmation
changes via an in-place opinion re-save; zero-opinion drafts degrade to
an explicit message instead of silence (§5.4-8)
- a4 axis markers: backlog ticket maintenance-backlog#02 (visual
enhancement; discovery already covered by list + G + locate)
- regressions: api 65=65 zero new; frontend 14=14 zero new; tsc clean
- rework_baseline: drop hand-rolled itoa for strconv.Itoa (P6 reuse)
- AcceptanceSourceOpinions goes through reworkApi.sourceOpinions instead
of a direct apiRequest (API-wrapper layering)
- shared opinionScopeLabel in review-opinions.ts replaces the triplicated
scope→label cascades
- rework-first scan limit named and justified in place
- feedback editor tracks conflict via state flag instead of matching
human-readable error text
- kept: reworkReturnMode os.Getenv follows the 24-precedent api-package
flag style (auth.go DROBOTICFLOW_ENABLE_LEGACY_ORGANIZATION_ADMIN);
baseline double-fetch note (useReworkReviewData is review-stage gated,
annotate mode needs its own fetch)
- GET /api/human-items/{id}/source-opinions: per-source projection of
rework baselines (round, frozen problems incl. timestamps, comment) and
formal quality reviews (round, decision, reviewer, frozen D7
confirmations); aggregate items only
- multi-source coordination detail: requireAcceptanceSourceReady and the
decision gate now name the pending sources (itemKey + stage + status)
instead of a generic message
- AcceptanceSourceOpinions panel in the final-acceptance workspace:
collapsible per-source history labelled who/which-round
- rework_review badge extends to prepackage_acceptance rounds
- tests: pending-gate names source then approves after ready; projection
carries baselines/reviews/confirmations and rejects non-aggregate items;
api failures identical to baseline (65), frontend zero new, tsc clean
The 1d1c9f50 editor patch called s.replace() without reassigning the
variable, so the 定位 button never landed despite the commit message;
this adds it for real (verified: browser shows 定位钮 on the rework
feedback section, seek wired via seekRequest). Also recorded: Vite's
module cache served stale transforms until restart, and the app-level
project scope defaulted to review-focused (no rework rows there) —
both cost one debug cycle each.
- ReworkFeedbackEditor: 定位 button per timestamp opinion, seeking the
annotate workbench player via the existing seekRequest channel
(revision-deduped), same capture-seconds timeline; B03 全局导航 for the
rework side without touching workbench internals
- tsc clean; frontend failures identical to baseline (14)
- random-claims: my directed rework item is returned as-is (no version bump)
before any random draw, and keeps priority on repeat claims until the
rework is submitted; other annotators never receive someone else's
directed item (assigned filter unchanged)
- quality pool rows gain a 返工复查 badge + detail line for round>0 items;
workbench header shows the same state; DetailedTaskStatus widened
- pool list stable-sorts rework items to the top (先清自己的错再领新)
- tests: rework-first claim matrix (priority, idempotent resume, priority
release after submit, invisible to others) green; api suite failures
identical to baseline (65); frontend failures identical (14); tsc clean
- retention: baselines/feedback kept forever (<=0.3MB per task lifetime,
no cleanup jobs); materialized slices keep K=2 generations, older-gen
cleanup registered as a known-gap for the C-block maintenance track
- comparison media: zero new video files - metadataOnly materialization
references source run artifacts, manifestSha256 content-addressed reuse
(existing code branch cited), playback over the existing presigned/direct
pipeline
- capacity at 50 users: sequential two-stream comparison <=2x single path
(~250Mbps peak), consistent with the C-block 50-user criteria; no new
storage/bandwidth budget items for B03
- resolve issue 06; unblocks issue 03
- rework API client (baseline/feedback GET + CAS save)
- useReworkReviewData: fetches current-round baseline + feedback when
reviewRound >= 1, degrades to null on missing/legacy data
- ReviewProblemPanel: read-only original-opinion section with per-opinion
annotator feedback, D7 confirmation controls (已解决 / 仍有问题+note) that
upsert into the review draft confirmations and ride the existing 8s
autosave + formal-decision freeze
- frontend failure set identical to baseline (14), tsc clean
- ReworkBaselineRecord: frozen at formal quality rejection via a new decision
effect (idempotent apply); embeds original opinions, reject comment, and the
reviewed revision's slice/action summaries - self-contained by design so
revision pruning can never orphan it and no customer data is deleted
- ReworkFeedbackRecord + GET/PUT /api/human-items/{id}/rework-feedback:
writer restricted to the directed owner (incl. admin-reassigned owner) or
manager; entries must reference baseline opinions; CAS version conflicts;
readable by the reviewer; missing-baseline rounds return a graceful conflict
- GET /rework-baseline returns null baseline for legacy rounds (degraded read,
never blocks the flow)
- ReviewDraft.Confirmations (D7): canonical validation against the current
round's baseline (unknown/duplicate opinions rejected; unresolved requires
note or a current-round opinion; no-baseline rounds must stay empty);
frozen into AnnotationReviewRecord at the formal decision, matching the
irreversible-verdict principle
- tests: baseline freeze+embedded evidence, feedback contract (403/400/CAS/
reviewer-read), confirmation validation+freeze, graceful-missing - all
green; internal/api failures identical to baseline (65), zero new
- server: timestamp scope in canonicalReviewProblems (identity = source +
canonical frame, discard-slice/out-of-range/exclusive-end rejections with
explicit messages, zero duration, dual basis conversion; fixes input
timeBasis being clobbered by the shared branch) and reviewOpinionKey
(microsecond frame identity); comment summary gains per-point labels;
slice-id statistics cover timestamp problems
- rework routing: FANYU_REWORK_RETURN=directed|pool rollback switch applied
at both decision entries (v5.8 plan + legacy /reviews); directed branch
already existed (22ca5cd8) with 7-scenario matrix; new pool-branch test
asserts public-pool restore + admin reassignment channel stays available
- frontend (D5): timestamp option in the F scope menu (three-card navigation
untouched via opinionCardScopes), timestamp opinion list in the review
panel with click-to-locate, independent G key jump command wired through
quality + acceptance workbenches; scope type widened
- tests: 4 new Go tests (canonicalization, 6-case rejection table, per-frame
uniqueness, pool switch) green; api suite failures identical to baseline
(65); frontend failures subset of baseline 14, zero new; replica-stack
live demo: save at 60.05s -> exclusive-end rejected -> formal rejection ->
directed return to original annotator with labeled timestamp comment
- resolve review-rework-workflow issue 01; interactive rework-side point
positioning handed to issue 02 (return-baseline view)
Record the approved catch-up work order outcome: Go lane suites and the
28-test Python suite pass at c8794dd7; the retained 20260927 seeded
database replays the five-role HTTP workflow on current binaries (sl-2
snapshot full pass through final acceptance; sl-3 stops at quality as
designed; BLF scratch needs a fresh batch per the documented boundary).
Note the colima 27019 forward workaround (lane-mongo-2 on 27020, same
volumes), the session-sandbox localhost-TCP gating requirement, the
part-index delivery shape addition to the delivery-packaging coverage
gap, and the still-open movi browser smoke.
Wire the existing zero-call saveCombinedDraft endpoint into the Capture
annotation workbench per .scratch/autosave-workbench spec:
- D1 triggers: slice switch (new onSelectedSliceChange workbench prop),
20s idle debounce after the last edit, and visibilitychange(hidden)/
pagehide immediate keepalive flush.
- D4 payload merge: unconfirmed workbench description drafts with a
complete start<end range join segments; mid-selection drafts stay in
the editor until their range completes.
- D2 conflict handling: 409 with a foreign server draft raises an
explicit banner (load server draft via reload / overwrite with local
content using the authoritative version); 409 without a server draft
(our own formal confirmation cleared it) silently resyncs the version.
- Single in-flight PUT, formal mutations take priority (isBlocked),
validation 4xx does not retry identical payloads, network errors do
not block editing; monotonic version guard on apply; non-blocking
"草稿已自动保存 HH:mm" status line.
Verification: tsc clean; 7 new unit tests (fake-clock scheduler, draft
fingerprint, merge/filter); full frontend suite 656 tests with a failure
set byte-identical to the pre-change baseline (14 pre-existing); Go
internal/api failures unchanged (no Go files touched). Manual E2E
evidence on the local replica stack remains open in the ticket.
Six follow-ups from the round8-12 hotfix retrospective:
- web-ci.yml: lint + Go/frontend tests on every push and PR (nothing ran
app checks before; the round10 dev-mode regression shipped green)
- tests/known-failures.json + check-test-baseline.mjs: gate by exact
failing-test id instead of hand-counted failure totals (14 frontend,
70 Go upstream debts recorded from the dev tip)
- devboot.test.mjs: boots the real Vite dev server and pins the movi
loader contract that broke round10 (query-less DEV url, /vendor stays
off the module pipeline)
- scripts/local/smoke-workbench.mjs: pre-release smoke covering the
seven recurring acceptance points (login/pool/claim/play-while-loading/
captions/4x/playhead), 3x green against the local replica
- docs/CODING_STANDARDS.md + AGENTS pointer: eligibility flags are
server-shipped, the UI renders them (rounds 9+12 lesson)
- vendor README host-element quirks section, HANDOFF gate pointers and
movi-path verification rule, perf-audit report pinned with the
post-round12 production 500 observation
- husky pre-commit: lint-staged (repo prettier scope) + tsc + gofmt
- gofmt: restore lint:go green on the dev tip (drift shipped silently
in the perf merge and round12 because nothing gated it)
The review workspace counted the available pool server-side but guessed
claim eligibility client-side. In the project-scoped workspace that guess
depends on listMembers data (review-only accounts skip the fan-out), so
absent or empty member data emptied the random-claim candidates while the
pool tab still showed claimable items — exactly the reported 可领取3但领取不了.
The pool listing now computes canClaim for quality reviewers exactly like
it already did for acceptance reviewers, and canClaimHumanItem resolves
batches through the request-scoped list-read cache (the listing's N+1
guard test stays green). The frontend honors server canClaim first, and
the empty-candidates notice now distinguishes no-permission from no-tasks.
Also fixes a dev-only regression from the rate-cap hotfix: the ?v=
cache-bust query on the vendored movi import defeats Vite's public-dir
resolver and hard-blocks every dev page with an error overlay. Dev now
injects a module script tag on the query-less path; built deployments
keep the cache-busted import URL.
Three production video/caption fixes (root causes reproduced with Edge
headless against the real BOS pipeline):
- Transport stall: seek settlement was purely event-driven, but movi can
fire loadedmetadata/canplay before the initial target dispatches, and a
target equal to currentTime issues no native seek — so nothing re-ran
settle(), the queue stayed pending forever (定位中 stuck), and play()
was swallowed until a manual timeline drag. A 200ms readiness poll now
closes the gap, and play() attempts settlement before deferring.
- Caption overlay never rendered in production: movi-player 0.4.1 leaves
host videoWidth/videoHeight at 0 and builds its shadow <video>
asynchronously after the host's first canplay, so overlay measurement
hid itself permanently (dev's native-video fallback masked this).
Measure intrinsic size from the shadow video with bounded retries.
- Caption visibility: overlays and the side panel now render for any
CLAIMED task in the review workbenches regardless of viewer identity,
pool tab, task status, or layout (专注/普通); review write controls
stay behind the reviewer-identity gate.
- movi-player 0.4.1 vendored dist: getMaxAllowedRate() 2 -> 4 (documented in
vendor README with refreshed SHA-256); the host setter silently clamped the
workbench speed selector to 2x in the movi branch.
- CAPTURE_PLAYBACK_RATES trimmed to [0.5, 1, 1.5, 2, 4]: 6x/8x options were
dead (clamped) and are removed instead of shipping fake speeds.
- ReviewCaptions invalid-kind highlight + caption list flex scroll (from dev,
PR #37) so review/acceptance users get the subtitle readability fixes.
- Test updated to the 5-rate contract; suite back at the 631/645 baseline.
Production report: for all three roles the video progress bar stayed frozen
during playback and only jumped to the playhead position on pause, and the
reviewer/acceptance random-claim buttons were gone.
Root cause (progress bar): the vendored movi-player 0.4.1 dist re-dispatches
play/pause/ended/playing/canplay/loadedmetadata/durationchange/progress on
the host element but NOT timeupdate/seeking/seeked/waiting from its shadow
<video>. Verified with an instrumented page: the shadow video fires ~4
timeupdate/s during playback while the host receives zero. The workbench
playhead, time display and fragment-end enforcement are driven by
onTimeUpdate, so they only moved when the transport re-read currentTime on
pause. MoviVideo now bridges those four events from the shadow video onto
the registered handlers with the host as currentTarget, so master-element
checks and proxied media property reads keep working for both camera
bridging and MaterializedSliceWorkbench sync.
Buttons: round7 (9d1c2252) dropped the acceptance random-claim entry as
collateral of the pool-join rework — restore it verbatim
(claimPrepackageAcceptance returns the claimed item again). The reviewer
random-claim entry (随机领取并开始审核) only ever lived on
codex/oct8-feedback-fixes and never merged; port it gated to quality review
workspaces.
Verified against the local snapshot replica: reviewer and acceptance
buttons render, claim and navigate (browser E2E); the production build
plays video with the playhead advancing at ~4Hz through 8s of samples;
frontend suite 631/645 pass vs 630/645 at the parent commit (failures are
pre-existing UI-copy debt, unchanged).
User report on production: reviewers saw 正在加载任务… for a long time and
then 任务关联数据缺失,请联系管理员核查; annotator loading slow; acceptance
fast. Production traces showed three distinct causes:
1. /api/human-items available pool 12-14s: the role pools filtered stages
only in-memory, so Mongo sorted the whole 17,220-doc unassigned backlog
(~7s per fetch round, up to 6 rounds) before the handler dropped nearly
every row. Acceptance was fast because its query already pushed stageId.
Fix: HumanItemQuery.StageIDs pushdown (parseHumanItemQuery accepts
stageIds=a,b,c merged with stageId); the quality/clip-quality/acceptance
workspaces send their stage set; review pool joins no longer depend on
the backlog sort.
2. 任务关联数据缺失 regression (introduced by the round4 task-list
pagination): review pool pages reference tasks across the whole backlog,
but the tasks fetch took a newest-first 200 window — only 60/500 pool
items could find their task. Fix: review workspaces (reviewOnly) fetch
tasks by the pool page's legacyTaskIds via the new ids= parameter
(id_unique ); ListAnnotationTasksFiltered gains an IDs mode in both
stores; the misleading 任务关联数据缺失 empty-state is scoped to
non-review workspaces (review pool loading shows its own message).
3. claim-count 3.4s: one per-candidate GetHumanBatch point lookup over
12,009 legacy batches. Fix: single ListHumanBatchAccessRecords read;
its projection now also carries status (the completed check read a
missing field before).
Verified on the 17k-item stress replica: pool 421→308ms with stage pushdown;
ids join returns 500/500 pool items in 78ms (was 0/440 outside the window);
claim-count 128ms. Full suites: 65 failures = the 65 pre-existing upstream
debt, no new.
Resolve server.go and production_stats.go conflicts by combining both
sides' intents:
- routes: keep dev's /api/dashboard/workforce and wrap the production
dashboard in the response cache
- dashboard loading: dev's parallel errgroup fetches, but the runs
goroutine keeps the C4 cursor-paginated summary page (limit 50 +
aggregates) instead of the unbounded list
- enrichDashboardHumanWork: keep the C4 aggregation-counter fast path;
the legacy fallback (stores without the counting interface) now
fetches items/packages in parallel like dev
- production_stats.go imports: our superset (time/sort/strings + cache)
The trace deployed in round5 located the cost: batches_ms carried 80% of
every work-buffer poll (1400-3900ms of 1600-4100ms total). The poller's
enablement check called ListHumanBatches for the project, which — because
the legacy migration created one batch per task — materialized 12,009 full
batch documents on every 3s poll, walking an organizationId-only index over
17,334 docs.
- HasRawHumanAnnotationBatch (Memory + Mongo): projects only the stages
field and stops at the first three-role raw_human match (105ms on the
production dataset, was 2000ms+).
- New humanBatches index organizationId_projectId_pluginId backs both the
enablement query and ListHumanBatches' project-scoped reads.
- store.Store interface gains the method; both store implementations keep
identical semantics (mid-test profile flips stay visible).
The new indexes cut the work-buffer poll from 3-5s to 2-3s, but the remaining
cost is unlocated. This trace records where the time goes per poll so the
next fix targets evidence, not guesses.
- ListAnnotationTasksFiltered (Memory + Mongo) accepts Limit and a descending
(createdAt, id) cursor; the handler exposes ?limit&cursor and returns
nextCursor/hasMore metadata only for explicitly limited requests, keeping
the legacy unbounded body byte-compatible for existing consumers.
- The annotation center fetches the first 200-task window; 显示更多 pulls the
next page via the opaque cursor and appends, so a 17k-task organization no
longer serializes the whole pool per page view (17k×~1KB JSON per load).
- UpsertHumanStageAttempt now upserts on (organization, item, stage, round):
review operations create attempt rows with operation-scoped ids, so the
claim path's id-only upsert violated organizationId_itemId_stageId_round_unique
(E11000 → 500 相同的记录已存在) and reviewers could not claim tasks whose
round already had an attempt row. Verified against the 2026-08-31 snapshot
replica with a real browser claim.
- Focus/compact workspace video: the fill rules targeted only <video>, but the
runtime renders <movi-player> (custom element) whenever browser-transcode
fallback is not confirmed, leaving the player at clamp-height with dead
space. Both rules now also match movi-player.
- migrateLegacyAnnotationHumanItems: one-shot guard stamped into the plugin
record when the sweep completes; GET /api/plugins no longer re-scans
17k tasks + 17k humanItems every read (8s per call in production).
- New humanItems index organizationId_latestAuthorUserId: the mine-pool /
work-buffer ActorUserID previously had an unindexed latestAuthorUserId
arm, forcing organizationId_legacyTaskId scans of 17k docs (6.2s) on every
3s poll.
- Task pool progressive rendering (200-card windows with 显示更多): the pool
state keeps full data, the DOM no longer mounts 17k cards at once.
- Task pool: push status/supplier/workflow/run/node/artifact equality filters into ListAnnotationTasksFiltered (new store method, backed by organizationId+createdAt indexes) instead of post-filtering an organization-wide scan
- Human items join: ListHumanItemsByLegacyTaskIDs fetches only the listed tasks' items via the organizationId+legacyTaskId index; TaskListProjection now drops annotationDraft too
- Draft progress: ListHumanItemDraftProgress loads slice/segment drafts per filtered task only (batched $in, new projection reads just legacyTaskId + draft payload); draft overrides revision only when the human item was touched after the latest slice revision
- Manager fast path: admin views skip the request-scoped batch snapshot, membership and supplier-pool reads entirely
- Workload summary: 45s per-user response cache (any /api write invalidates), mirroring the dashboard workforce route
- Tracing: any /api request over 1s now logs method/path/duration so page-level latency regressions surface without per-handler instrumentation; task list log gains drafts_ms segment
- Tests: draft-progress override semantics, manager scan-free path, store filter pushdown; v5 fixture users get SupplierID to match the supplier-unified account model (pre-existing red since c92bca16, 18 stock failures recovered green)
Co-authored-by: AgentTeams slow-page-fix-round3
The D-layer commit (54e47906) was staged from the shared working tree and
swept in one unrelated in-flight line: collapsedByDefault={false} on
WorkforceStatisticsPanel — a usage of a prop that exists only in a
colleague's uncommitted panel WIP. The committed history alone therefore
failed tsc (the main tree compiled only because that WIP panel was
present locally). Remove the leaked usage so the release branch's
committed state is self-contained; the colleague's feature line stays
in his uncommitted work exactly where it was.
- Dockerfile.api web-build never copied public/, so vite publicDir output
(movi-player 0.4.1 vendor + diagnostics-probe.json) never reached the
production image; local replica hid this because Vite dev serves the
source tree directly
- spaHandler: /vendor/ joins the immutable-cache and miss-404 branches
(version-pinned dirs; a failed module import must 404, not receive
index.html as a confusing syntax error)
- application/wasm MIME comes from Go's builtin table (verified
GOROOT/src/mime/type.go; container golang:1.24-bookworm)
- TestSPAHandlerServesVersionedVendorAssets: wasm MIME + immutable header,
miss 404, probe not cached
- proposal-final.md D.9 records the gap and fix (release prep finding)
E' foundation (per proposal v4, user constraints: no server-side transcode
fallback, no upstream format talks, fast ship):
- video-preview.js: buildBrowserPlayableVideoURL no longer appends
transcode=browser; legacy param is defensively stripped; bos:// proxy
URLs are direct too
- LazyVideoPreview.tsx: remove useProxy transcode retry (sync=1 blocking
stream); direct playback only; error copy points to browser update
- annotation_operations.go: drop unconditional task-detail warmup call
(<=2 ffmpeg per GET, C-1 complete)
- server.go: mark warmAnnotationVideoPreviews dormant (kept one release
cycle as rollback hatch)
- video-preview.test.mjs: flip 7 assertions to direct/no-param, add
bos:// + legacy-strip coverage (14/14 green)
Verified: tsc clean, go build cmd+internal ok, targeted Go tests green
(1 baseline pre-existing failure unchanged via stash A/B), full frontend
suite failures identical to baseline (14), local replica: task GET has
zero warmup/cache/ffmpeg activity, direct artifact content returns 307
presigned redirect, transcode=browser mechanism retained and produces
H.264 960px 12fps cache artifact (rollback path intact).
proposal-final.md v4: new Part E row + §6.6 (E'+D fused decode chain),
recommendation reworked (A backlog, E'+D single-ship, C accelerated,
B dormant pending open question 13), appendices D.8 + full attachment D
implementation & verification record. Not pushed, not deployed.
Record how to verify the part-index delivery in the local replica: the three
test layers, the real-media boundary check that keeps review media while the
index references none, the reversible replica fixture, and the dry-run
migration command. Also note that the snapshot super admin cannot log in locally
because legacy organization-admin access is off, so the organization admin
account and its phone identifier are the working path.
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.
The media-only compact height overrode focused layout sizing, leaving videos at 200px inside a tall player. Limit that height to ordinary previews and cover both cameras across three viewport sizes.
The per-resource mutex behind account/project-member/supplier writes had
no expiring lease by design: a paused process must never resume after
another writer has stolen its lock, so recovery required an operator to
verify the owner had actually stopped and clear the lock by hand. In
practice, on Fanyu this meant every worker pod replacement (a routine
rolling deploy) mid-hold left the lock permanently stuck — hit three
times in one session, each requiring a manual mongosh intervention.
Adds a lease (ACCOUNT_MUTATION_LOCK_LEASE_SECONDS, default 2 minutes)
renewed by a background ticker for as long as the guarded operation
keeps running — mirroring the project-deletion task lease's own renewal
pattern already in this codebase. A live owner's lease is renewed well
before it can lapse (every leaseDuration/4), so it's never reclaimed out
from under it; only a lock whose owner stopped renewing entirely —
because it crashed or was replaced — becomes reclaimable, once its lease
lapses. Reclaiming always assigns a fresh owner id, so the original
holder's own release (matched on "owner": owner) can never succeed
afterward and can never touch the new holder's lock — the fresh id
already acts as the fencing token a naive TTL-lock would be missing. A
transient renewal error (network blip) doesn't give up the lease
early — only a confirmed "someone else now owns this" does. Genuine
crashes or ambiguous network results are still surfaced to the caller to
verify, exactly as before; only the "must wait for an operator to
notice and clear it by hand" half of the old design is gone.
Added TestAccountMutationLockLeaseReclaimAndRenewal (live-Mongo gated,
same convention as the existing index-migration/duplicate-key tests):
normal acquire/release still round-trips, a lapsed lease from a
simulated dead owner is reclaimable, and a live owner's renewed lease
blocks a concurrent reclaim attempt.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Root-caused live on Fanyu: creating a new account failed with "phone
must be unique" for a phone number that had never been used. The users
collection still carried a stale, non-sparse email_unique index left
over from before accounts moved to phone as the sole identifier — this
codebase stopped declaring that index, but nothing ever dropped it from
an already-existing database. The first account created without an
email field (a normal, expected shape post-migration) occupied that
index's one allowed null slot; every account created after that
collided with it on insert, and upsertUser/updateAdministrator treated
*any* MongoDB duplicate-key error on the users collection as a phone
conflict without checking which index actually fired, misreporting the
real (email_unique) conflict as a phone conflict that had nothing to do
with the phone number entered.
Fixes:
- isPhoneUniqueDuplicateKeyError checks the error message for the real
index name (phone_unique) instead of assuming any duplicate-key error
on the collection is a phone conflict — mirrors the existing pattern
already used for annotation_labels' unique-index checks.
- EnsureIndexes now drops email_unique if present (dropObsoleteIndexes),
so any other pre-migration database doesn't carry the same landmine.
- Directly dropped the stale email_unique index on the live Fanyu
database to unblock account creation immediately.
Added TestPhoneUniqueDuplicateKeyErrorIgnoresUnrelatedIndex (live-Mongo
gated, same convention as the existing annotation-review index test) to
reproduce the exact failure and lock in the fix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
executeProjectDeletion processed every target (runtime, then workspace,
then bos, then records) strictly one at a time — for a project with
thousands of real runs, that meant thousands of sequential K8s/BOS/Mongo
round trips. Observed live on Fanyu: BLF-data's runtime phase (stopping
4,641 runs) took tens of minutes at that pace.
Replaced the per-target sequential loop with a bounded worker pool
(PROJECT_DELETION_TARGET_CONCURRENCY, default 12) applied within each
phase — targets of the same kind now run concurrently, but phases still
run strictly in order (runtime, then workspace, then bos, then records),
preserving the "stop/verify runtime, then remove files, then DB"
ordering the plan is built with. The one-time phase-transition safety
checks (wait for in-flight human work, re-verify runtime absence,
revalidate references) still run exactly once, at the same point,
between the runtime and workspace phases.
Every read-modify-write of shared task state (a target's Status/Error,
and every persist() call) is guarded by a mutex; the actual I/O
(deleteProjectTarget) runs unlocked so workers genuinely overlap. Added
TestProjectDeletionExecutesTargetsConcurrentlyAndCompletes (30 runs) to
lock in that concurrent execution reaches the same end state — every
target done, every workspace directory removed, project record gone —
as the old sequential loop. Full suite passes under -race with no
warnings; 75 pre-existing unrelated failures unchanged.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
deleteProjectTarget's "bos" case called validateDeletionReferences again
for every single BOS target — with SL-data's ~2,600 BOS targets, that
meant re-running the (already expensive, now individually fast but still
~10s including Mongo I/O) org-wide reference check up to 2,600 times
during actual deletion execution, not just once during preview. Caught
live: SL-data's real deletion run was in the BOS cleanup phase at
~1.5 items/minute, which would have taken roughly 29 hours to finish.
executeProjectDeletion already re-runs validateDeletionReferences once,
right before it starts processing non-runtime targets (the runtimeDone
gate at line ~724) — that is the correct point to catch a run created
between plan-build and execution referencing a path about to be deleted.
Repeating it per-target adds no additional safety, since nothing about
processing one BOS target changes what other runs reference within the
same execution pass.
The only other caller (supplier_deletion.go:442) passes an empty
ProjectDeletionPlan{}, so the removed call was already a no-op there.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reviewer-confirmed edge: in the ordinary layout an explicit claim/continue with an already undersized window marked an intent that the dimension-keyed pause effect never latched, so enlarging the window would auto-start without a manual continue. A fresh intent is now latched immediately whenever the review window is undersized; recovery stays manual (rule 10).
Reviewer follow-ups for ticket 03 rule 10: the 1413x615 bottom line now gates ordinary quality/acceptance layouts too (annotation pages unchanged), so an undersized window pauses the queue and blocks auto-entry until a manual continue. The ordinary compact status + pause/continue stay visible whenever the queue was engaged in this page lifetime, even with no editable item open (waiting after the last decision retired it). Explicit 返回任务池/返回我的任务 returns pause the queue in ordinary layout as the focused heading already did; layout display toggles still never pause or restart.
Ticket 03 rule 10: a one-shot entry intent is armed only by explicit claim/continue actions and consumed exactly once after the write lease and task context are ready. Pauses latch the intent, scope mismatches always clear it, unrelated selections prune it, and lagging detail of a previous task can neither consume nor drop a fresh intent. Legacy-protocol tasks stay manual-only. Ordinary layout gains the same compact continuation status and pause/continue control as the focused heading; the acceptance card separates header preview from footer continue.
Introduce an optional viewAnchor viewing bookmark on ReviewProblem
(sourceItemId?, sliceId, atSeconds, timeBasis) persisted via JSON/BSON.
The anchor recalls the recorded picture, including for task-scope
problems whose target semantics stay global zeros, and never acts as a
problem target or decision gate input.
canonicalReviewProblems validates the anchor against the same current
reviewed evidence (aggregate source identity included), allows discarded
slices as bookmarks, rejects nonfinite time and unknown bases, converts
between capture-seconds and slice-seconds to the evidence's canonical
basis, and clamps out-of-window time like existing record validation.
Legacy problems without an anchor stay valid with no invented frame.
Cover with quality/acceptance public-handler tests for anchor
persistence, source isolation, invalid-anchor rejection, legacy saves
and idempotent replay, plus a canonicalization unit test for nonfinite
time and discarded-slice anchors.
- Drop the 原始记录 JSON details block from ReviewCaptionDetails; the
current-frame annotation full text and evidence error hints remain
- reviewCaptionAtTime no longer exposes the original record channel and
renders invalid segments as 无效片段, keeping discarded and blank
business states distinct
- Remove now-unused caption summary/pre styles and update the frontend
and browser caption tests to the new contract
Drop the uniqueness-by-target rejection in canonicalReviewProblems so the
same action/slice/task can carry several problems identified by their own
IDs. Duplicate problem IDs, canonical evidence spans, permission, version
and operation idempotency handling stay unchanged, and input order remains
the persisted order.
Add public-handler regressions for quality and aggregate acceptance draft
saves: same-target multiple entries, edit/delete of a single entry,
duplicate-ID rejection and idempotent operation replay.
The scoping fix in #11 got validateDeletionReferences's queries down to a
single organization, but SL-data/BLF-data deletion previews still hung
for minutes. Live debug instrumentation on Fanyu found the real cost:
for a project like SL-data, buildProjectDeletionPlan produces ~2,600 BOS
deletion targets, and the org has ~8,000 other runs averaging ~30KB of
marshaled JSON each. The old code did a strings.Contains scan of every
other run's JSON for every target — ~21M pair-wise substring searches
over ~240MB of JSON, which is what actually burned the CPU (confirmed
via `kubectl top`: pegged at 1 full core for minutes).
Replaced the O(targets×runs) nested loop with a single combined regexp
(Go's regexp is RE2-based, so an alternation of N literal patterns still
matches in time linear in the text length) scanned once per other-run,
collecting which target URIs are actually referenced. The boolean result
for every (target, run) pair is unchanged — same exact-substring
semantics as the original strings.Contains check — just computed once
per distinct URI/run instead of once per pair. Added
TestProjectDeletionBlocksTargetReferencedByOtherRun to lock in that the
safety check still blocks a target another run's artifact references and
still allows one nothing references.
Local benchmark at SL-data's real scale (8,000 other runs, 2,600 BOS
targets): 241ms, down from a multi-minute hang.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PR #9 scoped the run/workflow counting pass in buildProjectDeletionPlan
but missed validateDeletionReferences, which still called
ListAllWorkflows/ListRunArtifacts(ctx, "") — an unscoped scan across
every organization's workflows and runs on every single project
deletion preview. This is why SL-data and BLF-data deletion previews
kept hanging even after the earlier fix was deployed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
buildProjectDeletionPlan and workflowRunsForDeletion both fetched EVERY
run in the organization via ListRunArtifactsByOrganization, then
filtered in Go by projectId/workflowId. For orgs with light test data
this is instant; for an org with real production history (thousands
of runs, 1000+ jobs/day) it made the project-deletion preview hang for
minutes against the shared external MongoDB — discovered live on
Fanyu trying to delete SL-data/BLF-data.
The runs collection already has organizationId_projectId_createdAt_id
and organizationId_workflowId_createdAt_id indexes (mongo_indexes.go)
that this code never used. Added ListRunArtifactsForProject, which
queries by projectId-or-workflowId-in-list directly, and switched both
call sites (plus buildWorkflowDeletionPreview, which was called once
per workflow inside buildProjectDeletionPlan — compounding the same
scan N times) to use it. The mid-deletion re-verification call site
(project_deletion.go ~669) keeps its exact prior semantics
(projectId-only match, no workflowId fallback) by passing nil
workflowIDs.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Standards + Spec review (two parallel sub-agents against dev) both
independently caught the same real regression, plus three smaller
issues:
- internal/store/supplier_deletion.go: supplierDeletionProjection's
"users" case still projected "email" instead of "phone", so
supplier-deletion audit plans silently showed an empty phone for
every account on the real Mongo store (memory store was unaffected,
which is why tests didn't catch it). Same bug class as the
ListProjectMemberUsers gap fixed while merging ticket 02 — missed
in the sweep.
- internal/store/mongo.go: ListProjectMemberUsers's projection still
listed a stray "email": 1 for a field that no longer exists on
UserRecord since ticket 05. Harmless but dead.
- src/lib/phone.ts (new): extracted the phone regex/validator that had
been duplicated (RegExp in Users.tsx, a re-typed string literal in
its own JSX pattern attribute) into one shared module.
- src/components/Sidebar.tsx: the self-profile phone edit form (wired
during the ticket-03 merge, not by any single ticket) had no
client-side format validation, unlike the account-management form —
now uses the same shared pattern/validator.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contract step: UserRecord.Email deleted, phone_unique tightened from
sparse to non-sparse, dead email-specific store/API code removed.
Account-hierarchy/supplier-deletion identifying fields switched to
Phone (they reflect live account state on every request, not frozen
history, so this isn't the historical-audit exception the spec allows).
~35 test files migrated off email fixtures.
Closes the account-phone-login spec and all five tickets.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
handleAuthLogin, bootstrap-super-admin, and the login UI now use phone
instead of email. Also converts the legacy
/api/admin/organizations/{id}/users account-creation endpoint to phone
(same-class gap as found while merging ticket 02/04 — it would have
created accounts unable to log in once login became phone-only).
net/mail is now fully removed from internal/api.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- handleAuthLogin now authenticates via store.FindUserByPhone instead of
FindUserByEmail; the login/bootstrap-super-admin request payload field
is now `phone`. Old email addresses are no longer valid login credentials.
- bootstrap-super-admin now validates phone format (isValidChinaMobilePhone)
instead of net/mail.ParseAddress; net/mail is fully removed from
internal/api.
- Same-class gap fix: handleAdminOrganizationUsersCreate (the legacy
per-organization admin endpoint, not touched by ticket 02) still created
users by email only, which would have left them unable to log in under
the new phone-only login. Switched it to phone validation/uniqueness too,
and removed the now-dead normalizeUserInput/validateUserEmailAvailable
helpers.
- Frontend: authApi.login, UserContext's login signature, and
UserBootstrapPanel's submit handler now send `phone` instead of `email`
(the form/labels were already phone-based from ticket 04).
- Updated ~20 Go test files whose fixtures/helpers logged in via
user.Email; adminCreateUser/loginSession/bootstrapSuperAdminSession now
work in terms of phone (deterministically derived from existing
email-shaped test identities via testPhoneFromSeed, to avoid rewriting
every call site). Added internal/api/auth_phone_login_test.go covering
phone login success/failure and old-email rejection.
go test ./internal/api/... and npm run test:frontend match their
pre-ticket baselines exactly (75 Go failures / 599 frontend tests with
586 pass, 13 fail) by failing test name, not just count.
Admin account-management UI and API now validate/enforce phone instead
of email on create/edit. Production Fanyu data migration deferred to
deployment time per spec decision 7 — not executed here.
Merge conflict resolution + gap fixes found while reconciling 02 and 04:
- src/types.ts / UserContext.tsx / users.ts: kept Email required + Phone
optional (matches current migration state — login still uses email
until ticket 03); createUser/updateCurrentUser signatures reconciled
to the versions that are actually wired to real backend behavior.
- internal/api/project_members.go: projectMemberView never exposed
Phone (ticket 04's frontend rename to userPhone had nothing to read).
Renamed UserEmail->UserPhone and populated it from user.Phone.
- internal/store/memory.go + mongo.go: ListProjectMemberUsers's field
whitelist projection dropped Phone entirely (pre-existed the Phone
field, never updated) — same root cause as project_members.go, one
layer down.
- internal/api/auth.go: handleCurrentUserProfileUpdate/
currentUserProfilePatch still only supported Email; self-service
profile edit silently no-opped on phone. Wired to phone validation
mirroring the ticket-02 admin create/edit pattern.
- Updated 3 tests whose expectations depended on the self-profile-update
gap above (TestSessionAuthTenantIsolationAndRolePermissions,
TestUserEmailUniquenessValidation, TestProjectMemberDisplayScopedBatch)
to phone; verified full internal/api suite back to the 75-failure
baseline (byte-identical failing test names) and frontend suite at
599/586/13 baseline.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wires the Phone field/validation/uniqueness helpers added in ticket 01
into the account-management create/edit path, per the
account-phone-login migration spec.
Backend (internal/api/server.go, internal/domain/types.go,
internal/store/{memory,mongo}.go, internal/api/store_errors.go):
- handleUsersCreate/handleUsersUpdate now validate and enforce phone
(^1[3-9]\d{9}$, uniqueness) instead of email; duplicate-phone errors
return field "phone" with no "邮箱" wording.
- CreateUserInput gained a Phone field, wired through both store
backends' CreateUser.
- Email remains on UserRecord (still used by login/self-profile,
untouched here) but is no longer required/validated on account
create/edit.
Frontend (src/pages/Users.tsx, src/services/api/users.ts,
src/types.ts, src/context/UserContext.tsx):
- Account management create/edit form, search box, and table column
switch from email to phone (type="tel", client-side
^1[3-9]\d{9}$ validation, Chinese labels updated to "手机号").
- User type gained an optional `phone` field; usersApi.create's
payload field renamed from email to phone to match.
- UserContext's createUser helper type/impl updated to match (dead
code today, unused by any caller, but kept building); login/session
bootstrap logic in UserContext.tsx is untouched.
Explicitly out of scope, per the research notes' scope boundary and
spec decision 7: the real "存量账号迁移" (migrating Fanyu's live
accounts to real phone numbers) is a human-supervised, deployment-time
operation, not something this session executed. No production Fanyu
Mongo/kubeconfig was touched. This ticket only makes the admin
UI/API *capable* of setting a phone number on new or existing
accounts, verified against the in-memory store and local fixtures.
Also left untouched, per scope: login page/flow, auth.ts,
UserContext's login/session logic (ticket 03); Sidebar.tsx,
ProjectMembersPanel.tsx, UserBootstrapPanel.tsx (ticket 04).
Verified: go build ./... clean; go vet ./... clean; gofmt clean on
touched files; go test ./internal/api/... and ./internal/store/...
produce the exact same 75 pre-existing failing test names as the
ticket-01 baseline (only two account/edit-adjacent tests updated to
assert phone instead of email behavior, plus a new
TestUserPhoneValidationAndUniquenessOnCreateAndEdit covering
create/edit phone format + uniqueness + role/supplier preservation);
npm run lint:web (tsc --noEmit) clean; node --test
tests/frontend/*.test.mjs matches the pre-existing baseline exactly
(599 tests, 586 pass, 13 fail, identical failing test names).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Renames the shared User.email/ProjectMember.userEmail fields to phone/
userPhone and updates every display and field reference outside the
account-management page (src/pages/Users.tsx, ticket 02) and the login
flow (src/services/api/auth.ts + UserContext/UserBootstrapPanel's login
call signature, ticket 03): project member list, sidebar profile,
bootstrap panel copy, and the candidate-user pickers in Projects.tsx,
ObjectSync.tsx, and SupplierDeletionDialog.tsx.
AccountHierarchyIssue.email in services/api/users.ts is left as-is: it
mirrors a read-only historical audit field the backend still returns
under the "email" key, matching the spec's carve-out for legacy
audit-log data.
Note: internal/api/project_members.go does not yet copy user.Phone into
the project-member view response, so ProjectMembersPanel will show a
blank phone until that backend field is wired up (flagged separately).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Expand step of the email→phone identifier migration. Adds Phone
alongside Email without touching any existing login/account behavior.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Expand step of the account-phone-login migration (ticket 01): adds
UserRecord.Phone, a sparse phone_unique Mongo index, a China mainland
mobile regex validator (^1[3-9]\d{9}$), FindUserByPhone (Mongo +
memory), and phone uniqueness helpers (ensureUserPhoneAvailableLocked,
validateUserPhoneAvailable) mirroring the existing Email plumbing.
Nothing wires Phone into login, account creation, or account editing
yet — Email remains the sole identifier used by existing flows, so
behavior is unchanged from a user's perspective. That's tickets
02/03/05.
Verified: go build ./... clean; new tests
(TestMemoryStoreFindUserByPhoneAndEnforcesUniqueness,
TestIsValidChinaMobilePhone, TestValidateUserPhoneAvailable) pass;
full internal/api suite has the same 75 pre-existing failures
(identical names) before and after this change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Requirements gathering for replacing email with a phone-number account
identifier (format-only validation, no SMS). Spec and five expand-migrate
-contract tickets ready for implementation.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- MovePrefix/RenameObject now copy objects larger than the 5 GB BOS
simple-copy limit via multipart part copy (preserving Content-Type and
user metadata), with per-object rollback that only removes
destinations created by the move itself
- MovePrefix reports per-object progress for async tracking
- directory moves and deletes guard against capture-automation watched
prefixes with an explicit force confirmation (409
capture_automation_conflict)
- move precheck rejects no-op destinations and parent/child overlapping
selections with actionable error codes instead of a bare validation
failure
- new POST/GET /api/object-storage/move-jobs async move jobs with
progress polling so large directory moves survive HTTP timeouts
- frontend object browser surfaces validation issue details, uses the
async move job for directory moves, and asks for force confirmation
when a capture automation watches the affected prefix
- handleTemplateReleasesList backfill created releases without
WorkflowInputs/ArtifactStorage, so workflows instantiated from such
releases failed every production run with required_root_input_unbound
- frontend API client now appends backend validation issues to error
messages instead of showing a bare 'Validation failed'
Goal: Implement the approved acceptance fixes, bounded reads and static delivery, then verify 90 annotators, 18 quality reviewers, 12 acceptance reviewers and one administrator.
Agent: Codex, current implementation chat
Base: origin/dev @ 6d9e6f66, integrating codex/production-quality-dashboard @ a8899740 to preserve the user's existing dashboard and responsiveness work.
Scope: acceptance UI/media lifecycle, review opinion provenance and forwarding, static build/delivery, bounded diagnostics, isolated capacity/recovery verification and corresponding contracts.
Out of scope: production writes, resource changes, public bandwidth expansion, object storage uploads, push, PR and deployment without separate authorization.
Risk: cross-stage opinion compatibility and coordinate mapping; cached media must retain frozen source identity and authorization; infrastructure and full capacity remain unaccepted until evidenced.
**人工复验步骤(Lane B 部分)**:单来源任务:顶栏应显总视频进度、拖顶栏跨切片应换片定位(缺陷1);普通模式画面标注只出现在视频画面内与验收面板,视频下无重复(缺陷2)。Legacy 任务(如有存量):验收面板出现统计表单、无打回按钮、填齐四项后「验收通过」应真实落库(events 可查 approved + statistics 存入 payload);严格任务不受影响(姿态开关仍在)。
**Lane B 收工**:两 commit(43d9e0e7、d3e2ffca)均在集成合并 4d182c8c 之上;未推送;Status 保持 claimed(票归多 lane 共有,收尾由 coordinator 裁定)。
### 2026-10-14 Lane C 证据注记(服务端互补根因,ise-af 父代理直派会话)
**提交**:`dd5f69a1`(修复 + 测试;在 Lane B `b5e3d79c` 之上,集成合并已含 4d182c8c/a6730800,merge = already up to date)。文件域仅 `internal/api/review_decision_plan.go`、`internal/api/review_session.go`、新测试 `internal/api/acceptance_release_compat_test.go`——与 Lane A/B 零重叠,未碰任何前端文件。
Base: `867d406c`. Synthetic local data only; no production writes.
## Reproduction and fix
The new browser regression failed against the unchanged base: after selecting 2x and advancing to slice two, the speed selector returned `1` instead of `2`. Physical acceptance slices intentionally change the media key and remount CaptureAnnotationWorkbench, whose rate was component-local state.
FinalAcceptanceWorkspace now owns the rate and passes it to its media and pose workbenches. Callers that do not supply a rate retain the existing local-state behavior. No persistence across reloads is introduced.
## Evidence
- `npm run verify:task -- --base 867d406c --budget-seconds 600` ran type/architecture checks, changed-component formatting, verification tooling tests, affected frontend tests, the new browser regression, rework-boundary browser, review-draft browser and review-decision browser checks successfully. Its final permissions command could not launch because the default Playwright Chromium was absent. Original report: `local-data/test-results/verify-1793876380248594000/report.json` (retains that failure; not relabeled).
- Reran the permissions command with `BROWSER_EXECUTABLE=/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge`; passed with no errors, failures or unexpected requests.
- Strengthened and reran `tests/browser/acceptance-playback-rate.mjs`: physical clips must mount VIDEO and source-index clips must mount MOVI-PLAYER. Both paths passed three forward/backward transitions retaining 2x/1.5x, actual left/right element rates and play/pause. Report/screenshots: `local-data/test-results/acceptance-playback-rate/`.
- The source components did not change during these follow-ups. Unchanged editing, draft, decision and permission evidence is reused; only the strengthened synthetic fixture/browser test was rerun.
- Visually checked the acceptance page, both cameras, current-slice caption and retained 1.5x control. No customer-facing copy or layout changed.
## Running the dedicated browser regression
Requires ffmpeg, installed browser and local Vite on 127.0.0.1:5197 (`npm run dev -- --host 127.0.0.1 --port 5197 --strictPort`). The browser test intercepts only /api requests, permits GET/HEAD only, and supplies synthetic metadata and MP4s. It never claims, saves or submits a task.
Run `BROWSER_PATH='/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge' node tests/browser/acceptance-playback-rate.mjs`.
## Limits
No production verification or deployment. No promise of retaining speed across page reloads. Broad release/capacity checks are not claimed by this local UI fix. The original task-gate report remains failed for its environment issue; the targeted follow-up above supplies the successful missing check.
- Built a real-browser keyboard loop (Ctrl+Arrow then immediate Space) using synthetic source-index media. Reproduced repeated failures with all bytes buffered: UI either remained in positioning or reverted to paused. Temporary probes and event traces are under `local-data/test-results/acceptance-shortcut-playback/`.
- Compared the pinned vendor implementation and native video properties: Movi derives seeking/readiness from its asynchronous state machine and paused from play intent. These diverge from the underlying media during rapid navigation; stale pause notifications could cancel a new play. The adapter now uses the current native engine's real paused/seeking/readyState; the software path retains vendor getters. No change to logical annotation times or seek accuracy.
- Extended the permanent browser regression to native clips, source-index clips with integer offsets, and source-index clips with fractional offsets. Each performs 15 transitions, checks both real media clocks advance after immediate keyboard play, and retains the playback rate. Passed twice with the fix (45 transitions per run). Screenshots/report: `local-data/test-results/shortcut-playback-fixed/`; task-run copy: `local-data/test-results/acceptance-playback-rate/`.
- Ran that same strengthened regression against the pre-fix MoviVideo from a341def2: failed waiting for playback after the shortcut (`local-data/test-results/shortcut-playback-baseline/browser-red.log`). Restored the fix automatically afterward.
- Task verification `verify-1793893323697578000/report.json`: type/architecture, format, and browser checks passed. Full frontend gate failed with one additional-to-known-baseline ID: `fanyu-comment-followup.test.mjs :: dashboard routes all workforce roles to the clean production quality panel`. Running the required gate with the pre-fix MoviVideo produces the same failure (`shortcut-playback-baseline/frontend-gate.log`); the tested dashboard sources are unchanged by this task. Known-failures was not expanded and the failed report remains failed.
- Actual acceptance screenshot checked with both cameras and 1.5x rate; no copy/layout changes. Production/client-specific verification remains pending; this is a local reproduction of the reported symptom, not proof of every customer's failure condition.
- Media recovery across annotation, quality review and acceptance passed with forced software-engine reload, simulated failed loading, bounded retry, retained position, and annotation draft preservation: `REWORK_BOUNDARY_BROWSER_TEST=1 ANNOTATION_FEEDBACK_BROWSER_SCRIPT=local-data/test-results/acceptance-shortcut-playback/media-recovery.mjs go test -count=1 ./internal/api -run '^TestReworkBoundaryBrowserReplica$' -v` (35.16s). The original script failed before mounting due to a hardcoded missing `.vite/deps/react-dom_client.js`; the task-local copy changes only its Vite cache directory and React module import through a Vite-transformed module. No product/fixture assertions were removed. The original harness failure remains recorded, and no shared node_modules cache was repaired or overwritten.
Local only. No push, PR, deployment, production data change or source-media change. Remaining release limitation: the pre-existing dashboard frontend assertion is still outside the known-failure baseline and blocks claiming the full task gate green.
Out of scope: Persistence across browser reloads, global player defaults, task/permission changes, V4 migration, production writes or deployment.
Risk: Shared workbench must preserve its existing uncontrolled behavior for annotation and quality review; remounted acceptance media must receive the retained rate before playback.
Follow-up base: `a341def2`. The user reports occasional inability to play after keyboard slice navigation. Reproduced locally with synthetic full-source clips and Ctrl+Arrow navigation followed immediately by Space; no production mutation.
Scope: normalize Movi's HTMLMediaElement-shaped paused/seeking/readyState properties from its current native engine when present; preserve the existing software-engine getters, source/seek coordinates, media bytes, annotations and permissions. Restore original property descriptors on cleanup. Extend the browser regression to repeated keyboard navigation with integer and fractional source offsets.
Compatibility: pinned vendored Movi 0.4.1 exposes the active native video via getHLSVideoElement(), including its direct native wrapper; the software engine returns null. Re-check that seam if the vendor is upgraded. No vendor bundle or network settings changed.
Baseline: 5699e7cf585d4823ef8e37cd484baf655cb56f23 (dev). Decision gate 1 approved option B; local implementation/checks/commit only. No push, deployment, company-cluster/BOS/customer-data writes.
Goal: finish an exiting supplier's existing acceptance work for settlement; supplier and accounts remain. Admin-only per-supplier policy with project scope, expiry, cancellation and version history. Keep reviewer supplier anonymity, aggregate membership/frozen sampling, permissions, decision receipts and count totals unchanged. Owned tasks precede new admission; priority groups precede normal candidates in random and continuous admission.
Owned files: new acceptance_priority domain/store/API files and tests; Store interface/MemoryStore field; human loop routes/review continuation; review-claim-candidates helper/human-loop service; Users admin insertion and new SupplierAcceptancePriorityPanel. Existing AGENTS/docs/admin pool test edits are unrelated, preserved and excluded from staging/check selection.
Status: original implementation433a3b6a deployed in ac1eddcc after explicit decision gate2 approval; production policy remains unconfigured and admin slow-read blocks acceptance. The fix_a follow-up below is local only, awaiting its own deployment decision. Source supplier resolution is request-local through SourceBatchID and source human items/task ownership; missing/conflicting evidence stays unknown, visible only as admin “归属待核对” count. No customer record backfill. New collection acceptancePriorities is created only when an administrator first saves locally/after approved deployment. No startup migration/index build.
Implemented: immutable versioned per-supplier configuration in acceptancePriorities; admin-only read/write routes and supplier account-management panel; request-local batch source ownership resolution through identity-only bulk queries; priority-before-normal admission in random/continuous paths; existing own-task precedence, permission checks, final store CAS and totals preserved. Unknown/conflicting source ownership is shown only in the admin unresolved count. No startup migrations or task backfill. Candidate-only metadata read mode avoids annotation hydration and serializes an explicit anonymous whitelist. Source lookup failure does not silently fall back to ordinary admission.
Verification:
- Final task report: local-data/test-results/verify-1794885636928492000/report.json, selected-checks-passed, all 14 commands passed, no unmapped checks or input changes during execution. Task baseline remains 5699e7cf. Standard verification planner/runner used with the task's declared file set and acceptance-supplier-priority scope; protected unrelated changes and their checks excluded. Reproducible local wrapper/terminal log: local-data/test-results/issue21/run-scoped-verification.py and task-final.log. npm verify:plan was inspected before editing and again after mapping.
- TypeScript lint/typecheck, changed-file formatting, Go formatting, verification tooling tests, frontend business regressions, API and MemoryStore regressions passed. Includes priority beyond 200 newer ordinary candidates, per-project scope, unknown/conflicting historical ownership and task fallback, expired/canceled policy fallback, returned acceptance rounds, admin access/version conflicts, unchanged count totals, owned-task-first continuation, grant revocation and a single winner among eight competing claim requests from two reviewers.
- Real localhost Mongo 27018: isolated acceptance_priority_test_* databases, configuration CAS/history, ownership resolution and new-store-instance persistence passed; temporary databases cleaned. No shared snapshot customer records changed.
- Race detector: go test -race ./internal/api ./internal/store -run '^TestAcceptancePriorityConcurrentClaimCAS$|^TestAcceptancePriorityStoreMemory$' -count=1 -timeout=2m passed (issue21/race.log).
- Actual Users page + isolated MemoryStore API browser: admin save/project selection/reload/cancel/load error/retry and supplier-manager exclusion passed. Desktop light/dark inspected: issue21/browser/active-light.png and active-dark.png. Loading/error and mobile screenshots retained. Existing global navigation compresses the Users page at 390px; the narrow screenshot is observation, not a mobile usability acceptance claim. No global layout changes were included.
- #18/#19 regressions passed: original-video-time browser for annotation/QC; acceptance timeline normal/focused/read-only; acceptance-playback-rate engines native/movi/movi-fractional, 15 slice changes each, retained rates and zero page errors. Player report: local-data/test-results/acceptance-playback-rate/report.json. These fixtures are local synthetic media.
- Earlier development failures are retained in temporary diagnostic logs; corrected MemoryStore private-field cloning and browser fixture routing/auth/reload assumptions. UI startup imports an existing synthetic legacy task once, so browser count assertions compare with the live fixture API rather than assume a fixed backlog size. The separate API before/after count equality and exact source ownership/count assertions remain in place.
Compatibility/activation: see docs/acceptance-supplier-priority.md. Production activation and business acceptance remain gate 2/explicit deployment authorization. Production supplier/project/expiry selection is not yet made; no production policy was created. No pushes, PRs, cluster/BOS writes, or customer-data writes. Production-size latency/capacity and full release gates have not been claimed.
Historical initial local handoff: implementation commit 433a3b6a. Pre-commit TypeScript/architecture/Go formatting checks passed. Existing protected user edits remain outside the task commit. Remote dev has not been changed by this task. Release preparation must first synchronize the authorized release tip and use the documented release process; deployment authorization is not inferred from decision gate 1.
## Configuration read unblock (fix_a)
Decision gate 1 approved 2026-11-16: local implementation only, no push/deploy. Base ac1eddcc. Owned files: API acceptance_priority*, routes_human_loop/golden, SupplierAcceptancePriorityPanel, browser fixture, matching verification scope/docs. Preserve unrelated dirty files. Separate metadata/save/cancel acknowledgements from optional two-second statistics; null counts on incomplete, version-fenced responses and independent browser cancellation/retry. Production policy remains unconfigured; deployed does not mean priority active.
fix_a verification: local-data/test-results/verify-1794893320981309000/report.json selected-checks-passed; 15 commands, no deferred/unmapped coverage and no input changes during run. Protected unrelated changes excluded using standard scoped planner/executor wrapper local-data/test-results/issue21/run-fix-a-verification.py. Type/architecture, format, tooling, API/MemoryStore, real isolated Mongo policy and configuration latency, full admin browser and #18/#19 normal/focused/read-only/native/movi/movi-fractional regressions passed. Additional race run covers save while statistics pending and competing claims.
Latency fixture: 5600 synthetic Mongo candidates; GET2.8ms, save26.3ms, cancel6.6ms; zero candidate/source read commands. Forced waiting statistics completes as incomplete at2s; counts null, never partial zero. Stats version fencing rejects a response after concurrent config save. Actual browser covers independent loading/timeout/error/retry, saved acknowledgement, stale version rejection, supplier-manager exclusion; normal light/dark and incomplete screenshots inspected under local-data/test-results/issue21/browser/. Initial failing pre-fix tests and one initial browser failure retained in fix-a-red.log / earlier tool output; final browser and task pass.
Limits: all fixtures local/synthetic. Production code/data/priority policies unchanged by fix_a, no push/deploy. Statistics retain exhaustive authoritative algorithm and may legitimately remain incomplete for organization-wide scope; this patch removes its ability to block configuration or mask committed saves. Production warm latency and full release/active-priority business acceptance remain pending gate2.
# Correct administrative annotation pool totals and paging
Status: resolved
Base: 867ca698 (contains the prior local editing repairs). Local only.
The annotation workspace administrator badges must count all authorized human items, independent of the current list page, text search and status category. Project/workflow/run/Capture scope still applies. Lists must page human items, then join tasks by IDs; searching must include older items beyond the former first 500. Never fetch all business payloads into the browser, change customer records, widen annotator visibility or modify claim permissions.
Use an admin-only read endpoint, compact server-side counts and bounded cursor pages. Keep existing non-admin/review behavior and old APIs for compatibility. Test >500 items, mixed stages, orphan/cross-org batches, permissions, claim changes, old-page search, category filtering, stale page responses and pagination with stable totals. No production deployment in this task.
## Answer
Implemented admin-only totals with a 5-second bounded actor/scope cache; list pages follow human item cursors and join only page task IDs. Server-side Capture/status search sees older items; abandoned searches are cancelled and stale responses fenced. Existing role paths and APIs remain. See docs/annotation-admin-task-pool.zh-CN.md and docs/verification/admin-pool-counts-20261021.md.
1. As an annotator, I want the workbench to retain its existing visual style, so that I can keep using familiar controls.
2. As an annotator, I want a complete focused workspace at a 1413×615 browser content viewport, so that I can work on the customer's available screens.
3. As an annotator, I want task headings and continuous-work status arranged compactly on the right, so that video and timelines have more vertical space.
4. As an annotator, I want core editing and submission controls visible without scrolling the page, so that I can work without repeatedly searching for buttons.
5. As an annotator, I want video to remain fully visible at its original aspect ratio, so that relevant details are not cropped.
6. As an annotator, I want video to grow with the available viewport, so that larger screens improve inspection without changing the workflow.
7. As an annotator, I want the left camera enlarged on my first focused entry, so that the initial view matches my usual work.
8. As an annotator, I want an independent left/right/both default-view setting remembered for my account and browser, so that I can choose my preferred starting view.
9. As an annotator, I want temporary camera switches to leave my saved default unchanged, so that inspecting another camera does not change later tasks.
10. As an annotator, I want a new task to use my default view while stage changes within the same task retain my temporary view, so that cameras do not switch unexpectedly.
11. As an annotator, I want usable slicing controls in left-only, right-only and dual-camera views, so that camera choice does not restrict editing.
12. As an annotator, I want both annotation timelines in every camera view, so that I can inspect and edit actions without restoring a different layout.
13. As an annotator, I want only the Capture slice timeline during slicing, so that an irrelevant action row does not waste space.
14. As an annotator, I want clicking either video to toggle synchronized playback, so that I can pause and resume directly on the image.
15. As an annotator, I want clicks on overlay controls to perform only their intended action, so that opening information does not also start playback.
16. As an annotator, I want an undersized window to pause playback and automatic work while preserving my task, so that resizing does not lose progress.
17. As an annotator, I want to resume explicitly after restoring the viewport, so that work does not restart before I am ready.
18. As an annotator, I want the first available project preselected only when I have no valid selection, so that I can start without an unnecessary extra choice.
19. As an annotator, I want manual project choices and task links preserved, so that a project refresh does not move me to different work.
20. As an annotator, I want project preselection to remain separate from task claiming, so that merely opening the page does not assign work.
21. As an annotator, I want the dedicated work page to open consistently in focused mode, so that an old layout preference does not strand me in the wrong view.
22. As an annotator, I want to return directly to the task pool, so that a redundant layout-switch button is unnecessary.
23. As an annotator, I want the normal task-pool workbench to remain available, so that returning to the pool does not remove existing task access.
24. As an annotator, I want playback shortcuts immediately after clicking or dragging a progress slider, so that mouse seeking does not interrupt keyboard work.
25. As an annotator, I want shortcut ownership restored after releasing a drag outside the slider or cancelling it, so that focus does not become stuck.
26. As an annotator, I want text fields, Chinese composition and dictionary dialogs to keep their own keys, so that editing text cannot accidentally cut or invalidate video intervals.
27. As an annotator, I want one Escape to return from a dictionary to the workbench, so that I do not need repeated dismissal keystrokes.
28. As an annotator, I want different shortcut help for slicing and annotation, so that the help describes actions available in the current stage.
29. As an annotator, I want a newly editable slice to start as one pending action interval, so that all required time is represented.
30. As an annotator, I want action intervals to remain contiguous and nonoverlapping, so that no time is silently skipped or counted twice.
31. As an annotator, I want C to split the interval under the playhead, so that I can use the same cutting habit in both stages.
32. As an annotator, I want a cut to pause at the cut point and select the left interval without forcing text focus, so that I can label what I just watched or continue cutting.
33. As an annotator, I want the left side of a split to retain its judgment and the right side to become pending, so that a completed label is not silently copied onto unseen work.
34. As an annotator, I want the obsolete N action removed, so that there is one clear action-splitting workflow.
35. As an annotator, I want unchanged pending selections to allow navigation and further cuts, so that an empty editor does not block continuous cutting.
36. As an annotator, I want genuinely edited text protected before switching or cutting, so that a partial description is not lost or applied to another interval.
37. As an annotator, I want to save unfinished action partitions, so that refreshing can restore structural progress without pretending annotation is complete.
38. As an annotator, I want Save Description and Ctrl+Enter to confirm the current description only, so that saving text does not also submit the task for review.
39. As an annotator, I want pending, described and invalid intervals visibly distinguished, so that completion is clear.
40. As an annotator, I want Ctrl+X to invalidate only the explicitly selected action, so that its target is predictable.
41. As an annotator, I want the mouse invalid action and Ctrl+X to save the same judgment, so that keyboard and mouse workflows agree.
42. As an annotator, I want an invalid judgment to count as complete only after the server confirms it, so that a failed save cannot hide unfinished work.
43. As an annotator, I want undo to restore a description replaced by an invalid judgment, so that misclassification is recoverable.
44. As an annotator, I want invalid actions retained as annotation results, so that marking invalid does not delete media or discard the whole slice.
45. As an annotator, I want action correction through editing, reclassification, undo and explicit boundary merging, so that a separate action-delete command cannot create gaps.
46. As an annotator, I want every required interval completed before submission, so that incomplete actions cannot accidentally reach quality review.
47. As a reviewer, I want explicitly discarded slices handled through their reasons and evidence, so that they do not require artificial action descriptions.
48. As an annotator, I want existing descriptions preserved when gaps become pending intervals, so that adopting the new workflow does not erase previous work.
49. As a reviewer, I want already submitted and accepted results left unchanged, so that a new editing policy does not rewrite review history.
50. As an annotator, I want returned work to follow the new completion rules when resubmitted, so that corrected work meets the current standard.
51. As an operator of another workflow, I want my existing annotation policy preserved, so that the Fanyu change does not alter unrelated work.
52. As an annotator, I want an action list containing every interval in the current slice, so that I can find short pending, described and invalid actions.
53. As an annotator, I want at least 50 densely packed actions to remain individually selectable, so that narrow timeline blocks do not prevent correction.
54. As an annotator, I want the list, timeline and editor to share one selected action, so that I always know which result I am changing.
55. As an annotator, I want list clicks and Up/Down to select adjacent actions and loop within the current slice, so that reviewing does not require precise mouse targeting.
56. As an annotator, I want Ctrl+Up/Down to perform six action-navigation steps, so that I can move quickly through dense annotations.
57. As an annotator, I want Alt+Up/Down to locate the selected action's start or last editable frame, so that precise review remains available after the shortcut change.
58. As an annotator, I want end navigation to show a frame belonging to the selected action, so that its video and annotation preview agree.
59. As an annotator, I want selection to take effect immediately while the list scrolls smoothly toward a stable row position, so that animation never delays editing.
60. As an annotator, I want manual list scrolling to leave selection unchanged, so that browsing the list does not move the video unexpectedly.
61. As an annotator, I want a short annotation summary to follow the playhead, so that I can see the judgment for the image being displayed.
62. As an annotator, I want full JSON available as a read-only expansion, so that I can inspect structured information without permanently covering the video.
63. As an annotator, I want the JSON preview to identify saved and unsaved content, so that a draft is not mistaken for the delivered result.
64. As an annotator, I want playback to update the image summary without changing my editing selection, so that watching ahead does not replace my editing target.
65. As an annotator, I want Shift+Left/Right to move the selected interval's end by one real frame, so that fine corrections do not require dragging.
66. As an annotator, I want a held boundary key to accelerate after one second to five frames per half-second, so that larger adjustments remain efficient.
67. As an annotator, I want the shared boundary to move both adjacent intervals together, so that adjustment cannot introduce gaps or overlap.
68. As an annotator, I want shrinking the selected action to zero to merge its range into the following action, so that an unnecessary cut can be removed.
69. As an annotator, I want extending to the next action's end to merge that action into the selected one, so that I can remove the next cut deliberately.
70. As an annotator, I want the surviving interval to retain its judgment after a merge, so that the outcome follows the selected direction consistently.
71. As an annotator, I want a single held key to consume at most one neighbor, so that acceleration cannot silently remove many actions.
72. As an annotator, I want the last endpoint fixed and ordinary mouse dragging to retain at least one frame on each side, so that full coverage remains protected.
73. As an annotator, I want the same boundary keyboard behavior for slices during slicing, so that precise adjustment uses one consistent habit.
74. As an annotator, I want merged slices to retain the surviving slice's name, so that names are not combined or fabricated.
75. As an annotator, I want discarded slices restored before their boundaries can be changed, so that discard evidence is not silently reassigned.
76. As an annotator, I want one held adjustment or mouse drag to be one undo step, so that a correction can be reversed predictably.
77. As an annotator, I want held adjustments to stop on release, focus loss, dialogs or task changes, so that delayed key repeats cannot edit a different target.
78. As an annotator, I want F to open the current stage's naming or description dictionary, so that existing dictionary habits remain useful.
79. As an annotator, I want G to open discard reasons for the current slice in either stage, so that whole-slice discard is distinct from action invalidation.
80. As an annotator, I want discard reasons searchable and pageable with keyboard selection, so that a large dictionary is usable without page scrolling.
81. As an annotator, I want Enter to select a reason and Ctrl+Enter to confirm discard after any required note, so that browsing choices cannot discard accidentally.
82. As an annotator, I want missing, disabled or changed dictionary entries explained without losing my note, so that I can recover from configuration changes.
83. As a project administrator, I want the existing project-enabled discard dictionary reused, so that I do not maintain a second reason system.
84. As a reviewer, I want historical reason text and snapshots preserved across renaming and restoration, so that audit evidence remains trustworthy.
85. As an annotator, I want a compact discarded status and explicit restore entry instead of a large default keep banner, so that useful space is recovered without hiding a real discard.
86. As an annotator, I want my personal task capacity configurable from two to eight with a default of two, so that I can balance waiting and work in progress.
87. As an annotator, I want capacity shared by my manual and automatic claims within a project, so that switching entry points does not exceed the limit.
88. As an annotator, I want processing and failed tasks to keep their slots until real submission succeeds, so that occupancy reflects unfinished work.
89. As an annotator, I want existing tasks preserved when I reduce capacity, so that changing a setting never releases assigned work.
90. As an annotator, I want explicit start or continue to fill available capacity, so that useful work is ready while another task is generating slices.
91. As an annotator, I want the next task opened only after slice generation has been definitely accepted, so that uncertain requests do not abandon my current task.
92. As an annotator, I want ready annotation tasks selected before unsliced tasks, so that completed media is used promptly.
93. As an annotator, I want background completion to leave my active editor in place, so that tasks cannot steal my attention mid-edit.
94. As an annotator, I want an honest waiting state when my full buffer is processing, so that the application does not claim extra work to conceal the wait.
95. As an annotator, I want a single background failure visible and retryable while other tasks remain usable, so that one failure does not halt all productive work.
96. As an annotator, I want uncertain operations reconciled through their original request identity, so that retries do not allocate or submit duplicates.
97. As an annotator, I want successful quality-review handoff to free a slot and refill the buffer while continuous work is active, so that my workload remains steady.
98. As an annotator, I want returned tasks to re-enter the public pool, so that the existing return-assignment policy is preserved.
99. As an annotator, I want Pause Continuous Work to stop automatic switching and claiming immediately, so that I retain control without cancelling background processing.
100. As an annotator, I want returning, closing or refreshing to require explicit continuation before more automatic claims, so that inactive pages do not acquire work.
101. As an annotator, I want concurrent pages and browsers to respect one server-enforced capacity per account and project, so that races cannot overfill my buffer.
102. As an annotator, I want permission changes, stale responses and version conflicts to preserve an honest recoverable state, so that older operations cannot overwrite newer work.
103. As an annotator, I want the existing undo throttle and task/stage boundaries preserved, so that undo cannot roll back media generation or another task.
104. As a maintainer, I want browser-visible behavior verified through public API readback, so that implementation refactoring does not invalidate the meaning of acceptance tests.
完成于本地提交 `18139a00`、`61703abc`。描述保存与重新切片只接受后端确认或权威回读证明的结果,失败保留编辑;同步任务/账号隔离阻止迟到响应污染。独立审查修复 1 项时序问题后通过。类型检查、前端构建、25 项相关前端测试及相关 Go API 测试通过;真实浏览器与 API 回读覆盖成功、409、响应丢失、重新切片和跨任务迟到响应。详见[实施报告](../implementation-report.md)。
实现提交 `fe593f8e`、`3ee1db6a`。独立审查通过,页头矛盾文案已修正并复审。真实浏览器覆盖已领取优先、处理期不领、送检后接续、成功响应丢失及关页后原编号恢复、停止后不多领、双页隔离、提交未知暂停及空池暂停;公开 API 回读一致。34项前端聚焦测试、HTTP幂等/处理中限制、类型检查与构建通过。最终全量检查单列于[实施报告](../implementation-report.md)。
操作者按 C 在当前精确帧切分并暂停,Space 继续观看;B 从选中片头复查,V 回到此前的工作位置。动作描述采用 N 开始、N 或 Enter 结束,随后 F 选字典或 Enter 输入文本。Ctrl/⌘+Enter 根据编辑状态保存描述或打开阶段提交确认。普通文本输入、输入法和弹层各自拥有清晰的键盘范围。
1. As an annotator, I want to split a slice at the exact current frame without jumping backwards, so that I can evaluate the cut in place.
2. As an annotator, I want splitting to pause at the cut, so that I can inspect nearby frames before continuing.
3. As an annotator, I want Space to continue across slice boundaries during slicing, so that I can watch the remaining Capture without repeatedly changing selection.
4. As an annotator, I want selection to remain meaningful after a split, so that the workbench does not unexpectedly return to the first slice.
5. As an annotator, I want B to replay the selected slice from its beginning and stop at its end, so that I can review the whole slice deliberately.
6. As an annotator, I want V to return to my previous working position and pause, so that reviewing earlier slices does not lose my place.
7. As an annotator, I want repeated review navigation to preserve the original return position, so that intermediate review frames do not overwrite it.
8. As an annotator, I want the return position to remain valid after slice edits, so that returning does not resurrect a deleted slice.
9. As an annotator, I want Ctrl/⌘ plus Left or Right to select adjacent slices, so that I can navigate without a mouse.
10. As an annotator, I want navigation to include the remaining tail slice and stop at either end, so that I can reach unfinished material without unexpected wraparound.
11. As an annotator, I want slice navigation to pause at the destination beginning, so that I know where review will start.
12. As an annotator, I want ordinary Left and Right to step by original frames at every playback speed, so that precise boundary adjustment remains reliable.
13. As an annotator, I want both cameras to retain their synchronized frame mapping, so that keyboard navigation does not alter alignment.
14. As an annotator, I want playback during semantic annotation to stay within the current slice, so that action descriptions remain grounded in that slice.
15. As an annotator, I want N to start an action description interval, so that I can mark its beginning while watching.
16. As an annotator, I want a second N to confirm the interval end, so that I can complete the selection with the same key.
17. As an annotator familiar with the existing controls, I want Enter to remain an alternative way to confirm the end, so that my existing workflow still works.
18. As an annotator, I want interval confirmation to focus the description editing area without immediately entering a text field, so that F and Enter have predictable next actions.
19. As an annotator, I want F to open the appropriate dictionary, so that I can choose a slice name or an action description without a mouse.
20. As an annotator familiar with D, I want it retained as a dictionary shortcut, so that I do not have to relearn an existing binding immediately.
21. As an annotator, I want arrows, Enter and Esc to operate the dictionary, so that searching and choosing a term remain keyboard accessible.
22. As an annotator, I want a selected description template to remain editable, so that I can describe the actual observed action.
23. As an annotator, I want Enter in the description editing area to begin manual text entry, so that free-form editing is explicit.
24. As an annotator, I want text fields and Chinese input composition to keep their normal keys, so that typing cannot split, play or submit a task.
25. As an annotator, I want one Esc to return to the workbench while retaining my draft, so that I can resume watching without repeatedly escaping focus.
26. As an annotator, I want Space after closing the dictionary to control playback, so that it does not reopen the dictionary.
27. As an annotator, I want unfinished action drafts retained separately for each slice during navigation, so that I can inspect another slice without losing my work.
28. As an annotator, I want navigation not to save drafts automatically, so that only explicitly confirmed descriptions count as saved work.
29. As an annotator, I want all outstanding drafts identified before stage submission, so that unfinished edits cannot be silently omitted.
30. As an annotator, I want Ctrl/⌘+Enter to save the current description when a draft exists, so that saving text does not unexpectedly submit the whole task.
31. As an annotator, I want incomplete descriptions to produce a useful prompt, so that an invalid save never falls through to stage submission.
32. As an annotator, I want Ctrl/⌘+Enter without outstanding drafts to open the current stage confirmation, so that I can generate slices or submit annotation by keyboard.
33. As an annotator, I want a separate Enter press to confirm and Esc to cancel, so that a held key cannot execute both confirmation steps.
34. As an annotator, I want confirmation to show the operation and relevant slice, description and blank information, so that I understand what I am submitting.
35. As an annotator, I want pending generation or submission to remain visibly pending, so that I do not mistake request acceptance for completion.
36. As an annotator, I want failed saves and submissions to preserve recoverable content, so that retries do not require rebuilding my work.
37. As an annotator, I want Ctrl/⌘+Z to undo recent slice and description edits across slices, so that ordinary mistakes are recoverable.
38. As an annotator, I want saved-description undo to update the server as well as the screen, so that reloading does not bring the mistake back.
39. As an annotator, I want undo and redo to return me to the affected slice and pause, so that I can inspect the restored result.
40. As an annotator, I want Ctrl/⌘+Shift+Z to redo an undone edit, so that an accidental undo is recoverable.
41. As an annotator, I want a complete drag or batch invalid marking to count as one edit, so that undo follows meaningful actions rather than intermediate events.
42. As an annotator, I want at most one undo or redo each second and no held-key repetition, so that an accidental press cannot erase many steps.
43. As an annotator, I want playback, frame inspection and selection excluded from edit history, so that undo reaches the last data change.
44. As an annotator, I want the last 100 edits available within the current task stage and page session, so that I can recover multiple recent mistakes.
45. As an annotator, I want a new edit after undo to replace the redo branch, so that redo cannot reapply an incompatible future.
46. As an annotator, I want text-field undo to continue editing text, so that it does not unexpectedly change slice data.
47. As an annotator, I want undo history to stop at task and stage boundaries, so that keyboard recovery cannot reverse generation or quality handoff.
48. As an annotator, I want failed or conflicting persisted undo to be reported accurately, so that I do not trust a restoration that the server rejected.
49. As an annotator, I want Shift+Delete, and Shift+Backspace on Mac, to delete only an explicitly selected object, so that deletion has a predictable target.
50. As an annotator, I want deleting a slice to preserve coverage by merging its range into a neighbor, so that deletion does not remove source media coverage.
51. As an annotator, I want deleting an action description to leave semantic blank space, so that unrelated descriptions and video remain unchanged.
52. As an annotator, I want mouse edits and keyboard edits to share the same recovery behavior, so that undo does not depend on how I invoked an action.
53. As an annotator, I want Ctrl+X outside text input to mark all current-slice blanks invalid in one operation, so that repeated invalid intervals can be handled efficiently.
54. As an annotator, I want semantic blanks, explicit invalid intervals and discarded slices to remain distinct, so that shortcuts do not silently change delivery intent.
55. As an annotator, I want shortcut help to reflect the current editing context, so that available actions are discoverable.
56. As an annotator, I want a dedicated work page in the same browser tab, so that I can focus on annotation with fewer surrounding controls.
57. As an annotator, I want to select an authorized project and explicitly start continuous work, so that new tasks are acquired deliberately.
58. As an annotator, I want to continue my current unfinished task before acquiring another one, so that entering work mode does not abandon existing work.
59. As an annotator, I want the next random task acquired only after confirmed quality handoff, so that an unfinished submission is not hidden by navigation.
60. As an annotator, I want a stop-after-current-task option, so that I can finish cleanly without receiving another task.
61. As an annotator, I want empty pools, failures, permission changes and unknown results to pause continuous work, so that I can resolve the problem without losing task ownership.
62. As an annotator, I want a retry after an unknown claim result to reuse the same logical request, so that a network problem does not allocate a second task.
63. As an annotator, I want refresh to restore saved work and require an explicit continuation, so that reopening a page does not silently claim more tasks.
64. As an annotator, I want a warning before leaving unsaved work, so that page-session drafts are not lost unknowingly.
65. As an annotator, I want only one page per account and project in the same browser to auto-claim continuously, so that duplicate tabs do not compete for new work.
66. As a quality or acceptance reviewer, I want the existing ownership, review and evidence rules preserved, so that faster annotation does not bypass review or change what is delivered.
## Implementation Decisions
### Scope and module responsibilities
- Deliver the existing workbench improvements first, then reuse that workbench for the dedicated work page and continuous-task coordination. Do not create a second editing implementation.
- The annotation task coordinator remains responsible for ownership, project context, server writes and authoritative stage transitions. The workbench owns user-facing playback, selection, editing focus and draft interactions; shortcut resolution maps an event in its context to one action.
- Add the required session-scoped history and per-slice draft coordination at the workbench/task boundary. Its public behavior must support cross-slice undo and server-confirmed restoration; this spec does not mandate internal class names or a new public API.
- Reuse current dictionary selection, version-checked saving, slice confirmation, annotation submission, status polling and idempotent random claiming. No new database schema or server-side undo history is decided by this spec.
- A model layer or test-only backend endpoint is not a prerequisite. If implementation exposes a missing production API capability, resolve it against the existing version and ownership contract rather than bypassing that contract.
### Playback, navigation and focus
- In the slicing phase, C splits at the current precise frame and pauses in place; Space plays or pauses from the current position across slice boundaries. Selection must remain valid after a split rather than falling back to the first slice.
- B starts review from the selected slice beginning and stops at its end. In semantic annotation, ordinary playback remains within the current slice. Existing frame stepping and synchronized dual-camera mapping remain exact at all playback speeds.
- Ctrl/⌘ plus Left or Right navigates to an adjacent slice beginning and pauses, includes the remaining tail slice, and does not wrap at either end.
- Record a working-position bookmark on entry to review. Repeated B, frame inspection and review navigation do not overwrite it. V returns and pauses; if slice edits changed ownership of that time, resolve it to the current containing slice on a valid frame boundary, not a deleted slice.
- N begins an action interval; a second N or Enter confirms the end. End confirmation enters the description editing area with the text field initially unfocused. F selects a dictionary template; Enter begins manual text entry; choosing a template returns to the editing area and does not save automatically.
- F is the primary dictionary key and D remains compatible. The slicing phase uses the slice-name dictionary; description editing uses the description dictionary. New slice names must still come from the enabled project dictionary, and description templates remain editable.
- Key handling respects input composition, active dialogs/menus, text inputs, the description editing area and the workbench. A key event performs at most one action. Text input retains normal characters, Space, cut and text undo. Esc exits to the workbench while retaining drafts; closing the dictionary must not leave Space activating its old trigger.
- Existing native button activation remains available, but must not dispatch a duplicate workbench action. Shortcut help reflects context, phase and availability.
### Drafts, delete and invalid marking
- Keep an unfinished action draft per slice in the current page session. Navigating between slices neither discards nor auto-saves it; returning restores the edit. All drafts must be explicitly saved or cancelled before stage submission.
- Shift+Delete deletes only an explicitly selected object, with Shift+Backspace additionally supported on Mac. In slicing it removes the slice partition and merges its range into a neighbor; in annotation it deletes the selected action description and leaves a blank. Without a clear target the command does nothing.
- Ctrl+X outside text input explicitly marks all unannotated gaps in the current slice invalid without changing existing descriptions. The entire batch is one undoable edit; text input keeps its native cut action.
- Ordinary deletion is not slice discard. Existing restrictions on editing discarded slices continue to apply; shortcuts do not implicitly restore them or remove their audit evidence.
### History and persistence
- Follow ADR-0001: undo is limited to the current task and editing stage. Starting slice generation, re-slicing, submitting to review or switching tasks forms a history boundary; undo cannot roll back the business workflow.
- Store the most recent 100 meaningful edits for the current page session and stage. A split, completed boundary drag, saved description, deletion or invalid-marking batch is one step. Beginning and ending action interval selection are also undoable.
- Playback, stepping and selection do not create data-history entries. Mouse and keyboard mutations share history. Cross-slice undo/redo reveals the affected slice and pauses. A new edit after undo removes the redo branch.
- Ctrl/⌘+Z undoes and Ctrl/⌘+Shift+Z redoes. The shared undo/redo action accepts at most one command per second and ignores held-key repeats. Text-field undo remains local to text.
- Persisted edits require persisted compensation. Serialize server-writing edits and their undo/redo against the latest confirmed version. Do not declare success, consume the successful history transition or overwrite newer content when a write fails or its result is unknown; reconcile authoritative state before continuing after conflicts or uncertain results.
- On refresh restore only server-saved work; the undo stack is not persisted across refresh. Warn before leaving unsaved page-session drafts. Keep task, stage and ownership changes isolated from stale responses and old history.
### Save and submission contracts
- Ctrl/⌘+Enter with a current draft only saves that description. Missing endpoint or text requirements produce validation feedback rather than falling through to submission. Drafts on other slices must be resolved before submitting the stage.
- With no outstanding drafts, Ctrl/⌘+Enter opens the current stage confirmation: generate confirmed slices during slicing, or complete annotation and hand off to quality review during annotation.
- The confirmation shows the operation and relevant slice, description and blank state. A new independent Enter press confirms; Esc cancels. A held key or repeated event must not both open and confirm the dialog.
- Pending requests and processing lock conflicting mutations and repeated submission. A processing response means accepted work, not completion. Only the authoritative completed stage allows annotation to begin or the next task to be claimed.
- Failed operations preserve recoverable edits and show the actual failure. Existing role, ownership, version, dictionary, frame, overlap and coverage checks remain active.
### Dedicated work page and continuous claiming
- Provide a work page within the existing browser tab. Explicit Start Work activates continuous mode after selecting an authorized project; continue the current unfinished task when present.
- On confirmed successful quality handoff, acquire one next task through the existing project-random claim operation. Keep project/supplier scope, blind pre-claim selection and permanent request-to-result idempotency.
- Stop After Current Task allows the current task to finish without another claim and does not release ownership.
- Empty pools, processing failures, unknown network results and permission changes pause continuous operation with a recovery entry point. Do not silently skip the unresolved task; an uncertain claim retries or reconciles using its existing request identifier.
- Refresh or reopen displays owned work and requires an explicit continuation; it does not silently issue a new claim.
- Only one page in the same browser, account and project may execute automatic continuous claiming. Other pages direct the user to the active work page. This is not a new cross-device or server-wide one-task-per-user restriction; existing server authorization and idempotency remain authoritative.
### Preserved business rules
- Slices fully partition the common hardware-frame range with no overlap or hole. Descriptions stay within a slice, align to valid boundaries and do not overlap.
- Semantic annotation may be partly or wholly blank. Blank, explicitly invalid and discarded are distinct: blank kept media remains reviewed and delivered, while discarded slices retain review evidence and are excluded from delivery according to existing rules.
- Naming rules, reviewer separation, forbidden self-release, permissions, audit evidence, async generation, current-version ownership and delivery contracts remain unchanged. Existing C behavior for splitting an action during annotation must not be confused with source-slice splitting.
## Testing Decisions
### Confirmed testing boundary
The user confirmed the recommended test boundary for this spec: the primary seam is the complete workbench journey through real browser interactions and existing public API writes/readback. Add focused tests at the existing HTTP application boundary for version conflicts, idempotency and pending-operation restrictions, and use existing pure-function interfaces only for precise keyboard, frame and throttling edge cases. No new test-only business interface is planned.
A good test drives an observable action and asserts its visible or persisted outcome. It should survive changes to component internals, state variable names and storage of the undo stack. Source-string matches or private-state assertions are not acceptance evidence for these features. A rendered page title alone is not proof that playback, focus or saving works.
### Modules and prior art
- Exercise the integrated task coordinator, Capture workbench, synchronized player, dictionary pickers and dedicated work page through actual keyboard/mouse input, active focus, playback position, confirmation visibility and server readback.
- Reuse the repository's browser-acceptance pattern of staged annotation/quality/acceptance fixtures, authenticated identities, real task selection and browser-network diagnostics. Extend it for shortcut/focus and same-browser multi-page behavior; do not assume the existing layout checks already cover those interactions.
- Reuse combined-draft HTTP tests that verify version comparison, ownership and saved state without advancing the stage. Extend the external request/readback pattern to compensating undo and rejected stale restoration.
- Reuse pending-submission mutation-conflict tests and random-claim tests for processing locks, repeated logical requests, scope and uncertain results. Exercise conflicts at HTTP boundaries instead of asserting internal retry implementation.
- Reuse public keyboard-resolution and dictionary-navigation tests for composition, native control handling and repeat events. Existing playhead-draft, unified frame-boundary, optional-annotation and submission-state tests provide prior art for the relevant domain rules.
- Some existing frontend tests inspect source strings. Do not copy that approach as proof of the new user behavior, and do not expand this feature into a wholesale test-suite rewrite.
### Environment, failure coverage and completion
- Use the local replica: frontend 5173, API 3001 and snapshot Mongo 27018, with isolated local tasks and test data for mutating flows. Do not run acceptance against company services or BOS by default. Existing acceptance tooling must be explicitly pointed at local services because its defaults can target a remote environment.
- Browser tests must cover keyboard and equivalent mouse edits, editable versus noneditable focus, Chinese composition, held keys, exact frame playback, persisted undo, outstanding cross-slice drafts, two-step confirmation, duplicate pages and resumed tasks.
- HTTP tests must cover stale versions, changing ownership, write failures, processing locks and idempotent claim retries. Network fault tests assert that pending/unknown is not success and that recovery does not allocate a second task.
- Pure-function tests supplement the high-level seam for one-second boundaries, the 100-step cap, redo invalidation and precise frame behavior without prescribing internal data structures. Where clock control is needed, keep it at the existing test runner or session boundary.
- Type checking, relevant frontend/backend tests and compilation must pass. Record existing full-suite failures separately and compare against the baseline; existing failures do not excuse new regressions.
- Phase one covers A01–A14 and A18. Phase two adds A15–A17 and the full continuous-work journey. All criteria below are implementation acceptance requirements, not claims that tests have already been executed.
| 编号 | 场景 | 必须观察到的结果 |
| --- | --- | --- |
| A01 | 连续播放,在已有多个切片的中间片内按 C | 原帧切分并原地暂停,选中项不回退第一片;Space 可越过新增边界继续播放 |
| A02 | 在工作点离开复查,连续切换两片并按 B | 每次 B 都从选中片头播放到片尾;V 返回最初记录的工作点并暂停 |
- Reversing slice generation, re-slicing effects or quality handoff through ordinary undo; changing the stage boundary defined by ADR-0001.
- Persisting undo history across refresh, devices or sessions, or offering unlimited edit history. Unsaved action drafts remain page-session data with leave protection.
- Rewriting the random-assignment service, adding a global one-task-per-account rule, exposing unclaimed candidate videos or letting annotators self-release tasks.
- Altering hardware timing, synchronized media, dictionary-only slice naming, blank/invalid/discard meaning, review roles, audit evidence, output format or delivery policy.
- Replacing the async processing architecture, changing deployment environments or claiming backend performance improvements beyond the agreed interaction work.
- Opening a separate browser popup, rebuilding unrelated administration/reviewer pages, or introducing new shortcuts beyond the approved set.
- Fixing unrelated existing test debt, deploying to company infrastructure, writing to the company BOS bucket, pushing a branch or messaging colleagues.
- Treating this specification as customer approval or claiming the protected customer source document has been read.
## Further Notes
- This is the published specification in the repository's local Markdown issue tracker. The ready-for-agent status applies to the approved scope and test boundary; it is not a claim that implementation or acceptance is complete.
- The user approved the initial four decisions and the following five recommendations, then explicitly accepted the browser/public-API testing seam. No new requirements interview is needed to act on those decisions.
- Domain terminology follows the repository glossary. ADR-0001 records why already-saved edits can be undone inside an editing stage while generation and review transitions cannot.
- The earlier requirements audit remains evidence about the old implementation, not a description of the intended new behavior. Preserve its distinction between observations inferred from code and interactions actually reproduced in a browser.
- The customer issue table is located in Feishu but required login during this session. Comparison so far used the latest local contracts, tests and colleague changes; it does not certify alignment with the unread customer original.
- Older local documents still contain superseded requirements that descriptions must cover every interval or that slice names can be freely entered. The newer five-rule and optional-annotation contracts and their tests govern those points for this spec.
- Implementation should proceed in the agreed order: complete and verify the current-workbench behavior before adding the dedicated continuous-work page. Task decomposition is separate from publication of this specification.
function openModal(title,content,action){one('[data-modal-title]').textContent=title;one('[data-modal-content]').replaceChildren(content);modalAction=action;one('[data-modal-confirm]').hidden=!action;one('[data-modal-shield]').hidden=false;one('[data-modal-close]').focus();}
function closeModal(){one('[data-modal-shield]').hidden=true;modalAction=null;one('[data-play]').focus();}
1. As an annotator, I want to enter a dedicated work page in the current tab, so that I can use the available screen for annotation.
2. As an annotator, I want platform navigation hidden during focused work, so that it does not reduce video space.
3. As an annotator, I want both camera views visible by default, so that I can compare synchronized observations.
4. As an annotator, I want each video shown at its original aspect ratio without cropping, so that scene edges remain visible.
5. As an annotator, I want video area to grow on larger windows, so that a large monitor improves viewing comfort.
6. As an annotator, I want an explicit minimum usable viewport, so that I know when the window is too small for reliable work.
7. As an annotator, I want slicing and description editing to keep the same layout, so that I do not search for controls after changing stages.
8. As an annotator, I want playback, frame stepping and current-stage marking controls always visible, so that I can work without scrolling.
9. As an annotator, I want the timeline below the videos, so that I can relate the current frame to its interval.
10. As an annotator, I want my current editing area visible beside the videos, so that I can describe what I am watching.
11. As an annotator, I want dictionaries to replace content within the fixed editing area, so that opening them does not displace the videos.
12. As an annotator, I want dictionary search, paging and keyboard selection, so that long dictionaries remain usable without scrolling for controls.
13. As an annotator, I want slice and description lists accessible through paging or keyboard navigation, so that large tasks do not grow the page.
14. As an annotator, I want selection to reveal its containing list page, so that keyboard navigation and undo keep the relevant item visible.
15. As an annotator, I want long descriptions editable within a bounded text area or expanded editor, so that text length does not push save actions off screen.
16. As an annotator, I want save, cancel and stage submission actions kept visible, so that I can complete an edit without hunting for buttons.
17. As an annotator, I want help and infrequent actions available on demand, so that they remain accessible without taking permanent video space.
18. As an annotator, I want to enlarge either camera temporarily, so that I can inspect details.
19. As an annotator, I want the detailed timeline compressed during single-camera inspection, so that the effective picture actually grows.
20. As an annotator, I want one action to restore the dual-camera layout, so that I can resume normal annotation at the same position.
21. As an annotator, I want viewport changes to preserve my task and edits, so that resizing does not lose work.
22. As an annotator, I want playback and automatic task continuation paused below the minimum viewport, so that work does not advance while controls are unavailable.
23. As an annotator, I want to explicitly resume after restoring the window, so that resizing alone does not restart work.
24. As an annotator, I want in-flight operations reconciled while the page is paused, so that a successful save or claim is not repeated.
25. As an annotator, I want to switch to the original layout during work, so that I have a usable fallback.
26. As an annotator, I want layout switching to preserve drafts, selection, playback position and undo history, so that fallback is not a task restart.
27. As an annotator, I want my layout preference remembered for my account in this browser, so that the next entry uses my chosen view.
28. As an annotator, I want the established shortcuts and focus rules to behave consistently in both layouts, so that I do not relearn annotation.
29. As an annotator, I want continuous claiming and submission recovery unchanged, so that a visual redesign does not alter task ownership.
30. As a maintainer, I want a verified source-code recovery point for the prior workbench, so that I can recover it if the redesign fails.
## Implementation Decisions
### Scope and responsibilities
- Apply the new presentation to the existing dedicated annotation work page. Keep the original task-pool/workbench entry available.
- The work-page shell owns available viewport, compact navigation and layout preference. The existing editing coordinator retains task ownership, requests, versions, stage transitions, drafts and history. Media playback and precise-frame mapping remain in the existing media/editing flow.
- New and original layouts share one editing implementation. A layout change is a presentation change; it must not create a new editing session, remount away its state, reconnect media unnecessarily or acquire another task.
- No new backend service, schema, claiming endpoint or server-side layout preference is required. Layout preference is scoped to the current account and browser; an account without a preference enters the new work-page layout. The original task-pool entry retains its original presentation.
- Do not change customer/domain contracts for frame coverage, semantic blanks, invalid intervals, discarded slices, permissions, explicit saving or ownership. The existing undo stage boundary remains authoritative.
### Stable space allocation
- In normal dual-camera mode, reserve left-side video space, playback/marking controls and detailed timeline; reserve a right-side editor with its save/cancel controls. Keep task state and the stop/submit/return entry points in fixed visible areas.
- Switch only the editing content when changing from slicing to action descriptions. Do not move the video, timeline, editor or submission areas to different sides of the page.
- Hide platform navigation in the focused work page while keeping an explicit return path. Compact processing and error messages must not introduce page scrolling or cover the primary actions. Long explanations may open an accessible detail panel.
- Allocate sizes automatically; no drag handles or stored custom split ratios in this release.
- Primary buttons must remain discoverable with visible labels or accessible, clearly explained controls. Shortcuts complement visible actions rather than replace them.
### Viewport and effective picture size
- Measure the browser's usable content area in CSS pixels. Physical display resolution alone does not establish support: browser chrome, OS scaling, browser zoom and a resized window affect the result.
- The full new layout requires width ≥1280 and height ≥640. Verify the boundary itself as well as larger content areas. Support applies to the new layout; the retained original layout preserves its existing scrolling behavior.
- Default to two equally allocated, synchronized camera views, preserving each source aspect ratio with no cropping. A layout breakpoint must not automatically hide a camera.
- Use the real 590×480 test pair (59:48) as the principal size baseline. At 1280×640, each effective picture must remain at least 400×325 CSS pixels; the accepted preview provides approximately 413×336. This rounded implementation floor preserves the accepted visual size without requiring identical decorative spacing.
- In temporary single-camera mode at the same viewport, the baseline picture must visibly grow to at least 490×398; the preview provides approximately 501×408. At larger sizes, use available space rather than keeping the previous 240px video-height ceiling.
- These dimensions refer to the image itself after aspect fitting, excluding letterbox space. They do not impose the same width on portrait media. Other ratios must remain complete and undistorted; 16:9 and 9:16 are adaptation cases, not evidence of actual customer-material coverage.
- Single-camera mode temporarily compresses the detailed timeline into a progress bar. Playback, marking, frame inspection, current editing, save and submit remain available. Restore the detailed timeline when returning to dual-camera mode without changing the current frame, task or draft.
### Lists, dictionaries and text
- The new work page must not require horizontal or vertical document scrolling to reach an operation.
- Use bounded list areas with paging/search and keyboard access. A selected slice or description reached through navigation, undo or redo must reveal its containing page. Preserve the chronological order and existing slice navigation semantics.
- Dictionaries switch into the fixed editing area. Keep search, paging, selection and return controls visible. Retain existing keyboard selection and one-Esc focus return; choosing a description template does not implicitly save it.
- Long descriptions may scroll inside the text field and use an expanded editor. Keep save/cancel outside the scrolling content. Returning from expanded editing preserves the text and the existing explicit-save contract.
- Help, discard reasons and other infrequent content may open on demand. Keep the existing two-step submission confirmation and keyboard behavior. Large summaries must not push confirmation controls outside the viewport.
### Undersized windows and in-flight work
- If the new layout becomes narrower than 1280 or shorter than 640, pause playback and suspend automatic continuation; retain the current task, selection, frame, drafts and history.
- Show an explicit resize/zoom-adjustment prompt. Do not automatically jump to the original layout or silently shrink controls below the accepted layout.
- Already dispatched save, generation, submission or claim requests remain subject to authoritative reconciliation. A resize does not cancel their server-side effects, invent a failure, discard a successful response or issue a replacement claim.
- If submission completes while undersized, keep the result and defer the next claim until explicit continuation. If a claim was already dispatched, reconcile and retain its result; do not claim again merely because the page was resized.
- Growing the window alone does not resume work. A user action restores editing and the prior continuous-work setting; video remains paused until explicitly played. A prior stop-after-current choice remains effective. Permission errors, unknown results and session conflicts continue to block inappropriate continuation.
### Original-layout fallback and recovery
- Keep an always reachable layout-switch entry. Switching retains the task, stage, current selection and frame, per-slice drafts, unsaved text, undo/redo and continuous-work intent. It is not a refresh, leave action or ownership change.
- Retain existing pending-operation restrictions and request/session guards during a switch. A delayed response must update the same authorized task and cannot reappear as a stale edit in a different task.
- Remember layout choice per account and browser; do not reuse a different account's preference. Reload still follows the original explicit task-resume rules and does not acquire work solely because a preference exists.
- Runtime fallback preserves the original layout's behavior. It is separate from the verified Git tag and bundle, which recover the entire source version and do not restore databases, downloaded media or unsaved browser state.
### Existing workflow preserved
- Start Work continues an owned unfinished task before random claiming. Random claiming remains within the selected project and supplier permissions, with no pre-claim video selection.
- Continue after authoritative completion of audit-data preparation and quality handoff, not after a `processing` response and not after a quality reviewer approves the task.
- Preserve stop-after-current, empty-pool handling, unknown-result retry with the same request identifier, refresh recovery, page-session exclusivity and leave protection.
- Retain current key bindings, IME/text-input ownership, one-Esc return, explicit draft save, per-stage undo limits and one-second undo/redo throttling.
## Testing Decisions
The main boundary is real browser interaction with the work page and existing API save/readback, following the previously accepted test strategy. Test visible outcomes and persistence, not component names, internal state variables or source-text strings.
The existing annotation browser fixtures and authoritative API recovery scenarios provide prior art. Add layout measurements to the browser checks; geometry checks alone cannot prove draft preservation, video synchronization or correct task ownership.
| ID | Scenario | Required observation |
| --- | --- | --- |
| L01 | Enter and leave the dedicated page | Navigation space is reclaimed; return path and original entry work without changing ownership. |
| L02 | Both stages at five supported viewport sizes | 1280×640, 1366×680, 1440×800, 1920×980 and 2560×1320 keep primary controls inside the viewport; no document scroll is needed. |
| L03 | Zoom and real desktop windows | Check representative 1366×768, 1440×900, 1920×1080 and 2560×1440 display/window settings with 100%, 125% and 150% browser zoom; record actual content dimensions and apply the normal or undersized behavior accordingly. |
| L04 | Real double-camera video | Effective picture size meets the accepted baseline; views remain synchronized, complete and undistorted. |
| L05 | Alternative ratios | Synthetic 16:9, 9:16 and differing left/right ratios remain contained without changing frame-to-time mapping; label these synthetic cases. |
| L06 | Single-camera inspection and return | Either camera grows, detailed timeline compresses/restores, frame and drafts remain; playback and editor actions remain reachable. |
| L07 | Dictionary and keyboard focus | Search, page, select, edit and one-Esc return work without moving video regions or implicitly saving a draft. |
| L08 | Many slices/descriptions | Use lists larger than one page; selection, Ctrl/⌘+arrows, undo and redo reveal the affected item and retain chronological navigation. |
| L09 | Long text and long names | Text may scroll internally; save/cancel and confirmations remain visible; Chinese input composition and native text undo continue to work. |
| L10 | Toggle new/original layout while editing | Task, frame, slice, draft text and undo/redo survive multiple switches; verify persisted edits by API readback. |
| L11 | Toggle with delayed responses | No duplicate write/claim or stale task overwrite; pending restrictions remain effective. |
| L12 | Resize below the boundary during playback/editing | Playback and auto-continuation pause; edits remain; enlarging alone does not resume. |
| L13 | Resize during save/generation/submission/claim | Reconcile the original operation; do not repeat a claim; defer new continuation until explicit resume. |
| L14 | Preference and refresh | Same-account preference survives re-entry, other-account preference does not leak; task recovery remains explicit. |
| L15 | Complete a continuous-work cycle | Slice, generate, describe, save, submit, reconcile and continue using the existing project/ownership contracts. Stop and empty-pool behavior remain correct. |
| L16 | Original-layout regression | Original task entry, shortcuts and common editing actions retain behavior; the new layout's no-scroll contract is not imposed on the original view. |
Use local isolated tasks on the existing 5173/3001/27018 verification stack. Company cluster or BOS writes are not part of this specification. Supplement browser checks with existing API conflict/idempotency coverage only where this change affects that behavior; do not create a new test-only backend or duplicate all prior suites.
The preview passed 27 local layout/state checks and screenshot inspection. That validates the design artifact only. Implementation acceptance evidence is now collected in the per-task reports and the final acceptance report; preview checks remain design-only evidence.
## Out of Scope
- New random-task allocation, reviewer workflow or server-side undo systems.
- New windows/popups as the main work surface, or a second independent annotation editor.
- User-draggable panels, arbitrary layout presets or server-synchronized display settings.
- Making the entire growing list/dictionary simultaneously visible, or forbidding text-field scrolling.
- Full new-layout operation below 1280×640, mobile annotation, or imposing the new layout on quality/acceptance reviewers.
- Restoring unsaved browser drafts or undo across refresh, rolling back business data via a Git backup, deployment, merge or push.
- Recovery baseline: commit `54a35afad95d77b1f23c955f9c4671cae83a664d`, local annotated tag `codex/annotation-keyboard-baseline-20260918`, verified complete bundle under the ignored local backup directory. This is the version already published in PR #1, before the new layout discussion.
- The current implementation reuses existing browser session coordination. Its secure-context deployment requirement remains in force; the preview does not verify company-cluster HTTPS or deployment readiness.
- Client source documents were not directly accessible in the prior audit. This specification reflects the user's explicit decisions and available repository contracts, not a claimed rereading of inaccessible client originals.
编辑已有动作时,编辑器草稿与工作区动作沿用同一 ID;自动保存按 ID 将草稿覆盖到对应位置,仅不同 ID 的新动作追加。新切分的动作已存在于本地工作区时也采用覆盖,不能再次追加为重复区间。合并不修改原工作区/编辑器对象,不自动确认描述、不移动区间,也不放宽服务端唯一 ID、连续覆盖和重叠校验。不对本来就非法的工作区静默删动作或改 ID。
Base: local rework boundary repair 4d12d8cb, based on deployed fab5be57.
- Initial slice quick conflicts must be visible and confirmable/cancellable by the same keys and buttons as annotation conflicts. Preserve pending, described and invalid records; no customer migration.
- Successful C split, drag and delete must survive save/reload and support same-session undo/redo, respecting the existing one-second acceptance window and stage boundaries.
- Live complete editor drafts update feedback immediately, preserving classification fields. Derived slice status alone must not clear opinions.
- Discarded slices retain evidence and a right-side opinion rail without an action editor. Explicit whole-action invalidation shows its impact.
- Review remains read-only; E remains annotation-only. No production mutation or deployment in this task.
Customer request 2026-10-16: one lit/unlit control beside personal buffer selects automatic continuous work or manual claim. Persist per account in this browser; first use defaults to manual. Focus entry, refresh and task selection never silently enable it. Manual task selection/resume must not allocate; only explicit random-claim action may allocate. Off stops subsequent auto claims/switches immediately, preserving drafts, owned tasks and accepted jobs. An already sent request may finish and remain assigned; do not lose its receipt.
Also resolve diagnosed under-capacity directed-rework refill loop: keep rework-first server behavior, stop automatic refill on an already owned item or unchanged occupancy and bound attempts. Preserve API/storage/task contracts, permissions, atomic receipts, capacity and old in-flight requests. No server schema or migrations. No push/PR/deploy authorized in this task.
Verify real coordinator progress/no-progress, real hook preference persistence and cross-tab off, manual focus entry, explicit claim, toggling during pending request, refresh, account change and draft preservation. Local replica/synthetic UI only; no production business writes.
## Answer and verification
Implemented a single switch adjacent to personal buffer (legacy flows retain a mode control without buffer capacity). Account/browser preference defaults to manual and is shared across projects and same-origin tabs. Focus entry uses that preference. Selecting owned items resumes without claim; an explicit random button is available even after refresh before the focused session is active. Off stays usable during requests and stops following auto dispatches, retaining confirmed late allocations. Storage failure cannot enable auto; a failed off persistence stops this document and displays a warning.
Refill now uses one bounded coordinator. Known directed rework suppresses automatic claim attempts, existing-item/no-progress responses stop the loop, and rework is preferred among ready buffered items. Existing API, permission, receipt, capacity and task data contracts are unchanged.
Evidence: diagnostic actual server handler reproduced three 200 responses returning the same rework at 1/2 before this fix (main-root local-data/verification/random-claim-20261016/local-refill-repro.log). New known-rework regression also failed before its loop condition was corrected; final executable mode/coordinator/actual page callback regressions pass 12/12. Frontend gate: 13 known failures against 14 baseline, no new failures, baseline untouched. Lint, formatting, production build and targeted server rework/capacity/replay tests pass.
CUA synthetic UI uses actual session hook, switch and coordinator: default manual and click-existing produce zero claims; on permits allocation; off preserves draft and confirmed in-flight work and stops following requests; reopen stays off; second-tab off updates active tab. Full local snapshot API was started with verify-existing/external processor, BOS disabled. Final built full platform displayed the control beside 4/2 personal buffer; manual Start Work entered an already-owned demo task without enabling continuous mode. Full focused editing is constrained by IAB 1280px viewport versus existing 1413px minimum; no viewport guard bypass or complete focus editing acceptance is claimed.
Screenshots: main-root local-data/verification/work-mode-20261016/actual-task-pool.png and manual-mode.png. Logs in worktree local-data/pr-checks/work-mode-*. No production business writes or new deployment, PR or push performed.
## Header spacing follow-up (2026-10-16)
Customer marked the focused header's task picker overlapping the capture name. Cause: the old 36px header and 390px buffer width wrapped the added controls onto the next line; the status bar also used an absolute left offset. The header now uses three grid columns (controls / status / exit), automatic height with a 44px minimum, a single unwrapped control row and a flexible task picker. Status sits in normal flow; its repeated helper sentence is hidden only in compact layout. No work-mode, request or task-state logic changed.
Type check, production build, existing 12 executable work-mode/entry regressions and diff checks pass. Static layout measurements used DOM read from the actual built local focused page with the real final CSS at 1413px and 1920px: header 46px, picker/status inside header, capture name below, no overlap. Static snapshot is used because IAB viewport remains 1280px; the live workflow guard remains enforced. Screenshot and measures: main-root local-data/verification/work-mode-20261016/header-spacing.png and header-spacing-measures.json. Local build updated; user page was not refreshed to avoid losing drafts. No push or deployment.
- E → G discards a whole slice atomically, persists after refresh and can be submitted for review; original evidence remains available and restore/undo recovers it. Works on first pass and rework, including pending/described/invalid actions and structure changes. Esc never persists a preview.
- Old claimed annotation tasks that have reliable server-owned annotation/materialization evidence remain editable without a new sliceWorkflow marker. Processing/failed/unconfirmed slices remain guarded. No production data migration is assumed.
- G formal confirmation and autosave cannot race within the same page. Other-session conflicts must not overwrite server changes.
- Selecting a review task preserves server-computed claim eligibility. Supplier grants without legacy membership work; revoked grants, owned and terminal tasks remain protected.
- F/D opens the E-panel slice dictionary. Enter selects a reason and then confirms the reason preview; text editing and IME retain expected behavior.
- E-panel errors are visible in the panel; submission failures remain visible at their action.
- Production roles land on their own task pool by default, with existing random-claim actions preserved. Explicit task deep links retain priority; manager dashboard stays available.
- Human-visible time points/ranges use MM:SS.mmm consistently; storage/API remain seconds and exact frame inputs remain frame numbers.
## Verification
Use the local replica (5173/3001/27018), isolated synthetic fixtures, frontend/Go known-failure gates, lint/build, and targeted integration/interaction tests. No company-cluster writes, deployment, push or PR changes are part of this request.
## Comments
- Root lane: src/components/CaptureAnnotationWorkbench.tsx, src/pages/AnnotationOperations.tsx, src/App.tsx, src/lib/annotation-time.js, slice-edit helpers, autosave hook, server legacy-confirmation/structure write paths and associated tests/docs. Root owns the shared integration.
- feedback_baseline (Luna) lane: src/components/SliceEditPanel.tsx, src/components/DiscardReasonFields.tsx, src/components/WorkspaceDictionaryPanel.tsx and their targeted tests. Root supplies shared time formatter and F/D dispatcher. No global key listener.
- claim_permissions (Luna) lane: internal/api/annotation_operations.go **handleAnnotationTaskGet only**, plus dedicated eligibility API tests. Root edits other functions in that same file; preserve both ranges. Agent does not commit or deploy.
- All lanes read this ticket before editing. Keep file/function ownership above; report cross-lane needs to root. Only root stages and commits task changes.
## Implementation and compatibility
- The E panel applies `POST /api/plugins/annotation-qa/tasks/{id}/slice-edit-applications` with the complete workspace, explicit disposition commands, a version, and a per-application receipt ID. The server validates ownership, stage, frame boundaries, dictionaries and action containment; it prepares changes in memory and commits one CAS. Any invalid command or version conflict leaves the stored workspace unchanged.
- Discard archives original actions, including pending/described/invalid states. Restore and persisted undo/redo use server-owned archives and merge evidence. A missing active partition in a discarded undo snapshot cannot erase the recovery archive. Continuous blank intervals after structure edits become pending actions, following the existing draft contract.
- Ordinary draft/confirmation routes retain their explicit-disposition guard. Existing archives and stored times remain compatible. New receipt metadata is additive; there is no production migration or bulk data repair. Frontend and API must be released together for the new application endpoint.
- Legacy G confirmation accepts a complete, valid persisted action partition without inventing a sliceWorkflow marker; full-video tasks additionally need saved generation evidence. Active/failed jobs, explicit incomplete workflows, wrong owners, pending submission and stale versions remain guarded.
- Formal operations wait for an in-flight autosave and use its acknowledged version. Unknown write outcomes are read back before success is shown. The E panel remains open on failure and cannot cancel an application already being committed.
- Detail responses ship `canClaim` after state recovery, using the same server eligibility calculation as the pool. The frontend renders this flag; supplier grants do not require a separate legacy project member record.
## Verification evidence (local only)
- Real local UI: E → F opens the slice dictionary; G → Enter selects the reason → Enter records the preview → Enter saves. Whole-slice discard, undo, redo and refresh preserve all 6 archived actions. The isolated `oct15-feedback-verify-task` was then submitted and reached quality review; the quality UI shows the discarded slice and its read-only original actions.
- Real legacy local task: G persisted an invalid judgment without a workflow marker, then Undo restored the original action. A deliberately advanced synthetic version caused an E application to fail safely; the error appeared inside the panel and Esc discarded the preview.
- Actual React autosave hook + deferred fake CAS: overlapping and sequential formal confirmations both used version 2 and confirmed successfully. Task/account lifetime guards remain in the existing hook tests.
- Go integration tests cover first pass/rework, mixed action states, restart/readback, stale versions, a failed second command without partial writes, split/discard undo/redo, merge/archive undo, all-discarded save and submission, legacy draft confirmation, and supplier-grant detail eligibility.
- `npm run test:go:gate`: 70 failures, all existing baseline cases; no new failures. `npm run test:frontend:gate`: 13 failures, all baseline cases (14 known). One old source-copy assertion was aligned with the already-approved continuous blank-action contract and current wording; this is not counted as a separate production fix.
- TypeScript, script lint, Prettier, web build and `go build ./...` pass. Full `npm run lint` stops at two pre-existing unformatted files: `internal/domain/review_decision.go` and `internal/domain/review_draft.go`; both exactly match HEAD and are outside this change. Changed Go files pass gofmt.
- Commit-hook note: the hook invokes whole-repository gofmt and is blocked by the two unchanged files above. Task-file gofmt, TypeScript and Prettier were verified separately; the local commit skips that hook without changing hook configuration.
- Evidence is under ignored `local-data/verification/customer-feedback-20261015-new/` in the integration checkout. No company-cluster writes, push, PR update or deployment were performed for this follow-up.
Goal: Fix shared dashboard single-day selection, stale results and slow production reads.
Agent: Codex
Base: codex/release-review-source-20261103 @ d93fb5f0 (verified live baseline; contains origin/dev; follow-up to user review).
Scope: Shared dashboard UI, production report read path and focused regression tests.
Out of scope: Production writes, indexes, deployment and changing ADR 0012 cohort semantics.
Risk: Preserve exclusive API bounds and existing authorization; UI uses inclusive dates. Report read optimizations require result equivalence.
Verification: Five-role browser flows cover inclusive dates, invalid input, recovery, snapshot refresh, CSV, daily work and legacy zero counters. Mongo synthetic evidence preserves exact report results and tenant/database isolation; cache hits avoid repeated finds. Production cold-query latency remains unverified after deployment; no new indexes or production writes are authorized or performed. Evidence is under local-data/test-results/dashboard-date-refresh-evidence/.
Implement approved local v4 contract only. Freeze source ref metadata in revision; require complete customer v4 original source fields. Derive tags from own dictionary or parent frozen dictionary without overwriting selection provenance. Explicit timestamps + local/part seconds, half-open time bases and original PTS resolution. Consumer roundtrip uses only exported JSON + synthetic original source. Legacy formats remain unchanged. Commit local only, no deploy.
Status: resolved
Acceptance:
- Effective tags and action/slice origin are explicit; independent selections and invalid flags remain intact.
- part → slices → segments hierarchy and discard-reason-only semantics remain intact.
- Frozen original BOS references survive metadata-only reuse; no connection credentials or workspace paths enter customer output.
- Action local/part times and hardware PTS boundaries are complete and continuous.
- Independent reader resolves every synthetic original camera frame from JSON alone in physical and source-index modes.
- Immutable retry/recovery, separate private audit, legacy formats and local Mongo publication remain verified.
Compatibility: v4 default stays off; no production changes, retrospective tag guessing, old delivery replacement, downstream recutting or source writes.
Verification:
- 73 relevant Python tests passed, including physical/source-index independent real-media consumption, legacy v1/v2/v3 and 60-second materialization.
- Native Python v4 output passed Go batch/API publication, failure recovery and download tests with an isolated local Mongo 27018 database.
- Go full baseline gate: the same 70 named known failures, no new failures and no baseline edits.
- Local evidence: `local-data/verification/delivery-consumer-20261021/`; final customer samples under `final-samples/{physical,source-index}/customer/part0001/part.json`.
Goal: images report the commit they were built from: pass DROBOTICFLOW_BUILD_COMMIT/BUILD_TIME build-args and make that the documented release build step
Agent: Claude Code (Opus 5.5), desktop session 2026-10-28
2. **兜底原样保留并加表驱动钉死**(新 `internal/api/inplace_slice_editing_test.go`,seam ②,复用 randomClaimFixture/continuousFixture 既有 harness):跨界动作(跨共享边界)提交拒("fully contained in exactly one submitted final slice");"半个动作"(半段悬在片外)拒("event must be finite and inside the clip range");未知状态拒("未知动作状态"白名单);三选合法产物(截断两段 / 挪片修剪 / 判无效 invalid)全部通过(202 respond-async,校验门全过)。
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.