Add Nexus Chaos sandbox game#2
Open
nadvolod wants to merge 1 commit intotemporalio:initfrom
Open
Conversation
Single-file interactive HTML sandbox at game/index.html that mirrors PaymentProcessingWorkflow over the compliance-endpoint Nexus call. Stop the Payments / Nexus / Compliance services and watch in-flight workflows pend (not fail) until the service returns. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a standalone, dependency-free browser “sandbox game” to visually simulate how PaymentProcessingWorkflow behaves when Payments / Nexus / Compliance are stopped (with step 2 pended rather than failed).
Changes:
- Introduces
game/index.htmlas a single-file interactive UI showing service topology, in-flight workflows, and an event history. - Implements a simple workflow state machine (validate → Nexus compliance → execute) with service stop/start controls.
- Adds auto-spawn/reset controls and basic completion/decline metrics.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+279
to
+281
| row.innerHTML = `<span class="t">${fmtTs()}</span>` + | ||
| (id ? `<span class="id">${id}</span>` : "") + | ||
| `<span>${msg}</span>`; |
Comment on lines
+324
to
+340
| stepProgress: 0, | ||
| stepDuration: 0, | ||
| stepStartedAt: 0, | ||
| stepStates: ["pending", "pending", "pending"], | ||
| el: null, | ||
| }; | ||
| workflows.set(id, wf); | ||
| renderWorkflow(wf); | ||
| logEvent("info", id, `WorkflowExecutionStarted (PaymentRequest amount=${fmtMoney(amount)})`); | ||
| beginStep(wf, 1); | ||
| } | ||
|
|
||
| function beginStep(wf, step) { | ||
| wf.step = step; | ||
| wf.stepProgress = 0; | ||
| wf.stepStartedAt = Date.now(); | ||
| if (step === 1) { |
| let lastTs = Date.now(); | ||
| let auto = true; | ||
| let autoTimer = null; | ||
| const counters = { completed: 0, declined: 0, lost: 0 }; |
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.
Summary
Adds
game/index.html— a single-file interactive HTML sandbox that mirrorsPaymentProcessingWorkflowover thecompliance-endpointNexus call. Stop the Payments / Nexus / Compliance services and watch in-flight workflows pend (not fail) until the service returns. No deps; just open the file in a browser.Stacks onto #1.
Test plan
game/index.htmlin a browser🤖 Generated with Claude Code