Skip to content

fix(verify): distinguish appended exchanges from archive refreshes - #177

Open
HengYangDS wants to merge 4 commits into
obra:mainfrom
HengYangDS:fix/verifier-high-water-classification
Open

HengYangDS wants to merge 4 commits into
obra:mainfrom
HengYangDS:fix/verifier-high-water-classification

Conversation

@HengYangDS

@HengYangDS HengYangDS commented Sep 26, 2026 •

Copy link
Copy Markdown

Problem

--verify treats archive mtime changes as an outdated index even when every exchange is indexed. Missing summaries can hide unindexed archives, and broad --repair can regenerate embeddings and summaries unnecessarily.

Change

  • Compare parsed exchange lineEnd with the indexed high-water mark; distinguish appended content, unindexed archives, missing summaries and mtime-only refreshes.
  • Verify an existing index read-only without creating an absent database. Lock-blocked verification exits 2 rather than reporting success.
  • Preserve valid external-source rows, deduplicate repair candidates, and show actionable paths and the existing provider/embedding effects before repair.

archiveRefreshes is diagnostic, not a repair target. An unindexed status alone does not select a repair. Historical backfill remains outside this change. The direct repair test obtains its issue shape from the native verifier, avoiding a fixed field inventory.

Verification

Exact head: c8c190007661c50bafbb6753228658b6031b56e4; current target: 7e06519357777badd7a115d2014a7ef845904310.

Fresh qualification on 2026-10-10, macOS arm64, Node 22.23.3/npm 10.9.9:

  • Independent empty-destination npm ci succeeds with this PR's unchanged manifest. Its native postinstall verifies the SQLite stack; dependencies are not borrowed from another PR.
  • npm run build and original bundled-script syntax pass. The full npm test passes 356/356 across 63 files, zero skips, with every tracked input—including the original committed bundle—matching this exact head.
  • The first cold-model suite retained two 10-second metadata-hook failures. Preparing the model through native initEmbeddings() and replaying the unchanged suite passes; no timeout or gate was loosened. Cold model preparation is therefore not claimed to fit those hooks.
  • Resolved inputs include Transformers 4.3.1, better-sqlite3 12.11.1, TypeScript 5.9.3 and Vitest 3.2.7. The local resolver lock SHA-256 is f4ac20b63ee3980db1711ee636f8b79b56fdd6664e5c6cd50809d85722af9398; it is qualification evidence, not a repository lockfile change.

The declared Vitest 3 range has known dev-tool advisories (GHSA-82fw-gwwq-j7x9, GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr). The operator accepted only trusted, isolated one-shot tests without credentials or a test server. Source dependencies and the live installation are unchanged; this is not security clearance for arbitrary input.

The earlier borrowed-tree Node matrix is not exact-input qualification. Current Node 24, hosted Linux/Windows, coverage and live-consumer acceptance are not verified. Exact-head CI remains action_required awaiting maintainer approval.

Integration

The unrelated committed MCP dependency drift is now removed: verifier and index-CLI modules are not reachable from MCP, so its bundle is byte-exact to the upstream base. No host-specific paths, policies or dependency upgrade are added. If #109 or #180 lands first, refresh shared verifier changes and rerun invalidated checks before merge. Maintainer merge and release remain separate outcomes.

Minimal-scope revision (2026-10-11)

Current exact head: ab29746447333ab3755a961713b75e454386556e; parent: c8c190007661c50bafbb6753228658b6031b56e4. The qualification above is historical evidence for that parent, not an exact-head claim for this follow-up.

  • Restored only dist/mcp-server.js to the unchanged upstream 7e06519357777badd7a115d2014a7ef845904310 blob. All ten bundled product-source sections already matched upstream; original esbuild reachability excludes src/verify.ts and src/index-cli.ts. This removes unrelated dependency behavior/layout changes.
  • All 211 other tracked files and executable modes remain exact parent bytes. The PR now contains nine focused source/dist/CLI/documentation/test files.
  • Native npm run build, bundle syntax and 356/356 tests across 63 files, zero skips, including three actual packaged MCP tests, pass on existing workspace Node 24.19.0/npm 12.2.0, macOS arm64. The original MCP bundle is retained after the build; fresh resolver bytes are not claimed to reproduce an original official build.
  • Reuses the same isolated native npm ci dependency tree qualified for fix(indexer): keep session indexing incremental on append #176; the three PRs have identical manifests and the prior resolver lock is unchanged. This is not a separate install, an official committed lock, a cold-model claim or hosted/Windows acceptance. The model cache is byte-qualified, native allowScripts and trusted-isolated-test risk limits stay unchanged, and owned test temporary state is removed with exact absence readback.

Current Node 24 local source/packaged acceptance is now proved; hosted CI/workflow approval, Windows, coverage, maintainer merge, stable release inclusion and installed-consumer adoption remain separate unverified gates. No duplicate approval ping accompanies this factual revision.

@HengYangDS
HengYangDS marked this pull request as ready for review September 26, 2026 05:10
@HengYangDS

Copy link
Copy Markdown
Author

Author follow-up for #177: the exact PR head is still mergeable, but its CI run remains action_required and has not executed. The consolidated current request on #180 covers this contribution as well: please approve the fork workflow and review its narrow source behavior for merge. I will address resulting failures and keep generated output, portability and generality qualified; no hosted pass or installation update is claimed.

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.

1 participant