fix(parser): use transcript identity for rooted uploads - #1435
Conversation
roborev: Combined Review (
|
3aca787 to
6112f91
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
27d66bd to
3ccb7d5
Compare
roborev: Combined Review (
|
|
The underlying fix for #1333 genuinely crosses three authorities:
After the repeated bounces trying to work all this into one PR I reworked it to just the identity-collision authority. This establishes the canonical identity input:
This is a better design and turned out smaller. Once this foundation merges, the next PR would cover the destructive behavior described in the original issue without reopening identity or filesystem design. Once both merge, the reported data-loss bug should be fixed such that we can close out the original issue. There are other possible follow-ups in:
But their value needs to be evaluated once the two-part fix here is in, since there may not be a need for them. |
Session uploads currently replace an existing transcript wholesale, so a shorter re-upload can reduce a stored session from 96 messages to 24 with a successful response and no caller consent. This makes shorter replacements return `409 Conflict` by default and requires the caller to pass `allow_shorter=true` for an intentional rewrite. If any member of a multi-session upload would shrink, the whole batch rolls back and the destination file does not move. The guard compares message counts inside the existing atomic batch transaction, keeping the decision and replacement under the same lock. This is the destructive-replacement slice of #1333. It stacks on #1435, which establishes transcript identity and lineage. Closes #1333 Co-authored-by: Rod Boev <rodboev@users.noreply.github.com>
Renamed Claude root uploads can collide with an existing archive because the multipart filename supplies session identity. Uploads whose transcript carries one stable archive-safe ID with explicit root markers now select that ID during the existing Claude parse, and the staged file follows it. Sidechain, markerless, mixed-ID, and local discovery parses keep their current identity rules.
Replacement semantics, existing filename-keyed rows, case-equivalent names, and concurrent-writer handling are unchanged.
Refs #1333