Skip to content

test: record doctor FTS feasibility - #76

Merged
ferueda merged 3 commits into
mainfrom
codex/doctor-plan-feasibility-gate
Jul 28, 2026
Merged

test: record doctor FTS feasibility#76
ferueda merged 3 commits into
mainfrom
codex/doctor-plan-feasibility-gate

Conversation

@ferueda

@ferueda ferueda commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an opt-in, provider-free measurement of document-ID-bounded FTS vocabulary reads used by the proposed doctor optimization
  • record that production-shaped interval scans multiply the dominant work and reject that design
  • keep production doctor behavior unchanged
  • retire the rejected doctor-plan sections and add an evidence-gated single-pass feasibility plan
  • preserve the independently executable orphan-maintenance work

Why

The proposed bounded-memory doctor design depended on document-filtered fts5vocab reads being cheap. PR #77 was stacked on this PR and merged into its branch, so this PR now contains both the original planning gate and the completed measurement.

The measurement found that 41 production-shaped intervals made total work 3.80× slower and grouped term-summary work 6.82× slower on the large generated cohort. The query-plan and scaling evidence is consistent with repeated whole-vocabulary traversal. That makes the proposed interval strategy unsuitable for production doctor.

Impact

No production src/ behavior, public CLI contract, schema, provider access, or retained-library state changes.

pnpm measure:doctor is an opt-in contributor command using generated data. It records exact equality, immutable-file, privacy, cleanup, timing, RSS, and query-plan evidence. The durable research note records the rejected approach so it is not repeated.

The successor plan evaluates a single-pass actual/expected comparison. It remains a feasibility gate and does not claim bounded total memory or authorize production changes.

Verification

  • pnpm measure:doctor completed three generated runs with every hard correctness gate passing
  • pnpm test test/doctor-measurement.test.ts
  • pnpm check
  • CI passed on macOS, Ubuntu, and Windows
  • CodeQL passed
  • independent code, test, measurement-method, and plan reviews passed

@ferueda ferueda changed the title docs: gate bounded doctor implementation test: record doctor FTS feasibility Jul 28, 2026
@ferueda
ferueda marked this pull request as ready for review July 28, 2026 03:48
@ferueda
ferueda merged commit 1288ea6 into main Jul 28, 2026
7 checks passed
@ferueda
ferueda deleted the codex/doctor-plan-feasibility-gate branch July 28, 2026 03:48
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