Repository navigation
feat(landing): Apollo 11 action scene on the ExecuteAction trace - #1782
Merged
Merged
Conversation
The homepage hero gains an "Apollo 11 mission" scene drawing MissionSequence::LunarMission as an action diagram. Run performs the action on apollo11 through the wasm engine with trace: true and replays the records the engine wrote: the token at each node a step reached, each assigned value written under the node that assigned it, the branch the decide took, and the wait at awaitGo for GoForDescent. Toggles post GoForDescent to the waiting accept, fly apollo8, or perform LunarMissionUnordered, showing whatever the engine answers. model.ts keeps an action view as a LandingAction (its nodes by the name the trace records carry) beside the part-shaped and machine-shaped models; debugSteps follows step/wait/decide/assign records and accumulates the assignments. The first paint is pinned by tests/wasm/landing_mission_test.go, which also pins the four traced runs the scene offers. 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)".
|
…fter a toggle is switched off valueText prints an instance value as its id, so the action's outputs read 'go = instance #3' rather than its kind; readSummary counts an action's steps and successions; switching a variant off on an unchanged root no longer leaves the status line on 'Reading … again'. Co-Authored-By: jason.han <hanhuijun@gmail.com>
The status line after a run counts the tokens the records name and says how the run ended: the completion record, or the last record the engine wrote, so LunarMissionUnordered shows the engine's own account of its three unordered tokens. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…' into feat/landing-action-scene
…' into feat/landing-action-scene
6 tasks done
…' into feat/landing-action-scene
The value badges of the previous run stayed on a replacement diagram; adopting a model or forgetting a run now clears them. The mission test reads the held value of each assignment. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…' into feat/landing-action-scene
…' into feat/landing-action-scene
…' into feat/landing-action-scene
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 homepage hero gains an Apollo 11 mission tab:
MissionSequence::LunarMission(fromexamples/runtime-showcase/mission-sequence.sysml) drawn as an action diagram, whose Run performs the action onapollo11through the in-browser engine withExecuteAction's newtrace: trueand replays the records the engine wrote. Nothing on the page is computed by the page: the token moves to the node eachsteprecord names, eachremainingappears under the burn whoseassignrecord reported it, thedeciderecord says which branch the engine took, and the run ends on thewaitrecord atawaitGowith the engine's own deadlock message namingGoForDescent.Toggles under the stage (as the mass scene's):
events: ["GoForDescent"]: the engine posts it to the waiting accept and the trace goes on throughdescent,surfaceOperations,ascent,transEarthInjection,splashdowntodone; the status line prints the outputs the engine returned (landed = true,returned = true,remaining = 480 'm/s').MissionSequence::apollo8: its 5500 m/s budget fails the guard and the decide takes2->transEarthInjection.LunarMissionUnordered: the engine does not refuse an action with nofirststep today; it starts a token on each of the three actions, records the order it took them as achoice, and completes. The scene shows exactly that; the status line reads the engine's records.Code
scene.ts: aSceneActionprogram (symbol,performer,events) andLUNAR_MISSION_SCENE(id: "apollo") with the three variants;present.ts:presentedMission.model.ts:LandingAction/LandingActionNode— an action view is kept as its nodes keyed by the name the trace records carry, beside the part-shaped and machine-shaped models (actionModel,stateIdOfresolves action nodes too);TraceRecordcarriestoken,step,feature,value;runActioncallsexecuteActionwith the performer, events and trace and keeps the printed outputs or the failed run's partial trace;debugStepsfollowsstep/wait/decide/assignrecords and accumulates theAssignments so far (an accept followed by astepcounts as fired).main.ts:runActedreplays the trace through the existingshowStep, so the Debug panel steps through an action run exactly as it steps through a state run;syncValueswrites each assigned value under its node (text.osml-value); action nodes get theosml-stepclass the live styling lights.overrides/home.html: the tab, caption, debug hint, edit hint and the two style rules.tests/wasm/landing_mission_test.gopinsmission.json(the first paint) and the four traced runs: the node kinds and successions RenderView draws, the wait atawaitGo, the assignments and completion withGoForDescent, Apollo 8's branch, and what the engine does withLunarMissionUnordered.The Debug panel is reused as is: its record list, step/play and "now" line work on the action's records (the decide shows as
chose 1->awaitGo). Its send buttons stay journey-only — the action's events are the scene's toggles, posted by the engine as the run waits, not sent from the panel.Landing order. This PR is built on #1778 (
feat/execute-action-trace-events), which it needs forExecuteAction'strace/eventsin the wasm engine; #1778 carriesdevelop(with #1777, now landed) merged in as merge commits, no rebase. Order: #1778 → this PR. Until #1778 lands, this branch's diff includes it; after, it is the hero change alone. The branch dry-merges onto currentdevelopwithout conflicts.How it was verified
On the head with #1778's current head (and so
develop) merged in:cd editors/vscode && npm run build && npm run typecheck && npm test— 454 pass, 0 fail;npm run build:landingbuilds the bundle.go build ./... && go vet ./... && gofmt -l .— clean;go test -count=1 ./tests/wasm— ok (TestLandingLunarMissionModelpinsmission.jsonand the four runs the scene offers).cd client/node && npm run build && npm test— 473 pass on the same engine code (run on feat(grpc): trace and events for ExecuteAction #1778's merged head; this PR adds no client change).make docs-engine-assets,mkdocs build, served statically) against the real wasm module, cache disabled, no console errors beyond the theme's twoapi.github.com403s. The status line and the values under the nodes below are read from the page, not typed in:wait GoForDescentatawaitGo— status "ExecuteAction performed LunarMission on apollo11 in 15 ms and stopped after 9 trace records: action execution failed: execute action: accept deadlock in action LunarMission: nothing can post the awaited message (accept go waiting since step 5 for a message of type GoForDescent)"; values under the nodesremaining = 6350 'm/s',remaining = 5450 'm/s'.landed = true, remaining = 480 'm/s', returned = true; values6350,5450,3350,landed = true,1480,480,returned = trueunder their burns.2->transEarthInjection, completes withlanded = false, remaining = 450 'm/s'.step,assign,decide,wait) and stepping through them moves the token and lands each value; the failed run's error is the last row, as for a state run.First paint (snapshot) and the Apollo 11 run stopped at
awaitGo:With
GoForDescentsent, and Apollo 8:LunarMissionUnordered, and the Debug panel on the Apollo 11 run:Known cosmetic, not from this PR: RenderView draws
awaitGo's three parameters as ports and their labels overlap under the box.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 changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/ea449771e507498985e128186c5ad7e5
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/ea449771e507498985e128186c5ad7e5?variant=devin
Requested by: @HuiJun