Skip to content

test: mainnet readiness sign-off — Lighthouse regression check, governance latency SLO, trust-critical walkthrough, launch notes - #972

Merged
Marvell69 merged 4 commits into
Invoice-Liquidity-Network:devfrom
thegreatfeez:test/959-960-961-962-mainnet-readiness-signoff
Sep 24, 2026
Merged

Marvell69 merged 4 commits into
Invoice-Liquidity-Network:devfrom
thegreatfeez:test/959-960-961-962-mainnet-readiness-signoff

Conversation

@thegreatfeez

Copy link
Copy Markdown
Contributor

Summary

This PR resolves four issues from the Final SCF/Mainnet Frontend Readiness Sign-off category. Each issue has its own commit.

Related Issue

Closes #959
Closes #960
Closes #961
Closes #962

Maintainers — about #961: this PR adds the walkthrough script and the sign-off record. It does not record a sign-off, because the live session hasn't happened and the table is intentionally empty. Please run the walkthrough and fill in docs/trust-critical-surface-walkthrough.md §4 before merging. If you'd rather keep #961 open until then, change its line above to Refs #961.

Complexity

  • Trivial
  • Medium
  • High

Type of Change

  • Feature
  • Fix
  • Docs
  • Perf
  • Test

Detailed Changes & Rationale

1. Key Changes

  • Build fix (Run the full Lighthouse CI suite against this batch's changes and address any regression #959): UPDATE_LP_WHITELIST_SUPPORTED is now typed boolean, not the literal false, so the runtime feature check type-checks. encodeReferralCodeBytes now passes a Buffer to xdr.ScVal.scvBytes. next build and tsc --noEmit pass again.

  • Lighthouse workflow (Run the full Lighthouse CI suite against this batch's changes and address any regression #959): now also triggers on dev. docs/LIGHTHOUSE_CI.md now:

    • lists the page actually audited: /lp, not /dashboard/lp;
    • states that every budget is warn-level;
    • includes a baseline-vs-candidate results table with the verdict and residual risks.
  • Governance latency (Confirm SLOs still hold under this batch's new real contract-call latency profile #960): scripts/measure-governance-latency.mjs measured the following (Soroban testnet, n=20; submit n=10):

    Stage p50 p95
    Governance read 323 ms 498 ms
    Account fetch 268 ms 347 ms
    prepareTransaction 283 ms 583 ms
    Submit → confirmed 4,977 ms 5,830 ms

    The targets are: read p95 ≤ 1 s, pre-signature preparation p95 ≤ 1.5 s, and submit → confirmed p95 ≤ 10 s. docs/slos.md also recommends a distinct "Confirming on-chain…" UI state once writes are wired, because a real vote takes about 5–6 s against the mock's 2 s.

  • Walkthrough findings (Conduct final maintainer sign-off walkthrough of every dark-feature and admin-surface change in this batch #961): these came from reading the code, not from running a live session.

    # Finding
    F1 Vote casting is mocked
    F2 Proposal execution is mocked
    F3 Protocol pause/unpause is mocked, although the dialog says "will call the contract"
    F4 Token approve/remove is signed but never submitted, yet the UI reports success
    F5 NEXT_PUBLIC_GOVERNANCE_CONTRACT_ID is unset on testnet, so governance reads fall back to mock proposals
    F6 DelegationPanel uses hard-coded values
    F7 Dark flags are build-time only
    F8 The admin audit log only covers signer rotations and parameter updates

2. Implementation Details

  • The Lighthouse baseline commit doesn't type-check (an error the batch later fixed). It was built with type checking skipped, which doesn't change runtime output. Both builds ran back-to-back on the same machine: Node 20.20.2, @lhci/cli 0.15.1, 3 runs per URL, medians reported.
  • / shows a higher median LCP (2,046 → 2,343 ms), but the individual runs overlap (1,650–2,051 vs 1,858–2,420 ms), and the LCP element is the same hero image in every run.
  • The governance read and cast_vote preparation targeted the address the app actually resolves as the governance contract on testnet. Neither function exists there, so the RPC round trip is real but the simulation returns a contract error.
  • Submit → confirmed was measured with a friendbot-funded throwaway account, submitting a read-only native XLM contract balance call. It goes through consensus but changes no state.
  • The readiness checklist gains a Blocked row for the walkthrough, and its Lighthouse, SLO, and launch-notes rows are updated. The repo's pre-commit hook ran prettier over the checklist, which is why that file's diff is larger than the rows changed.

Files Changed Summary

  • Created:
    • __tests__/lighthouse-config.test.ts
    • __tests__/governance-latency-measurement.test.ts
    • scripts/measure-governance-latency.mjs
    • docs/trust-critical-surface-walkthrough.md
  • Modified:
    • .github/workflows/lighthouse.yml
    • src/utils/soroban.ts
    • docs/LIGHTHOUSE_CI.md
    • docs/slos.md
    • docs/mainnet-launch-notes.md
    • docs/mainnet-frontend-readiness-checklist.md
  • Deleted: none

Breaking Changes

  • No breaking changes
  • Yes (describe impact and migration steps below):

Test Coverage

  • Unit tests added/updated (npm test):
    • lighthouse-config.test.ts checks the workflow triggers on dev, that every audited URL maps to a real route, and that the doc's page list matches.
    • governance-latency-measurement.test.ts covers the percentile, summary, and timing helpers.
  • E2E tests added/updated (npm run test:e2e)
  • Storybook stories added/updated for new/changed components
  • Manual testing completed: two Lighthouse CI runs (baseline and candidate), and a live testnet latency run including 10 real transaction submissions.
  • Coverage thresholds maintained (90% lines/functions, 80% branches)

Local CI mirror (Node 20.20.2, pnpm 9.0.0):

  • Build: pnpm run build passes. It fails on dev.
  • Type check: tsc --noEmit passes.
  • Tests: 2,362 passed and 44 failed. The same 44 fail on current dev, and none fail only on this branch.
  • Lint, format, env checks: these fail identically on dev. ESLint shows the same 140 errors / 247 warnings on both, prettier issues went from 45 files to 43, and the file-size and env checks fail on both. Nothing new comes from this PR.
  • Note: ci.yml also only triggers on main/develop, so the main CI workflow doesn't run on PRs to dev. I left that alone because it's outside these issues.

Accessibility

  • Keyboard tested: Yes
  • Keyboard tested: No / Not applicable

Checklist

  • Code follows project style guidelines (npm run lint)
  • Self-review completed
  • Comments added for complex logic
  • Documentation updated (README, DESIGN.md, architecture docs) if needed
  • No new console warnings or errors
  • All tests passing locally (44 failures pre-exist on dev; see above)

Residual / accepted risk

…'s changes

Lighthouse CI had never run on this batch: the workflow only triggered on
main/develop while every PR targets dev, and two type errors from Invoice-Liquidity-Network#965 broke
next build outright. Fix both, then compare the batch against its pre-batch
baseline using the repo's own .lighthouserc.json. No CWV regression beyond
run-to-run noise; pre-existing home CLS and byte-weight breaches are recorded
as residual risk.
…latency

Governance writes still resolve a fixed setTimeout with a fake tx hash, so
docs/slos.md had no latency target grounded in real network behaviour. Add a
measurement script that times every RPC stage a governance write will take
(read, account fetch, prepare, and a real testnet submit-to-confirm), record
the results as SLO 5, and state plainly that the end-to-end write path stays
unverified until the governance contract is wired.
…ical surfaces

Add the live walkthrough script (real vote, dark-flag flip, admin action
through the confirmation/audit-log flow) and a blank sign-off record for
maintainers to complete during the session. Tracing each step through the
code found that vote casting, proposal execution, and protocol pause are
still mocked, token removal is signed but never submitted, and the audit log
does not cover those actions; each is listed as a finding needing a decision,
and the checklist marks the item Blocked until sign-off happens.
…h completion

The launch notes described governance as a live contract interaction and had
no readiness story. Add a Launch Readiness Status section tied to the
checklist: governance is read-only with writes still simulated, dark
features and how flags actually flip, what admin hardening is real versus
not yet on-chain, the Lighthouse outcome, and the remaining blockers. Point
the checklist's Lighthouse, SLO, and launch-notes rows at the new results.
@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

@thegreatfeez is attempting to deploy a commit to the Nursca's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 24, 2026

Copy link
Copy Markdown

@thegreatfeez Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Marvell69
Marvell69 merged commit 9619a8c into Invoice-Liquidity-Network:dev Sep 24, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment