Repository navigation
chore(extensions): re-pin to the project-interchange upstream and prove the vendored copy is the published project - #1563
Merged
Conversation
…dor its manifests The pin moves to the commit that makes Open-MBEE/OpenSysML-Extensions-Library a KerML 10.3 project interchange. The sync script vendors .project.json, .meta.json and LICENSE into internal/workspace/libs/extensions-project/, refuses an upstream without them, and reports drift or stray files there as it does beside the units. A gate holds every vendored unit to the SHA-256 the upstream .meta.json records and to the root namespace its index names. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…'s folder, note an index entry naming no member A usage linked by elimination was silent: the post-load warning pass saw the installed project among the enclosing ones and had nothing left to link. It is now a warning on the consumer's .project.json naming the project taken and the publisher/name the resource should end with, judged by the exit policy. An archive holding the project's folder with the manifests inside, as the OMG library releases are, is read as the project in that folder, and an index entry naming no member is noted rather than refusing the archive, since the members' declarations are what name resolution reads. Co-Authored-By: jason.han <hanhuijun@gmail.com>
… a tree and as an archive The consumer lays the vendored units out under libraries/ with the vendored manifests, beside an unclaimed project so the name decides the link, and loads the sixteen packages from the install in both forms; a changed unit fails the archive's checksum, a misnamed project is linked by elimination with the warning, and a folder-layout archive with a misnamed index entry loads with its notes. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…I and the linking warnings Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ing the elimination link; flag stray directories in the vendored copy An enclosing project installed under the roots stays in the usage traversal and may still answer a usage by elimination, never its own; the sync script's compare reports a directory or other non-file entry in a vendored directory as unexpected, as the check did before. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ests Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
This was referenced Oct 28, 2026
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.
What and why
Open-MBEE/OpenSysML-Extensions-Library is now a KerML 10.3 project interchange (its root holds
.project.jsonand.meta.json, andscripts/build-kpar.pyderivesopensysml-extensions-library-<version>.kparfrom them). This re-pins the vendored extension libraries to that upstream commit (b36b361f85af4764de8e2817cbae62fb9e74ffdb; no unit changed) and makes the vendored copy provably the published project:scripts/sync-extension-libraries.shvendors.project.json,.meta.jsonandLICENSE(the one recorded file that is not a unit) intointernal/workspace/libs/extensions-project/, beside the units it writes flat understdlib/OpenSysML Libraries/. It refuses an upstream without them, reports a drifted manifest under--check, and a stray file in either directory is an error as before. The identity comes from the pin, never a hand-kept copy.internal/workspace/libs/extensions_project_test.goholds the embedded units to the manifests: each unit's SHA-256 equalschecksum["libraries/<Unit>"], every recorded unit is embedded, and each unit declares exactly the root namespaces theindexnames for it. Verified load-bearing: a byte appended toMOSA.sysmlfails the checksum test; an index key renamedMOSAsfails the index test.tests/kpar/extensions_test.golays out, from the vendored copy at test time (no fixture committed), a consumer whose.project.jsonusespkg:git/github.com/Open-MBEE/OpenSysML-Extensions-Library@1.0.0with the library installed aslib/open-mbee-opensysml-extensions-library_1.0.0/(units underlibraries/, so the checksums verify) beside an unclaimedacme/widgets, so the link is by publisher and name: the sixteen packages load from the install in both the directory and the.kparform with no warning (-warnings-as-errors -validatepasses); an archive with a changed unit is refused on its checksum; a copy named "OpenSysML Extension Libraries" is linked by elimination with the new warning; an archive of the project's folder with a misnamed index entry loads with its two notes.Where the manifests live, and why not beside the units
internal/workspace/libs/extensions-project/, notstdlib/OpenSysML Libraries/. The Go embed ofstdlibskips dotfiles and both library sources list only.sysml/.kerml, so the loader would not have noticed either way; but (1) the units are vendored flat, so a.meta.jsonbeside them would recordlibraries/<Unit>paths the directory does not have, and (2) a.project.jsonthere flipsIsProjectDiron the standard-library directory, so a developer opening a vendored unit from disk would load it as an installed project with a manifest contradicting its tree. A directory holding only the manifests andLICENSEis never a load input. The snapshot generator reads throughlibs.BundledSource, which is unaffected.Reader notes, adjudicated against develop (
2c0f1750e)a.
Usesslug matching — kept as is; it is the contractdocs/internals/design/package-management.md§3 settles. §4 now spells it out for library authors: a project meant to be used aspkg:git/<host>/<owner>/<repository>must give itsnamea slug equal to the repository's last path segment (andpublisherthe owner's); one that does not is still installable, linked by elimination when it is the one unclaimed candidate (with a warning, see b) and left unresolved with the ambiguity warning otherwise.b.
discovery.go:usedelimination was silent. Probe: one installed project named "OpenSysML Extension Libraries" underlib/for the usage above;sysml -validateand-warnings-as-errors -validateboth passed with no text, and the in-processLoadReport.Foundwas empty. Root cause: the post-load warning pass (repl.loadWarnings→Discovery.Warnings(paths)) runs over every loaded path, so the installed project linked by elimination is among the enclosing projects on that pass, is claimed up front, andusedhas nothing left to link; the ambiguity case never had this problem because its candidates are not loaded. Fix:Aroundlinks an enclosing project that is itself installed under another's roots as installed again (it stays loaded), andusedemits one warning per usage linked by elimination:<consumer>/.project.json: usage pkg:git/github.com/Open-MBEE/OpenSysML-Extensions-Library@1.0.0 names no installed project by publisher and name; linked by elimination to open-mbee/opensysml-extension-libraries 1.0.0 (<install dir>), the one unclaimed installed project that satisfies it; end the resource with the project's publisher and name (…/open-mbee/opensysml-extension-libraries) to name itIt is judged by the exit policy like the ambiguity warning (
-warnings-as-errorsfails,-jsonreports it asproject.load). A repository learnt from one link answers its other versions silently.Projects.Unlinkedis renamedLinking, since a linked usage is now among them.c. OMG release archives.
tests/kpar/testdata/omg/*.kparare the SysML-v2-Releasekpar/builds, whose manifests are at the top level with a correct index — they did not show we read the omg.org releases. Probe with the actualhttps://www.omg.org/spec/SysML/20250201/Requirement-Derivation-Domain-Library.kpar: its members areRequirement Derivation/{.project.json,.meta.json,RequirementDerivation.sysml,DerivationConnections.sysml}and its index mapsRequirementsDerivation→RequirementsDerivation.sysml, a file that does not exist. On develop the archive is refused twice over —no .project.json at the top level of the archive; Requirement Derivation/.project.json is nested in a directory, so the archive holds a folder rather than a project(a warning underlib/or-library-root, an error when named on the command line); and, had the folder been accepted,index entry "RequirementsDerivation" names "RequirementsDerivation.sysml", which is not a member. Name resolution never reads the index (deps.go:rootIndexandworkspace.goparse the units), so the index is not trusted; but the mismatch lost the whole archive, not just the package. Fix: an archive whose every member lies under one folder holding both manifests is read as the project in that folder, and an index entry naming no member no longer refuses the archive; each is a note, surfaced as a warning on the archive's path. KerML 1.1 §10.3 says the manifests sit "at its top level", so both are read-through-with-warning, not silent acceptance.TestParseArchiveReadsTheProjectInsideAFolder,TestParseArchiveNotesAnIndexEntryNamingNoMemberand thetests/kparfolder-archive test cover it; the OMG archive itself is not committed (PR #1529 ownstestdata/omg).d.
Bundle— the sibling PR.Docs
docs/project/extension-libraries.md(the published project, both manifests, archive name and layout, tagged tree vs derived archive, the consumer usage IRI, where OpenSysML reads it from, the vendoring decision),docs/internals/design/package-management.md§3 (elimination warning; archive-only checksum verification stated plainly — an installed directory's.meta.jsonis not verified, the tagged tree is read as it stands) and §4 (present tense, the name-slug contract),docs/guide/03-command-line.md(the warning and the two archive read-throughs). README anddocs/manual/introduction.mdwere still accurate and are untouched. Upstream has since taggedv1.0.0at the pinned commit and publishedopensysml-extensions-library-1.0.0.kparas its release asset; the pin stays on the commit SHA, and no test fetches anything over the network.Specification basis
KerML 1.1 Beta 2 §10.3 (Model Interchange Projects): the archive holds the manifests at its top level and a model interchange file per root namespace; the
.meta.jsonindex and checksums per Table 13. No row indocs/project/spec-compliance.mdmoves.How it was verified
./scripts/sync-extension-libraries.sh --check→Extension libraries in sync with b36b361f85af4764de8e2817cbae62fb9e74ffdb; a byte appended to the vendored.meta.json→changed internal/workspace/libs/extensions-project/.meta.jsonand exit 1; a stray file there →error: unexpected file(s): …/stray.txt;EXTENSIONS_COMMIT=5c5deea6… --check→error: upstream holds no .project.json; refusing to sync a tree that is not a project interchange. The three vendored files are byte-identical to the upstream tree (cmp).go test ./internal/workspace/libs -run VendoredExtension,go test ./internal/workspace/project,go test ./tests/kparpass.go build ./...ok,go vet ./...ok,gofmt -l .empty,make lint(staticcheck + gosec, both modules) ✓,go test ./...withOPENSYSML_REQUIRE_TRAINING_CORPUS=1 OPENSYSML_REQUIRE_PILOT_CORPORA=1 OPENSYSML_REQUIRE_SPEC_EXAMPLES=1after the three download scripts — all packages ok (the 46 packages depending oninternal/workspace/projectre-run on the final head after the review fixes, all ok),python3 scripts/changelog.py checkok,python3 scripts/check-doc-links.py→ 0 broken links,python -m mkdocs build --strictok,make extension-libraries-check→ in sync withb36b361f….origin/develop, against fix(project): bundle the files a project's .meta.json records #1566 (the sibling), and textually clean against chore(pilot): pin the OMG pilot implementation to release 2026-09 (0.63.0) #1529's head for every file this PR touches — chore(pilot): pin the OMG pilot implementation to release 2026-09 (0.63.0) #1529's own conflicts with develop (docs/project/api-json-differential*,spec-compliance.md,validation-constraints.md) are files this PR does not change.Aroundchange, the sync script's directory blind spot, two comment lengths), each fixed in its own commit and the thread resolved; the current head has no open finding of any severity, flags included.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/1e9164f57f814014a9f0aba35666e2a3
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/1e9164f57f814014a9f0aba35666e2a3?variant=devin
Requested by: @HuiJun