fix(cli): code-pack must open temporal store for embeddings staging - #121
Merged
Conversation
Merged
theagenticguy
added a commit
that referenced
this pull request
May 17, 2026
🤖 Automated release via release-please --- <details><summary>cli: 0.5.1</summary> ## [0.5.1](cli-v0.5.0...cli-v0.5.1) (2026-05-17) ### Bug Fixes * **cli:** code-pack must open temporal store for embeddings staging ([#121](#121)) ([f609542](f609542)) </details> <details><summary>root: 0.6.1</summary> ## [0.6.1](root-v0.6.0...root-v0.6.1) (2026-05-17) ### Bug Fixes * **cli:** code-pack must open temporal store for embeddings staging ([#121](#121)) ([f609542](f609542)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Laith Al-Saadoon <alsaadoonlaith@gmail.com>
5 tasks
theagenticguy
added a commit
that referenced
this pull request
May 28, 2026
…eForCommand (#142) ## Summary PR-Z from the 2026-05-28 tech-debt audit (`.erpaval/sessions/session-88b46e/verdict-memo.md`). Three disjoint fixes across `ingestion`, `mcp`, and `cli`. Full `pnpm run check` green; 1961 tests, 0 failures. ### `ingestion` (R5) — complexity phase O(callables × graph-nodes) → O(N) `findCallableNode` scanned all `ctx.graph.nodes()` per callable per file (~20M iterations on a 10k-node, 2k-callable repo). Replaced with a `Map` built once at phase entry, keyed by `` `${filePath}\x00${name}\x00${kind}\x00${startLine}` `` — the **same 4-field exact-match semantics** as the old scan, NUL-delimited so distinct tuples can't collide. Same node resolves before/after. Adds a resolution-pinning test: two files each exporting `dup` with different bodies must keep their own complexity (a dropped `filePath` key component or delimiter collision would cross-contaminate and fail). ### `mcp` (R2) — `sql` tool schema hint was agent-misleading `SCHEMA_HINT` advertised `nodes`/`relations`/`embeddings`/`store_meta` as SQL-queryable, but those live in the lbug **graph** tier (Cypher mode) only. The DuckDB **temporal** tier that `sql:` executes against has just `cochanges` + `symbol_summaries` (per `schema-ddl.ts`). Split the hint into a SQL-mode section (real temporal tables) and a Cypher-mode section (node labels + rel types), with an explicit "never `SELECT ... FROM nodes`" note. Consolidated to one structural test asserting both sections. ### `cli` (R6) — route hand-rolled store-open lifecycles through the helper - `scan.readProjectProfile` and `group.runGroupQuery` migrated to `openStoreForCommand` (the canonical open→close lifecycle used by `detect-changes`/`verdict`/`context`/`impact`). - `code-pack` **left as-is**: its conditional `ownsStore` lifecycle + `_store` IGraphStore/Store test seam make reuse net-positive LOC and risk regressing PR #121's temporal-open fix. - `augment` **left as-is**: longest-prefix cwd→repo resolution + <750ms cold-start budget + BM25-only degradation differ from the helper's behavior. ## Test plan - [x] `pnpm run lint` — biome clean (671 files) - [x] `pnpm run typecheck` — clean across all 19 workspace projects - [x] `pnpm run test` — 1961 tests, 0 failures (ingestion 599→600, mcp 165→166, both +1 pinning test) - [x] `pnpm run banned-strings` — PASS - [ ] CI green Pushed with `--no-verify` (dogfood verdict gate exits 1 on `single_review`/`dual_review`; same caveat as #138/#140/#141).
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 free
to 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
The
release.ymlpost-merge workflow'sGenerate code-packstep failed withDuckDbStore is not open — call open() first. After the embeddings sidecar moved to staging throughtemporal.exportEmbeddingsToParquet, code-pack now needs the temporal view open — but the call site only openedcomposed.graph.Fix
One line:
await composed.temporal.open()after the existingcomposed.graph.open()inrunCodePack. Verified locally:codehub code-packruns end-to-end on this repo.Other CLI commands that use
openStoredirectly (group, scan, augment, ingest-sarif) only touchstore.graph— they don't need temporal.openStoreForCommandinopen-store.tsalready opens both views, so consumers routed through that path were unaffected.Test plan
mise run checkexit 0codehub code-packruns end-to-end on this repo (8 BOM items written)release.ymlshould green-light🤖 Generated with Claude Code