Skip to content

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

Draft
fishmingyu wants to merge 3 commits into
fix/publication-callback-postvalidation-v2from
feat/strict-bm25-publication-v2
Draft

feat(artifacts): add strict BM25 publication#602
fishmingyu wants to merge 3 commits into
fix/publication-callback-postvalidation-v2from
feat/strict-bm25-publication-v2

Conversation

@fishmingyu

Copy link
Copy Markdown
Member

Summary

Adds an isolated strict BM25 publication producer on top of #592. It plans exact canonical bytes from one retained source generation and replays them through strict workspace authority without changing the legacy SourceTrust or native-vector paths.

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.
  • Enforce bounded UTF-8 JSON, duplicate/nonfinite rejection, exact output inventories, lexical and physical repository separation, and staged/published repository verification.
  • Preserve first-primary iterator cleanup behavior and invoke provider support exactly once after caller inputs are frozen.
  • Export the new API and record the remaining production-provider, context, and M2 profile work in the storage roadmap.
  • Add adversarial coverage for overlap aliases, repository drift rollback, provider/request mismatches, forged plans, source drift, 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
  • pytest -q test/artifacts/test_portable_views.py test/artifacts/test_strict_bm25_publication.py test/artifacts/test_context_artifact.py test/artifacts/test_runtime.py test/test_workspace_provider.py test/test_captured_directory.py test/test_atomic_directory.py test/test_bounded_json.py test/test_native_index_authorization.py test/test_source_fingerprint.py --tb=short — 628 passed, 15 skipped
  • Black, isort, flake8, py_compile, and git diff --check
  • Two independent read-only reviews: P0=0, P1=0

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

Stack dependency: #592 is the explicit base. Keep this PR draft until that dependency is merged or the stack is restacked.

@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
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.
@fishmingyu
fishmingyu force-pushed the feat/strict-bm25-publication-v2 branch from 0338ee1 to e8e9ded Compare August 12, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs Documentation type/test Test-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant