Repository navigation
refactor(core): move hashing utilities out of lib - #660
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 26 minutes and 58 seconds.Comment |
Polylogue Proof PackRefs: Affected Domains
Required Gates
Known Gaps
Oracle / Cost
|
There was a problem hiding this comment.
Pull request overview
This PR continues the ongoing “core primitive” extraction by relocating shared hashing helpers from polylogue.lib into polylogue.core, updating runtime/tests/docs/tooling so hashing primitives are treated as low-level core utilities.
Changes:
- Introduces
polylogue.core.hashing(SHA-256 helpers) and removes usage ofpolylogue.lib.hashing(no shim). - Updates all Python imports across pipeline, storage, parsers, browser capture, action-event extraction, and tests to the new core path.
- Refreshes topology/coverage docs and devtools topology projection rules to classify hashing as a
core-primitive.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/core/test_hashing.py | Switches hashing imports to polylogue.core.hashing. |
| tests/benchmarks/test_pipeline.py | Benchmarks now import hashing helpers from polylogue.core.hashing. |
| polylogue/storage/runtime/archive/records.py | Updates hashing import for archive runtime record logic. |
| polylogue/storage/repository/archive/writes/conversations.py | Updates hashing import used in content-hash computation for writes. |
| polylogue/storage/products/session/timeline_rows.py | Updates hashing import for session timeline row IDs. |
| polylogue/sources/parsers/drive_support_attachments.py | Updates hashing imports used for deterministic attachment IDs. |
| polylogue/sources/parsers/base_support.py | Updates hashing import used in parser support helpers. |
| polylogue/pipeline/ids.py | Updates hashing imports used for core pipeline ID/content-hash generation. |
| polylogue/core/hashing.py | New core primitive module implementing hashing helpers. |
| polylogue/browser_capture/receiver.py | Updates hashing import used for browser capture artifact naming. |
| polylogue/archive/action_event/fields.py | Updates hashing import used for action event ID generation. |
| docs/topology-status.md | Updates rendered topology counts for core-primitive and primitives summary. |
| docs/plans/topology-target.yaml | Moves hashing file ownership from lib-root to core-primitive. |
| docs/plans/campaign-coverage.yaml | Updates mutation campaign coverage target from old hashing path to new. |
| docs/internals.md | Updates internal reference to hashing implementation location. |
| devtools/build_topology_projection.py | Removes hashing.py from LIB_ROOT_PRIMITIVES to reflect the move. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
## Summary Move shared hashing helpers from `polylogue.lib.hashing` to `polylogue.core.hashing`. ## Problem The hashing helpers are low-level primitives used by archive IDs, storage row IDs, browser capture artifact names, parser attachment IDs, and benchmarks. They are not generic catch-all `lib` code and should live with the new core primitive package introduced by #659. ## Solution Rename `polylogue/lib/hashing.py` to `polylogue/core/hashing.py`, update all imports and generated docs/topology references, and keep no old-path shim. ## Verification - `devtools build-topology-projection && devtools verify-topology` — realized=697 declared=697 blocking=False - `ruff check polylogue/ tests/ devtools/` — all checks passed - `mypy polylogue/` — no issues found in 697 source files - `pytest -q tests/unit/core/test_hashing.py tests/unit/pipeline/test_pipeline_ids.py tests/unit/storage/test_archive_search_contracts.py tests/benchmarks/test_pipeline.py` — 84 passed - `devtools render-all --check` — sync OK - pre-push `devtools verify --quick` — all checks passed Ref #635
Summary
Move shared hashing helpers from
polylogue.lib.hashingtopolylogue.core.hashing.Problem
The hashing helpers are low-level primitives used by archive IDs, storage row IDs, browser capture artifact names, parser attachment IDs, and benchmarks. They are not generic catch-all
libcode and should live with the new core primitive package introduced by #659.Solution
Rename
polylogue/lib/hashing.pytopolylogue/core/hashing.py, update all imports and generated docs/topology references, and keep no old-path shim.Verification
devtools build-topology-projection && devtools verify-topology— realized=697 declared=697 blocking=Falseruff check polylogue/ tests/ devtools/— all checks passedmypy polylogue/— no issues found in 697 source filespytest -q tests/unit/core/test_hashing.py tests/unit/pipeline/test_pipeline_ids.py tests/unit/storage/test_archive_search_contracts.py tests/benchmarks/test_pipeline.py— 84 passeddevtools render-all --check— sync OKdevtools verify --quick— all checks passedRef #635