Repository navigation
feat(queryexec): Differ, a keyed value comparison of two projected tables - #1690
Conversation
…bles — (key, left, right) per key on both sides whose column differs; unknown-column path error, duplicate-key model error Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…-Extensions-Library#16 (Differ) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…ity, numbers by value, quantities by base magnitude — not by spelling Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…lumns) and keeps the left row's Tree depth Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…/right are not key names Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… name with a library parameter (Differ::left) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ary chore/engine-contract-differ, whose engine contract lists Differ Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…-Extensions-Library#17 (engine contract lists Differ) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… line instead of reading the log the instant the main address appears Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
The exact-head run on e829e23 fails Cause: this branch re-pins the extension libraries ( Fix, on this branch: merge origin/develop (merge commit), then and account the movement per object in the body (expect at least the libraries digest + date; if any count or scorecard row moves, restate |
…ndored libraries with WhereType exact and Differ (34 WhereType calls move on InvocationExpression.parameter/input: the pilot lists defaulted parameters, our writer the bound ones); make extension-libraries-pin-check and the AGENTS.md pin-bump checklist Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…p, re-recorded next for the merged libraries) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
Head |
… examples digest, this branch's libraries digest; 810 pilot-library elements for Differ, no other movement) Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
What and why
ExceptandUnionidentify rows, so a value that changed on an element present on both sides is invisible to them. Comparing a model with its reflection (Open-MBEE/qvtsreflection-compare.sysml, oneChanged_C_pper mirrored property) needs a keyed value comparison.DocumentQueries::Differ(left, right, key, column)— declared in Open-MBEE/OpenSysML-Extensions-Library#16 and listed in its engine contract by #17 (both merged) — is now evaluated:New plan operation
OperationDiffer, step kindDiffer, constraintduplicateKey, error kindsunknown-column/duplicate-key— names matching the QVTS-Core specification (qvtsdocs/qvts-core.md§5.8) and its Lean record (Step.differ,Constraint.duplicateKey).Dependency: the vendored extension libraries are pinned to
main's merge commit of #17,b87334ffd1bbc7461806e8a0858823be6f8335c1(scripts/extension-libraries-pin.sh,EXTENSIONS_REF=main), which declaresDifferand lists it inengine-contract.json; nothing upstream is pending.What the pin move touched, and the rule that follows: the vendored libraries are an input to gates far from
internal/workspace/libs, and each surfaced in a separate full-tier round here. So this PR also (a) re-records both pilot-differential baselines (docs/project/pilot-differential-baseline.json: only theopensysml-librariesdigest moved, 0 entries;api-json-differential-baseline.json: the digest, +1008pilotLibraryElementsfor the new declarations, and 34WhereTypecalls moving from present-equal to present-different onInvocationExpression.parameter/.input— the pilot lists a defaulted parameter the call does not bind, our writer lists the bound ones; adjudicated inapi-json-differential.md, a writer follow-up); (b) renames the REPL quoting-hint fixture that was literallyleft, now shadowed byDiffer::leftin the stdlib (assertions unchanged); (c) addsmake extension-libraries-pin-check— the Java-free gates (sync, snapshot, engine-contract hygiene, both provenance guards, REPL/query tests) — the AGENTS.md §6.1 checklist, and a reminder printed byscripts/sync-extension-libraries.shwhenever it changes the tree; (d) makesTestGRPCRobustnessAuthStartup/health_binds_the_same_hostwait for the health listener's log line instead of reading the log the instant the main address appears (an unrelated flake this run hit).Specification basis
OpenSysML
DocumentQueriessurface (Extensions Library) with the QVTS-Core §5.8 semantics; not an OMG clause, no row ofdocs/project/spec-compliance.mdmoves.How it was verified
internal/doc/queryexec/differ_test.go:ChangedMassesoverBefore/Afterreturns the one part whose mass changed as(b, 2, 5)with columnsname left right, and nothing against itself; integer1/2.5keys match real1.0/2.50keys; aTree-arranged left side keepsouter@0 inner@1; a key namedleftisinvalid-argument; a side carrying one key on two rows isduplicate-keywith aduplicateKeyfinding atDiffer(mass, name)naming both rows; a side without the column isunknown-columnnaming the side, the column and the side's columns, as a path error atDiffer(name, mass).make extension-libraries-pin-checkgreen;go run -C tools ./cmd/pilot-diff/./cmd/pilot-apijson-diffrun fresh and compared entry by entry against the committed baselines before-update;make docs-countscurrent.go build ./...,go vet ./...,gofmt -l .clean;go test ./internal/doc/queryexec ./internal/ir/queryplan ./internal/workspace/libs ./internal/frontend/repl,tests/hygiene TestEngineContractCoversEveryBoundName;scripts/changelog.py check.Differunder the set operations;docs/internals/design/query-outcomes.mdgains theDifferrow; changelog fragmentchanges/unreleased/differ.added.md.Checklist
make testandmake lintpass locally (targeted packages; the full tier runs in CI)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count movedF4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette