Repository navigation
Merge rule for a Claude tool call both capture lanes stored, and flush settle-miss counts (LLP 0620 part A) - #3057
Conversation
… its tool id (Draft)
… against LLP 0301, hosted obligations, question 1 options)
…d, LLP 0310 convergence, message_count per fallback id, question 1 readers)
…elete files; note the survivor's date can move the native uuid
…h settle-miss counts (LLP 0620 part A)
|
Independent review (steward-server) at head 4a009be. Rating: LOW. Two pure exported functions that nothing calls yet, plus a flush-only settle-miss count. Privacy: low (counts by reason only, no content, ids or paths). Checked:
Must-fix:
Should-fix:
Gates:
Verdict for landing A once it leaves draft: yes, after must-fix 1, a green server-suite gate at the landing head, and green test-windows. |
|
Server-suite gate at head 4a009be: pass.
Why the gate applies: the server imports |
…y-lane miss reason; pin tie, undated and unreadable-transcript rules
|
Review fixes and server-suite gate at head 0350f0c. Must-fix,
Should-fixes:
Checks:
Server-suite gate: pass.
|
|
Delta review (steward-server) at head 0350f0c: final yes. Rating LOW.
No merge by me. |
|
Landing note (HypForge orchestrator): enqueueing at 0350f0c.
|
|
Landed on master (HypForge orchestrator).
|
Part A of LLP 0620 (design: #3055). This PR carries the LLP, so the design and its first code land together. #3055 will be closed in favor of this PR.
This is a draft. The design's question 1 (rewrite or hide the stored hosted pairs) is with its owner. Nothing here depends on that answer.
What changes
ai-gateway/src/dataset.jsgains two exported pure functions that the server (through its kernel shim) and the later maintenance change (part B) share:claudeToolPairKey(row): the key two copies of one Claude tool call or result share. It is session, tool_call_id and part kind, so a call and its result never share one (LLP 0620 #tool-identity).mergeClaudeToolPair(rows)(LLP 0620 #unambiguous, #survivor):ambiguouswhen two native part_ids hold the key;no_pairwhen one side is missing;merged, with the one row the key keeps. That row takes its identity from the native row, its content and time from the earliest copy (so a replay never replaces the original), and the live row's lane and live-only columns.discardedUsagefor the caller to count.onSettleMissonDatasetSettleContext. Only the flush path sets it, so the speculative compaction probe and the maintenance re-settle stay free of side effects (LLP 0312 #settle-purity).ai_gateway.settle_missevent with a count per reason.No stored data changes, and no maintenance or hosted behavior changes. Nothing calls the merge function yet.
Tests
test/plugins/ai-gateway-tool-pairs.test.js(13 tests) covers:Checks
CPU and memory
mergeClaudeToolPairis O(rows of one key), and keys hold a handful of rows.Gates
DatasetSettleContext. It runs before this leaves draft.