Skip to content

Enforce coverage observability guardrails (codex) - #2363

Merged
numnx merged 2 commits into
feature/CODUX-143-qs-coverage-observability-and-ci-reliability-audit-3from
task/feature-codux-143-qs-coverage-observability-and--t01-codex-mr9l83a4
Jul 6, 2026
Merged

Enforce coverage observability guardrails (codex)#2363
numnx merged 2 commits into
feature/CODUX-143-qs-coverage-observability-and-ci-reliability-audit-3from
task/feature-codux-143-qs-coverage-observability-and--t01-codex-mr9l83a4

Conversation

@numnx

@numnx numnx commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Enforce coverage observability guardrails

Automated task PR opened by Code UX for T01.

📋 Summary

Sprint: Sprint 143 · QS: Coverage Observability and CI Reliability Audit · Task: T01

Strengthen Code UX coverage observability and CI reliability through enforceable tests, workflow hardening, structured observability guarantees, security validation, and aligned operational documentation without lowering coverage thresholds.

📝 Full Task Prompt
## Objective
Make coverage configuration observable and enforceable so global thresholds and the `src/server/activity-cache-service.ts` 80% line gate cannot silently regress.

## Scope
- `vitest.config.ts`
- `scripts/check-quality-guardrails.mjs`
- `tests/backend/scripts/quality-guardrails.test.ts`
- `tests/backend/docs/testing-docs-commands.test.ts`
- `docs/development/testing-and-quality.md`
- Current verification gap: coverage thresholds exist, but the audit should make lowered or missing thresholds fail with actionable output and documented commands.
- Desired guarantee: `pnpm run quality:guardrails` fails if global floors or the activity cache file threshold are removed, lowered, malformed, or excluded from coverage observability.

## Implementation Requirements
1. Extend the quality guardrail coverage scanner to validate that `vitest.config.ts` includes `src/**/*.ts`, retains the current or higher global thresholds, and retains the `src/server/activity-cache-service.ts` line threshold at 80 or higher.
2. Improve guardrail failure messages so they name the exact threshold, configured value, required minimum, and remediation command such as `pnpm run test:backend:coverage`.
3. Add focused tests in `tests/backend/scripts/quality-guardrails.test.ts` for missing include coverage, lowered global thresholds, malformed activity-cache-service threshold entries, and clear failure output.
4. Update `tests/backend/docs/testing-docs-commands.test.ts` if needed so documented coverage commands remain executable and accurately named.
5. Update `docs/development/testing-and-quality.md` with the enforced coverage observability guarantees and the focused commands for threshold changes.

## Constraints
- Never lower any threshold in `vitest.config.ts`; only preserve or raise existing values.
- Do not broaden exclusions or remove `src/server/activity-cache-service.ts` from coverage enforcement.
- Keep the guardrail file-based and deterministic; it must not run Vitest coverage internally.
- Avoid changing unrelated quality guardrails beyond coverage observability.

## Verification
- `pnpm run quality:guardrails`
- `pnpm run test:backend -- tests/backend/scripts/quality-guardrails.test.ts tests/backend/docs/testing-docs-commands.test.ts`
- `pnpm run test:backend:coverage`
- `pnpm run lint`
- Success means threshold regressions fail with actionable messages and current coverage configuration passes without lowering gates.

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.5

⏱️ Timing

Started 2026-07-06 19:02:57 UTC
Finished 2026-07-06 19:07:35 UTC
Duration 4m 38s

📊 Token Usage

Metric Value
Input tokens 110,022
Cached input tokens 732,800
Output tokens 7,534
Total tokens 850,356
Invocations 1
Tool calls 28
Active time 4m 2s

Included usage estimate (subscription/local login): $1.14

🌿 Branch Info

Base: feature/CODUX-143-qs-coverage-observability-and-ci-reliability-audit-3
Head: task/feature-codux-143-qs-coverage-observability-and--t01-codex-mr9l83a4


🤖 Generated by Code UX

@numnx
numnx merged commit 51f2615 into feature/CODUX-143-qs-coverage-observability-and-ci-reliability-audit-3 Jul 6, 2026
6 checks passed
@numnx
numnx deleted the task/feature-codux-143-qs-coverage-observability-and--t01-codex-mr9l83a4 branch July 6, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant