Skip to content

feat(software): conformance harness — flight host and generated tables vs the pinned model - #28

Merged
devin-ai-integration[bot] merged 7 commits into
integration/phase-6cfrom
wp/sw-conformance
Oct 23, 2026
Merged

devin-ai-integration[bot] merged 7 commits into
integration/phase-6cfrom
wp/sw-conformance

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

software/conformance/ is the conformance harness: it proves the Argent flight host, the generated tables and the Meridian ground suite agree with the Tethys model as the pinned OpenSysML (5cd37f288) executes and evaluates it, and turns the software VCRM's planned flight-software-in-the-loop cases into as-run evidence. make software-conformance-check (root Makefile include after the flight include, CI job software-conformance-check after the flight job) builds the host, starts sysml-grpc from the pin, runs three tiers and compares every output byte for byte with software/conformance/expected/ and software/conformance/evidence/; make software-conformance-update rewrites them. Whole gate ≈ 50 s wall-clock, sysml-grpc ≈ 0.83 GB peak, so one tier — no fast/full split.

Counts

  • Trace tier: 16 runs (the 14 pinned sw-* runs + vc-final-targeting, vc-thrust-arc) × machines = 149 machine-runs compared, 146 agree, 3 adjudicated divergences (F-SW1304 ×2, F-SW1305 ×1), 348 configuration changes, 434 model transitions, 282 model accepts compared.
  • Calc tier: 47 calcs — agree 10 (C and Go, 1e-9 relative / exact), disagree 0, does-not-compile-at-pin 15 (quantity-typed inputs or results, package constants: F-SW1308), not-driveable 22 (record/sequence inputs; what covers each is in the file). No Python target at the pin (F-SW1307). The power margin 11.9 % vs 15 % and the bus slots 36 of 64 vs the 32 reserve (TF-011) come out identical on both sides and failing.
  • Cases: 5 run / 5 pass / 0 fail / 26 still planned (12 unit, 4 integration, 4 hardwareInTheLoop, 6 flatsat — benches this repository does not hold). No planned case is at level modelInTheLoop.

F-SW1201 adjudication. The pinned run is right and the host was wrong: the model keeps a transfer routed to a port until an accepter takes it (SysML v2 §7.17.8 — an accept action accepts a payload received by its receiver; §7.18.3 — a transition fires when its accepter can accept an incoming transfer), so attitudeControl later takes the earlier ProximityOperationsGo/DockingGo from wheels. sm_runner now holds unaccepted items and offers them again; attitudeControl agrees in every run and the wildcard in compare_runs.py is gone. The model's own design point (rows that consume stale items) stays visible in the pinned run.

Flight-side edits the comparison forced (nothing under software/ground/, software/gen/, software/generated/):

  • software/flight/sm/sm_runner.[ch] — held items (F-SW1301), unit test test_held_items.
  • software/flight/host/argent_host.c — fast-forward stopped one frame short of an exact deadline (F-SW1302) and skipped the sequence engine's next step (F-SW1306).
  • software/flight/tests/compare_runs.py + regenerated software/flight/scenarios/*.stim — exact campaign times instead of the render's six significant digits, and only this host's uplink (F-SW1303).

Model edit (model/88-software-assurance.sysml, runs re-recorded with make runs, make check green): for the five cases that ran, verdict = VerificationVerdict::planned; evidence = "not yet run" → verdict = VerificationVerdict::pass; evidence = "software/conformance/evidence/<case>.txt" — finalTargetingFlightSoftwareInTheLoop, thrustArcFlightSoftwareInTheLoop, captureSequenceFlightSoftwareInTheLoop, faultDetectionFlightSoftwareInTheLoop, groundTwoStepIntegration. Run diff: sw-assurance-passed 10 → 15 rows (PassedCases), sw-assurance-vcrm/sw-assurance-vcrm-document and sw-doc-test-plan carry the five verdicts and evidence paths, the VCRM and test-plan documents (runs/documents*/…SoftwareVcrmDocument, …SoftwareTestPlan) and render-documents-*.txt re-rendered — 10 files, nothing else moved. IV&V status, SA-001/SA-002 untouched.

Findings (docs/findings/WP-SW-13.md): F-SW1301 host dropped unaccepted items (fixed); F-SW1302 fast-forward off-by-one (fixed); F-SW1303 scenario derivation rounding/uplink (fixed); F-SW1304 host sequence-3 step items have no model source (open, adjudicated divergence); F-SW1305 ExecuteState over gRPC traces two FdirSupervisor instances in earthImpactScenario (pin; probe software/conformance/probes/F-SW1305-duplicate-fdir-instance.py); F-SW1306 fast-forward skipped sequence steps (fixed); F-SW1307 no Python -compile target; F-SW1308 -compile refuses quantity/record inputs and package constants; F-SW1309 client events are untimed and payload-less; F-SW1310 -compile cost (parallelised).

Decisions / alternatives rejected. Retention semantics fixed in the host rather than wildcarded or tolerated per machine; exact stimulus times derived by snapping to the driver script's delay gcd rather than hand-editing the shipped files or loosening the time comparison; the model side of every run is a scenario part (the client cannot inject timed payloads, F-SW1309) rather than CLI fallbacks; the duplicate FDIR instance is worked around by rebuilding the run's own usage and recorded, not hidden; compile steps parallelised rather than moved to a slower tier; calcs the pin cannot compile are bucketed with the reason rather than re-implemented by hand.

Coverage: docs/coverage/WP-SW-13.md. How to read a divergence and add a case: software/conformance/README.md.

Link to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/a18b635f8fa84ae5848db4d43bbfb422
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/a18b635f8fa84ae5848db4d43bbfb422?variant=devin
Requested by: @HuiJun

devin-ai-integration Bot and others added 3 commits October 23, 2026 13:48
…forwards to exact deadlines

A dispatched item that no active state takes is held (up to 16 per machine) and offered again when a state that names it becomes active, which is how the pinned model routes a transfer to a port: the run keeps it until an accepter takes it. The attitude-control region of TugModes now ends every scenario in the model's state (F-SW1201). The fast-forward deadline search skipped a timer expiring exactly on the frame it was computed in; it now includes it.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
… this host's uplink only

The sequence render prints six significant digits, so campaign times such as 19880640 reached the host as 19880600; derived times are snapped to the gcd of the driver script's delays. Messages the operations centre sends to the inspector's own uplink are no longer stimuli of the tug host. The attitude-control wildcard is gone: the host agrees with the pinned run.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
software/conformance compares, per machine and scenario, the host's --trace state sequences with the model's ExecuteState(trace=true) trace at the pinned OpenSysML: every configuration change with its time, the transitions and accepts, with wall-clock, peak RSS and output size per step. make software-conformance-check compares the outputs byte for byte with software/conformance/expected/.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration Bot and others added 4 commits October 23, 2026 14:06
Every calc def the software uses is evaluated by the model (Model.eval at the pin) and, where the pin compiles it, by its compiled C and Go programs over a deterministic grid of the model's own values and boundary points, with an explicit tolerance per calc (1e-9 relative for Reals, exact for Integer, Boolean and enumeration results). Each calc lands in one bucket: agree, disagree, does-not-compile-at-pin with the pin's reason, or not-driveable with what covers it instead. The power margin (11.9 % against 15 %) and the bus slots by mode (36 of 64 against the 32 reserve) come out of the model and the generated tables identical and failing. The compile steps run in parallel; the pin has no Python target.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
The five planned flightSoftwareInTheLoop cases of the software VCRM run on the flight host, the model through sysml-grpc and the ground suite, each with an evidence file under software/conformance/evidence/ (inputs, both sides' outputs, the case's own pass criterion, tool pin): final targeting (Earth-impact exclusion abort), thrust arc (string restart and the relay rule), capture sequence (fire when armed, hold when inhibited), fault detection (latency and the safe configuration) and the ground two-step (second approval and the flight-rule refusal). Two conformance scenarios drive the host for them; the trace rebuild prefers the run's own machine instance when a scenario traces two.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
next_deadline() polled only the state machines' timers, so a --fast-forward skip jumped over an on-board sequence step and the step items fired on the first frame after the skip (the inspector release steps hours late). The sequence engine's next step is a deadline too. CI job software-conformance-check runs make software-conformance-check after the flight job.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…cation cases pass

The five flightSoftwareInTheLoop cases of TethysSoftwareAssurance that the conformance harness ran move from planned to pass with their evidence paths; the VCRM and test-plan documents and the assurance counts are re-recorded. software/conformance/README.md, docs/coverage/WP-SW-13.md, docs/findings/WP-SW-13.md (F-SW1301 to F-SW1310, with the F-SW1305 probe) and one paragraph in software/README.md.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review October 23, 2026 15:33
@devin-ai-integration
devin-ai-integration Bot merged commit f58929c into integration/phase-6c Oct 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant