Skip to content

feat(review): pinned open-source sample repositories across languages - #532

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/502-pinned-sample-repos
Sep 24, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/502-pinned-sample-repos

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #502.

Why

devops ai is meant for any technical project. Its live checks had used this Python repository and one set of Ansible playbooks. This adds the sample repositories that #503–#506 build on: defect templates per language, the cross-language validation run, and AST support.

Catalog (src/devops_cli/ai/review/samples.json)

16 repositories cover all 12 categories. Each is pinned to a full commit SHA, with its SPDX licence, licence files and the paths the tooling is run over.

Category Samples
Python click (BSD-3-Clause)
TypeScript/JavaScript ky (MIT, TS), express (MIT, JS)
Go cobra (Apache-2.0)
Rust serde_json (MIT OR Apache-2.0)
Java gson (Apache-2.0)
C#/.NET serilog (Apache-2.0)
C/C++ cJSON (MIT), fmt (MIT)
Terraform terraform-aws-vpc (Apache-2.0)
Kubernetes/Helm prometheus-node-exporter chart, kubernetes/examples (Apache-2.0)
Dockerfiles docker-nginx (BSD-2-Clause), docker-library/python (MIT)
Shell nvm (MIT)
Technical documentation kind's user guide (Apache-2.0)

Every repository was pushed to within the last seven months, and its working tree is 13 MiB or less.

Policy enforced by the model (samples.py)

  • Licences: permissive only (MIT, Apache-2.0, BSD-2/3-Clause, or an SPDX expression of them).
  • Commits: full SHAs, never branches or tags.
  • Repositories: https:// URLs, or file:// for local mirrors and tests. No other git transport.
  • Names and paths: they stay inside the samples directory, and names are unique.

Commands

  • devops review samples fetch [NAMES] [--category]:
    • fetches only the pinned commit, at depth one with GIT_TERMINAL_PROMPT=0, into .data/samples/<name>;
    • verifies the commit, licence files and paths;
    • leaves a checkout already at its commit alone and moves a stale one;
    • a dry run lists what it would fetch.
  • devops review samples list [--category]: the catalog, and whether each sample is fetched.
  • Setting: data.samples_dir / DEVOPS_CLI_DATA_SAMPLES_DIR (default .data/samples).
  • Docs: regenerated with devops docs generate --sync-readme.

Verification

devops review samples fetch fetched all 16 samples from GitHub in 17 s (59 MB), each verified. A second fetch changed nothing.

Test plan

  • tests/test_review_samples.py (23 tests):

    • catalog coverage and policy;
    • rejected entries: copyleft licence, branch or tag, http:// or ext:: URL, escaping path;
    • selection by name and category;
    • fetching from local repositories: pinned commit only, no refetch, stale checkout moved, missing licence file, path or commit;
    • the list, fetch and dry-run commands.

    No test touches the network.

  • uv run devops ci --force: all 13 gates pass

devops ai is meant for any technical project, but its live checks had used this Python
repository and one set of Ansible playbooks.

A checked-in catalog names 16 permissively licensed repositories across all 12
categories: Python, TypeScript/JavaScript, Go, Rust, Java, C#/.NET, C/C++, Terraform,
Kubernetes/Helm, Dockerfiles, shell and technical documentation. Each is pinned to a
full commit SHA with its SPDX licence, licence files and the paths the tooling is run
over. The model enforces the policy:
- permissive licences only;
- exact commits;
- https or file URLs only;
- paths inside the checkout.

`devops review samples fetch` takes only the pinned commit, at depth one, into
.data/samples/<name> (data.samples_dir) and verifies the commit, licence files and
paths. `devops review samples list` shows the catalog and what is fetched. Tests fetch
from local repositories, so CI stays offline.

Closes #502
@dan-petty dan-petty added this to the v0.2.23 milestone Sep 24, 2026
@dan-petty dan-petty added type/feature Type feature: a new function scope/review Multi-persona code review engine, verification, and findings priority/p1-high Priority P1: high-impact work for the next planned milestone labels Sep 24, 2026
@dan-petty
dan-petty merged commit 82b94b5 into release/v0.2.23 Sep 24, 2026
7 checks passed
@dan-petty
dan-petty deleted the feat/502-pinned-sample-repos branch September 24, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1-high Priority P1: high-impact work for the next planned milestone scope/review Multi-persona code review engine, verification, and findings type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant