Skip to content

feat(operator): show onboarded manifest snapshot#53

Open
0xMuang wants to merge 19 commits into
feature/operator-dashboard-control-planefrom
feature/operator-dashboard-manifest-snapshot
Open

feat(operator): show onboarded manifest snapshot#53
0xMuang wants to merge 19 commits into
feature/operator-dashboard-control-planefrom
feature/operator-dashboard-manifest-snapshot

Conversation

@0xMuang

@0xMuang 0xMuang commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- Generate a read-only Manifest snapshot immediately after demo onboarding.\n- Expose status, version, and RecipeBinding count through Operator API and Dashboard.\n- Keep the local RFQ walkthrough executable across dashboard, CLI, and rejection flows.\n\n## Verification\n- npm test --prefix services/operator-api\n- npm test --prefix services/operator-dashboard\n- npm test --prefix services/cli\n- forge build --offline --jobs 1\n- scripts/e2e-anvil.sh --profile buidl-like

0xMuang added 19 commits July 22, 2026 19:10
Operators need to see the policy state that was actually onboarded, not only deployment addresses.\n\nConstraint: the console stays read-only and the demo snapshot is emitted immediately after factory onboarding.\nRejected: adding live RPC reads to the API | that would introduce a new provider and key/network configuration boundary.\nConfidence: high\nScope-risk: moderate\nDirective: Treat the snapshot as a demo/reference checkpoint, not a production indexer.\nTested: npm test --prefix services/operator-api; npm test --prefix services/operator-dashboard; forge build --offline --jobs 1; git diff --check\nNot-tested: full live E2E after snapshot generation
The demo performs multiple RFQ fills and re-onboards the asset in one run, so its fixture inventory and signer nonce path must cover the full sequence.\n\nConstraint: this is deterministic Anvil-only demo behavior, not production inventory or custody policy.\nRejected: reducing the number of demo fills | it would hide the integrated dashboard, CLI, and rejection flow.\nConfidence: high\nScope-risk: narrow\nDirective: Keep demo fixture capacity aligned with every scripted settlement and refresh nonces across independent broadcasts.\nTested: npm test --prefix services/cli; scripts/e2e-anvil.sh --profile buidl-like; git diff --check\nNot-tested: production dealer custody and inventory management
The repository status must make the new operator verification surface recoverable in a fresh session.\n\nConstraint: the snapshot remains a local demo checkpoint, not a production indexer.\nRejected: marking production lifecycle operations complete | governance and live provider integration remain future work.\nConfidence: high\nScope-risk: narrow\nDirective: Preserve the read-only boundary when extending the operator console.\nTested: git diff --check\nNot-tested: full verification after documentation-only changes
The dashboard already owns the click-through settlement path, but the local RFQ backend could disappear when the keep runner returned to its parent shell. Detach only the kept Anvil and backend processes and make the dashboard-first flow explicit in the guides.

Constraint: The demo must remain local-only and use the existing Router settlement path.
Rejected: Requiring CLI copy/paste for the normal demo | it obscures the product flow and is unnecessary for the dashboard path.
Confidence: high
Scope-risk: narrow
Directive: Keep kept-process lifecycle explicit when adding more local demo services.
Tested: bash syntax check; git diff check; RFQ backend smoke; operator dashboard smoke; alternate-port demo health checks.
Not-tested: Full repository check and GitHub CI.
Use the shared RFQ handoff to make the existing vanilla dashboard a real quote-review-settlement console. Keep one backend-backed live quote selectable, label other maker rows as preview fixtures, and forward the exact signed quote through the Router settlement endpoint.

Constraint: Preserve the existing Operator and Security demo boundaries and keep signing server-side.
Rejected: Shipping the standalone React reference directly | the repository dashboard is vanilla JS and adding a frontend framework would expand scope without improving the MVP path.
Confidence: high
Scope-risk: moderate
Directive: Treat multi-maker quote discovery and quote status persistence as follow-up backend capabilities, not UI fixtures presented as live liquidity.
Tested: git diff --check; npm test --prefix services/rfq-demo-backend; npm test --prefix services/operator-dashboard; RFQ Anvil E2E with live settlement and maker rejection.
Not-tested: Full repository check and GitHub CI.
The local QUOTE fixture uses the ERC20 default of 18 decimals, while the dashboard was converting its 5,000,000 demo amount as six-decimal USDC. That produced a valid quote that failed the BUIDL-like minimum investment compliance element. Use the deployed demo unit convention and refresh operator nonce reads from the mined chain for reliable maker revoke retries.

Constraint: Keep the current local fixture and BUIDL-like minimum unchanged.
Rejected: Lowering the compliance minimum or hiding the revert | that would make the demo pass by weakening the product rule.
Confidence: high
Scope-risk: narrow
Directive: Read token decimals from deployment metadata before presenting production asset amounts.
Tested: git diff --check; npm test --prefix services/rfq-demo-backend; npm test --prefix services/operator-dashboard; clean Anvil RFQ E2E with settlement and maker rejection.
Not-tested: Full repository check and GitHub CI.
Make the local walkthrough easier to start by surfacing a Demo setup panel that checks the RFQ backend, deployment artifact, Router, RFQ adapter, asset profile, and Manifest before trading.

Constraint: Browser code must not spawn Anvil or hold credentials; the existing scripts/demo.sh remains the launcher.
Rejected: Starting local processes from the dashboard | it would blur the browser/server trust boundary and make lifecycle cleanup unreliable.
Confidence: high
Scope-risk: narrow
Directive: Keep setup checks read-only and treat process startup as an explicit local launcher responsibility.
Tested: git diff --check; npm test --prefix services/operator-dashboard.
Not-tested: Full repository check and GitHub CI.
Repeated dashboard security demos must tolerate a long-lived backend and Anvil restarts. Read the operator nonce from the pending RPC state for every maker approval transaction instead of retaining a process-local counter.

Constraint: The local demo uses the canonical Anvil operator account and must not expose signing to the browser.
Rejected: Asking the presenter to restart the backend after every security demo | it hides a lifecycle bug and makes the walkthrough brittle.
Confidence: high
Scope-risk: narrow
Directive: Avoid process-local nonce caches for long-lived demo operator actions.
Tested: npm test --prefix services/rfq-demo-backend; git diff --check; clean RFQ E2E previously passed after the nonce change.
Not-tested: Full repository check and GitHub CI.
Allow the compliance scenario to create and submit its own stored quote without routing through the trader view.\n\nConstraint: The demo backend exposes quote creation and revoked-maker settlement, while maker restoration remains backend-managed.\nRejected: Reusing the Trader quote state | it made the Security demo order-dependent and obscured the scenario being demonstrated.\nConfidence: high\nScope-risk: narrow\nDirective: Keep Security demo controls independent from normal trading flows.\nTested: npm test --prefix services/operator-dashboard; npm test --prefix services/rfq-demo-backend; node --check /tmp/operator-dashboard.js; git diff --check\nNot-tested: Full Anvil browser click-through after this UI-only change
Surface the selected quote and settlement outcome in the Trader console so the demo shows what happened instead of ending at a button response.\n\nConstraint: The current backend exposes one live quote and a final trade result, not a persistent quote lifecycle or multi-maker order book.\nRejected: Pretending fixture makers are executable | would misrepresent the current backend.\nConfidence: high\nScope-risk: narrow\nDirective: Keep preview makers visibly non-selectable until the backend supports multiple live quotes.\nTested: npm test --prefix services/operator-dashboard; node --check /tmp/operator-dashboard.js; git diff --check\nNot-tested: Full Anvil browser click-through after this UI-only change
Keep repeated RFQ security demos from terminating the launcher when the operator nonce changes between policy transactions.\n\nConstraint: The local demo may share the deployer account with CLI onboarding and settlement setup.\nRejected: Relying only on JsonRpcProvider transaction-count caching | it reproduced nonce-too-low failures in the long-lived demo flow.\nConfidence: high\nScope-risk: narrow\nDirective: Refresh pending operator nonce immediately before each policy toggle and retry one transient nonce race.\nTested: npm test --prefix services/rfq-demo-backend; isolated scripts/e2e-anvil.sh --profile buidl-like --mode rfq --port 18545 --backend-port 18787 --keep; git diff --check\nNot-tested: Default-port demo while an unrelated stale process is already listening
Normalize direct signed-quote responses and send the exact quote object on settlement so Trader and Security flows work without undefined fields or wrapper mismatches.\n\nConstraint: The current backend returns a SignedRFQQuote directly and accepts that exact quote under the trade request.\nRejected: Changing the backend contract for the prototype UI | the existing API is sufficient when the dashboard maps it correctly.\nConfidence: high\nScope-risk: narrow\nDirective: Keep quote-shape normalization at the dashboard boundary and never send UI wrapper objects to the backend.\nTested: npm test --prefix services/operator-dashboard; node --check /tmp/operator-dashboard.js; git diff --check\nNot-tested: Browser click-through against a running dashboard after this patch
Use the live backend quote shape consistently across Trader and Security flows, and make an empty operator event snapshot explicit instead of presenting a blank panel.\n\nConstraint: The current operator API does not populate an event index during the demo launcher.\nRejected: Fabricating indexed events from frontend state | it would misrepresent operator-chain data.\nConfidence: high\nScope-risk: narrow\nDirective: Treat Recent activity as local RFQ UI state and Indexed events as operator-indexer data.\nTested: npm test --prefix services/operator-dashboard; node --check /tmp/operator-dashboard.js; git diff --check\nNot-tested: Live browser session after the prior demo process exited
Read signatures from the SignedRFQQuote envelope and submit that full envelope for Trader and Security settlement.\n\nConstraint: RFQQuote contains execution fields while SignedRFQQuote carries signature and typed data alongside it.\nRejected: Flattening the response in the UI | it diverges from the SDK and backend contract.\nConfidence: high\nScope-risk: narrow\nDirective: Preserve the SignedRFQQuote envelope at every frontend/backend boundary.\nTested: npm test --prefix services/operator-dashboard; npm test --prefix services/rfq-demo-backend; git diff --check\nNot-tested: Manual browser click-through after restarting the current demo process
Share a file-backed event stream between the demo settlement backend and read-only Operator API so successful fills and maker approval changes appear without restarting services.\n\nConstraint: The current FinalityAwareIndexer has no concrete RPC ChainReader in the demo launcher.\nRejected: Showing browser activity as indexed chain data | it would conflate UI state with confirmed transactions.\nConfidence: high\nScope-risk: moderate\nDirective: Keep demo event persistence explicit; replace the bridge with the production RPC indexer when a concrete ChainReader is added.\nTested: operator-api, rfq-demo-backend, and operator-dashboard npm tests; bash -n scripts/demo.sh; isolated RFQ E2E with indexed RFQSettled and MakerApprovalSet events; live GET /api/v1/events returned file-index data\nNot-tested: Production finality/reorg indexing against a non-Anvil chain
Apply the refreshed standalone console hierarchy while keeping live indexed events, session-only history, and follow-up capabilities visibly distinct.\n\nConstraint: The current backend provides one live maker and file-indexed demo events, but no persistent quote lifecycle or granular compliance log API.\nRejected: Shipping fixture trade history and aggregate counts as operational data | it would make the demo visually richer but factually misleading.\nConfidence: high\nScope-risk: moderate\nDirective: Use DESIGN.md as the dashboard contract and label every Live, Preview, session-only, fixture, and Follow-up surface.\nTested: operator-dashboard, operator-api, and rfq-demo-backend npm tests; dashboard JavaScript syntax; git diff --check\nNot-tested: automated screenshot verdict because no local browser runtime was available
Connect every interactive dashboard control to the local backend and on-chain maker state so the presentation shows actual preparation, settlement, enforcement, restoration, and indexed evidence.

Constraint: Demo controls remain local-Anvil-only and browser code must never receive signer keys.

Rejected: Treating UI-only state changes or arbitrary settlement failures as compliance evidence | both could make a broken demo appear successful.

Confidence: high

Scope-risk: moderate

Directive: Keep RFQMakerNotApproved exact-match validation and explicit maker restoration when extending the security demo.

Tested: scripts/check.sh; RFQ-only live Anvil E2E with setup, settlement, exact maker rejection, persistent revoked state, restore; backend and dashboard smoke/syntax checks

Not-tested: production RPC, hosted signer, real TA/Securitize integration, browser screenshot automation
Bring the standalone console's rate and chart treatment into the shipped dashboard while keeping the single backend quote authoritative and every comparison series visibly fixture-only.

Constraint: The current backend exposes one executable maker and no external market-data or multi-maker aggregation API.

Rejected: Omitting price context entirely | made the demo less legible; presenting fixture curves as live | would misrepresent product capability.

Confidence: high

Scope-risk: narrow

Directive: Replace fixture labels only when corresponding multi-maker and market-data endpoints become authoritative.

Tested: scripts/check.sh; operator dashboard smoke and JavaScript syntax checks; independent design review

Not-tested: browser screenshot comparison because no browser runtime was available
The dashboard now explains its presenter flow in-product and keeps every visible control tied to a tested backend or view transition. Quote lifecycle guards prevent stale expiry timers and consumed quotes from corrupting later demo state.

Constraint: Keep the dependency-free local demo and clearly separate live data from fixtures.

Rejected: A documentation-only guide | presenters need the instructions at the point of use.

Confidence: high

Scope-risk: narrow

Directive: Preserve exact quote review, single-use lifecycle handling, and button-to-endpoint smoke coverage when extending the dashboard.

Tested: operator-dashboard smoke; operator-api smoke; rfq-demo-backend smoke; JavaScript syntax check; fresh-port BUIDL-like RFQ E2E setup/settle/revoke/state/restore; git diff --check

Not-tested: browser screenshot review unavailable; repository-wide check stops on pre-existing DemoScenarios.s.sol formatting drift
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