Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
8b0456d
chore(go): scaffold Go module at go/
aksOps May 12, 2026
0ee8f59
checkpoint: pre-yolo 2026-05-12T01:15:25
aksOps May 12, 2026
efe7f9f
feat(buildinfo): version/commit/date/dirty strings + Platform/Features
aksOps May 12, 2026
6b65f0f
feat(cache): SHA-256 file hasher matching Java FileHasher (64 hex chars)
aksOps May 12, 2026
b9fe049
feat(model): NodeKind enum with all 34 kinds + JSON round-trip
aksOps May 12, 2026
f4e0207
feat(model): EdgeKind enum with all 28 kinds + JSON round-trip
aksOps May 12, 2026
40a123d
feat(model): Confidence three-tier enum with score + parse
aksOps May 12, 2026
070fb83
feat(model): Layer enum (frontend/backend/infra/shared/unknown)
aksOps May 12, 2026
b34c2e5
feat(model): CodeNode struct + constructor + JSON tags
aksOps May 12, 2026
43e9ebf
feat(model): CodeEdge struct + constructor + JSON tags
aksOps May 12, 2026
2e62e82
test(fixture): minimal 3-file fixture for parity testing
aksOps May 12, 2026
b84dd7a
feat(parser): Language enum + Parse facade + Tree wrapper
aksOps May 12, 2026
274896d
feat(detector): Detector interface + Context + Result
aksOps May 12, 2026
fafb241
feat(detector): static registry with deterministic ordering
aksOps May 12, 2026
28c0c1f
feat(parser): tree-sitter bindings for Java + Python
aksOps May 12, 2026
ef7a50e
feat(detector/base): RegexDetector helpers (FindLineNumber + LEXICAL …
aksOps May 12, 2026
0ad13d8
feat(detector/base): TreeSitterDetector helpers (Walk + Find* + SYNTA…
aksOps May 12, 2026
1b20f41
feat(cli): Cobra root command + global flags (build pending version.go)
aksOps May 12, 2026
5af431a
feat(cli): version subcommand with text + JSON output
aksOps May 12, 2026
08aea62
checkpoint: pre-yolo 2026-05-12T01:24:20
aksOps May 12, 2026
29470c9
feat(cache): SQLite Open/Put/Get/Has/Version + IterateAll
aksOps May 12, 2026
2b14d4d
feat(analyzer): FileDiscovery via git ls-files with dir-walk fallback
aksOps May 12, 2026
540af76
ci(go): vet + race test + staticcheck + gosec + govulncheck
aksOps May 12, 2026
9b7fa5d
test(cli): contract test asserts every subcommand has Use/Short/Long/…
aksOps May 12, 2026
fe4e3f4
feat(detector): port Spring REST controller detector (regex path, pha…
aksOps May 12, 2026
e5b991e
feat(cmd): codeiq binary entry point
aksOps May 12, 2026
116122f
feat(detector): port JPA entity detector (regex path, phase 1)
aksOps May 12, 2026
a019ee8
ci(parity): cross-binary parity check on fixture-minimal
aksOps May 12, 2026
9f36508
feat(parity): SQLite → sorted JSON normalizer (path + kind + id order…
aksOps May 12, 2026
e8cafb5
docs(readme): development section for the Go port phase 1
aksOps May 12, 2026
ea45ba3
feat(detector): port Django model detector (regex path, phase 1)
aksOps May 12, 2026
6b6fc51
feat(analyzer): Run orchestrator wiring discovery, parser, registry, …
aksOps May 12, 2026
a534858
feat(detector): port Flask route detector (regex path, phase 1)
aksOps May 12, 2026
1ac88d7
feat(detector): port generic-imports detector (java + python, phase 1)
aksOps May 12, 2026
9afb2e5
feat(cli): add index subcommand wiring analyzer.Run
aksOps May 12, 2026
8b2432a
test(parity): cross-binary parity harness for fixture-minimal
aksOps May 12, 2026
c2f160c
chore(phase-1): exit gate passes — Go port phase 1 complete
aksOps May 12, 2026
a48ba1b
chore(go): pin go-kuzu binding and update buildinfo features
aksOps May 12, 2026
fa2b47e
feat(go/intelligence): DocCommentExtractor for Java/TS/Py/Go/Rust
aksOps May 12, 2026
19b8be8
feat(go/analyzer): LayerClassifier kind+framework+path heuristics
aksOps May 12, 2026
c6097f6
feat(go/graph): add Store facade for embedded Kuzu
aksOps May 12, 2026
a142ba0
feat(go/intelligence): SnippetStore with bounded extraction
aksOps May 12, 2026
00e14a2
feat(go/analyzer): TopicLinker pairs producer to consumer
aksOps May 12, 2026
aac51f7
feat(go/graph): add Cypher execution facade
aksOps May 12, 2026
90297a5
feat(go/intelligence): LexicalEnricher populates lex_comment + lex_co…
aksOps May 12, 2026
8899921
feat(go/analyzer): EntityLinker repository to entity QUERIES
aksOps May 12, 2026
e77c61b
feat(go/analyzer): ModuleContainmentLinker emits MODULE + CONTAINS
aksOps May 12, 2026
0271af5
feat(go/intelligence): LexicalQueryService bridges fulltext index
aksOps May 12, 2026
80e19c3
feat(go/graph): schema DDL for CodeNode + per-EdgeKind rels
aksOps May 12, 2026
9522bd6
feat(go/analyzer): ServiceDetector walks filesystem for 30+ build sys…
aksOps May 12, 2026
a0bc026
feat(go/graph): bulk-load nodes via CSV + COPY FROM
aksOps May 12, 2026
38d7822
feat(go/graph): bulk-load edges grouped by rel table
aksOps May 12, 2026
67d1d83
feat(go/graph): search helpers for search_graph + lexical query
aksOps May 12, 2026
bc96937
feat(go/graph): read helpers for query services
aksOps May 12, 2026
2064e99
feat(go/query): StatsService 7 categorized statistics
aksOps May 12, 2026
64a74b5
feat(go/intelligence): LanguageEnricher orchestrator + interface
aksOps May 12, 2026
a8d285c
feat(go/intelligence): Java language extractor (calls + type hints)
aksOps May 12, 2026
0731548
feat(go/query): QueryService consumers/producers/callers/cycles/dead
aksOps May 12, 2026
13d97ee
feat(go/intelligence): TypeScript language extractor
aksOps May 12, 2026
f43652d
feat(go/intelligence): Python language extractor
aksOps May 12, 2026
bb4325b
feat(go/query): TopologyService cross-service topology
aksOps May 12, 2026
224d259
feat(go/intelligence): Go language extractor + tree-sitter-go wiring
aksOps May 12, 2026
c54f4b4
feat(go/cli): enrich command orchestrates linkers + intelligence + bu…
aksOps May 12, 2026
1122f15
feat(go/cli): stats command with category + json modes
aksOps May 12, 2026
3d0ecae
feat(go/cli): query subcommands (consumers, producers, callers, deps,…
aksOps May 12, 2026
4dc5e4b
test(go): fixture-multi-lang for enrich + intelligence parity
aksOps May 12, 2026
900af91
feat(go/cli): find finders for endpoints/guards/entities/etc
aksOps May 12, 2026
94a0f19
feat(go/cli): topology command + sub-views
aksOps May 12, 2026
1f1902c
test(go/parity): phase-2 mode compares Kuzu vs Neo4j dump
aksOps May 12, 2026
1e6bf7b
chore(phase-2): exit gate passes — Go port phase 2 complete
aksOps May 12, 2026
c87aaf6
chore(go): phase-2 exit gate green
aksOps May 12, 2026
fd76f89
feat(go/intelligence/query): QueryRoute + QueryType enums
aksOps May 12, 2026
ca00930
feat(go/intelligence/query): Plan + CapabilityMatrix
aksOps May 12, 2026
05440fc
feat(go/intelligence/query): Planner with deterministic rules
aksOps May 12, 2026
d9a50f7
feat(go/mcp): stdio server, registry, tool plumbing
aksOps May 12, 2026
fca7ab3
feat(go/intelligence/evidence): EvidencePack + Request types
aksOps May 12, 2026
db71e27
feat(go/mcp): structured error envelope + result/depth cap helpers
aksOps May 12, 2026
645a79a
feat(go/intelligence/evidence): assembler + helpers
aksOps May 12, 2026
27a34aa
feat(go/graph): read-only Kuzu open + mutation gate + row-cap iter
aksOps May 12, 2026
1925fc2
feat(go/flow): View enum, model structs
aksOps May 12, 2026
705ec17
feat(go/mcp): read_file with path-traversal + MIME-allowlist guards
aksOps May 12, 2026
b26ad12
feat(go/flow): Engine + per-view builders
aksOps May 12, 2026
a16505e
feat(go/flow): JSON + Mermaid + DOT + YAML renderers
aksOps May 12, 2026
5b32bbf
feat(go/mcp): 20 graph tools — stats, query, neighbors, dead-code, cy…
aksOps May 12, 2026
eaf2163
feat(go/cli): cypher (actually implemented, not a stub)
aksOps May 12, 2026
9353f83
feat(go/cli): flow command with 5 views + 4 formats
aksOps May 12, 2026
6a03cfc
feat(go/cli): graph export (json/yaml/mermaid/dot)
aksOps May 12, 2026
095d57f
feat(go/cli): cache info/list/inspect/clear
aksOps May 12, 2026
49068a6
feat(go/cli): plugins list + inspect
aksOps May 12, 2026
9446ef2
feat(go/cli): mcp command wires stdio server
aksOps May 12, 2026
045ba9f
feat(go/mcp): 9 topology tools via targeted Cypher (no heap snapshot)
aksOps May 12, 2026
924f17a
feat(go/mcp): generate_flow tool wrapping flow.Engine
aksOps May 12, 2026
f6061f9
feat(go/mcp): 4 intelligence tools + full 34-tool server wiring
aksOps May 12, 2026
74a52ac
chore(phase-3): exit gate passes — Go port phase 3 complete
aksOps May 12, 2026
99776d7
test(go/mcp): end-to-end integration test via real stdio binary
aksOps May 12, 2026
1e2bcb1
feat(detector/typescript): port ExpressRouteDetector
aksOps May 12, 2026
1714479
feat(detector/go): port GoStructuresDetector
aksOps May 12, 2026
fd890dc
feat(detector/go): port GoOrmDetector
aksOps May 12, 2026
4dd2d58
feat(detector/go): port GoWebDetector
aksOps May 12, 2026
e389291
feat(detector/base): structured + frontend helpers for phase 4 batche…
aksOps May 12, 2026
1ce26fd
feat(detector/jvm/kotlin): port KotlinStructuresDetector + shared JVM…
aksOps May 12, 2026
9b2a5e9
feat(detector/typescript): port NestJSControllerDetector
aksOps May 12, 2026
dd178d0
feat(detector/typescript): port FastifyRouteDetector
aksOps May 12, 2026
81614f2
feat(detector/structured): port YamlStructure + JsonStructure detectors
aksOps May 12, 2026
8423d14
feat(detector/typescript): port NestJSGuardsDetector
aksOps May 12, 2026
5e01b12
feat(detector/jvm/scala): port ScalaStructuresDetector
aksOps May 12, 2026
12844ea
feat(detector/typescript): port PassportJwtDetector
aksOps May 12, 2026
82eb606
feat(detector/structured): port TOML / INI / Properties detectors
aksOps May 12, 2026
0aecede
feat(detector/jvm/kotlin): port KtorRouteDetector
aksOps May 12, 2026
2bc069c
feat(detector/jvm/java): port QuarkusDetector with io.quarkus discrim…
aksOps May 12, 2026
39242b8
feat(detector/csharp): port CSharpEfcoreDetector
aksOps May 12, 2026
2a97d6b
feat(detector/csharp): port CSharpMinimalApisDetector
aksOps May 12, 2026
4996765
feat(detector/csharp): port CSharpStructuresDetector
aksOps May 12, 2026
4b0022b
feat(detector/structured): port SqlStructure + BatchStructure detectors
aksOps May 12, 2026
d47b21a
feat(detector/jvm/java): port MicronautDetector with io.micronaut dis…
aksOps May 12, 2026
339a27f
feat(detector/typescript): port PrismaORMDetector
aksOps May 12, 2026
9d3181f
feat(detector/typescript): port TypeORMEntityDetector
aksOps May 12, 2026
d7744c4
feat(detector/typescript): port SequelizeORMDetector
aksOps May 12, 2026
1715026
feat(detector/typescript): port MongooseORMDetector
aksOps May 12, 2026
36bcadd
feat(detector/structured): port KubernetesDetector
aksOps May 12, 2026
61c72eb
feat(detector/jvm/java): port KafkaProtocol + SpringEvents + SpringSe…
aksOps May 12, 2026
143ec30
feat(detector/systems): port CppStructuresDetector
aksOps May 12, 2026
b744a25
feat(detector/systems): port RustStructuresDetector
aksOps May 12, 2026
75732b7
feat(detector/systems): port ActixWebDetector
aksOps May 12, 2026
7e4763a
feat(detector/structured): port HelmChart + GitHubActions detectors
aksOps May 12, 2026
19bcca5
feat(detector/typescript): port KafkaJSDetector
aksOps May 12, 2026
9917162
feat(detector/typescript): port RemixRouteDetector
aksOps May 12, 2026
d6ba426
feat(detector/jvm/java): port Repository + ClassHierarchy + PublicApi
aksOps May 12, 2026
b441ce3
feat(detector/structured): port DockerCompose + PackageJson detectors
aksOps May 12, 2026
38d60cd
feat(detector/typescript): port TypeScriptStructuresDetector (regex)
aksOps May 12, 2026
cccb2bf
feat(detector/base): add FileName helper
aksOps May 12, 2026
623351c
feat(detector/iac): port TerraformDetector
aksOps May 12, 2026
81e6f5f
feat(detector/iac): port DockerfileDetector
aksOps May 12, 2026
e579388
feat(detector/iac): port BicepDetector
aksOps May 12, 2026
4e1c46f
feat(detector/jvm/java): port ConfigDef + ModuleDeps detectors
aksOps May 12, 2026
6f7c76f
feat(detector/structured): port TsconfigJson + PyprojectToml detectors
aksOps May 12, 2026
033f26a
feat(detector/python): port DjangoViewDetector
aksOps May 12, 2026
24d2275
feat(detector/python): port FastAPIRouteDetector
aksOps May 12, 2026
614c483
feat(detector/script): port BashDetector
aksOps May 12, 2026
0d3afca
feat(detector/script): port PowerShellDetector
aksOps May 12, 2026
6dc5279
feat(detector/python): port SQLAlchemyModelDetector
aksOps May 12, 2026
fb36398
feat(detector/python): port CeleryTaskDetector
aksOps May 12, 2026
d9e72c4
feat(detector/jvm/java): port Kafka + JMS + RabbitMQ messaging detectors
aksOps May 12, 2026
8610be9
feat(detector/structured): port OpenApi + GitLabCi + CloudFormation +…
aksOps May 12, 2026
e751d69
feat(detector/jvm/java): port IbmMq + TibcoEms + ActiveMq detectors
aksOps May 12, 2026
f9462a1
feat(detector/python): port PydanticModelDetector
aksOps May 12, 2026
c716e5b
feat(detector/python): port DjangoAuthDetector
aksOps May 12, 2026
e319042
feat(detector/python): port FastAPIAuthDetector
aksOps May 12, 2026
ff21d5e
feat(detector/python): port KafkaPythonDetector
aksOps May 12, 2026
c14fdbd
feat(detector/python): port PythonStructuresDetector (regex)
aksOps May 12, 2026
69b1a8d
feat(detector/proto): port ProtoStructureDetector
aksOps May 12, 2026
096e465
checkpoint: pre-yolo 2026-05-12T03:12:40
aksOps May 12, 2026
1a15c08
checkpoint: pre-yolo 2026-05-12T07:16:07
aksOps May 12, 2026
b6bdcde
feat(detector/frontend): port VueComponentDetector
aksOps May 12, 2026
076b703
fix(detector/jvm/java): JaxrsDetector method @Path scan stops at clas…
aksOps May 12, 2026
b293a1d
feat(detector/frontend): port SvelteComponentDetector
aksOps May 12, 2026
be800ef
feat(detector/jvm/java): port RawSqlDetector
aksOps May 12, 2026
28e90a1
feat(detector/jvm/java): port CosmosDbDetector
aksOps May 12, 2026
c2c5071
feat(detector/jvm/java): port RmiDetector
aksOps May 12, 2026
d775a60
feat(detector/jvm/java): port WebSocketDetector
aksOps May 12, 2026
30debab
feat(detector/jvm/java): port JdbcDetector
aksOps May 12, 2026
cbf5095
feat(detector/jvm/java): port GrpcServiceDetector
aksOps May 12, 2026
be194a3
feat(detector/jvm/java): port AzureFunctionsDetector
aksOps May 12, 2026
640132e
feat(detector/frontend): port FrontendRouteDetector
aksOps May 12, 2026
3135e23
feat(detector/jvm/java): port Java GraphqlResolverDetector
aksOps May 12, 2026
9934e29
feat(detector/sql): port SqlMigrationDetector
aksOps May 12, 2026
63cbc04
checkpoint: pre-yolo 2026-05-12T16:10:21
aksOps May 12, 2026
42e9894
feat(parser): map 15 additional file extensions to languages
aksOps May 12, 2026
08a32cc
checkpoint: pre-yolo 2026-05-13T00:46:50
aksOps May 13, 2026
e35e47d
fix(cli): register all 18 detector packages, not just 3
aksOps May 13, 2026
807505e
checkpoint: pre-yolo 2026-05-13T00:59:50
aksOps May 13, 2026
40ec785
ci: fix go-ci + go-parity workflows
aksOps May 13, 2026
bafd454
perf(detector/auth): tight pre-screen on CertificateAuthDetector
aksOps May 13, 2026
64a0b0f
feat(analyzer): confidence-aware node + canonical edge dedup with sur…
aksOps May 13, 2026
c6da129
feat(analyzer/linker): defensive sort at the linker boundary
aksOps May 13, 2026
dea201d
checkpoint: pre-yolo 2026-05-13T01:35:47
aksOps May 13, 2026
22300ae
feat(mcp): consolidated 6 mode-driven tools alongside deprecated 34
aksOps May 13, 2026
6226173
feat(review): MR-review pipeline + review_changes MCP tool + codeiq r…
aksOps May 13, 2026
83e9493
feat(review): wire Kuzu graph evidence into codeiq review + review_ch…
aksOps May 13, 2026
602bedc
fix(detector/typescript): emit anchor nodes for imports edges
aksOps May 13, 2026
911f6a8
fix(detector/markup): resolve markdown link paths to anchor edges
aksOps May 13, 2026
9897e36
ci: remove Java build from automatic pipeline
aksOps May 13, 2026
ed274f5
fix(detector/python): emit anchor nodes for imports edges
aksOps May 13, 2026
1581b28
fix(detector/systems): emit anchor nodes for rust + cpp imports
aksOps May 13, 2026
8efbc32
feat(detector/base): EnsureFileAnchor + EnsureExternalAnchor helpers
aksOps May 13, 2026
dd1bd9a
ci: pin Go to 1.25.7 + restore Java↔Go parity workflow
aksOps May 13, 2026
e4fa472
ci: restore lean Java CI gate to pair with go-parity workflow
aksOps May 13, 2026
be92520
chore(gomod): pin go directive to 1.25.0 (dep-mandated floor) + toolc…
aksOps May 13, 2026
93712c3
ci: fix go-ci + go-parity to actually pass under Go 1.25
aksOps May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 28 additions & 8 deletions .github/workflows/ci-java.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
name: Java CI

# Lean Java CI — fast compile + unit-test gate on the Java reference side.
# Pairs with go-parity.yml: this workflow proves the Java jar still builds
# on every PR; go-parity.yml then uses the same build to diff against the
# Go port.
#
# Heavier checks (jacoco coverage, SpotBugs, OWASP dependency-check) live
# under workflow_dispatch via release-java.yml — they're not in the per-PR
# loop because they slow the Go port's PRs without adding signal.
#
# Disappears in Phase 6 cutover along with the rest of the Java tree.

on:
push:
branches: [main]
paths: ['src/**', 'pom.xml']
paths:
- 'src/**'
- 'pom.xml'
- '.github/workflows/ci-java.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'pom.xml'
- '.github/workflows/ci-java.yml'

permissions: read-all

jobs:
build:
name: build
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -22,14 +42,14 @@ jobs:
distribution: 'temurin'
java-version: '25'
cache: 'maven'
- name: Build + verify (jacoco 85% + SpotBugs)
run: mvn -B -ntp clean verify
- name: Compile + unit tests (skip frontend)
# -Dfrontend.skip=true so the npm step doesn't run — CI image
# doesn't carry node 20 by default and the frontend is owned by
# a separate workflow. -B (batch) + -ntp (no transfer progress)
# for quiet logs.
run: mvn -B -ntp -Dfrontend.skip=true verify
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4.6.2
if: always()
with:
name: test-results
name: java-test-results
path: target/surefire-reports/
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4.6.2
with:
name: coverage-report
path: target/site/jacoco/
66 changes: 66 additions & 0 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: go-ci

on:
push:
branches: [main]
paths: ['go/**', '.github/workflows/go-ci.yml']
pull_request:
branches: [main]
paths: ['go/**', '.github/workflows/go-ci.yml']

permissions:
contents: read

jobs:
go:
name: vet / test / staticcheck / gosec / govulncheck
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1"
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
# Pin to 1.25.x — 1.26+ isn't on enough developer machines yet.
# 1.25.10 includes the fix for GO-2026-4918 (HTTP/2 SETTINGS
# infinite loop) which is reachable via review.Client.Review.
go-version: '1.25.10'
cache: true
cache-dependency-path: go/go.sum
- name: Install C toolchain
run: sudo apt-get update -y && sudo apt-get install -y build-essential
- name: go vet
run: go vet ./...
- name: go test (race)
run: go test ./... -race -count=1
- name: staticcheck
run: |
# staticcheck must understand the Go toolchain version that built
# the binaries above. 2024.1.1 errors with "internal error in
# importing internal/byteorder (unsupported version: 2)" against
# Go 1.25's stdlib. 2025.1.1 is the first release that handles it.
go install honnef.co/go/tools/cmd/staticcheck@2025.1.1
"$(go env GOPATH)/bin/staticcheck" ./...
- name: gosec
run: |
# v2.21.4 won't compile under Go 1.25 — its pinned
# golang.org/x/tools v0.25.0 hits an int64 constant-overflow
# bug in tokeninternal.go. v2.22.0 ships an x/tools bump that
# builds clean on 1.25.x.
go install github.com/securego/gosec/v2/cmd/gosec@v2.22.0
# Suppressed rule rationale (all reviewed manually):
# G104 — idiomatic deferred Close()/Rollback() error drops
# G115 — uint64→int64 on counter rows from Kuzu, bounded
# G202 — analysis-cache LIMIT/OFFSET; ints, not user input
# G204 — git ls-files / mvn shellouts, no user input
# G301/G306 — codeiq cache files are dev-local, 0o755/0o644 ok
# G304 — fixture and cache files under controlled dirs
# G401/G404/G501 — non-crypto hashing (MD5 for ID dedup, etc.)
"$(go env GOPATH)/bin/gosec" -quiet -exclude=G104,G115,G202,G204,G301,G304,G306,G401,G404,G501 ./...
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
"$(go env GOPATH)/bin/govulncheck" ./...
101 changes: 101 additions & 0 deletions .github/workflows/go-parity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: go-parity

# Java vs Go parity test for fixture-minimal. Validates that the Go port
# produces the same canonical graph shape as the Java reference until
# Phase 6 cutover deletes the Java tree. Runs on PRs that touch the Go
# tree, the Java tree, the parity harness, or this workflow.
#
# The Java side ships a JSON graph via `codeiq graph -f json` from the
# `serving` profile (Neo4j-backed). A small jq filter
# (go/parity/java-normalize.jq) rewrites that into the same per-file
# canonical shape that the Go-side parity.Normalize emits. The two
# normalized JSON blobs are then diff'd by the `parity` build tag in
# go/parity/parity_test.go, with expected-divergence.json holding the
# allow-list of intentional drift.

on:
pull_request:
branches: [main]
paths:
- 'go/**'
- 'src/**'
- 'pom.xml'
- '.github/workflows/go-parity.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
parity:
name: Java vs Go parity (fixture-minimal)
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
cache: maven
- uses: actions/setup-go@v5
with:
# Pin to 1.25.x — 1.26+ isn't on enough developer machines yet.
go-version: '1.25.10'
cache: true
cache-dependency-path: go/go.sum
- name: Install C toolchain
run: sudo apt-get update -y && sudo apt-get install -y build-essential jq

# ---- Java side ----------------------------------------------------
- name: Build Java jar (skip frontend)
run: mvn -B -q -DskipTests -Dfrontend.skip=true package
- name: Stage Java fixture (separate copy so caches don't collide)
run: cp -r go/testdata/fixture-minimal /tmp/fm-java
- name: Java index → H2 cache
run: java -jar target/code-iq-*-cli.jar index /tmp/fm-java
- name: Java enrich → Neo4j (serving profile)
# `graph -f json` reads from Neo4j under the serving profile, not
# H2. Need to enrich first or the export prints "No graph data
# found. Run 'codeiq analyze' first."
run: |
java -Dspring.profiles.active=serving \
-jar target/code-iq-*-cli.jar enrich /tmp/fm-java
- name: Java graph → normalized JSON
# Run from inside the fixture so Neo4j path resolution finds the
# store enrich wrote. java-normalize.jq pivots the Java
# {nodes:[...]} shape into the per-file array shape
# parity.Normalize uses on the Go side.
#
# The Java CLI prints Logback JSON log lines to stdout BEFORE the
# graph JSON, so we capture everything then awk to the first line
# that is exactly "{" — that's the pretty-printed graph object.
run: |
cd /tmp/fm-java
java -Dspring.profiles.active=serving \
-jar "$GITHUB_WORKSPACE"/target/code-iq-*-cli.jar graph . -f json \
> /tmp/java-raw-with-logs.json
awk '/^\{$/ {f=1} f' /tmp/java-raw-with-logs.json > /tmp/java-raw.json
jq -f "$GITHUB_WORKSPACE"/go/parity/java-normalize.jq /tmp/java-raw.json \
> /tmp/java-normalized.json

# ---- Go side ------------------------------------------------------
- name: Build Go binary
working-directory: go
run: go build -o codeiq ./cmd/codeiq
- name: Go parity test (diff vs normalized Java output)
working-directory: go
env:
TEST_JAVA_NORMALIZED: /tmp/java-normalized.json
run: go test -tags=parity ./parity/... -v

# ---- Failure artifact --------------------------------------------
- name: Upload normalized JSON on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: parity-diff
path: |
/tmp/java-normalized.json
/tmp/java-raw.json
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ target/
*.swo
*~

# Claude Code local state (progress trackers, settings, ralph-loop state)
.claude/

# OS
.DS_Store
Thumbs.db
Expand Down Expand Up @@ -94,6 +97,7 @@ dist/
build/
*.whl
pyproject.toml
!go/testdata/**/pyproject.toml
uv.lock
.venv/
venv/
Expand All @@ -116,3 +120,7 @@ graph.db/
# Phase A baseline
.seeds/
docs/superpowers/baselines/**/raw/**

# Agent-generated plans / scratch (not project deliverables)
go-port-phase4-plan.md
phase*-plan.md
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ for that specific tag for the per-commit details.

### Added

- **Go port (Phases 1-4 of the rewrite)** — codeiq is being ported from
Java/Spring Boot to a single static Go binary on the `port/go-port`
branch. PR #130. 100 detectors at 1:1 parity with the Java side; 34 MCP
tools (deprecated) + 6 consolidated mode-driven tools (new); `codeiq
review` CLI + `review_changes` MCP tool for LLM-driven PR review via
Ollama (Cloud or local). Java tree untouched until Phase 6 cutover.
- **Graph dedup + determinism** (Go side) — `GraphBuilder` deduplicates
nodes by ID with confidence-aware merging, edges by canonical
`(source, target, kind)` tuple. Linker output sorted at the boundary.
`codeiq index` surfaces "Deduped: N nodes, M edges Dropped: K phantom
edges" so graph hygiene is visible.
- **`codeiq review`** — LLM-driven review of `git diff base..head` against
the indexed graph. Defaults to local Ollama (`gpt-oss:20b`); set
`OLLAMA_API_KEY` to flip to Ollama Cloud. `--format=markdown|json`,
`--out`, `--focus`. Graph evidence (nodes-in-file + 1-hop blast radius)
attached per changed file when the Kuzu store is enriched.
- **`review_changes` MCP tool** — same review flow exposed over MCP for
agent-driven invocation. Strictly read-only against the graph.
- OpenSSF supply-chain wiring — Best Practices project
[12650](https://www.bestpractices.dev/projects/12650), live Scorecard at
[securityscorecards.dev](https://api.securityscorecards.dev/projects/github.com/RandomCodeSpace/codeiq),
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@

---

## Development — Go Port (Phase 1)

An in-progress Go port lives in [`go/`](./go/). Phase 1 ships `codeiq index`
over 5 detectors with byte-level parity against the Java side on
`go/testdata/fixture-minimal`. Phases 2-6 land enrich, MCP, the remaining 94
detectors, release infra, and Java cutover (see
[`docs/superpowers/specs/2026-05-11-codeiq-go-port-design.md`](docs/superpowers/specs/2026-05-11-codeiq-go-port-design.md)).

Build and run:

```bash
cd go
CGO_ENABLED=1 go build -o codeiq ./cmd/codeiq
./codeiq index .
./codeiq --version
```

The Go binary writes to the same `.codeiq/cache/` location the Java side
uses, but `CACHE_VERSION` is bumped to 6 so the first run triggers a clean
rebuild. Phase 1 is parity-only — use the Java side for production runs.

## Quick Start

```bash
Expand Down
6 changes: 6 additions & 0 deletions go/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/codeiq
/codeiq.exe
/coverage.out
/coverage.html
/dist/
/.cache/
13 changes: 13 additions & 0 deletions go/cmd/codeiq/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Binary codeiq is the codeiq CLI entry point. All logic lives in
// internal/cli; this file is just the os.Exit shim.
package main

import (
"os"

"github.com/randomcodespace/codeiq/go/internal/cli"
)

func main() {
os.Exit(cli.Execute())
}
33 changes: 33 additions & 0 deletions go/cmd/extcheck/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package main

import (
"fmt"

"github.com/randomcodespace/codeiq/go/internal/detector"
// Same blank imports as the CLI uses
_ "github.com/randomcodespace/codeiq/go/internal/detector/auth"
_ "github.com/randomcodespace/codeiq/go/internal/detector/csharp"
_ "github.com/randomcodespace/codeiq/go/internal/detector/frontend"
_ "github.com/randomcodespace/codeiq/go/internal/detector/generic"
_ "github.com/randomcodespace/codeiq/go/internal/detector/golang"
_ "github.com/randomcodespace/codeiq/go/internal/detector/iac"
_ "github.com/randomcodespace/codeiq/go/internal/detector/jvm/java"
_ "github.com/randomcodespace/codeiq/go/internal/detector/jvm/kotlin"
_ "github.com/randomcodespace/codeiq/go/internal/detector/jvm/scala"
_ "github.com/randomcodespace/codeiq/go/internal/detector/markup"
_ "github.com/randomcodespace/codeiq/go/internal/detector/proto"
_ "github.com/randomcodespace/codeiq/go/internal/detector/python"
_ "github.com/randomcodespace/codeiq/go/internal/detector/script/shell"
_ "github.com/randomcodespace/codeiq/go/internal/detector/sql"
_ "github.com/randomcodespace/codeiq/go/internal/detector/structured"
_ "github.com/randomcodespace/codeiq/go/internal/detector/systems/cpp"
_ "github.com/randomcodespace/codeiq/go/internal/detector/systems/rust"
_ "github.com/randomcodespace/codeiq/go/internal/detector/typescript"
)

func main() {
for _, lang := range []string{"terraform", "csharp", "kotlin", "vue", "bash", "rust", "powershell"} {
dets := detector.Default.For(lang)
fmt.Printf("%-12s: %d detectors\n", lang, len(dets))
}
}
37 changes: 37 additions & 0 deletions go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module github.com/randomcodespace/codeiq/go

// Minimum Go version that can compile this module — clamped at 1.25.0
// because github.com/modelcontextprotocol/go-sdk v1.6 (Phase 3, MCP
// server) declares `go 1.25.0`. `go mod tidy` rewrites anything lower
// back to 1.25.0. Bumping out of 1.25 should wait until a release of
// that SDK that targets 1.26+.
go 1.25.0

// Actual build toolchain. Pinned to 1.25.7 — 1.26+ isn't on enough
// developer machines yet. CI pins the same version (.github/workflows/
// go-ci.yml + go-parity.yml).
toolchain go1.25.10

require github.com/mattn/go-sqlite3 v1.14.22

require (
github.com/google/uuid v1.6.0
github.com/kuzudb/go-kuzu v0.7.1
github.com/modelcontextprotocol/go-sdk v1.6.0
github.com/pmezard/go-difflib v1.0.0
github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/google/jsonschema-go v0.4.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/segmentio/asm v1.1.3 // indirect
github.com/segmentio/encoding v0.5.4 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
golang.org/x/sys v0.41.0 // indirect
)
Loading
Loading