Repository navigation
docs(self-model): bring the surfaces up to date with the implementation - #2043
Merged
Merged
Conversation
ModelService carries its host, token and logging facts, LanguageServer its notebook sync and settings, RenderingForms the eleven forms with draw.io read back, CommandLine its verbs, ProjectDiscovery the library layouts, every client its token option, EmacsMode/TreeSitterGrammars/MagicMDK/SysonMDK the editors, McpNpmPackage the npm names, and the oracles the toolchain gained join the model; self_model_surfaces2_test.go reads each fact back from the code. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…hanged examples The examples digest moved with the self-model; the API-JSON record restates the headline and gap-table figures the re-recorded baseline carries. 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)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…cture baselines after merging develop The examples digest moved with the self-model's new surfaces; every figure scales an existing bucket and the API-JSON record restates the headline and gap-table rows the baseline carries. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…lf-model comment tidy Only the examples input digest moves in each baseline; no figure changed. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md
The figures move with the self-model elements only; the record's headline and gap-table rows are restated from the baseline. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…rging develop The merged cmd/sysml registers -run-query through a flag.Value built in place and adds -run-inline-query; the flag-definition pattern the self-model tests read now accepts a value built in place, and the three baselines are re-recorded for the examples/ edit (provenance digest only). Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md # internal/semantic/metamodel/derived_census_baseline.json
… after merging develop Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com> # Conflicts: # docs/project/api-json-differential-baseline.json # docs/project/api-json-differential.md # internal/semantic/metamodel/derived_census_baseline.json # internal/translate/export/testdata/structure_differential_expected.txt
…e baselines after merging develop Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 10, 2026
Re-recorded with pilot-apijson-diff -update on the merged tree. Only the six examples/self-model fragments and index.json move (1,278 rows, 1,007 newly matched elements from #2043's self-model surfaces); the folded totals equal develop's monolith at 1b94d85 (105,427 matched, 2,045,067 present-equal, 144,702 present-different, 308,336 ours-missing, 81,780 pilot-missing, 2,244,567 absent-both, 35,440 indeterminate, 534 pilot-nondeterministic). Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
HuiJun
added a commit
that referenced
this pull request
Nov 11, 2026
…gments * feat(tools): add tools/referee/baseline, a shared per-file fragment baseline store A referee baseline kept as one generated file conflicts on every merge of two branches that re-record it. This package lays a baseline out as a directory: one JSON fragment per compared source file (<root>/<relative path>.json, the file's summary and its rows in key order) beside an index.json carrying the provenance and the aggregate figures, which must be a fold of the fragments. Write/Rewrite record all or the named roots, Read refuses a missing or unlisted fragment, Check/CheckRoots name every moved, added or removed row, missing or orphaned fragment and stale index figure or provenance line, and Verify holds a committed directory to itself without the reference toolchain. Row, summary and aggregate types and the ratchet policy stay with each referee. Co-Authored-By: jason.han <hanhuijun@gmail.com> * refactor(apijson): split the api-json differential baseline into per-file fragments docs/project/api-json-differential-baseline.json (1.3 MB, re-recorded whole by every change under internal/translate/export) becomes the directory docs/project/api-json-differential/ on tools/referee/baseline: one fragment per compared source file holding the file's summary and its Metaclass.property rows as seven-bucket count vectors, and an index.json with the provenance and the aggregate figures, each a fold over the fragments. The fold reproduces the monolith exactly: same provenance, same 935 files, same 11,771 scorecard rows and every total and per-root figure, and the fresh report is byte-identical. The comparison now accounts per source file: a matched pair under the file our writer declares the element in, a pilot-only element under the pilot's file, each side's diagnostics under its own, an ownerless tree without a document under the file of the element that refers into it; fragmentsOf refuses an account outside the root's files and sameFigures holds the direct totals to the fold. pilot-apijson-diff gains -update -roots (re-record named roots and refold the index), -reindex (rebuild index.json from the committed fragments, no pilot) and -check -roots; the provenance guard, doc-counts, the hygiene workflow test, ci-changed-areas and mkdocs read the directory. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(apijson): re-record the api-json fragments on the merged tree Carries develop's Documentation.documentedElement movement (387 properties oursMissing -> presentEqual across 108 files) into the per-file fragments and the index; the fold equals develop's monolithic baseline. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(apijson): re-record the baseline fragments on the 67efcea merge Re-recorded with pilot-apijson-diff -update on the merged tree. 66 fragments and index.json move; the folded totals equal develop's monolith at 67efcea (104,420 matched, 2,024,875 present-equal, 143,814 present-different, 305,457 ours-missing, 80,960 pilot-missing, 2,220,557 absent-both, 35,136 indeterminate, 534 pilot-nondeterministic). Movement comes from #1936: TransitionUsage.output, EventOccurrenceUsage/AcceptActionUsage/ SendActionUsage/TerminateActionUsage inherited features and inputs, and six newly matched elements. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(apijson): re-record the baseline fragments on the 1b94d85 merge Re-recorded with pilot-apijson-diff -update on the merged tree. Only the six examples/self-model fragments and index.json move (1,278 rows, 1,007 newly matched elements from #2043's self-model surfaces); the folded totals equal develop's monolith at 1b94d85 (105,427 matched, 2,045,067 present-equal, 144,702 present-different, 308,336 ours-missing, 81,780 pilot-missing, 2,244,567 absent-both, 35,440 indeterminate, 534 pilot-nondeterministic). Co-Authored-By: jason.han <hanhuijun@gmail.com> * fix(examples): point the self-model at the api-json fragment directory examples/self-model/surfaces.sysml still named the removed monolith docs/project/api-json-differential-baseline.json as the ApiJsonDifferential oracle's baseline, which TestSelfModelGainedOraclesMatchTools rightly rejects; it now names docs/project/api-json-differential. The edit changes the examples corpus digest, so the three baselines that record it are re-recorded by their tools (pilot-apijson-diff -update -roots examples, pilot-diff -update, derived-census -update): provenance only, no row, verdict or figure moves. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(apijson): re-record the baseline fragments on the 6ff0288 merge pilot-apijson-diff -update on the merged tree: 69 fragments and index.json move with #2093's objective/body-constraint export and #2109's bare-comment fix (develop's monolith moved the same rows). Totals: 935 files, 105,427 matched; present-equal 2,045,864, present-different 143,898, ours-missing 308,343, pilot-missing 81,606, absent-both 2,244,653, indeterminate 35,440, pilot-nondeterministic 534 — equal to develop's monolith on this tree. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(hygiene): mark the api-json baseline fragments generated .gitattributes listed docs/project/*-baseline.json only, so the fragments under docs/project/api-json-differential/ were shown as source in a diff and counted in the language statistics; the directory's JSON is now linguist-generated, and tests/hygiene holds the attribute line. Co-Authored-By: jason.han <hanhuijun@gmail.com> * fix(tools): bound what a partial baseline re-record vouches for tools/referee/baseline.Rewrite stamped the checkout's provenance on fragments it had not re-measured, so -reindex after a pilot pin move produced an index the provenance guard accepted; it now refuses every provenance movement outside the inputs named like the replaced roots, naming the refresh command. It also read the committed directory strictly, so two branches that each added or removed a file of one root could not re-record that root after merging; the replaced roots' index entries and files are now skipped and re-recorded whole, while the other roots stay strict. scripts/ci-changed-areas.sh claims tools/referee/baseline/ for the apijson differential job. Co-Authored-By: jason.han <hanhuijun@gmail.com> * chore(tools): keep the baseline store's comments to two lines Co-Authored-By: jason.han <hanhuijun@gmail.com> * build(go): move the toolchain to go1.27.4 (GO-2026-6859) Co-Authored-By: jason.han <hanhuijun@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jason.han <hanhuijun@gmail.com>
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
The self-model's surfaces (
examples/self-model/surfaces.sysml) had drifted from the implementation. This brings them back, each fact read back from the code by a test:ModelService:-hostwith the loopback default,-token/-token-file,-allow-unauthenticated,-allow-insecure-token-transport,OPENSYSML_GRPC_TOKENand per-call logging throughcmd/sysml-grpc/access.go.LanguageServer: notebook-cell synchronization (sysml,kermlcells), thesysmlsettings section with itskeepLineBreaksandlibraryRootskeys, the-keep-line-breaksand-strictflags, andopensysml/importDiagram.RenderingForms(new): the eleven forms ofview.Forms(), which are diagram forms, which render runs only, and draw.io as the one read back — bysysml -import-diagram, the LSP request and the MCPimport_diagramtool.CommandLine: its verbs (-convert…-metamodel-table,-run-query,-import-diagram).ProjectDiscovery(new):.project.json, the well-knownliband.sysand/liblayouts,OPENSYSML_LIBRARY_ROOTS.EmacsModeandTreeSitterGrammars(Helix, Neovim, Zed) joinVsCodeExtension;OpenSysMLMDK/SysonIntegrationbecomeMagicMDK/SysonMDKwith the plugin names, Maven coordinates and Java package their poms declare.McpNpmPackage(new):@openmbee/sysml-mcpand its@openmbee/opensysml-mcpalias.DocCounts.baselinenow points atdocs/project/spec-compliance/(the sources), with the combined page recorded as untracked andscripts/spec_compliance.pyas its combiner;StdlibSnapshotGaterecords that it skips without an embedded snapshot; the API-JSON differential, Flexo interop, transformation, formal-constraint, notation and metaclass-map censuses, the specification-examples gate and the structure differential are modelled and placed in theToolchain.The "Surfaces over one pipeline" section of the architecture document reads the plugin names, the token variable and the form count from the model; the README's "Keeping it honest" lists the new checks.
origin/developis merged in nine times with merge commits (1556ade; e074d3f after #2027 and #2071 landed; ddc4a54 after #2026 and #2072 landed; c010f23 after #2073 landed; ade067f after #2077 landed; bd58fde after #2074 landed; c4f55e0 after #2080, #2082 and #2085 landed; 67efcea after #1936 and #2089 landed; d213603 after #2086, #2090, #2091, #2094, #2095, #2098, #2076, #2097, #2099 and #2096 landed). The first two merges conflicted only in the API-JSON baseline and its record, the fourth in those two and the derived-property census baseline, the eighth in those three and the structure differential expectation, and the third, the fifth to seventh and the ninth merged clean; every conflict was resolved by taking develop's side and re-recording by tool.How it was verified
examples/self_model_surfaces2_test.goreads every added fact back: the gRPC flag table andtokenEnvconstant, the access interceptor, the LSPinitializeresult and its constants,view.Forms()/DiagramForms()/ViewForms(), the MCP catalog entry,cmd/sysml's flag table and usage options,project.ProjectFile/LibraryRootsEnvVar/IsLibraryDirand thewellKnownLibraryDirstable, each client's connection source, the Emacs files/modes/Make targets, the editors guide, bothpom.xmls, the npmpackage.jsonand README, and each oracle's baseline constants, gate variables and test names.make stdlib-snapshot,go build ./...,go vet ./...,go vet -C tools ./...,gofmt -l .(empty),make lint,make changelog-check,make docs-counts,make self-model,sysml -validate examples/self-model/*.sysml, and the fullgo test -count=1 ./...with the training, pilot and specification-example corpora required (six long packages re-run serially under a longer timeout after the parallel run hit the 10-minute default).self-model/document.sysmlshift by the ten lines the prose section grew), the API-JSON differential (-checkreproduces it; matched elements +1007 from the new attributes, headline and gap-table rows restated indocs/project/api-json-differential.md), the derived-property census (-update; summary and silent list unchanged, every rule's counts scale with the new elements) and the structure differential (-update-structure-differential; 101 rows move, every one an existing bucket scaling, none newly non-zero).make stdlib-snapshot, then the same re-recordings; only the API-JSON baseline moved (its examples root: matched elements +1007, ours-only +23, the scorecard scales accordingly; headline and 21 gap-table rows restated), the pilot differential, derived-property census and structure differential reproduce byte for byte. The full gate above was re-run on the pushed head.make stdlib-snapshot, then the same re-recordings reproduced every baseline byte for byte. The mergedcmd/sysmlregisters-run-querythrough aflag.Valuebuilt in place and adds-run-inline-query, whichTestSelfModelCommandLineVerbsMatchFlagscaught:CommandLine.verbsnow names-run-inline-querytoo, and the flag-definition pattern the tests read accepts a value built in place as well as a field or local. The three baselines were re-recorded once more for thatexamples/edit (provenance digest only; no figure moved), and the full gate above was re-run on the pushed head.make stdlib-snapshot, then the same re-recordings. The API-JSON differential moved only by the new elements over develop's record (matched +1007, ours-only +23; the headline and the 21 gap-table rows restated), the derived-property census likewise (summary and silent list unchanged, every rule's counts scale), and the pilot differential and structure differential reproduce develop's byte for byte. The full gate above was re-run on the pushed head.examples/):make stdlib-snapshot, then the same re-recordings and every-checkreproduce all four baselines byte for byte. The full gate above was re-run on the pushed head.make stdlib-snapshot, then the same re-recordings. Over develop's records only the new elements move: the API-JSON differential (matched +1007, ours-only +23; the headline and 21 gap-table rows restated), the derived-property census (elements 31524 → 32523, implied 18354 → 18943; summary and silent list unchanged) and the structure differential (everyexamplesrow scales, the self-model's annotations add 8 toAnnotatingElement::annotationpresent-different, no row newly non-zero); the pilot differential reproduces. Against the previous head only fix(semantics): audit implied generalizations against KerML/SysML 1.1 §8.4 #1936's implicit-generalization rows move (Namespace::member/membership,Type::feature/featureMembership/inheritedFeature/inheritedMembership,Usage::usage, and the census and API-JSON figures develop re-recorded for them); thethen_after_membersconvert golden digest is develop's and its test passes. The full gate above was re-run on the pushed head.verify r;is the RequirementUsage its RequirementVerificationMembership owns, not a SatisfyRequirementUsage — reflection, the query leg and the symbol structure answer it as the RDF writer and the pilot state it #2091 re-records the structure differential expectation, which merged clean):make stdlib-snapshot, then the same re-recordings and every-checkreproduce all four baselines and the convert goldens byte for byte. The full gate above was re-run on the pushed head.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 changelog🟢 Devin Review found nothing to fix · View findings · Follow Devin's work