feat: devcontainer tests, action defaults tests, testnet widget, output-panel benchmarks#934
Merged
Gbangbolaoluwagbemiga merged 1 commit intoJun 26, 2026
Conversation
HyperSafeD#622, HyperSafeD#626, HyperSafeD#737, HyperSafeD#609) Issue HyperSafeD#622 – vscode-extension: devcontainer integration tests + fixtures - Add src/devcontainer.test.ts with 17 Jest tests covering devcontainer.json structure, Soroban project detection via Cargo.toml, remote workspace URI handling, and shell-injection safety checks on postCreateCommand - Add fixture files: devcontainer.json, soroban-cargo.toml, plain-cargo.toml under src/test/fixtures/devcontainer/ - Extend .github/workflows/vscode-extension-ci.yml to trigger on .devcontainer/** path changes so devcontainer config is covered by CI - Fix pre-existing package.json JSON errors (duplicate keys) and tsconfig.json duplicate "exclude" field that broke test runs - Clean up src/analyzer.test.ts and src/test/analyzer.test.ts which had corrupted mixed content from multiple merged versions; consolidate into clean Jest-style files (83 tests → 83 tests, all passing) Issue HyperSafeD#626 – action.yml: unit tests + fixtures for inputs validation and defaults - Add tests/action/test_action_defaults.py with 24 unit tests covering: default value verification, all allowed severities/formats, boolean normalisation (true/yes/1/false/no/0/uppercase variants), write_env_file output content and line discipline, and fixture-driven validation - Add tests/action/fixtures/valid_action_inputs.yml (9 valid test cases) - Add tests/action/fixtures/invalid_action_inputs.yml (9 invalid test cases) - Add tests/__init__.py and tests/action/__init__.py to allow Python unittest discover to work correctly with -t option Issue HyperSafeD#737 – live testnet status widget on docs site - Add frontend/app/api/testnet-status/route.ts: Next.js API route that queries Soroban Testnet RPC (getLatestLedger) for network health and Stellar Expert REST API for per-contract live status; 30 s cache header - Add frontend/app/components/TestnetStatusWidget.tsx: client component showing network status, ledger number, per-contract Live/Offline badges, explorer links, last-refresh time, and manual refresh button - Add frontend/app/components/TestnetStatusWidget.test.tsx: 16 Vitest + Testing Library tests covering loading, success, offline, error, refresh, and accessibility scenarios - Update DOCUMENTATION_INDEX.md to link the widget and API route Issue HyperSafeD#609 – vscode-extension: output panel performance benchmarks + budgets - Add src/output-format.ts: centralised output-channel formatting module (formatLine, formatScanStart, formatCliExit, formatFindings, renderOutputBlock, truncateOutput) - Add src/output-format.test.ts: 29 Jest tests including performance budget assertions — 1 000 findings rendered in <5 ms, 10 000-char stderr line in <1 ms, 1 MB truncation in <10 ms, 100 mixed lines in <2 ms Closes HyperSafeD#622 Closes HyperSafeD#626 Closes HyperSafeD#737 Closes HyperSafeD#609
|
@leojay-net is attempting to deploy a commit to the gbangbolaoluwagbemiga's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@leojay-net 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! 🚀 |
fb53380
into
HyperSafeD:main
12 of 27 checks passed
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
This PR addresses four issues in a single pass, all centred on hardening tests, adding
fixtures, and delivering new production-ready features with CI coverage.
vscode-extension: devcontainer integration tests + fixturesaction.yml: unit tests + fixtures for inputs validation and defaultsvscode-extension: output panel performance benchmarks + budgets#622 – vscode-extension: devcontainer integration tests + fixtures
New files
vscode-extension/src/devcontainer.test.ts— 17 Jest tests covering devcontainer.json structure, Soroban project detection via Cargo.toml, remote workspace URI scheme detection, and shell-injection safety checksvscode-extension/src/test/fixtures/devcontainer/devcontainer.json— canonical fixturevscode-extension/src/test/fixtures/devcontainer/soroban-cargo.toml— Soroban project fixturevscode-extension/src/test/fixtures/devcontainer/plain-cargo.toml— non-Soroban project fixtureModified
.github/workflows/vscode-extension-ci.yml— added.devcontainer/**to path triggerspackage.jsonJSON parse errors (duplicatedescription/command/test/lintkeys) andtsconfig.jsonduplicateexcludefield that preventednpm testfrom runningsrc/analyzer.test.tsandsrc/test/analyzer.test.tswhich had corrupted content from multiple merged versions; all 83 pre-existing passing tests are preserved#626 – action.yml: unit tests + fixtures for inputs validation and defaults
New files
tests/action/test_action_defaults.py— 24 unit tests covering default values, all allowed severities and formats, boolean normalisation (true/yes/1, false/no/0, uppercase), write_env_file output content and security properties, and fixture-driven validationtests/action/fixtures/valid_action_inputs.yml— 9 valid input combinationstests/action/fixtures/invalid_action_inputs.yml— 9 invalid input combinations with expected error fragmentstests/__init__.pyandtests/action/__init__.pyforpython -m unittest discover -t .support#737 – Live testnet status widget on docs site
New files
frontend/app/api/testnet-status/route.ts— API route: Soroban RPCgetLatestLedgerfor network health + ledger; Stellar Expert REST API per contract;Promise.allSettledparallel fetch with 8 s timeouts; 30 s Cache-Control headerfrontend/app/components/TestnetStatusWidget.tsx— React client component with Live/Offline badges, animated status dots, ledger display, Stellar Expert deep-links, last-updated timestamp, manual refresh, and auto-refresh every 30 sfrontend/app/components/TestnetStatusWidget.test.tsx— 16 Vitest tests covering all widget states and accessibilityModified
DOCUMENTATION_INDEX.md— added entry linking the widget, API route, and LIVE_TESTNET.md#609 – vscode-extension: output panel performance benchmarks + budgets
New files
vscode-extension/src/output-format.ts— centralised output-channel formatting utilitiesvscode-extension/src/output-format.test.ts— 29 Jest tests with performance budget assertions: 1 000 findings rendered in <5 ms, 10 000-char stderr line in <1 ms, 1 MB truncation in <10 ms, 100 mixed lines in <2 msTest plan
cd vscode-extension && npm test— 112 Jest tests pass (5 suites)python -m unittest discover -s tests/action -p "test_*.py" -t .— 44 Python tests passcd frontend && npx vitest run app/components/TestnetStatusWidget.test.tsx— 16 tests passvscode-extension-ci.yml(Ubuntu / macOS / Windows) andci.ymlpassCloses #622
Closes #626
Closes #737
Closes #609