Skip to content

📖 Add AI quality assurance documentation#4359

Merged
clubanderson merged 1 commit intomainfrom
docs/ai-quality-assurance
Apr 3, 2026
Merged

📖 Add AI quality assurance documentation#4359
clubanderson merged 1 commit intomainfrom
docs/ai-quality-assurance

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

@clubanderson clubanderson commented Apr 3, 2026

  • Analyze feedback comments from code review
  • Fix README.md: remove Playwright E2E from "Before merge" (not triggered on PRs), clarify API contract runs against ephemeral local backend, note ts-null-safety is strict fail-on-findings, change "Hourly coverage" to "Post-merge coverage"
  • Fix CONTRIBUTING.md: remove "9 hard CI gates" claim, use advisory language matching QA doc
  • Fix docs/AI-QUALITY-ASSURANCE.md: add path-filter caveat to PR checks section, removed Playwright E2E row (not triggered on PRs), fix Coverage Gate description (advisory/warning, not blocking), fix "Coverage hourly" → "Coverage on main" with accurate trigger description, update "What This Means" section

@clubanderson
Copy link
Copy Markdown
Collaborator Author

/lgtm
/approve

Copilot AI review requested due to automatic review settings April 3, 2026 00:43
@kubestellar-prow kubestellar-prow bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 3, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit fd67451
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69cf0ec62d2278000828d1e4

@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds repository documentation describing AI-assisted development quality gates/CI checks, and links it from top-level contributor-facing docs to address community concerns about regression risk.

Changes:

  • Add docs/AI-QUALITY-ASSURANCE.md describing PR checks, post-build safety checks, post-merge verification, and monitoring.
  • Add a new “Quality Assurance” section to README.md linking to the new document.
  • Add a reference to the new QA doc from CONTRIBUTING.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
README.md Adds a QA overview section and links to the detailed QA document.
docs/AI-QUALITY-ASSURANCE.md New detailed documentation for CI/QA checks and incident response model.
CONTRIBUTING.md Adds a pointer to the QA documentation from contributor guidance.

Console uses AI tools (GitHub Copilot, Claude Code) to accelerate development. Quality is maintained through **layered feedback loops** — every PR triggers the same automated checks regardless of author, and continuous monitoring catches what PR checks miss.

- **Before commit**: TypeScript build + Go build + 5 post-build safety checks + lint
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bullet claims ts-null-safety is a "ratcheted baseline" that only allows improvement, but the ts-null-safety job in .github/workflows/nil-safety.yml fails on any findings (no baseline/ratchet). Consider rewording to distinguish: nilaway + array-safety are ratcheted, while ts-null-safety is a strict fail-on-findings check.

Suggested change
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
- **Before merge**: ratcheted nil-safety and array-safety baselines, strict ts-null-safety (fail on findings), API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review

Copilot uses AI. Check for mistakes.
Console uses AI tools (GitHub Copilot, Claude Code) to accelerate development. Quality is maintained through **layered feedback loops** — every PR triggers the same automated checks regardless of author, and continuous monitoring catches what PR checks miss.

- **Before commit**: TypeScript build + Go build + 5 post-build safety checks + lint
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says the API contract check runs "against a live demo backend", but api-contract.yml actually builds and starts the backend locally (demo mode) on localhost:8080 and runs the contract script against that. Suggest rephrasing to "against an ephemeral locally-started demo backend" (or similar) to match the workflow behavior.

Suggested change
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract (against an ephemeral locally-started demo backend), Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review

Copilot uses AI. Check for mistakes.
Console uses AI tools (GitHub Copilot, Claude Code) to accelerate development. Quality is maintained through **layered feedback loops** — every PR triggers the same automated checks regardless of author, and continuous monitoring catches what PR checks miss.

- **Before commit**: TypeScript build + Go build + 5 post-build safety checks + lint
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This states Playwright runs "on every PR", but .github/workflows/playwright.yml is triggered on push (main/dev) and workflow_dispatch, not pull_request. If PR Playwright coverage is intended, either update the statement or reference the actual PR-triggered workflows (e.g., perf-ttfi, nil-safety, CodeQL, etc.).

Suggested change
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, coverage gate, TTFI performance, CodeQL, Copilot code review

