Repository navigation
perf(notes): draft exact capture dedupe pending synthetic model parity - #23789
Git-on-my-level wants to merge 3 commits into
Conversation
Fix the single Luna review's P1 evaluation gaps with per-case expected and forbidden action items, explicit salience and supporting source IDs. The default-off draft still requires real dev-gateway generation before promotion.
|
The single Luna round reviewed head 89e0864 and found no default-off implementation blocker. Its P1 findings concerned the future model-evaluation rubric, and are corrected in the follow-up:
The corpus shape/source references were validated locally, and the 72 seed/writer fixture tests pass. No production behavior was changed by this rubric-only correction. No second Luna round is requested under the single-round brief. The flag remains off and this PR stays draft: real dev-gateway generation, blinded semantic checks and lead acceptance are still required before promotion. |
|
Final source head: CI is terminal red because unit shard 3 took 724s against a 720s harness wall budget; its log reports no test failure. The other five unit shards passed. No blind rerun, budget raise or skipped check was applied. Local seed/writer tests remain 72 passed and normal pre-push gates passed. The rollout lead accepted the single-round rubric correction and this terminal draft handoff (rulings eb7e31 / 7a2a62), and assigned the wall-budget issue to a separate fixer lane. Real dev-gateway model evaluation and lead acceptance remain mandatory before promotion; no flag flip or deploy is included. |
…pecheck (#23796) ## What Backend unit CI shard walls keep grazing the 720s regression budget: #23767 754/740s, #23771 762s, #23789 724s, with main at ~681s (~5% headroom). This rebalances the shards to a simulated worst shard of **607s** (target 640s, 11% headroom) without touching `.github/` workflows, the 720s budget, or the shard count. Three causes, each fixed at its layer: 1. **The weights table priced pytest time, not wall time.** Per-file wall (import/collection startup included) is what the scheduler consumes. The old table (3-run mean pytest seconds) missed the suite's heaviest file entirely — `test_runtime_image_contracts.py` at ~183s wall was unlisted and dealt at the 1.1s default — and underpriced `test_cross_service_deploy_contract.py` at 36.7s vs a measured 130s. Rebuilt as **p90 wall seconds over the last 20 main-branch runs** (1982 entries, ≥2s floor), attribution-free from each file's `::group::` marker to its last path-bearing line +0.7s tail; `DEFAULT_WEIGHT` 1.1 → measured 1.66. 2. **Slices launched alphabetically**, so heavy files started ~75% into their shard and serialized the tail (the 183s file capped a lane for the final quarter on #23789 shard 3). Each shard's slice now keeps deal order, so `test.sh`'s four worker slots run a longest-processing-time schedule. 3. **All six shards ran the identical full-tree pyright** (~99s each: ~8m of runner time per main commit, ~99s of every shard's budget). It is deterministic over the same checkout every shard sees, so only shard 1 runs it now; its failure still fails the workflow for the commit, and the deal reserves shard 1's extra capacity (`load[0] += 360`) so shards finish level. Plus the split the brief asked for: the 183s closure walk (`test_registered_runtime_image_sources_are_closed`, 18 registered image contracts staged + AST-walked in one process) becomes the same test in two files split by parity of the sorted contract name — every contract still checked exactly once, new contracts land in exactly one half by construction. Halves measured 33.6s / 33.8s locally. Moved node IDs inherit their fast-unit duration-guard allowlist entry. ## Evidence - Harvest + parser + simulation scripts and per-run JSON: `/Volumes/Ephemeral/scratch/shardbudget/` (20 main runs × 6 shard logs; per-file p90s are tight across runs, e.g. runtime_image 179.7–185.7s over 20 samples). - Variant simulation over all 20 runs (same deal code as shipped): current setup reproduces at 737s worst; new table + LPT → 701s; + split → 679s; + shard-1 typecheck → **607s worst**, per-shard makespans level at 594-595s (shard 1: 504s + 95s typecheck). - Shipped-deal check: union of the 6 slices == full selection (2341 files), partition exact. - Local layer: `backend/test.sh` over the seven changed/pinning test files — all green (runner pins 94, workflow contracts 14, allowlist pin 2, runtime_image trio 63+1+1). ## Notes for review - The typecheck dedup is a contract change to a documented invariant ("phases identical across shards"). The guard still gates every commit exactly once on the same tree; preflight (seconds) still runs on every shard. If this is rejected, the projected worst shard is 679s — over the 640s target and within 6% of the budget, and the residual fix (a 7th shard or a budget raise) lives in `.github/`, which this lane does not touch. - `test_cross_service_deploy_contract.py` (130s wall, now correctly weighted) is the next split candidate if walls creep again; not split here to keep the diff reviewable. - Failure-Class: none - UI-Evidence: none -- no UI changes ## Review - Round 1 (Luna, full): **SHIP** with one minor finding — the 360s shard-1 reservation also applied to changed-files runs where `needs-typecheck.sh` skips the check, handing shard 1's capacity to siblings for nothing (~570s vs ~556s projected max on such runs). Fixed in e0fc220: the boundary decision is computed once before the deal, and both the reservation and the typecheck step key off it (verified: with the check reserved → shard 1 empty in a tiny fixture; without → 7/6 even split; runner pin tests 94 + workflow contracts 14 green locally). - Empirical CI on this PR (full 2338-file suite through the new deal): shards green at 422 / 607 / 470 / 533 / 581 / 393s — worst 607s, matching the simulation, was 718–762s near-misses.
test_registered_runtime_image_sources_are_closed staged and AST-walked all 18 registered runtime image contracts in one pytest process: ~183s of CI wall, the single heaviest file in the unit suite, unlisted in the shard weights table and capable of serializing a shard lane's final quarter (PR BasedHardware#23789 shard 3, 724s against the 720s budget). The walk now runs as the same test in two files, split by parity of the sorted contract name, so every contract is still checked exactly once, a newly registered contract lands in exactly one half by construction, and the deal can spread the halves across shards. Measured on this checkout: halves 33.6s / 33.8s. The moved node IDs inherit their fast-unit duration-guard allowlist entry.
…pecheck Four near-misses against the 720s shard budget tonight (BasedHardware#23767 754/740s, BasedHardware#23771 762s, BasedHardware#23789 724s) with main at ~681s left ~5% headroom. Three causes, each fixed at its layer, measured from the six shard logs of the last 20 main-branch runs (40333043889..40458587600, per-file wall time from each file's ::group:: marker to its last path-bearing line + 0.7s tail): - Weights priced pytest time, not wall time. Per-file import/collection startup is what the scheduler actually consumes; the old table missed a 183s file entirely (unlisted) and underpriced a 130s file at 36.7s and the sub-2s default at 1.1s vs a measured 1.66s wall mean. Rebuilt as p90 wall seconds (1982 entries); DEFAULT_WEIGHT 1.66. - Slices launched alphabetically, so heavy files started late and serialized their shard's tail. Each shard's slice now keeps deal order, turning test.sh's four worker slots into a longest-processing-time schedule. - All six shards ran the identical full-tree pyright (~99s each; ~8m of runner time per main commit, ~99s of every shard's 720s budget). It is deterministic over the same checkout every shard sees, so only shard 1 runs it; its failure still fails the workflow for the commit, and the deal reserves shard 1's capacity (load[0] += 360) so all shards finish level. Simulated over all 20 runs with the shipped deal and scheduler: worst shard 607s (budget 720, target 640, was 718-762 observed; per-shard makespans 594-595s except shard 1's 504s). Runner pin tests updated to the new contract: shard-1-only typecheck, offset-aware deal, deal-ordered slices.
|
Closing as part of a stale-PR cleanup David asked for on 2026-11-26 (Shipping lead agent): it is a draft with no activity for days. Nothing is lost: the branch stays, and anyone can reopen this PR if the work is still wanted. If it still matters, reopen it and refresh it against main. |
|
Hey @Git-on-my-level 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What changed and why
Draft an exact duplicate-capture removal from notes agent seeds. Packet-v2 includes the full capture and the seed appends it again; the candidate serializes one copy only when the values are exactly equal. It preserves all other packet fields, the full terminal CAPTURE, segment IDs, speaker authority, language, tool schemas and the caller's original packet. Distinct evidence and one-shot notes keep their prior behavior.
Not qualified for promotion.
CONVERSATION_NOTES_CAPTURE_DEDUPE_ENABLEDdefaults off; unset/unknown/false retain exact legacy seed bytes. Only true/on/1/yes opts in. The rollout lead separated this draft from the mechanically neutral L1/embedding release because removing repetition can affect model salience and attribution even when all information remains available.Product invariants affected
Verification
Fixture tests reconstruct the complete original evidence packet, cover default/off/unknown/explicit-on values, preserve distinct data and cache boundaries, and replay the invented weekly-sync tool sequence through the real writer in both arms. Every content/policy field is compared; only the server's per-run task creation timestamp is excluded. These are fixed-response replay checks, not live-model quality proof.
Required model evaluation and ramp
backend/docs/runbooks/notes-capture-dedupe-eval.mddefines the gate andfixtures/notes_agent/capture_dedupe_eval.jsonsupplies six invented cases. Run real generation through the dev gateway with fixture-only tools, same resolved model/settings and interleaved baseline/candidate arms, three samples per case. Check expected/forbidden claims, proposal/decision distinctions, unresolved speakers, multilingual evidence, existing tasks, tense, long-meeting coverage and source provenance. An ineligible one-shot case or a failing baseline is inconclusive; no such case counts as a candidate win.The single Luna round found no default-off implementation blocker and two P1 rubric gaps. The follow-up adds explicit expected/forbidden action items (owner/source/count/due-date rules), required salience and fact-to-source mappings for every case, plus weekly-sync expectations. Every generated sample in both arms must satisfy these checks. All 72 local seed/writer fixture tests pass; real model generation has not been run. This review does not authorize promotion.
The rollout lead owns the authorized dev identity/spend and acceptance, with result review by 2026-10-28 10:00Z. No LLM API credential is injected into this lane, and no user content, production data tool or secret payload is used. After accepted parity: dev release probe, then lead-controlled production 1%, 5%, 25%, 100% with clean matched error/attribution/p95 windows by 2026-10-29. If blocked, report and renew the dated promise; remain off. The registry contains the same plan. No flag flip or deploy is included.
False restores exact old seed bytes; image rollback also restores them. No stored notes are deleted or rewritten. Content-free seed/removed-character counters permit later attribution, but no production saving is booked for this draft.
UI evidence
UI-Evidence: none -- default-off backend notes seed serialization
Failure class (fixes)
Failure-Class: none