Org policy file: devready check --policy FILE

Open
#44 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli, devtools

Research direction

Start with section 6 of docs/plans/features-5-8.md and the existing check_tool version checks and _compare logic; the issue recommends beginning after #43. The plan spans policy loading and validation, evaluation, CLI and environment options, GitHub Action support, starter file generation, and documentation. Follow its one PR per step sequence; done means the stated policy results and exit behavior work, invalid content produces one policy.file ERROR without echoing contents, and organization guidance is documented.

Written by the indexing model from the issue text.

Description

enhancement

Problem: Platform teams want one minimum toolchain for every repo ("Git >= 2.40, Node >= 20, Docker required") without editing each repo's .devready.json, whose keys are frozen in 1.x.

Do: follow section 6 of the team features plan. One PR per step:

  • checks/policy.py: loader and validator, with hostile-content tests (file content is never echoed).
  • Requirement evaluation reusing check_tool versions and _compare; policy.* ids, explain.py entries, docs/checks.md rows.
  • --policy FILE flag and DEVREADY_POLICY env var; works with --recursive (#43), applying to every package.
  • GitHub Action policy input; devready init --policy prints a starter file.
  • Docs: a "Using DevReady across an organization" guide.

Policy file shape (unknown keys make the file invalid, reported as one ERROR result):

{"policy_version": 1,
 "require": {"node": ">=20", "python": ">=3.11", "git": ">=2.40", "docker": "*"},
 "skip": ["platform.autocrlf"],
 "env": ["NPM_TOKEN"]}

Done when:

  • devready check --policy org.json reports policy.<tool>.require results, and a policy fail exits 1.
  • A repo's .devready.json skip cannot skip policy.* ids.
  • An invalid policy file gives one policy.file ERROR and never prints its contents.

Notes:

  • Local files only. Remote URLs stay out (network checks need a design review first, see ROADMAP.md); teams vendor the file or fetch it in CI.
  • DEVREADY_POLICY holds a path; its value is never printed.
  • Best started after #43.
Dominant language
Python
Stars
2
Forks
3
Avg merge
10h 51m
Merged PRs (30d)
40

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Evalogical-Inc/devReady

All issues in Evalogical-Inc/devReady

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.