Skip to content

docs(#1776): add collection change pattern to AGENTS.md#1777

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1776-doc-collection-pattern
Open

docs(#1776): add collection change pattern to AGENTS.md#1777
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/1776-doc-collection-pattern

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown

Add a row to the Common Change Patterns table documenting testing expectations for new collection definitions. The new entry clarifies that collections are metadata-only definition files that do not require new tests themselves, since the CLI repo tests collection filtering and make conventions-check validates dependency-collection superset constraints. Rules introduced alongside a collection still need _test.rego coverage.


Closes #1776

Post-script verification

  • Branch is not main/master (agent/1776-doc-collection-pattern)
  • Secret scan passed (gitleaks — e562e23edce2af210375d071e17645b0fb123691..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:34 AM UTC · Completed 9:38 AM UTC
Commit: 87c4a29 · View workflow run →

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unit-tests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fullsend-ai-review

fullsend-ai-review Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review

Findings

Medium

Low

  • [line length / readability] AGENTS.md:66 — The new collection bullet point (50 words, 385 chars) is roughly 2x the length of the longest existing entry (21 words, 186 chars). It packs the instruction, a characterization, two rationale clauses, and a caveat into a single list item. While the OCI blob entry also includes rationale, the new entry is substantially longer and denser than any sibling. Consider splitting the content so the first clause stays imperative and concise, matching the sibling style.
Previous run

Review — ✅ Approve

Scope: 1 file changed (AGENTS.md), 1 line added — documentation only.

This PR adds a new row to the "Common Change Patterns" table in AGENTS.md, documenting testing expectations for new collection definitions. The change directly implements issue #1776.

Verified claims

All verifiable assertions in the added documentation were checked against the codebase:

  • Collection path pattern policy/*/collection/<name>/ — confirmed. policy/release/collection/ contains 9 collection directories. The wildcard pattern is consistent with the existing Architecture section in AGENTS.md.
  • "metadata-only definition file" — confirmed. Collection .rego files (e.g., redhat_security.rego) contain only a package declaration with METADATA annotations and no logic.
  • "No new tests needed" — confirmed. No _test.rego files exist under any policy/*/collection/ directory.
  • make conventions-check validates dependency-collection superset constraints — confirmed. checks/annotations.rego (line 155) implements this validation.
  • CLI repo tests collection filtering — cross-repo reference to internal/evaluator/filters_test.go in conforma/cli. Cannot verify from this repo, but consistent with the discussion in Document testing expectations for new collection definitions in AGENTS.md #1776.

Assessment

Dimension Status
Correctness ✅ All claims accurate
Security ✅ No concerns (docs only)
Intent & coherence ✅ Matches #1776 precisely
Style/conventions ✅ Table formatting consistent
Documentation currency ✅ Content is current
Cross-repo contracts ✅ No code changes

No findings. Clean documentation change with verified accuracy.


Protected paths detected — this PR modifies files under one or more
protected paths. The review agent cannot approve PRs that touch these paths.
A human reviewer must approve this PR.

Protected files in this PR:

  • AGENTS.md

Labels: PR adds documentation for collection change patterns

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment documentation Improvements or additions to documentation labels Jul 15, 2026
@simonbaird

Copy link
Copy Markdown
Member

This is right on the edge of worthless/harmless-but-maybe-some-value. Let's merge I guess.

@simonbaird

Copy link
Copy Markdown
Member

/fs-fix please rebase and resolve the conflict.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jul 21, 2026

Copy link
Copy Markdown
Author

🤖 Finished Fix · ✅ Success · Started 1:55 PM UTC · Completed 2:09 PM UTC
Commit: 87c4a29 · View workflow run →

Add a row to the Common Change Patterns table documenting
testing expectations for new collection definitions. The new
entry clarifies that collections are metadata-only definition
files that do not require new tests themselves, since the CLI
repo tests collection filtering and make conventions-check
validates dependency-collection superset constraints. Rules
introduced alongside a collection still need _test.rego
coverage.

Closes #1776
@fullsend-ai-coder

Copy link
Copy Markdown
Author

🔧 Fix agent — iteration 1 (human-triggered)

Rebased onto origin/main and resolved AGENTS.md conflict. The Common Change Patterns section was reformatted from table to bullet list on main, and a basic collection entry already existed. Merged the PR's additional testing-expectations detail into the existing bullet point.

Fixed (1):

  1. rebase and resolve conflict: Rebased agent/1776-doc-collection-pattern onto origin/main and resolved merge conflict in AGENTS.md. Main had reformatted the Common Change Patterns section from a table to a bullet list and already had a basic collection entry. Resolved by keeping the bullet-list format and enhancing the existing collection entry with the PR's additional detail about testing expectations (no tests needed for the collection itself, CLI repo tests filtering, conventions-check validates constraints, rules alongside collection still need _test.rego coverage).

Tests: passed

Updated by fullsend fix agent

@fullsend-ai-coder
fullsend-ai-coder Bot force-pushed the agent/1776-doc-collection-pattern branch from 74eaa5a to 219f1c9 Compare July 21, 2026 14:09
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 21, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:10 PM UTC · Completed 2:21 PM UTC
Commit: 87c4a29 · View workflow run →

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See the review comment for full details.

Comment thread AGENTS.md
- **Add a shared library function:** see `policy/lib/tekton/` for reference implementation (must have test coverage)
- **Fetch and parse an OCI blob:** use `oci.parsed_blob(ref)` from `data.lib.oci`, not `json.unmarshal(ec.oci.blob(ref))` directly. A Regal lint rule (`prefer-parsed-blob`) enforces this
- **Add a new collection:** follow the pattern in `policy/release/collection/` — import specific policy packages
- **Add a new collection:** follow the pattern in `policy/release/collection/` — metadata-only definition file; no new tests needed for the collection itself since the CLI repo tests collection filtering and `make conventions-check` validates dependency-collection superset constraints. If new rules are added alongside the collection, those rules need `_test.rego` coverage as usual

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] protected-path

AGENTS.md is a protected path. The change is authorized by Issue #1776 and the PR description explains the rationale, but human approval is always required for protected-path changes regardless of context.

Comment thread AGENTS.md
- **Add a shared library function:** see `policy/lib/tekton/` for reference implementation (must have test coverage)
- **Fetch and parse an OCI blob:** use `oci.parsed_blob(ref)` from `data.lib.oci`, not `json.unmarshal(ec.oci.blob(ref))` directly. A Regal lint rule (`prefer-parsed-blob`) enforces this
- **Add a new collection:** follow the pattern in `policy/release/collection/` — import specific policy packages
- **Add a new collection:** follow the pattern in `policy/release/collection/` — metadata-only definition file; no new tests needed for the collection itself since the CLI repo tests collection filtering and `make conventions-check` validates dependency-collection superset constraints. If new rules are added alongside the collection, those rules need `_test.rego` coverage as usual

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] line length / readability

The new collection bullet point (50 words, 385 chars) is roughly 2x the length of the longest existing entry (21 words, 186 chars). It packs the instruction, a characterization, two rationale clauses, and a caveat into a single list item. While the OCI blob entry also includes rationale, the new entry is substantially longer and denser than any sibling.

Suggested fix: Split the content so the first clause stays imperative and concise, matching the sibling style. Move the rationale into a parenthetical or a second sentence.

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

Labels

documentation Improvements or additions to documentation requires-manual-review Review requires human judgment size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document testing expectations for new collection definitions in AGENTS.md

1 participant