Skip to content

[codex] add PR checks - #4

Merged
philcunliffe merged 2 commits into
masterfrom
codex/add-pr-checks
May 21, 2026
Merged

[codex] add PR checks#4
philcunliffe merged 2 commits into
masterfrom
codex/add-pr-checks

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Summary

  • add a CI workflow matching Collectivus' PR checks for lint, typecheck, and test
  • add local lint/typecheck scripts and TypeScript dev dependencies so the workflow has runnable targets
  • keep Docker checks out of scope

Validation

  • npm run lint
  • npm run typecheck
  • npm test

@philcunliffe
philcunliffe marked this pull request as ready for review May 21, 2026 17:49
@philcunliffe
philcunliffe merged commit 8b35f5e into masterMay 21, 2026
6 checks passed
This was referenced May 23, 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>
Sign up for freeto 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

@philcunliffe