M2-05: A memo is up to three files #46
No reviewers
Labels
No labels
area/agent
area/capture
area/editor
area/geo
area/security
area/sync
area/transcription
area/ui
area/vault
area/voice-memos
blocked
milestone/M1
milestone/M2
milestone/M3
milestone/M4
needs-decision
needs-hardware
p0
p1
p2
type/bug
type/enhancement
type/feature
type/idea
type/infrastructure
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stash/stash-ios!46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "m2-05-track-file-triple"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #32.
A memo is now up to three files:
<base>_audio.m4a,<base>_transcription.vttwhere somebodyspoke, and
<base>_track.gpxwhere the route was recorded. Nothing writes a track yet — thatis #34. What lands here is everything that has to be ready before one exists, so there is never a
build where a track is on disk and swipe-to-delete strands it.
What changed
trackFileNameandtrackPartFileName— the latter<base>_track.NNN.gpxin the<base>.parts/folder the transcript's parts already use, under the same numbering. The two partparsers are thin wrappers over one strict rule rather than two copies of it, so what keeps
.000,0001and a.sb-…temporary out cannot drift between them.A track that will not go keeps the audio, which keeps the row and keeps the deletion retryable —
the same rule the transcript has, and it matters more here because a track is a record of where
somebody was.
clearPartsis asked for.transcriptor
.wholeCapture, with no default. Publishing a transcript owns transcript parts and theunfinalised tail; deleting a memo owns everything the capture wrote.
decision record in
stash-docs(Stash/stash-docs#7).The design change made during the work
The first draft taught the parts clean-up about track parts globally. Codex caught that
clearPartsruns on the ordinary stop path and not only on delete — so once #34 writes trackparts, the first normal stop after it lands would unlink the route on its way out of transcript
assembly, and the launch sweep would do the same to any capture nobody spoke into. Ownership became
the caller's to state.
Both mutations are covered: flipping either
.transcriptcall site to.wholeCapturefailsassemblingATranscriptLeavesTheTrackPartsAndTheirFolderAloneandaFolderOfNothingButTrackPartsSurvivesAssembly. Checked by hand, not assumed.Codex
Plan review, code review, test review and security review are in
.agent/m2-05-track-file-triple/,with every finding's disposition in
SUMMARY.md. The security pass found nothing at any level. Thetest review found four gaps and all four were accepted — the no-speech branch could have lost every
route and stayed green, and the deletion fixture would have passed even if it deleted every
.gpxin the folder.
Validated
make test: 372 pass.make lint: 0 violations._track.gpxin Documents. The memo is one row;the lone track is no row.
Not validated
tests against a temporary directory, not by a tap.