Skip to content

refactor: renew session-product runtime contracts - #234

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/storage-runtime-renewal
Apr 20, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/storage-runtime-renewal

Conversation

@Sinity

@Sinity Sinity commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Ref #225
Ref #222

Summary

  • replace dict-shaped session-product rebuild counts with a typed runtime counter object
  • replace dict-shaped session-product status snapshots with a typed runtime snapshot and ready-flag helper
  • carry the new contracts through archive operations, repair, embedding stats, benchmark tooling, and the direct tests

Problem

The session-product runtime still exposed broad dict payloads for rebuild counts and readiness snapshots. That kept storage, repair, and product surfaces stringly-typed even after the earlier substrate renewal work, and it forced tests plus benchmark tooling to keep patching and indexing anonymous containers.

Solution

Added SessionProductCounts and SessionProductStatusSnapshot in polylogue/storage/session_product_runtime.py, then moved session_product_refresh.py, session_product_rebuild.py, and session_product_status.py onto those contracts. Updated the downstream storage/query/facade surfaces and the consumers that actually inspect the status data, especially operations/archive.py, storage/repair.py, storage/derived_status.py, storage/embedding_stats_support.py, and devtools/synthetic_benchmark_runtime.py.

Verification

  • devtools verify

@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 51e60f1e-b14a-4f9e-b420-3da122d6bfe7

📥 Commits

Reviewing files that changed from the base of the PR and between b449e2c and 144a199.

📒 Files selected for processing (20)
  • devtools/synthetic_benchmark_runtime.py
  • polylogue/facade_archive.py
  • polylogue/operations/archive.py
  • polylogue/pipeline/run_stages.py
  • polylogue/storage/backends/async_sqlite_archive.py
  • polylogue/storage/backends/query_store.py
  • polylogue/storage/derived_status.py
  • polylogue/storage/embedding_stats_support.py
  • polylogue/storage/repair.py
  • polylogue/storage/session_product_rebuild.py
  • polylogue/storage/session_product_refresh.py
  • polylogue/storage/session_product_runtime.py
  • polylogue/storage/session_product_status.py
  • polylogue/sync_product_queries.py
  • tests/unit/cli/test_products.py
  • tests/unit/devtools/test_benchmark_campaigns.py
  • tests/unit/pipeline/test_run_sources.py
  • tests/unit/storage/test_derived_status.py
  • tests/unit/storage/test_embedding_stats.py
  • tests/unit/storage/test_session_product_refresh.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/storage-runtime-renewal

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Sinity
Sinity merged commit 014f01a into master Apr 20, 2026
13 checks passed
@Sinity
Sinity deleted the feature/refactor/storage-runtime-renewal branch April 20, 2026 01:30
Sinity added a commit that referenced this pull request Apr 22, 2026
Ref #225
Ref #222

## Summary
- replace dict-shaped session-product rebuild counts with a typed runtime counter object
- replace dict-shaped session-product status snapshots with a typed runtime snapshot and ready-flag helper
- carry the new contracts through archive operations, repair, embedding stats, benchmark tooling, and the direct tests

## Problem
The session-product runtime still exposed broad dict payloads for rebuild counts and readiness snapshots. That kept storage, repair, and product surfaces stringly-typed even after the earlier substrate renewal work, and it forced tests plus benchmark tooling to keep patching and indexing anonymous containers.

## Solution
Added `SessionProductCounts` and `SessionProductStatusSnapshot` in `polylogue/storage/session_product_runtime.py`, then moved `session_product_refresh.py`, `session_product_rebuild.py`, and `session_product_status.py` onto those contracts. Updated the downstream storage/query/facade surfaces and the consumers that actually inspect the status data, especially `operations/archive.py`, `storage/repair.py`, `storage/derived_status.py`, `storage/embedding_stats_support.py`, and `devtools/synthetic_benchmark_runtime.py`.

## Verification
- `devtools verify`
@Sinity Sinity added area:storage Storage tool:claude Claude type:refactor Code restructuring labels Apr 22, 2026
Sinity added a commit that referenced this pull request Apr 22, 2026
The session-product runtime still exposed broad dict payloads for
rebuild counts and readiness snapshots. Storage, repair, and product
surfaces remained stringly-typed even after the earlier substrate
renewal; tests and benchmark tooling kept patching and indexing
anonymous containers.

Adds `SessionProductCounts` and `SessionProductStatusSnapshot` in
`storage/session_product_runtime.py`, then moves
`session_product_refresh.py`, `session_product_rebuild.py`, and
`session_product_status.py` onto those contracts. The downstream
storage/query/facade surfaces and the consumers that inspect status
data — especially `operations/archive.py`, `storage/repair.py`,
`storage/derived_status.py`, `storage/embedding_stats_support.py`,
and `devtools/synthetic_benchmark_runtime.py` — adapt to the typed
shape.

Verification: devtools verify green.

Ref #225
Ref #222
Sinity added a commit that referenced this pull request Apr 22, 2026
The session-product runtime still exposed broad dict payloads for
rebuild counts and readiness snapshots. Storage, repair, and product
surfaces remained stringly-typed even after the earlier substrate
renewal; tests and benchmark tooling kept patching and indexing
anonymous containers.

Adds `SessionProductCounts` and `SessionProductStatusSnapshot` in
`storage/session_product_runtime.py`, then moves
`session_product_refresh.py`, `session_product_rebuild.py`, and
`session_product_status.py` onto those contracts. The downstream
storage/query/facade surfaces and the consumers that inspect status
data — especially `operations/archive.py`, `storage/repair.py`,
`storage/derived_status.py`, `storage/embedding_stats_support.py`,
and `devtools/synthetic_benchmark_runtime.py` — adapt to the typed
shape.

Verification: devtools verify green.

Ref #225
Ref #222
Sinity added a commit that referenced this pull request Apr 22, 2026
The session-product runtime still exposed broad dict payloads for
rebuild counts and readiness snapshots. Storage, repair, and product
surfaces remained stringly-typed even after the earlier substrate
renewal; tests and benchmark tooling kept patching and indexing
anonymous containers.

Adds `SessionProductCounts` and `SessionProductStatusSnapshot` in
`storage/session_product_runtime.py`, then moves
`session_product_refresh.py`, `session_product_rebuild.py`, and
`session_product_status.py` onto those contracts. The downstream
storage/query/facade surfaces and the consumers that inspect status
data — especially `operations/archive.py`, `storage/repair.py`,
`storage/derived_status.py`, `storage/embedding_stats_support.py`,
and `devtools/synthetic_benchmark_runtime.py` — adapt to the typed
shape.

Verification: devtools verify green.

Ref #225
Ref #222
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:storage Storage tool:claude Claude type:refactor Code restructuring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant