Skip to content

Show a conversation after a removal on the page, and draw the bodies landed after it - #67

Merged
wu-sheng merged 1 commit into
mainfrom
retention-page
Oct 14, 2026
Merged

wu-sheng merged 1 commit into
mainfrom
retention-page

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Step 6 of retention: the page. Until now the page drew a removed step with no text, but said nothing above the conversation. Its Prompt tab could not draw a provider body landed after a removal, because the renderer rebuilds bodies in the browser from the files the page serves, and a removed file was left out.

The renderer is pinned at Horizon aff6287, apache/skywalking-horizon-ui#192.

What changes

  • The files route serves a removed file as its skeleton, uncompressed, with kept:

    • bodies: the body of each record the session's store kept as a chain tip, by record id;
    • pieces: each removed piece a later body cites, by SHA-256.

    The budget counts them by the sizes the records name, only for what the store has, before anything is read. A file that does not fit the budget on its own is served alone. A file a removal deletes while the route reads is served as its skeleton. A store that cannot be read gives a 500, never an answer that keeps nothing.

  • The page shows a small note in its header, "N files removed by retention". Its title says that only a receiver that accepted the files still has their text. It sits in the header row, so the conversation keeps its height. The loader hands the kept bytes to the renderer, and asks again for whatever an answer left out.

  • The renderer (Horizon #192):

    • Its prompt store holds skeletons.
    • It takes a piece by the SHA-256 that a removed or too-large part keeps, from the record that landed first.
    • It says when a body was removed, is built from a removed one, or holds a piece too large to store.
  • Skeletons keep an empty segment list for a body whose segments were all literal, so the renderer judges the skeleton as it judged the body.

  • The OTLP exporter over HTTP keeps its own connections. It shared the process's default transport. An httptest server closing in a parallel scenario broke a push it had just started, with CloseIdleConnections called; that was the Linux CI failure. And closing the exporter closed every other HTTP client's idle connections.

.sk files and the store under provider/ stay local. They are never sent, so nothing changes on the OAP.

Tests

  • tests/chain:
    • Every body landed after a removal rebuilds from the route's answer alone. This test also writes Horizon's fixtures.
    • The budget serves every file, and a file deleted while the route reads is served as its skeleton.
  • internal/view:
    • Kept bytes are counted once, only for what the store has, and a store error is an error.
    • The page's helpers run under node: the note, kept bytes as typed arrays, a record id __proto__, and asking again for left-out files.
  • internal/storage: lookup failures of the store.
  • pkg/skeleton: a literal-only manifest keeps an empty list.

Each guard was proven by reverting it. make check, make scenarios and make conversation-view-check pass.

@wu-sheng wu-sheng added this to the 0.6.0 milestone Oct 13, 2026
…landed after it

Retention removes an idle sent conversation's landed files and leaves
skeletons. The page drew removed steps, but said nothing above them, and its
Prompt tab could not rebuild a provider body landed after a removal: the
renderer rebuilds bodies in the browser from the files the page serves, and a
removed file was left out.

- The files route serves a removed file as its skeleton, uncompressed, with
  what the session's store kept of it under "kept": the body of each record
  kept as a chain tip, by record id, and each removed piece a later body
  cites, by SHA-256. The budget counts them by the sizes the records name,
  for what the store has, before anything is read; a file over the budget on
  its own is served alone. A file a removal deletes while the route reads is
  served as its skeleton. A store that cannot be read is an error, never a
  store that keeps nothing.
- The page says in its header how many files retention removed, and that only
  a receiver that accepted them still has their text. Its loader hands the
  kept bytes to the renderer, and asks again for what an answer left out.
- The renderer is pinned at apache/skywalking-horizon-ui#192, whose prompt
  store holds skeletons, takes a piece by the SHA-256 a removed or too large
  part keeps, from the record that landed first, and says when a body was
  removed, is built from a removed one, or holds a piece too large to store.
- A skeleton keeps an empty segment list for a body whose segments were all
  literal, so the renderer reads it as it read the body.
- The chain test of the files route writes the fixtures of the renderer's
  tests.
- The OTLP exporter over HTTP keeps its own connections. It shared the
  process's default transport, so an httptest server closing in a parallel
  scenario broke a push it had just started ("CloseIdleConnections called"),
  and closing the exporter closed every other HTTP client's idle connections.
@wu-sheng
wu-sheng merged commit eec38bf into main Oct 14, 2026
24 checks passed
@wu-sheng
wu-sheng deleted the retention-page branch October 14, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant