Skip to content

feat(artifacts): add strict BM25 publication - #602

Merged
fishmingyu merged 4 commits into
mainfrom
feat/strict-bm25-publication-v2
Aug 15, 2026
Merged

feat(artifacts): add strict BM25 publication#602
fishmingyu merged 4 commits into
mainfrom
feat/strict-bm25-publication-v2

Conversation

@fishmingyu

@fishmingyu fishmingyu commented Aug 11, 2026

Copy link
Copy Markdown
Member

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

  • Add PlannedBm25View plus strict plan, replay, and high-level normalization APIs.
  • Bind source and output records, repository fingerprint, and caller configuration into one exact workspace subject.
  • Capture one detached authenticated repository identity for the complete high-level operation so mutable public projections cannot redirect policy, paths, or fingerprints.
  • Enforce bounded UTF-8 JSON, duplicate and nonfinite rejection, exact inventories, repository separation, and staged and published verification.
  • Export the isolated API and update the storage roadmap; no production provider or compiler route is enabled.
  • Add adversarial coverage for overlap aliases, repository drift rollback, provider mismatches, forged plans, source drift, identity ABA, and BM25 query compatibility.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Performance improvement
  • Tests

Testing

  • Tests pass locally
  • Added new tests for the changes
  • Focused publication, source, provider, and artifact suites: 800 passed, 15 skipped.
  • Unit tier under umask 022: 5,490 passed, 71 skipped, 191 deselected; the sole additional deselection is the locally installed 0.2.0 distribution metadata mismatch against source version 0.2.1, already reproduced on clean main and covered by clean CI.
  • Exact-head Full CI light: 5,492 unit tests passed and 36 integration tests passed.
  • Exact-head formal PR CI: 5,490 unit tests passed.
  • Exact-head Docs and CodeNib Publish Smoke passed. Every release artifact build, Python 3.10-3.14 install, upgrade, CodeGraph, Wiki/MCP, and Ask verification job passed; the workflow-dispatch-only MCP Registry environment gate rejected this non-tag branch before running steps and is not a PR check.
  • Pre-commit, py_compile, git diff --check, and python -m mkdocs build --strict.

Checklist

  • My code follows the project style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

@github-actions github-actions Bot added type/docs Documentation type/test Test-related labels Aug 11, 2026
@fishmingyu
fishmingyu force-pushed the fix/publication-callback-postvalidation-v2 branch from efc6137 to 1f987a5 Compare August 12, 2026 00:38
@fishmingyu
fishmingyu force-pushed the feat/strict-bm25-publication-v2 branch from 0338ee1 to e8e9ded Compare August 12, 2026 00:42
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.
@fishmingyu
fishmingyu force-pushed the feat/strict-bm25-publication-v2 branch from e8e9ded to b3fdb8b Compare August 15, 2026 23:27
@github-actions github-actions Bot added type/chore Build, CI, dependency updates scope/indexing FAISS, vector store, incremental pipeline scope/graph Code graph, igraph, ROI subgraph, SCIP decode scope/agent Agent runner, skills, tool execution scope/compiler Index compiler, manifest, build integration scope/eval Evaluation, baselines, experiment scripts scope/chunking Tree-sitter chunkers, code chunking scope/infra CI, packaging, repo config labels Aug 15, 2026
@fishmingyu
fishmingyu changed the base branch from fix/publication-callback-postvalidation-v2 to main August 15, 2026 23:27
@fishmingyu
fishmingyu marked this pull request as ready for review August 15, 2026 23:34
@fishmingyu
fishmingyu had a problem deploying to mcp-registry-publish August 15, 2026 23:37 — with GitHub Actions Failure
@fishmingyu
fishmingyu merged commit f4deeae into main Aug 15, 2026
26 of 27 checks passed
@fishmingyu
fishmingyu deleted the feat/strict-bm25-publication-v2 branch August 15, 2026 23:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +554 to +558
validate_bounded_json_stream(
source,
label="portable BM25 documents",
max_bytes=_MAX_DOCUMENTS_JSON_BYTES,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/agent Agent runner, skills, tool execution scope/chunking Tree-sitter chunkers, code chunking scope/compiler Index compiler, manifest, build integration scope/eval Evaluation, baselines, experiment scripts scope/graph Code graph, igraph, ROI subgraph, SCIP decode scope/indexing FAISS, vector store, incremental pipeline scope/infra CI, packaging, repo config type/chore Build, CI, dependency updates type/docs Documentation type/test Test-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant