Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ pre-push:
# mirrors the SKIP behaviour of scripts/pack-determinism-audit.sh.
- name: verdict
run: |
if [ -f .codehub/graph.duckdb ] || [ -f .codehub/graph.lbug ]; then
if [ -f .codehub/graph.lbug ]; then
{pnpm} codehub verdict --base origin/main --head HEAD
else
echo "verdict skipped: no .codehub/graph.duckdb or graph.lbug (run 'mise run och:self-analyze' first)"
echo "verdict skipped: no .codehub/graph.lbug (run 'mise run och:self-analyze' first)"
fi
skip:
- merge
Expand Down
6 changes: 2 additions & 4 deletions packages/cli/src/commands/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ type Health = "ok" | "path-missing" | "graph-missing";

function classifyHealth(entry: RepoEntry): Health {
if (!existsSync(entry.path)) return "path-missing";
// Backend-aware probe: any of `meta.json`, `graph.duckdb`, or
// `graph.lbug` under `.codehub/` counts as "indexed". The legacy
// hard-coded `graph.duckdb` check pre-dated the M3 backend split and
// would have flagged every `CODEHUB_STORE=lbug` repo as broken.
// Indexed probe: presence of `meta.json` / `graph.lbug` under `.codehub/`
// counts as "indexed" (lbug is the only graph backend post-ADR 0016).
if (!codehubIsIndexed(entry.path)) return "graph-missing";
return "ok";
}
Expand Down
9 changes: 1 addition & 8 deletions packages/scip-ingest/src/derive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* definition. Innermost enclosing wins.
*/

import type { ScipDocument, ScipIndex, ScipOccurrence, ScipRange } from "./parse.js";
import type { ScipDocument, ScipIndex, ScipRange } from "./parse.js";
import { SCIP_ROLE_DEFINITION, SCIP_ROLE_IMPORT } from "./parse.js";

export interface DerivedEdge {
Expand Down Expand Up @@ -245,13 +245,6 @@ function findDefinition(doc: ScipDocument, symbol: string): ScipRange | null {
return null;
}

export function findOccurrencesBySymbol(
doc: ScipDocument,
symbol: string,
): readonly ScipOccurrence[] {
return doc.occurrences.filter((o) => o.symbol === symbol);
}

/**
* Build a SCIP-symbol -> definition-site map from an index.
*
Expand Down
27 changes: 3 additions & 24 deletions packages/scip-ingest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,15 @@
* 2. `parseScipIndex(fsReadSync(path))` decodes the protobuf stream.
* 3. `deriveIndex(index)` computes caller->callee edges via innermost-
* enclosing-range attribution (see `./derive.ts`).
* 4. `materialize(edges)` produces blast-score metrics +
* reach-forward / reach-backward closures for the MCP retrieval
* pack.
* 5. Consumers (the `scip-index` ingestion phase) convert
* 4. Consumers (the `scip-index` ingestion phase) convert
* DerivedEdge → CodeRelation with
* `reason = "scip:<indexer-name>@<version>"` and
* `confidence = 1.0`, fulfilling the oracle-edge contract that
* `confidence-demote` and downstream consumers expect.
*/

export type { DerivedEdge, DerivedIndex, DerivedRelation, DerivedSymbol } from "./derive.js";
export {
buildSymbolDefIndex,
deriveEdges,
deriveIndex,
findOccurrencesBySymbol,
} from "./derive.js";
export type {
BlastMetrics,
MaterializeOptions,
MaterializeResult,
ReachPair,
} from "./materialize.js";
export { materialize } from "./materialize.js";
export { buildSymbolDefIndex, deriveEdges, deriveIndex } from "./derive.js";
export type {
ScipDocument,
ScipIndex,
Expand All @@ -57,10 +42,4 @@ export type {
IndexerResult,
RunIndexerOptions,
} from "./runners/index.js";
export {
buildCommand,
defaultCobolProleapPaths,
detectLanguages,
runIndexer,
SCIP_DOTNET_MIN_SDK_MAJOR,
} from "./runners/index.js";
export { buildCommand, detectLanguages, runIndexer } from "./runners/index.js";
47 changes: 0 additions & 47 deletions packages/scip-ingest/src/materialize.test.ts

This file was deleted.

220 changes: 0 additions & 220 deletions packages/scip-ingest/src/materialize.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/storage/src/graphdb-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ export class GraphDbStore implements IGraphStore {
}
}

/** Replaces `WITH RECURSIVE ... USING KEY (ancestor_id)` — see {@link DuckDbStore.traverseAncestors}. */
/** Ancestor traversal via a Cypher variable-length upward walk (the lbug analogue of a recursive ancestor query). */
async traverseAncestors(opts: AncestorTraversalOptions): Promise<readonly TraverseResult[]> {
return this.traverseDirectionalGd(opts, "up");
}
Expand Down
Loading
Loading