Correctness over expedience. Fix root causes, never weaken or skip a test to make it pass.
SysPI is the SysML Package Installer: a Go command-line tool (cmd/syspi) that resolves,
verifies, installs and locks KerML / SysML v2 project-interchange packages. It is a separate
project from OpenSysML, which only reads what SysPI installs.
- The package contract is KerML 1.1 §10.3 and nothing else.
.project.jsonat a tag is mandatory; never synthesise one, never add a lax mode. - Identities are ECMA-427 Package-URLs.
pkg:generic/<name>?vcs_url=…with the Annex B.3.5vcs_urlqualifier (<vcs>+<transport>://<host>/<path>[@<version>][#<subpath>], percent-encoded);git,svn,hg; no provider vocabulary, nothing host- or tool-specific in identities, locks or installed trees. Everything VCS-specific lives behindvcs.Source. - Verify before reading. Checksums, revisions, digests, path confinement and size bounds are
checked before any model content is used or written under
lib/. - Deterministic outputs. The lock and
bundleare byte-reproducible; sort, never rely on map order or wall-clock time (SOURCE_DATE_EPOCHis honoured). - Standard library only. The CLI is
flagwith subcommand dispatch; the one third-party dependency is the semver range library. Do not add a CLI framework or a purl parser.
go build ./...
go vet ./...
gofmt -l . # must print nothing
go test ./...
SYSPI_REQUIRE_VCS=1 go test ./... # CI: a missing hg or svn is a failure, not a skipThe end-to-end suite (tests/e2e) builds the binary and drives it on local git, hg and svn
fixtures and an httptest server; it needs git, hg, svn and svnadmin on PATH
(apt-get install mercurial subversion, brew install mercurial subversion). No test touches
the network.
cmd/syspi/ the command: flag parsing and dispatch only
internal/origin/ resource parsing and canonical identities
internal/version/ semver, tag names, constraints
internal/vcs/ Source interface; git, svn, hg implementations
internal/digest/ the tree and file SHA-256 the lock records
internal/project/ .project.json, .meta.json, .kpar reading, verification, bundling
internal/lock/ .project.lock.json
internal/install/ resolver: usages → lock entries → lib/
tests/e2e/ end-to-end suite on local fixtures
docs/ design and format notes
changes/unreleased/ changelog fragments
- Branch from
developas<type>/<slug>(feat/,fix/,docs/,ci/,test/); open the pull request againstdevelopas a draft; mark it ready when CI is green. Merging is a maintainer's decision. - Conventional Commits:
feat(install): …,fix(vcs): …,docs: …,test(e2e): …,chore: …. - Add a changelog fragment under
changes/unreleased/<slug>.<section>.md(added,changed,fixed,removed); never editCHANGELOG.mddirectly. - Every Go file starts with
// SPDX-License-Identifier: Apache-2.0. - Keep comments to one or two lines; prefer good names.
- Never write session identifiers, internal work-item labels or tool-specific bookkeeping into files, commit messages or pull requests.