feat(tools): add an advisory pilot-implementation diagnostic differential - #332
Conversation
…tial Compare our diagnostics against the OMG SysML v2 Pilot Implementation (pinned 2026-05) over the OMG training corpus, testdata/ and examples/, normalised to (file, line, severity, coarse category). Advisory only: no CI gate and no change to the training-examples snapshot. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Original prompt from Devin Bot
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Tighten report file/dir modes, annotate the corpus reads, and fail instead of writing an empty report when no .sysml files are found. Co-Authored-By: jason.han <jason.han@jpl.nasa.gov>
Runtime verification — pilot differential harnessVerified end to end on Linux (Java 21.0.11, Maven, Go 1.23). Gate green, harness deterministic and baseline-reproducing, doc numbers exact, failure modes clean. Reproduces the committed baseline, twice, and after a from-scratch validator rebuild Two consecutive Every number in
Alias probe clean on both sides (pilot direct, exit code captured without a pipe)
Harness failure modes
Re-provisioning: no-op, bad pin, missing mvnAlready built →
CI's Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/a87d0b1126e94828b2260ff5ff58e5af |
Summary
training_examples_expected.txtanswers "did we change?"; it cannot answer "are we right?" — it is a snapshot of our own behavior, so a regression re-baselines as quietly as a fix. This adds the other half: run the OMG SysML v2 Pilot Implementation (the reference) over the same corpora and bucket the differences. Advisory only — no CI gate, no touch to that snapshot, no stdlib edits, no diagnostic fixes (all findings are follow-ups F1–F7 in the doc).scripts/download-pilot-validator.sh— builds DeciSym'ssysmlv2-validatorat pinned commit0d706e5bintobuild/pilot-validator/, and fails loudly if that commit'spom.xmlno longer pins pilot2026-05/0.60.1, i.e. the same releasescripts/download-training-examples.shpins.cmd/pilot-diff— runs both analyzers overexamples/sysml-v2-training,testdata/,examples/and a probes root, normalizes to(file, line, severity, coarse category), and writesbuild/pilot-diff/pilot-diff.{txt,json}. Message text is never compared; unclaimed messages stayunmappedand are also listed in a table of their own.docs/project/pilot-differential.md+ a committedpilot-differential-baseline.jsonso a later run diffs against this one.Wrapper choice.
Fabi303/sysmlv2toolis the better fit (true directory batch) but does not build here — it builds the pilot from a submodule via Tycho and dies withNo implementation for org.eclipse.tycho.core.resolver.MavenTargetLocationFactory was boundunder both Maven 3.6.3 and 3.9.9. That is F6, not a faked result. DeciSym builds, but validates each file with a separateinteractive.process(content, true)against one accumulating session, so the harness compensates and the doc records what leaks through:What the comparison found (122 files: 100 fully agreeing, 18 agreed diagnostics, 1 severity-only, 9 only ours, 188 only the pilot's):
state on { ... } ... then on;trips"on" is a reserved keyword(F1). That row is the like-for-like verdict.import X::*;(10 files) is rejected because the pilot's grammar makes visibility mandatory —ImportPrefix : visibility = VisibilityIndicator 'import'— and its recovery then cascades into most of theno viable alternative/missing EOF/ unresolved-Realentries; plus two genuine over-acceptances of ours (namespace N;andregionin a state body are not in the pilot's SysML grammar at all).part few subsets cap [0..10]undercap [0..3]is anerrorfor us and awarningfor the pilot — kept apart so it is neither counted as agreement nor double-counted as two disagreements.The alias case that motivated this is now a probe (
cmd/pilot-diff/testdata/alias-supertype-lru.sysml,part def AvionicsLRU :> Box { :>> length = 100 [mm]; }): the pilot accepts it; at #331's merge base we reportedpart cannot specialize alias (kind mismatch); onmainwith #331 we accept it and agree. That is the class of question this harness exists to ask.Gate:
go build ./...,go vet ./...,gofmt -l .(empty),go test ./...all green, with unit tests for the categorization, multiset/severity bucketing, import ordering (including a cycle), and the pilot line parser.Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/a87d0b1126e94828b2260ff5ff58e5af
Requested by: @HuiJun