Skip to content

Add a fail-closed FTS5 candidate audit - #2

Merged
omar07ibrahim merged 14 commits into
mainfrom
agent/fts5-candidate-audit
Aug 9, 2026
Merged

Add a fail-closed FTS5 candidate audit#2
omar07ibrahim merged 14 commits into
mainfrom
agent/fts5-candidate-audit

Conversation

@omar07ibrahim

@omar07ibrahim omar07ibrahim commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Outcome

This PR adds RecallLedger's first bounded FTS5 conformance layer without changing the durable schema or the serving search path.

  • exposes the typed Fts5CandidateAudit result and SQLiteLedger.audit_fts5_candidates
  • rebuilds a tenant-local SQLite TEMP FTS5 table only from fully verified current live heads
  • indexes inert canonical ASCII-hex token streams with ascii, detail=none, and columnsize=0
  • evaluates a parameterized literal all-terms MATCH expression
  • compares the complete ordered candidate identity set with the independent reference scorer
  • drops the TEMP table and returns SQLite runtime identity plus bounded scan facts only on exact agreement
  • fails closed on candidate drift, malformed or duplicated candidate identities, SQLite errors, corpus corruption, and uncertain transaction state
  • documents the storage boundary and end-to-end calibration workflow with a source-derived Mermaid architecture diagram
  • adds a pinned, least-privilege CodeQL workflow

Verification

Final PR head: 3049a2dc1b2c0de1a5e2935944048a02feb18531.

  • CI run 31317251822: Python 3.11 and 3.12 both passed; 623/623 tests passed on each runtime; statement and branch coverage are 100%
  • lint, canonical formatting, strict mypy checks, frozen lexical evaluation, source-bound visual freshness, packaging, and clean-tree boundaries all passed
  • the installed-wheel job rendered the exact six-file media bundle twice, compared both bundles byte-for-byte, replayed the pinned adoption source, and matched every adopted payload
  • final replay artifact 9039127989: 523,155 bytes, archive digest sha256:5eef3ccf5821c5fc1722d17e6f59391b00764d975d26cad5134150044373abd6
  • CodeQL run 31317251805: analysis 1592002185, 0 results across 50 security-extended rules
  • 14 strictly linear commits; author and committer are exclusively Omar Ibrahim

Evidence provenance

The adopted media remains bound to source commit 9ab4115e817deab4c843aa4d1680ef1cd63a9503 and tree bbc8dcc4d4e3f8456b469382902edd731e36ee56. Hosted artifact 9038918220 was independently reviewed before adoption; its API and recomputed archive digest are both sha256:bb6c2f45693392a4febb252c22856e81ec097d429e7a8378eed1474dc844878d.

All committed captures use normalized synthetic fixtures. The repository checks exact payload hashes, media structure, source inputs, privacy boundaries, and reproducibility. No secret, personal note, host path, or personal identifier is used as evidence.

Evidence boundary and non-claims

The installed-wheel PNG/GIF/SVG bundle proves the real packaged CLI workflow and general ledger behavior; it is not presented as direct FTS5 candidate-audit execution proof. The FTS5 diagram is a source-derived architecture explanation, not a photographed production system.

This is an ephemeral conformance/rebuild audit. It is not a persistent index, latency benchmark, serving-speed claim, semantic search system, embedding pipeline, authorization layer, production deployment, or user interface. search_notes remains the correctness oracle and serving path.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@omar07ibrahim
omar07ibrahim marked this pull request as ready for review August 9, 2026 14:02
@omar07ibrahim
omar07ibrahim merged commit 3049a2d into main Aug 9, 2026
5 checks passed
@omar07ibrahim
omar07ibrahim deleted the agent/fts5-candidate-audit branch August 9, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants