Skip to content

Remove unused attributes and flags parameters from CreateChronicle and AcquireStory#641

Merged
iameneko merged 6 commits into
developfrom
575-remove-attrs-parameter
May 22, 2026
Merged

Remove unused attributes and flags parameters from CreateChronicle and AcquireStory#641
iameneko merged 6 commits into
developfrom
575-remove-attrs-parameter

Conversation

@iameneko
Copy link
Copy Markdown
Contributor

@iameneko iameneko commented May 6, 2026

The CreateChronicle and AcquireStory APIs each took two parameters that have never done anything: an attributes map and an int& flags. The attribute map was stored as opaque key/value strings and silently dropped; nothing in Keeper, Grapher, or Store ever consumed it. The flags reference was threaded through the public client, the Visor portal, the Thallium RPC, and the metadata directory for years, only ever to be logged. This PR removes both, end-to-end, so the v3.0.0 client API stops advertising configurability it doesn't deliver.

These two changes were originally split into separate issues (#575 for attributes, #577 for flags) and separate PRs. Since they touch the same call sites in every example, test, and plugin, the second one to merge would have spent its time re-editing exactly the lines the first one touched. Bundling them into a single PR is cheaper and more honest about the fact that it's one logical change: "remove the parameters the API was lying about."

While in the area, this PR also clears out a handful of helpers that became orphaned by the cleanup:

  • Chronicle::removeArchive has no callers anywhere in the codebase, so it goes.
  • Story::setProperty was only ever called from Chronicle::addStory, which lost its attrs argument here; the function was left behind in the original attrs-removal slice and is removed now.
  • A pair of leftover Priority=High string locals in client_metadata_rpc_test.cpp that the previous cleanup missed.
  • The orphan tiering_policy field and the matching StoryTieringPolicy / ChronicleTieringPolicy enums — always set to *_normal in the constructor, never read.

A few things are deliberately out of scope so this PR stays focused:

Two notes for reviewers:

The Python binding file (py_chronolog_client.cpp) didn't need any changes. pybind11 binds via &Client::CreateChronicle and &Client::AcquireStory method pointers, so the new C++ signatures are picked up automatically. The Python example scripts under client/python/examples/ are updated.

In plugins/chrono-stream/ClientScripts/client_writer.cpp, the acquire_or_create_story function previously made three retry attempts that distinguished open-vs-create via different flags values. Since flags was never read on the server side, all three calls were always equivalent. The three-attempt structure is kept for now to minimize behavior change; the function can be collapsed in a follow-up if desired.


Closes #575 and #577. Part of #572.

…and AcquireStory

The attribute map argument was advertised by the public client API but
never honored — ChronicleMetaDirectory only logged it and dropped it on
the floor, no Keeper/Grapher/Store code consumed any value. Removing
the parameter end-to-end (public client header, facade, impl, RPC,
Visor portal, metadata directory, Chronicle::addStory) makes the API
stop pretending to be configurable.

Also removes the orphan tiering_policy field from ChronicleAttrs and
StoryAttrs (always set to *_normal in the constructor, never read), the
matching enums, and the "TieringPolicy=Hot" / "Priority=High" / etc.
attribute-map setup in CLI, perf bench, examples, and integration tests.

Closes #575.
@iameneko iameneko added this to the v2.9.0 — API Completeness milestone May 6, 2026
@iameneko iameneko added Maintenance Refactoring, cleanup, dependency updates, dead-code removal ChronoVisor Coordination service: chronicle/story metadata, client registry, recording group orchestration ChronoLogClient Client library: C++/Python APIs for connecting, recording, and replaying labels May 6, 2026
@iameneko iameneko self-assigned this May 6, 2026
@iameneko iameneko modified the milestones: v2.9.0 — API Completeness, v3.0.0 — Native Extension Plugins May 14, 2026
@iameneko iameneko force-pushed the 575-remove-attrs-parameter branch from e5eb674 to 46a742d Compare May 18, 2026 20:50
iameneko added 2 commits May 18, 2026 22:34
Resolve repo restructure (#563) conflicts: relocate ChronologClient.cpp
modifications to client/cpp/src/.
The int& flags argument has been threaded through the public client API,
the Visor portal, the Thallium RPC, and the metadata directory for years
without ever being read or written — only logged. Removing it everywhere
shrinks the API to what the system actually does and unblocks Python
binding work that had to mirror the noise.

Also drops a few orphan helpers exposed by the prior #575 cleanup:

- Chronicle::removeArchive: no callers anywhere in the codebase.
- Story::setProperty: only caller (Chronicle::addStory) was removed
  along with the attributes parameter; the function itself was left
  behind.
- A pair of dead "Priority=High" string locals in
  client_metadata_rpc_test.cpp that were leftovers from the removed
  attribute-map setup.

Closes #577.
@iameneko iameneko changed the title Remove unused attrs parameter from CreateChronicle and AcquireStory Remove unused attributes and flags parameters from CreateChronicle and AcquireStory May 22, 2026
@iameneko iameneko linked an issue May 22, 2026 that may be closed by this pull request
@iameneko iameneko marked this pull request as ready for review May 22, 2026 00:48
@iameneko iameneko requested review from fkengun and ibrodkin May 22, 2026 15:56
iameneko and others added 2 commits May 22, 2026 13:30
…anges

PR #641 dropped the attrs/flags parameters from Client::CreateChronicle
and Client::AcquireStory. The chrono-pubsub adapter, merged in from
develop, was still calling the old four-arg signatures and breaking the
build. Update the calls to the new minimal signatures and drop the now-
unused DEFAULT_FLAGS / story_attrs / chronicle_attrs locals.
@iameneko iameneko mentioned this pull request May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ChronoLogClient Client library: C++/Python APIs for connecting, recording, and replaying ChronoVisor Coordination service: chronicle/story metadata, client registry, recording group orchestration Maintenance Refactoring, cleanup, dependency updates, dead-code removal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client API cleanup: unused flags and missing story metadata APIs Remove unused attributes parameter from CreateChronicle and AcquireStory

3 participants