Skip to content

feat(preflight): measure individual stages without changing result identity - #58

Open
DivyamTalwar wants to merge 2 commits into
fix/jitmind-proc-liveness-20260929from
feat/jitmind-preflight-stage-metrics-20260929
Open

DivyamTalwar wants to merge 2 commits into
fix/jitmind-proc-liveness-20260929from
feat/jitmind-preflight-stage-metrics-20260929

Conversation

@DivyamTalwar

Copy link
Copy Markdown
Owner

Original ZIP gap addressed

Implements C06 / GAP-06, tracked in #54. Stacked on #49; this is JITMIND-only work. It does not claim the remaining closure issues or release gates are complete.

Changes

  • Measure lookup, eligibility, ranking, rendering and deduplication independently in the actual preflight path.
  • Use request-local exclusive timing, bounded invocation/outcome counters, explicit null/not-entered measurements, and finite clock-anomaly handling.
  • Add immutable versioned metrics and an optional bounded, nonblocking in-memory sink. No exporter callback, network call, source content, identity, path or exception text is captured on the delivery path.
  • Preserve authorization checkpoints, receipt identity, existing result states and the default 150 ms deadline.
  • Keep observational metrics out of result equality/hash so existing value semantics are unchanged.
  • Provide an executable recording-on/off benchmark and document the limitations of its synthetic workload.

Independent review correction

The frozen-candidate review reproduced one compatibility issue: timing metadata participated in dataclass equality/hash. This was fixed with field(default=None, compare=False) and two real-delivery regressions covering equality, sets/dictionaries and changed semantic-field controls. Other reviewed timing, cancellation, concurrency, receipt and privacy checks passed within the stated scope.

Actual verification

Candidate: 291bea4757930e27c44f685e9142d2ceb83cd36a.
Supervisor rerun on the exact corrected source bytes, macOS arm64 / Python 3.12.12, with provisioned real parser dependencies:

PYTHONPATH=$PWD python -m pytest -q -p no:cacheprovider
# 905 passed, 0 failed, 0 skipped; 3 expected optional-provider warnings
python -m compileall -q jitmind tests
python -m pip check
python -m ruff check --no-cache --isolated --select E9,F <changed Python files>
git diff --check
# all passed

The full count includes inherited tests, not 905 independent production scenarios. Source hashes were checked before/after verification and again before commit. The implementation worker and independent reviewer also ran the original 903-test candidate; those are historical pre-correction results, not additional distinct tests.

The retained 200-sample benchmark is explicitly tied to its pre-review source fingerprint. Its paired median recording overhead was approximately 0.047 ms on that local workload; it is not relabelled as a benchmark of this corrected commit or as a production latency guarantee. See docs/preflight-measurement.md and docs/closure/C06-interfaces.md.

Remaining boundaries

C05's new anchor-schema reader integration is a separate composed change. Full installed-feature, platform/provider, donor-comparison and independent release qualification remain tracked in #56. No live provider calls, production data operations or automatic merge. Merge prerequisites, retarget as appropriate and rerun CI on the resulting base.

@DivyamTalwar
DivyamTalwar changed the base branch from codex/jitmind-j08-reviewed-20260928 to fix/jitmind-proc-liveness-20260929 September 29, 2026 01:27
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