Implement deterministic full-text index generation #22

Open
opened 2026-07-24 19:38:20 -04:00 by JackFrostbyte · 0 comments

Goal

    Build a deterministic offline lexical index from validated, accepted, bundleable pilot chunks and emit a valid index manifest.

    ## Why

    The pilot corpus needs a reproducible index that preserves Arkive lineage and refuses invalid or ineligible inputs before a search runtime can be trusted.

    ## Scope

    - Read validated source, document, and chunk records through a documented input boundary.
  • Reject schema-invalid or cross-record-invalid metadata.

  • Exclude unaccepted, metadata-only, rejected, or otherwise non-bundleable sources.

  • Preserve chunk, document, and source IDs in the index.

  • Apply the backend configuration recorded by the index manifest.

  • Detect duplicate, missing, or stale inputs.

  • Build the index offline without network calls.

  • Emit the index artifact and a validated manifest.

  • Produce deterministic output or explicitly isolate and document unavoidable backend variation.

  • Use non-destructive or atomic output handling.

      ## Out of scope
    
      - Search UI or generated answers.
    
  • Vector or hybrid indexes.

  • Automatic source processing.

  • A deployment bundle.

  • Large-corpus scaling work.

      ## Dependencies
    
      - #21 — Define index manifest schema v0.1
    
      ## Acceptance criteria
    
      - All eligible pilot chunks are indexed exactly once.
    
  • Ineligible or invalid records are rejected or excluded according to documented rules.

  • Source, document, and chunk identifiers are recoverable from every result record.

  • The emitted manifest validates and matches the built artifact.

  • Repeated builds are identical under the documented determinism contract.

  • A failed build does not replace a valid existing index.

  • The builder operates without network access.

      ## Validation
    
      - Run the complete unit-test suite.
    
  • Build the pilot index twice and compare artifacts and manifests.

  • Exercise invalid, duplicate, stale, and non-bundleable input fixtures.

  • Run with networking disabled.

  • Verify index integrity against the manifest.

      ## Suggested branch
    
      `feature/issue-22-index-builder`
    
      <!-- arkive-planning-automation:2026-07-24-v3:M2-04 -->
    
## Goal Build a deterministic offline lexical index from validated, accepted, bundleable pilot chunks and emit a valid index manifest. ## Why The pilot corpus needs a reproducible index that preserves Arkive lineage and refuses invalid or ineligible inputs before a search runtime can be trusted. ## Scope - Read validated source, document, and chunk records through a documented input boundary. - Reject schema-invalid or cross-record-invalid metadata. - Exclude unaccepted, metadata-only, rejected, or otherwise non-bundleable sources. - Preserve chunk, document, and source IDs in the index. - Apply the backend configuration recorded by the index manifest. - Detect duplicate, missing, or stale inputs. - Build the index offline without network calls. - Emit the index artifact and a validated manifest. - Produce deterministic output or explicitly isolate and document unavoidable backend variation. - Use non-destructive or atomic output handling. ## Out of scope - Search UI or generated answers. - Vector or hybrid indexes. - Automatic source processing. - A deployment bundle. - Large-corpus scaling work. ## Dependencies - #21 — Define index manifest schema v0.1 ## Acceptance criteria - All eligible pilot chunks are indexed exactly once. - Ineligible or invalid records are rejected or excluded according to documented rules. - Source, document, and chunk identifiers are recoverable from every result record. - The emitted manifest validates and matches the built artifact. - Repeated builds are identical under the documented determinism contract. - A failed build does not replace a valid existing index. - The builder operates without network access. ## Validation - Run the complete unit-test suite. - Build the pilot index twice and compare artifacts and manifests. - Exercise invalid, duplicate, stale, and non-bundleable input fixtures. - Run with networking disabled. - Verify index integrity against the manifest. ## Suggested branch `feature/issue-22-index-builder` <!-- arkive-planning-automation:2026-07-24-v3:M2-04 -->
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Arkive/arkive#22
No description provided.