Skip to content

research(session-lineage): persist VM decision — Python memo + B=1500 (#54) - #55

Open
Skywind5487 wants to merge 45 commits into
devfrom
research/session-lineage-benchmark-gate
Open

research(session-lineage): persist VM decision — Python memo + B=1500 (#54)#55
Skywind5487 wants to merge 45 commits into
devfrom
research/session-lineage-benchmark-gate

Conversation

@Skywind5487

@Skywind5487 Skywind5487 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Result

The #54 resolver gate is complete.

Selected production shape: ranked sequential indexed point traversal + query-local Python node -> resolved_root memo/path compression.

Selected global work budget: B = 1500 successful row lookups.

Production implementation is tracked separately in #62. This remains a research/evidence PR; it does not modify production session-search code.

Durable evidence

  • research/session-lineage/benchmark/FOCUSED_GATE.md — final decision record;
  • research/session-lineage/benchmark/results/focused_vm_gate_20260809.md — exact e2-micro receipt, tests, focused performance CSV, safety/B CSV, package SHA;
  • python_memo.py — hardened selected research candidate;
  • focused_scenarios.py — shallow normal + depth14/size15 compatibility fixtures;
  • focused_vm_gate.py — production-VM focused runner;
  • tests/test_focused_gate.py — exactness/reuse/budget contracts.

Existing TEMP/Fixed/broad-gate/profiler artifacts remain historical/reference evidence. The old "Pure TEMP vs Fixed3 only" finalist framing is superseded.

Focused VM result

Accepted run source head: 444c161218b00166bda73f2ec5a21f250e2049bc.

The runner used a clean worktree, disposable synthetic DBs only, a 35-second CPU precondition, and passed 11/11 focused/contract tests.

Median timings:

workload no memo Python memo TEMP ref Fixed3 ref
normal depth0 0.037460 ms 0.038469 ms 0.294199 ms 0.297606 ms
normal depth1 0.051469 ms 0.053704 ms 0.335803 ms 0.320288 ms
depth14/size15 worst-ranked 0.592984 ms 0.124840 ms 0.564849 ms 0.423345 ms
depth14/size15 full-consume 0.619249 ms 0.114357 ms 0.519640 ms 0.386486 ms

The memo cost on shallow normal paths is ~0.001–0.002 ms while reducing the real compatibility extreme by ~4.75x–5.42x. Full-consume work drops deterministically from 120 to 15 successful row lookups.

B=1500

Previously established legitimate frozen-corpus envelope:

C <= 300   -> work <= 554
C <= 1000  -> work <= 1254
real 15-node worst ordering -> work <= 120

B=1500 leaves ~20% headroom above the hard C<=1000 envelope. The pathological e2-micro curve contains non-monotonic quota stalls, so the budget is selected from the logical work envelope + modest margin, not from a fitted wall-time cliff.

Runtime caveat

The saved focused-run receipt used /usr/bin/python3 linked against SQLite 3.40.1 rather than a Hermes-managed runtime. This does not reopen the memo-vs-no-memo mechanism decision; #62 still requires normal Hermes-runtime tests before production merge.

Production semantic handoff

#62 must not reproduce the current generic-parent mistake. The DB winner path and tool-layer current/title exclusion must share one positive compression-continuation root meaning, keeping branch/delegation/tool parent relations separate and respecting the Aug-7 foreign-marker correction documented in #58/#46.

CI note

Research-diff ruff/ty passed. Repository-wide failures observed during this PR were in unrelated dev files/tests (including existing mem-trim and Windows-footgun/lint findings); this PR intentionally does not modify unrelated production code to make global checks green.

Status

Refs #54 #58 #60 #62.

@Skywind5487 Skywind5487 changed the title docs(research): persist session-lineage measurement space and VM gate (#54) research(session-lineage): focused no-memo vs Python memo VM gate (#54) Aug 9, 2026
@Skywind5487 Skywind5487 changed the title research(session-lineage): focused no-memo vs Python memo VM gate (#54) research(session-lineage): persist VM decision — Python memo + B=1500 (#54) Aug 9, 2026
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