feat(artifacts): add strict BM25 publication - #602
Conversation
efc6137 to
1f987a5
Compare
0338ee1 to
e8e9ded
Compare
Plan and replay exact BM25 generations through retained source and strict workspace authority. Validate staged and published candidates against bounded canonical bytes, reject repository overlap, and preserve existing portable-view compatibility. Verified with 628 focused tests (15 skipped) plus Black, isort, flake8, py_compile, and git diff --check.
Document the short-lived replay plan, the retained-source and two-phase validation boundary, and the remaining provider, context, and M2 profile work.
Assert both low-level replay and high-level normalization invoke provider support exactly once after caller inputs are frozen.
Use one detached authenticated repository identity across strict BM25 planning and publication so mutable public projections cannot redirect policy, paths, or fingerprints between validation steps. Verified with 800 focused tests, pre-commit, strict MkDocs, py_compile, and git diff --check.
e8e9ded to
b3fdb8b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3fdb8bd5d
ℹ️ 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".
| validate_bounded_json_stream( | ||
| source, | ||
| label="portable BM25 documents", | ||
| max_bytes=_MAX_DOCUMENTS_JSON_BYTES, | ||
| ) |
There was a problem hiding this comment.
Raise the aggregate budget for streamed BM25 documents
When a generation contains 20,000 otherwise valid documents, this whole-file preflight rejects it with exceeds its 100000-node limit even if the JSON is only about 1.2 MB. The call inherits DEFAULT_MAX_NODES_PER_ELEMENT and DEFAULT_MAX_LEXICAL_TOKENS, but applies those limits to the entire top-level array before iter_bounded_json_array performs the intended per-element checks, so sufficiently large repositories cannot use strict BM25 publication despite the documented 256 MB file budget and one-million-item iterator limit. Use aggregate limits consistent with the allowed array size, or restrict this preflight to the whole-file lexical properties it actually needs to check.
Useful? React with 👍 / 👎.
Summary
Restacks the isolated strict BM25 publication producer on current main. It plans and replays exact canonical BM25 generations through retained source and strict workspace authority without changing legacy SourceTrust or native-vector production routes.
Changes
Type of Change
Testing
Checklist