Skip to content

trystero: AGENTS.md sends the reader to the superproject's coding guidelines - #2

Merged
pinhopro merged 4 commits into
mainfrom
coding-guidelines
Oct 27, 2026
Merged

pinhopro merged 4 commits into
mainfrom
coding-guidelines

Conversation

@pinhopro

@pinhopro pinhopro commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Part of the organization's proposal coding-guidelines (webcpporg/proposals, organization/openspec/changes/coding-guidelines), accepted on 2026-10-26: the superproject's rules and design decisions now live in CODING-GUIDELINES.md, whose chapter 15 gives this library's decisions with their reasons, and its AGENTS.md says how to work in the tree. This library's AGENTS.md now sends the reader to both.

It also fixes what the CI found, which predates this change (the shared connection was merged without a CI run):

  • The lint. Analysed against libstdc++, as the CI's Linux lint does, clang-tidy's performance-unnecessary-value-param reports pc and channel of app_impl::share_or_adopt and app of room_impl::make as used only as const references, although each is moved into what std::allocate_shared builds. They are sinks, exempt with that reason as app::make's already are. Reproduced locally with libstdc++: 3 findings before, none after.
  • trystero/allocation on MSVC 14.3 and 14.5. A room counted a 16-byte and a 56-byte global allocation: MSVC's std::list allocates its sentinel when constructed, and in a debug build every container its iterator proxy, and the test backend's data channel queued frames in a std::list of std::allocator. The queue now takes its nodes from the channel's resource, through an allocator that leaves each frame in its own; the second test checks its resources once its own objects are gone. The test now writes the size of each global allocation when a count is not what it expects, which is how the cause was found.

trystero/native_room failed once on MSVC 14.5 (a real connection not seen within 15 s), passed on a rerun of that lane and in every other run, and passes 30 of 30 times locally: recorded for an investigation of its own.

🤖 Generated with Claude Code

R added 4 commits October 26, 2026 11:41
…delines

The superproject's rules and design decisions moved to CODING-GUIDELINES.md,
whose chapter 15 gives this library's decisions with their reasons; its
AGENTS.md says how to work in the tree. Both are read before this file.
…pp's are

Analysed against libstdc++, as the CI's Linux lint does, clang-tidy's
performance-unnecessary-value-param reports pc and channel of
share_or_adopt and app of room_impl::make as used only as const references,
although each is moved into the object std::allocate_shared builds; against
libc++ it reports nothing. They are sinks, exempt with that reason as
app::make's parameters already are.
On MSVC 14.3 and 14.5 a room counts 6 global allocations where 2 are
expected, and two rooms of an app 12 where 4 are, which the test reported
as numbers alone. It now keeps the size of each global allocation it counts,
without allocating, and writes them to the standard error with MSVC's
iterator debugging level when a count is not what it expects, so that a
failure says what was allocated.
…keep to their resources

MSVC counted, for each room, a global allocation of 16 bytes and one of
56: its std::list allocates a sentinel node when constructed, and in a
debug build every container allocates an iterator proxy, and the memory
backend's data channel queued its frames in a std::list of std::allocator.
The queue now takes its nodes from the channel's resource, through an
allocator that leaves each frame in the resource it was made in.

The second test also checked its resources while its moved-from
configurations and its payloads were alive, of which MSVC's debug
containers still hold proxies: they are now destroyed before the check.
@pinhopro
pinhopro merged commit a9af932 into main Oct 27, 2026
49 of 50 checks passed
@pinhopro
pinhopro deleted the coding-guidelines branch November 8, 2026 15:23
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