Skip to content

refactor(semantic): move the semantic packages into internal/semantic - #441

Merged
HuiJun merged 4 commits into
developfrom
refactor/layer-semantic
Sep 19, 2026
Merged

HuiJun merged 4 commits into
developfrom
refactor/layer-semantic

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

What and why

Second step of the layer-directory move, on top of the internal/syntax pull request. Moves the semantic packages into internal/semantic/:

internal/core/{symbols,suggest,resolve,semantics,identity,highlight,query}
  → internal/semantic/{symbols,suggest,resolve,semantics,identity,highlight,query}

highlight (classifies source text using the resolver) and query (the transport-neutral element-query model that queryexec, grpc and repl consume) join this layer.

One edit is not a pure move: query/oslc.go imported internal/core/rdf for the rdf:, xsd: and sysml: namespace IRIs of the OSLC prefix map, which would have made a semantic-layer package depend on the translation layer. query now declares those three IRIs as unexported constants (rdfNS, xsdNS, sysmlNS, same literals as rdf/vocab.go, which is unchanged), and the layering test pins semantic/query → rdf as a removed edge.

Everything else is the mechanical import rewrite across the root module and tools/, path strings in tests, the self-model's goPackage references and the citations in docs/project/validation-constraints.md; the examples digest in docs/project/pilot-differential-baseline.json is re-recorded for that reason only.

How it was verified

go build ./..., go vet ./..., gofmt -l . (empty), make lint, make docs-check, the full suite with OPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_PILOT_LIBRARY_XMI=1 go test -count=1 ./... (79 packages ok), the tools/ module (build, vet, test, doc-counts -check), python3 scripts/changelog.py check. go list ./internal/... | wc -l (59) and the func Test count (9006) match develop.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 19, 2026 09:04

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

devin-ai-integration Bot and others added 2 commits September 19, 2026 14:45
Moves symbols, suggest, resolve, semantics, identity, highlight and query
from internal/core to internal/semantic and rewrites their imports. query
declares the three namespace IRIs it needs instead of importing rdf, so
the package sits in the semantic layer.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ential baseline

The self-model's Go package references moved to internal/semantic.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration Bot and others added 2 commits September 19, 2026 16:17
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Base automatically changed from refactor/layer-syntax to develop September 19, 2026 17:57
@HuiJun
HuiJun merged commit 12e6ba0 into develop Sep 19, 2026
12 checks passed
@HuiJun
HuiJun deleted the refactor/layer-semantic branch September 19, 2026 17:59
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