Skip to content

[logmeister] Sitemap render aborts on a soft-deleted post: channel query returns tombstones #1698

Description

@Seifert69

GET /sitemap.xml aborts on any identity that has soft-deleted a post in a channel.
The sitemap query returns the deleted post's tombstone, whose header content is blank, and
the render throws on it.

Root cause — three things line up:

  1. A soft delete writes a tombstone (DriveStorageServiceBase.WriteDeletedFileHeader,
    :1817-1859) that keeps FileType/UserDate but sets AppData.Content = "" and
    Payloads = null. So it still matches FileType = [PostFileType] and sorts among live
    posts.
  2. FileQueryParams.FileState defaults to null and QueryBatch.cs:335 only filters on
    it when set — so batch queries return tombstones unless the caller opts out.
    FollowerService.cs:392, PeerOutgoingTransferService.cs:232 and
    V2DriveBatchFileWriteOperationsController.cs:79 all pass FileState.Active; the
    three queries in HomebaseChannelContentService (GetChannelPosts, GetChannelPostIds,
    QueryBatchFirstFile) do not.
  3. DriveQueryServiceBase.cs:412-419 detects FileState.Deleted, logs
    Creating Client File Header for deleted file, and falls through — the code that
    would build a deleted header is commented out.

GetChannelPostIds (HomebaseChannelContentService.cs:158-159) then calls
Deserialize<PostContent>(""), gets JsonException, and the whole render aborts.

Evidence: every occurrence traced (2026-08-30, 2026-09-01) has the deleted-file
debug line for the same file, under the same correlation id, immediately before the
public-posts channel is processed. On bleeding-edge two more identities fail the same
way after their own deleted-file lines. Same tombstone causes #1699 via a different
throw site (Payloads == null).

Suggested fix

  • Add FileState = [FileState.Active] to the three FileQueryParamsV1 in
    HomebaseChannelContentService. Fixes this and [logmeister] ParsePostFile throws on a soft-deleted post's null Payloads (channel preview, post preview, SSR channel page) #1699; also stops GetChannels /
    GetChannelDrive from picking a deleted channel-definition file.
  • Optionally wrap the per-post deserialize in GetChannelPostIds in a try/catch that
    logs the FileId and skips that post.
  • Withdrawn: the earlier suggestion to fall back to the default payload. A tombstone
    has Payloads = null; it would throw on the next line.
  • Decide what DriveQueryServiceBase.cs:412-419 should do — restore the deleted-header
    path or remove the dead branch. Today the log claims one thing and the code does another.

Occurrences: 11 on production, 2026-08-29..09-01, one identity, caller anonymous.


Maintained by logmeister. This body is revised in place as evidence changes, so it does
not contradict itself — see the comments for the changelog. Identity domains redacted.

logmeister-fp: 1c83b513

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglogmeisterFiled by the automated log analyser

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions