test(ci): require full-stack dual-chain release checks and measurable quality gates #51

Open
opened 2026-10-14 03:12:12 +00:00 by PlasticDigits · 0 comments
Owner

Scope and source

Priority: P1. Gap coverage: GAP-037, GAP-041, GAP-043, GAP-044. Derived from GAP_1791945837.md, reviewed code commit f8dbe93df953a78b17cb3304b717dcf84c4cd517. Current e476a68da09645c2308cbf47b90211fcaffcb7af adds 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

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 --lib plus isolated Postgres integration (explicit guarded LEDGER_TEST_DATABASE_URL); frontend changes require npm test and 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.

<!-- voting-gap-1791945837:16 --> ## Scope and source **Priority:** P1. **Gap coverage:** GAP-037, GAP-041, GAP-043, GAP-044. Derived from [GAP_1791945837.md](https://git.cl8y.com/code/voting/src/branch/main/gaps/GAP_1791945837.md), reviewed code commit `f8dbe93df953a78b17cb3304b717dcf84c4cd517`. Current `e476a68da09645c2308cbf47b90211fcaffcb7af` adds 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](https://git.cl8y.com/code/voting/issues/35). Workstream **16**. Dependencies: [01](https://git.cl8y.com/code/voting/issues/36), [02](https://git.cl8y.com/code/voting/issues/37), [03](https://git.cl8y.com/code/voting/issues/38), [05](https://git.cl8y.com/code/voting/issues/40), [06](https://git.cl8y.com/code/voting/issues/41), [07](https://git.cl8y.com/code/voting/issues/42), [08](https://git.cl8y.com/code/voting/issues/43), [09](https://git.cl8y.com/code/voting/issues/44), [10](https://git.cl8y.com/code/voting/issues/45), [11](https://git.cl8y.com/code/voting/issues/46), [12](https://git.cl8y.com/code/voting/issues/48), [13](https://git.cl8y.com/code/voting/issues/49), [14](https://git.cl8y.com/code/voting/issues/50), [15](https://git.cl8y.com/code/voting/issues/47). ## 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`](https://git.cl8y.com/code/voting/src/branch/main/.gitlab-ci.yml) - [`.woodpecker.yaml`](https://git.cl8y.com/code/voting/src/branch/main/.woodpecker.yaml) - [`Makefile`](https://git.cl8y.com/code/voting/src/branch/main/Makefile) - [`.githooks/pre-push`](https://git.cl8y.com/code/voting/src/branch/main/.githooks/pre-push) - [`frontend/playwright.config.ts`](https://git.cl8y.com/code/voting/src/branch/main/frontend/playwright.config.ts) - [`frontend/e2e/operatorMock.ts`](https://git.cl8y.com/code/voting/src/branch/main/frontend/e2e/operatorMock.ts) - [`frontend/e2e/vote.spec.ts`](https://git.cl8y.com/code/voting/src/branch/main/frontend/e2e/vote.spec.ts) - [`frontend/package.json`](https://git.cl8y.com/code/voting/src/branch/main/frontend/package.json) - [`frontend/tsconfig.app.json`](https://git.cl8y.com/code/voting/src/branch/main/frontend/tsconfig.app.json) - [`frontend/vitest.config.ts`](https://git.cl8y.com/code/voting/src/branch/main/frontend/vitest.config.ts) - [`operator-voting/tests/api_flow.rs`](https://git.cl8y.com/code/voting/src/branch/main/operator-voting/tests/api_flow.rs) - [`ledger/tests/ledger_integration.rs`](https://git.cl8y.com/code/voting/src/branch/main/ledger/tests/ledger_integration.rs) - [`deploy/docker/test-frontend-spa-fallback.sh`](https://git.cl8y.com/code/voting/src/branch/main/deploy/docker/test-frontend-spa-fallback.sh) - [`docs/OPS.md`](https://git.cl8y.com/code/voting/src/branch/main/docs/OPS.md) ## Recommended 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 --lib` plus isolated Postgres integration (explicit guarded LEDGER_TEST_DATABASE_URL); frontend changes require `npm test` and 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/voting#51
No description provided.