Skip to content

feat(weave): add in-memory fake trace server skeleton and test wiring - #7145

Merged
andrewtruong merged 2 commits into
masterfrom
andrew/fake-ts-01-skeleton
Jun 17, 2026
Merged

feat(weave): add in-memory fake trace server skeleton and test wiring#7145
andrewtruong merged 2 commits into
masterfrom
andrew/fake-ts-01-skeleton

Conversation

@andrewtruong

@andrewtruong andrewtruong commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

This PR has two commits:

  1. The first commit introduces the skeleton of the fake trace server implementation, including new wiring to run the impl. Initially, this impl is a no-op to start.
  2. The second commit (most of the changes in this PR) are mechanical additions telling pytest to skip tests against the fake impl. As we implement the fake in subsequent PRs, we'll remove the skips.

At the end of this process, we should have a fully featured fake impl and no skips.


All subsequent PRs in this stack share these properties:

  1. The first commit removes the skip from relevant tests whose impl will be implemented; then
  2. The second commit actually implements the fake, allowing the tests to pass.

andrewtruong commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.72340% with 20 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
weave/trace_server/in_memory_trace_server.py 78.72% 20 Missing ⚠️

📢 Thoughts on this report? Let us know!

@andrewtruong
andrewtruong marked this pull request as draft June 11, 2026 01:20
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch 2 times, most recently from 70f64f6 to ec1112c Compare June 11, 2026 04:00
@andrewtruong andrewtruong changed the title feat(weave): scaffold in-memory fake trace server (storage + SQLite-semantics helpers) feat(weave): scaffold in-memory fake trace server (storage + lifecycle) Jun 11, 2026
@andrewtruong
andrewtruong changed the base branch from master to graphite-base/7145 June 11, 2026 04:33
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch from ec1112c to c9a86e6 Compare June 11, 2026 04:33
@andrewtruong
andrewtruong changed the base branch from graphite-base/7145 to andrew/remove-sqlite-trace-server June 11, 2026 04:33
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch from c9a86e6 to 91b6e4c Compare June 11, 2026 13:05
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch 2 times, most recently from d96061d to 9d73269 Compare June 11, 2026 17:06
@andrewtruong
andrewtruong force-pushed the andrew/remove-sqlite-trace-server branch from c626345 to 38f4846 Compare June 13, 2026 17:16
Base automatically changed from andrew/remove-sqlite-trace-server to master June 13, 2026 20:32
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch from 9d73269 to 53388a3 Compare June 13, 2026 20:36
@w-b-hivemind

w-b-hivemind Bot commented Jun 13, 2026

Copy link
Copy Markdown

HiveMind Sessions

1 session · 8h 14m · $283

Session Agent Duration Tokens Cost Lines
Implement Fake Trace Server PR Stack
805f9d5c-0e5b-46d2-865d-8ad9f5a6969f
claude 8h 14m 2.1M $283 +496 -230
Total 8h 14m 2.1M $283 +496 -230

View all sessions in HiveMind →

Run claude --resume 805f9d5c-0e5b-46d2-865d-8ad9f5a6969f to pickup where you left off.

@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch 10 times, most recently from 5838d2a to be55e16 Compare June 16, 2026 14:30
@andrewtruong
andrewtruong marked this pull request as ready for review June 16, 2026 15:04

@drtangible drtangible left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

Comment thread .github/workflows/test.yaml Outdated
contents: read
# The in-memory fake needs no ClickHouse/wandb services — it is a pure
# in-process backend. Tests it cannot satisfy yet are skipped via
# tests/fake_unimplemented.txt; the rest must match ClickHouse.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this reference to fake_unimplemented.txt accurate?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that was removed; fixed

updated_by: str


class InMemoryTraceServer(tsi.FullTraceServerInterface):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why subclass this at all? aren't we going to need to add methods?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with subclassing?

Comment thread tests/trace/util.py Outdated
# `skipif(FAKE_NOT_IMPLEMENTED, ...)` decorators for the capability it
# implements, so CI then runs those tests on the fake and verifies they match
# ClickHouse. (NOT_CLICKHOUSE_BACKEND, by contrast, is permanent CH-only.)
FAKE_NOT_IMPLEMENTED = (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

presumably this will drift from above?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah fair, fixed

self._init_storage()

def _init_storage(self) -> None:
# Calls keyed by id (unique per call in practice; reads filter by

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not key the calls by project_id, id ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch from be55e16 to b22d2f2 Compare June 16, 2026 20:38
@andrewtruong
andrewtruong force-pushed the andrew/fake-ts-01-skeleton branch from b22d2f2 to a56135b Compare June 17, 2026 02:43
@andrewtruong
andrewtruong enabled auto-merge (squash) June 17, 2026 02:45
@andrewtruong
andrewtruong merged commit 0caf63e into master Jun 17, 2026
107 of 108 checks passed
@andrewtruong
andrewtruong deleted the andrew/fake-ts-01-skeleton branch June 17, 2026 02:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants