Uh oh!
There was an error while loading. Please reload this page.
[codex] add PR checks - #4
Merged
Merged
Conversation
philcunliffe
marked this pull request as ready for review
May 21, 2026 17:49
Uh oh!
There was an error while loading. Please reload this page.
This was referenced May 23, 2026
Merged
Merged
This was referenced Jun 12, 2026
philcunliffe added a commit
that referenced
this pull request
Jun 18, 2026
…outing) Fixes the dual-review findings on the two-regime enrichment rework: - propose: select sessions on the EXACT (ts, tiebreak) tuple, not MAX(ts) alone. buildSessionAggregateQuery now ranks parts with ROW_NUMBER() OVER (PARTITION BY anchor ORDER BY ts DESC, tiebreak DESC) and keeps rn=1, so a same-millisecond part that advanced a settled session past its mark is reselected instead of silently dropped (Codex #1). selectSessions compares the full tuple via cmpMark; the exact match also avoids re-selecting already-enriched sessions every tick. - state: add updateState() read-modify-write helper (atomic w.r.t. the event loop). propose's final write and batch submit/collect now merge into the latest on-disk state, so a curate_job submitted during propose's await window is preserved rather than clobbered to null — no orphaned batch / double spend (Codex #4 / Claude). - curate: an under-specified merge (missing merge_into or item_type) can't be routed to the right content-addressed node, so routeDecision returns it pending (no commit, no resolution) and routeClusterDecisions leaves it in the queue, rather than attaching the produced edge to the wrong node (Codex #2). - commands: export + test parseBackfillArgv (bare argv, each flag, mutual exclusion, unknown flag, stray positional, flag ordering). - llp 0028: describe the actual deterministic (timestamp, tiebreak) ordering chosen over message-graph columns for source portability, so the orderSessionParts [implements] ref is honest. - batch/curate: move VectorSearchHit/CompletionRequest to top-of-file @import blocks (no inline import('...') types). npm test 1264 pass / 1 skipped; tsc --noEmit clean; lint clean (379 files). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
philcunliffe added a commit
that referenced
this pull request
Jun 18, 2026
…tering, Batch API) (#124) * context-graph-enrich: two-regime rework (full-session T1, curate clustering, Batch API) Implements the LLP 0028 redesign; the spec edit lands with the code. - Per-session high-water mark replaces the global (timestamp, tiebreak) cursor (state.js schema v4). T1 propose now extracts a whole DAG-ordered session in a single call — closing the 12k-char truncation defect (silent loss on 47% of sessions). Two regime selectors: ongoing (settled + past-watermark, capped) and backfill (all sessions). - T2 curate clusters by recall-region + embedding-cosine the no-recall remainder (hypaware.embedder, best-effort), with content-based shared context replacing the structural one-hop neighborhood. merge now writes a committed row under the canonical key with the merging session's anchor → a `produced` edge per contributing session; the node dedups by content-addressed id. - @hypaware/completion-anthropic gains an optional `batch` surface (Anthropic Message Batches: submit/poll/results/cancel; refusal = success; provider error messages never surfaced). New `hyp enrich backfill` command, and the ongoing curate daemon source is now submit-and-collect (job state in the sidecar) so frontier work never blocks a tick. npm test 1251 pass / 0 fail; tsc 0 errors; lint clean; all @refs resolve. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * context-graph-enrich: address PR 124 review (race, watermark, merge routing) Fixes the dual-review findings on the two-regime enrichment rework: - propose: select sessions on the EXACT (ts, tiebreak) tuple, not MAX(ts) alone. buildSessionAggregateQuery now ranks parts with ROW_NUMBER() OVER (PARTITION BY anchor ORDER BY ts DESC, tiebreak DESC) and keeps rn=1, so a same-millisecond part that advanced a settled session past its mark is reselected instead of silently dropped (Codex #1). selectSessions compares the full tuple via cmpMark; the exact match also avoids re-selecting already-enriched sessions every tick. - state: add updateState() read-modify-write helper (atomic w.r.t. the event loop). propose's final write and batch submit/collect now merge into the latest on-disk state, so a curate_job submitted during propose's await window is preserved rather than clobbered to null — no orphaned batch / double spend (Codex #4 / Claude). - curate: an under-specified merge (missing merge_into or item_type) can't be routed to the right content-addressed node, so routeDecision returns it pending (no commit, no resolution) and routeClusterDecisions leaves it in the queue, rather than attaching the produced edge to the wrong node (Codex #2). - commands: export + test parseBackfillArgv (bare argv, each flag, mutual exclusion, unknown flag, stray positional, flag ordering). - llp 0028: describe the actual deterministic (timestamp, tiebreak) ordering chosen over message-graph columns for source portability, so the orderSessionParts [implements] ref is honest. - batch/curate: move VectorSearchHit/CompletionRequest to top-of-file @import blocks (no inline import('...') types). npm test 1264 pass / 1 skipped; tsc --noEmit clean; lint clean (379 files). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * context-graph-enrich: don't unref the inter-poll delay (fixes CI test flake) The pre-existing batch tests failed in CI (ubuntu-latest's Node 20) while passing on local Node 24: `pollUntilEnded` awaits `delay()`, whose setTimeout was `unref()`'d, so the test-runner event loop could drain before the timer fired — reported as "Promise resolution is still pending but the event loop has already resolved", poisoning the whole batch test file. Removing the unref also fixes a latent bug: this delay is awaited inside the backfill command's run-to-completion poll loop, so it must keep the loop alive — an unref'd timer could let `hyp enrich backfill` exit mid-poll. The daemon source intervals keep their unref (correct: never block shutdown); the abort signal still clears this timer for prompt cancellation. npm test 1264 pass / 1 skipped; tsc clean; lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 29, 2026
Merged
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation