test(ci): require full-stack dual-chain release checks and measurable quality gates #51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Scope and source
Priority: P1. Gap coverage: GAP-037, GAP-041, GAP-043, GAP-044. Derived from GAP_1791945837.md, reviewed code commit
f8dbe93df953a78b17cb3304b717dcf84c4cd517. Currente476a68da09645c2308cbf47b90211fcaffcb7afadds only the report, so implementation findings remain applicable. Report evidence is local reproduction/source inspection unless explicitly proposed; no production exploit or current live-readiness claim.Coverage and sequencing: gap backlog tracker. Workstream 16. Dependencies: 01, 02, 03, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15.
Current codebase
GitLab has unit/DB/SPA smoke but omits production build, Playwright, lint/typechecked tests, coverage/advisories/image validation. Woodpecker intentionally checks file presence only. Browser E2E mocks Terra signatures/API and skips Legal; only Chromium. make test omits integration/E2E. Formatting/Clippy drift and unknown coverage hide untested concurrency and failure paths.
Why this implementation is needed
Passing mock tests or bootstrap CI does not prove a supported release. Changes need reproducible contract, browser, accessibility and nonfunctional checks across Terra/BSC.
Relevant files
.gitlab-ci.yml.woodpecker.yamlMakefile.githooks/pre-pushfrontend/playwright.config.tsfrontend/e2e/operatorMock.tsfrontend/e2e/vote.spec.tsfrontend/package.jsonfrontend/tsconfig.app.jsonfrontend/vitest.config.tsoperator-voting/tests/api_flow.rsledger/tests/ledger_integration.rsdeploy/docker/test-frontend-spa-fallback.shdocs/OPS.mdRecommended solution
Build a deterministic local full stack with isolated Postgres, mock HTTP chain providers and genuine ADR-36/EIP-191 fixture signing. Keep fast UI mocks but add production-like Legal SDK responses without bypass and real second-origin middleware. Cover lifecycle, amendments/scheduling/editors/results and errors on Chromium/Firefox/WebKit/mobile. Require production frontend/container builds, existing DB/SPA checks, pinned Rust format/Clippy and frontend lint/format/test typechecking plus advisories/secrets. Measure branch coverage with focused budgets on ledger/crypto/authorization, property/fuzz cases and retained failing seeds. Add representative load/soak, production-bundle CSP smoke, keyboard/a11y/mobile visual and migration/grant restore jobs. Make aggregate targets/reporting explicit and verify actual Forgejo/Woodpecker required contexts/branch protection, not only historical GitLab config. Extend the existing repository-root .woodpecker.yaml as required; do not introduce .woodpecker.yml or .woodpecker/.
Constraints and guardrails
Preserve standalone offchain advisory voting, no new smart contracts or archive-node dependency, BSC as a core electorate, raw 18-decimal integer balances and separate Terra/BSC address identities. Keep Legal fail-closed transactional UI and the proven DEX Terra/Bridge EVM connectors; no browser BSC balance RPC, seed/key prompt or embedded admin/model credential. API must retain a restricted role separate from the ledger writer. Freeze at actual opening, never at draft creation or a client-supplied height. Agents own design, implementation, review and evidence under repository guidance; do not shift approvals/tests to the human or invent PASS evidence.
Acceptance criteria
Supported release contexts cannot pass with placeholder file checks, missing test DB or omitted build/E2E. Both chains complete genuine signed lifecycle under real middleware/DB and Legal gating. Critical missing behaviors have direct tests, focused coverage and nonfunctional budgets from measurements. Artifacts identify commit/toolchains/test scope; separate staging wallet evidence remains required.
Test plan: supported paths, failure paths and concurrency
Green baseline and intentional broken build, CORS, signature, concurrency, Legal, dependency, privilege, migration and CSP fixtures demonstrate gate failure. Browser/happy/error/permission/race matrices across supported engines/viewports; fuzz/property parsing/amount/crypto/Unicode canonicalization. Clean pinned install, production image actual JS requests, load/soak freeze/lists/threads, accessibility/visual and backup restore. Missing DB must fail required jobs before any destructive command.
Test plan: attack, hack and abuse vectors
CI skip/bypass or secret leak in artifacts, untrusted PR scripts/cache poisoning, malicious event/HTML/signature fuzz inputs, worker/rate-limit abuse and fixture keys accidentally enabling production. Isolate synthetic keys/providers and prohibit prod credentials/data; branch protection must require real product contexts.
Verification and completion criteria
Attach real required-context configuration and a full green commit-specific run plus deliberate-failure receipts, coverage/fuzz/performance/browser artifacts and toolchain versions. Record which tests are mocked versus full-stack versus real wallet; no inferred coverage/load/live PASS.
Record commit and pinned toolchain, commands/results and sanitized artifacts. Relevant Rust changes require
cargo test --workspace --libplus isolated Postgres integration (explicit guarded LEDGER_TEST_DATABASE_URL); frontend changes requirenpm testand production build plus relevant browser cases. Run secret scanning for new fixtures/config. Exercise fresh/upgrade migrations when schema/grants change; report skipped/live-only checks explicitly.