Copilot uses AI. Check for mistakes.
- **Before commit**: TypeScript build + Go build + 5 post-build safety checks + lint
- **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, Playwright E2E, coverage gate, TTFI performance, CodeQL, Copilot code review
- **After merge**: Targeted Playwright tests run against production (`console.kubestellar.io`); failures reopen the original issue
- **Continuous**: Hourly coverage (12 shards), 4x daily QA, nightly E2E, nightly security scanning, real-time GA4 error tracking
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Hourly coverage" is called out here, but .github/workflows/coverage-hourly.yml currently has no schedule trigger—it's run on pushes to main (i.e., after merges). Consider rewording to avoid implying an hourly schedule unless there's an external scheduler not documented here.

Suggested change
- **Continuous**: Hourly coverage (12 shards), 4x daily QA, nightly E2E, nightly security scanning, real-time GA4 error tracking
- **Continuous**: Post-merge coverage (12 shards), 4x daily QA, nightly E2E, nightly security scanning, real-time GA4 error tracking

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +21
| `npm run lint` (ESLint) | Style violations, unsafe patterns, unused imports | ~10 seconds |
| `go build ./...` | Go compilation errors | ~5 seconds |
| **5 post-build safety checks** | Vendor corruption, missing chunks, MSW leak, bundle size regression, HTML integrity | <1 second (scans built files) |

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown tables use || at the start of each row, which renders as an extra empty column in most markdown renderers. Update the table rows to start with a single | so the tables render correctly on GitHub.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +26
The post-build checks (`web/scripts/check-vendor-safety.mjs`) run automatically after every `npm run build` — no separate step needed.

### Loop 2: PR Checks (Before Merge)

Every PR — human or AI — triggers these checks. Maintainers review results before merging.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR-level checks table should include the Array Safety ratcheted check, which runs as part of .github/workflows/nil-safety.yml (id: array-safety) and can fail PRs on regressions. Right now README mentions it, but this document’s PR-level table omits it.

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +26

Every PR — human or AI — triggers these checks. Maintainers review results before merging.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row implies Playwright E2E runs for PRs via playwright.yml, but that workflow is triggered on push (main/dev) rather than pull_request. Either adjust the workflow reference or reword this row to avoid claiming PR-level coverage that doesn’t currently run.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
Every PR — human or AI — triggers these checks. Maintainers review results before merging.

Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Coverage Gate is described like a blocking threshold, but coverage-gate.yml explicitly labels below-threshold results as "Warning only — not blocking" and uses continue-on-error. Consider stating that it posts a report and warns when files are <80%, rather than failing the PR.

Copilot uses AI. Check for mistakes.

| Signal | Frequency | Feedback |
|--------|-----------|----------|
| **Coverage hourly** | Every hour | Full test suite across 12 shards. Alerts if coverage drops >5%. |
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Coverage hourly" is listed as running every hour, but coverage-hourly.yml is triggered by pushes to main (and manual dispatch) and does not have a schedule: cron. Consider updating the frequency wording to match the actual triggers.

Suggested change
| **Coverage hourly** | Every hour | Full test suite across 12 shards. Alerts if coverage drops >5%. |
| **Coverage on `main`** | On push to `main` + manual dispatch | Full test suite across 12 shards. Alerts if coverage drops >5%. |

Copilot uses AI. Check for mistakes.

**Manual coding PRs are discouraged.** They take significantly longer to complete and review compared to agent-generated code. PRs that miss required patterns (isDemoData wiring, useCardLoadingState, locale strings, marketplace vs console) will be sent back — these are things coding agents catch automatically.

**All PRs — human or AI — must pass the same 9 hard CI gates before merge.** There is no separate path for AI-generated code. See [docs/AI-QUALITY-ASSURANCE.md](docs/AI-QUALITY-ASSURANCE.md) for the full list of quality gates, post-build safety checks, and our regression response model.
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This claims there are "9 hard CI gates before merge", which conflicts with this PR’s own QA doc language (advisory checks / no required status checks) and will also drift as workflows change. Consider rewording to avoid a fixed hard-gate count and align with the documented distinction between failing workflows vs GitHub-required status checks.

Suggested change
**All PRs — human or AI — must pass the same 9 hard CI gates before merge.** There is no separate path for AI-generated code. See [docs/AI-QUALITY-ASSURANCE.md](docs/AI-QUALITY-ASSURANCE.md) for the full list of quality gates, post-build safety checks, and our regression response model.
**All PRs — human or AI — are expected to satisfy the same CI and quality checks.** There is no separate path for AI-generated code. See [docs/AI-QUALITY-ASSURANCE.md](docs/AI-QUALITY-ASSURANCE.md) for the current list of checks, the distinction between advisory workflow failures and GitHub-required status checks, post-build safety checks, and our regression response model.

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 6 code suggestion(s) and 5 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • README.md (line 89): - **Before merge**: ratcheted nil-safety and array-safety baselines, strict ts-n...
  • README.md (line 89): - **Before merge**: nil-safety, ts-null-safety, array-safety, API contract (agai...
  • README.md (line 89): - **Before merge**: nil-safety, ts-null-safety, array-safety, API contract, cove...
  • README.md (line 91): - **Continuous**: Post-merge coverage (12 shards), 4x daily QA, nightly E2E, nig...
  • docs/AI-QUALITY-ASSURANCE.md (line 58): | **Coverage on main** | On push to main + manual dispatch | Full test suite...
  • CONTRIBUTING.md (line 15): **All PRs — human or AI — are expected to satisfy the same CI and quality checks...

Also address these general comments:

  • docs/AI-QUALITY-ASSURANCE.md (line 21): The markdown tables use || at the start of each row, which renders as an extra empty column in most markdown renderers
  • docs/AI-QUALITY-ASSURANCE.md (line 17): This section says every PR triggers these checks, but several workflows are path-filtered (e.g., api-contract only runs
  • docs/AI-QUALITY-ASSURANCE.md (line 26): The PR-level checks table should include the Array Safety ratcheted check, which runs as part of `.github/workflows/nil-
  • docs/AI-QUALITY-ASSURANCE.md (line 26): This row implies Playwright E2E runs for PRs via playwright.yml, but that workflow is triggered on push (main/dev) r
  • docs/AI-QUALITY-ASSURANCE.md (line 27): The Coverage Gate is described like a blocking threshold, but coverage-gate.yml explicitly labels below-threshold resu

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

Documents layered feedback loops preventing AI-generated regressions.

New CI checks in nil-safety.yml (ratcheted baselines — fail only on increase):
- Magic numbers in timers (baseline: 8)
- No-op test assertions like expect(true).toBe(true) (baseline: 5)
- Hardcoded route strings instead of ROUTES.* (baseline: 2)
- Cards missing useCardLoadingState unified controls (baseline: 1)
- Non-localized user-facing strings (baseline: 167)

Updated greetings.yml to link AI Quality Assurance doc in PR and issue
welcome messages so new contributors see the quality gates upfront.

Files: docs/AI-QUALITY-ASSURANCE.md, README.md, CONTRIBUTING.md,
  .github/workflows/nil-safety.yml, .github/workflows/greetings.yml,
  5 baseline files
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson clubanderson force-pushed the docs/ai-quality-assurance branch from 91984a5 to fd67451 Compare April 3, 2026 00:50
@clubanderson clubanderson merged commit ce079a8 into main Apr 3, 2026
6 of 8 checks passed
@kubestellar-prow kubestellar-prow bot deleted the docs/ai-quality-assurance branch April 3, 2026 00:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit ce079a8008b583788c7cc1df58bb6eaa0e1a143f.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

🔄 Auto-Applying Copilot Code Review

Copilot code review found 6 code suggestion(s) and 5 general comment(s)....

All suggestions have been applied. Here's a summary of each change:

README.md:

  • "Before merge" bullet: removed Playwright E2E (playwright.yml triggers on push to main/dev, not pull_request), clarified API contract runs against an ephemeral locally-started demo backend, noted ts-null-safety is strict fail-on-findings (not ratcheted like nil-safety/array-safety)
  • "Continuous" bullet: changed "Hourly coverage" → "Post-merge coverage" to match the actual trigger (coverage-hourly.yml runs on push to main, not a cron schedule)

CONTRIBUTING.md:

  • Removed "9 hard CI gates" claim; replaced with advisory language: "expected to satisfy the same CI and quality checks" — aligns with the QA doc's clarification that checks are advisory, not GitHub-required status checks

docs/AI-QUALITY-ASSURANCE.md:

  • Loop 2 intro: added path-filter caveat — api-contract, coverage-gate, and helm checks are path-filtered, not triggered on every PR
  • Removed Playwright E2E row from the PR checks table (same reason as README)
  • Updated API contract description: "ephemeral demo backend locally"
  • Updated Coverage gate description to reflect advisory behavior: "Warns when files are below 80% — advisory, not blocking (continue-on-error)"
  • Loop 4: renamed "Coverage hourly" → "Coverage on main" with frequency "On push to main + manual dispatch"
  • "What This Means" section: updated "Hourly coverage" → "Post-merge coverage (12 shards)"

Note: The original PR branch was deleted after merge and repository rules prevent recreating it, so these changes are committed locally on docs/ai-qa-review-corrections (based on current main). A maintainer will need to cherry-pick or apply these as a follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants