Skip to content

docs: fix agent instructions — coverage thresholds and PR quality rules#277

Merged
RobertLD merged 4 commits intomainfrom
fix/agent-instructions
Mar 2, 2026
Merged

docs: fix agent instructions — coverage thresholds and PR quality rules#277
RobertLD merged 4 commits intomainfrom
fix/agent-instructions

Conversation

@RobertLD
Copy link
Owner

@RobertLD RobertLD commented Mar 2, 2026

Fixes incorrect/missing guidance in agent instruction files that led to CI failures across PRs #274, #275, #276.

Changes

  • agents.md: Fix coverage threshold (was 80%, actual is 75/74/75/75 per vitest.config.ts)
  • agents.md: Change npm testnpm run test:coverage in checklist (CI runs test:coverage which enforces thresholds; npm test does not)
  • agents.md: Add checklist items: PR descriptions must match implementation, check HTTP resp.ok, don't expose secrets
  • .github/copilot-instructions.md: Same test:coverage fix with threshold values

Copilot AI review requested due to automatic review settings March 2, 2026 21:44
@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
libscope Ignored Ignored Preview Mar 2, 2026 11:08pm

Copy link

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

Updates contributor/agent guidance to reflect the repo’s actual coverage enforcement and PR-quality expectations, reducing CI failures caused by following outdated instructions.

Changes:

  • Corrected documented Vitest coverage thresholds to match vitest.config.ts.
  • Updated pre-push / pre-PR checklist commands to use npm run test:coverage (aligned with CI).
  • Added PR-quality checklist items (description fidelity, HTTP status handling, secret redaction).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
agents.md Fixes coverage threshold guidance, updates test command to test:coverage, and adds PR-quality checklist rules.
.github/copilot-instructions.md Aligns Copilot instructions with CI by requiring test:coverage and documenting the correct thresholds.

…mand, PR quality rules

- Fix incorrect coverage threshold (was 80%, actual is 75/74/75/75)
- Change 'npm test' to 'npm run test:coverage' in checklist (CI enforces thresholds)
- Add rules: PR descriptions must match implementation
- Add rules: always check HTTP response status (fetch resolves on 4xx/5xx)
- Add rules: never expose secrets in API responses

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RobertLD RobertLD force-pushed the fix/agent-instructions branch from 1b46c39 to 7e226e8 Compare March 2, 2026 21:47
RobertLD and others added 3 commits March 2, 2026 22:34
The envOverrides.indexing spread was missing from the config merge,
so LIBSCOPE_ALLOW_PRIVATE_URLS and LIBSCOPE_ALLOW_SELF_SIGNED_CERTS
environment variables were silently ignored.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add tests across low-coverage files to exceed the 74% branch threshold:

- Create db-validation.test.ts: full coverage of validateRow/validateCountRow
- schema.test.ts: add createVectorTable edge cases and migration error wrapping
- search.test.ts: add LIKE fallback filter tests (version, minRating, dates,
  source, tags, maxChunksPerDocument, contextChunks), FTS filter tests
- rag.test.ts: add Ollama/OpenAI provider error branches, token counting,
  default models, empty choices, status code handling
- packs.test.ts: add validation edge cases for metadata fields, description,
  version, documents array type
- graph.test.ts: add multi-chunk embedding averaging test
- watcher.test.ts: add non-file stat, missing filename, non-Error events,
  missing document on delete

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cover importFromBackup error branches: non-object backup, missing keys,
non-array documents, invalid document structure, missing metadata version,
and non-JSON file handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RobertLD RobertLD merged commit 90d5913 into main Mar 2, 2026
9 checks passed
@RobertLD RobertLD deleted the fix/agent-instructions branch March 2, 2026 23:52
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.

2 participants