Daily Test Coverage ImproverResearch and Plan #12491
Replies: 13 comments 2 replies
-
|
Phase 2 complete. Created
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete: I've created the coverage steps configuration and opened a PR. PR: Daily Test Coverage Improver - Updates to complete configuration — please review The action mirrors the existing
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. I've created the coverage steps configuration at
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. I've created
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete — I've created the coverage-steps configuration and submitted a PR: https://github.com/Agoric/agoric-sdk/pull (see latest PR titled "Daily Test Coverage Improver - Updates to complete configuration"). The
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. I've created The action delegates to the existing
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete — I've created a draft PR with the coverage-steps configuration: The action sets up Node.js 22, installs dependencies, builds JS packages (skipping native toolchain packages like
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 re-run: Recreated
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. Created PR: "Daily Test Coverage Improver - Updates to complete configuration" with
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. I've created a pull request adding
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. Created The action mirrors the existing
|
Beta Was this translation helpful? Give feedback.
-
Phase 2 Complete — Coverage Steps ConfigurationCreated
Each step appends to A draft PR has been submitted: Daily Test Coverage Improver - Updates to complete configuration — please review and merge when ready. Once merged, Phase 3 will begin: identifying low-coverage packages, writing new tests, and submitting draft PRs with measured coverage improvements.
|
Beta Was this translation helpful? Give feedback.
-
|
Phase 2 complete. I've created Note: Local validation of the install/build steps was not possible in the sandboxed runner (no outbound network), but the YAML structure is confirmed valid and the commands mirror the existing
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary of Findings
Repository Overview
Agoric SDK is a JavaScript/TypeScript monorepo containing 57 packages, managed by Yarn workspaces and Lerna Lite. It implements Agoric's smart contract platform, including ERTP (Electronic Rights Transfer Protocol), Zoe (contract framework), SwingSet (vat-based computation engine), orchestration, and more.
Testing Framework
c8(V8 native coverage for Node.js)packages/*/test/**/*.test.*(JS and TS).test.js/.test.tsfiles across packagesCoverage Infrastructure
NODE_V8_COVERAGEenvironment variable andc8scripts/ci/generate-test-coverage-report.shcodecov.yamlKey Commands
How Tests Are Organized
test/directorypackage.json(under"ava"key) specifies"files": ["test/**/*.test.*"]@endo/init/debug.jsfor initializationtestscript (ava) andtest:c8(c8 --all ava)C8_OPTIONS=--clean=falseallows accumulation across packages for full-repo reportsCoverage Gap Analysis
By comparing source files to test files per package:
client-utilscosmic-protovatsorchestrationagoric-cliinter-protocolsparse-intstelemetryswingset-runnerportfolio-apiCoverage Report Notes
The
COVERAGE.mdfile notes an important limitation: lines from bundled code cannot be detected until source maps are implemented across all source-to-source transforms (@endo/bundle-source,@agoric/transform-metering, etc.). This means some coverage data may undercount actual exercised code.Improvement Plan
Strategy
client-utils,cosmic-proto,telemetry,swingset-runner, andsparse-intswhich have poor test-to-source ratiosPhase-by-Phase Approach
Immediate wins (Phase 3):
sparse-ints(currentlytestscript isexit 0)telemetrypackage utilitiesclient-utilsutilitiesgovernancepackageMedium-term:
cosmic-protogenerated code testingorchestrationtest coverage for edge casesinter-protocolfee/parameter management pathsQuestions/Clarifications Needed
client-utilssource count: The high source count (346 files) may include generated code — should those be excluded from coverage targets?test:xstargets — should coverage include XS tests as well?How to Control this Workflow
You can add comments to this discussion to provide feedback, adjustments to the plan, or direction on which packages to prioritize.
You can also use these commands to control the workflow:
gh aw disable daily-test-improver --repo Agoric/agoric-sdk gh aw enable daily-test-improver --repo Agoric/agoric-sdk gh aw run daily-test-improver --repo Agoric/agoric-sdk --repeat (number-of-repeats) gh aw logs daily-test-improver --repo Agoric/agoric-sdkWhat Happens Next
.github/actions/daily-test-improver/coverage-steps/action.ymlfile containing the CI steps needed to build the project, run tests, and produce a combined coverage reportBeta Was this translation helpful? Give feedback.
All reactions