Skip to content

fix(cli): code-pack must open temporal store for embeddings staging - #121

Merged
theagenticguy merged 1 commit into
mainfrom
fix/code-pack-open-temporal
May 17, 2026
Merged

fix(cli): code-pack must open temporal store for embeddings staging#121
theagenticguy merged 1 commit into
mainfrom
fix/code-pack-open-temporal

Conversation

@theagenticguy

Copy link
Copy Markdown
Owner

Summary

The release.yml post-merge workflow's Generate code-pack step failed with DuckDbStore is not open — call open() first. After the embeddings sidecar moved to staging through temporal.exportEmbeddingsToParquet, code-pack now needs the temporal view open — but the call site only opened composed.graph.

Fix

One line: await composed.temporal.open() after the existing composed.graph.open() in runCodePack. Verified locally: codehub code-pack runs end-to-end on this repo.

Other CLI commands that use openStore directly (group, scan, augment, ingest-sarif) only touch store.graph — they don't need temporal. openStoreForCommand in open-store.ts already opens both views, so consumers routed through that path were unaffected.

Test plan

  • mise run check exit 0
  • codehub code-pack runs end-to-end on this repo (8 BOM items written)
  • CI on this PR
  • After merge, release-please will re-trigger and the post-merge release.yml should green-light

🤖 Generated with Claude Code

@theagenticguy
theagenticguy merged commit f609542 into main May 17, 2026
41 of 45 checks passed
@theagenticguy
theagenticguy deleted the fix/code-pack-open-temporal branch May 17, 2026 00:13
@github-actions github-actions Bot mentioned this pull request May 17, 2026
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>
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).
Sign up for free to 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