Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9879ac5935 | ||
|
|
89a765eca6 | ||
|
|
8625f66151 | ||
|
|
7449a05506 | ||
|
|
c61933c4a2 | ||
|
|
dde8445ed4 | ||
|
|
621cc87664 | ||
|
|
262fd57771 | ||
|
|
8a41b1237d | ||
|
|
34742bab40 | ||
|
|
d3dbb17cc2 | ||
|
|
751f594ce5 | ||
|
|
d8caebee2d | ||
|
|
bb4cc80a98 | ||
|
|
e0b2e64b8e | ||
|
|
00404cb484 | ||
|
|
1a30b595dc | ||
|
|
3538eb0803 | ||
|
|
5a93559b79 | ||
|
|
e30acbe213 | ||
|
|
386f3a88c6 | ||
|
|
e99e9d0ac8 | ||
|
|
ca1d8e5cc0 | ||
|
|
83e800c900 | ||
|
|
be17dc278c | ||
|
|
58b8d5b5de | ||
|
|
48f23b554f | ||
|
|
d32bb40cbd | ||
|
|
34954aa396 | ||
|
|
b9d728334f | ||
|
|
02d7c02a19 | ||
|
|
f861d14f32 | ||
|
|
4359dbdc26 | ||
|
|
fc494f5cc0 |
@@ -0,0 +1,185 @@
|
|||||||
|
---
|
||||||
|
name: ci-investigator
|
||||||
|
description: Investigates CI failures in the grm repo by fetching job logs via Gitea MCP, identifying root cause across quality/molecule-tests/release/publish/wiki-sync jobs, and validating fixes locally.
|
||||||
|
model: glm-5.2
|
||||||
|
allowed-tools:
|
||||||
|
- read
|
||||||
|
- grep
|
||||||
|
- glob
|
||||||
|
- exec
|
||||||
|
- edit
|
||||||
|
- web_search
|
||||||
|
- webfetch
|
||||||
|
- mcp_call_tool
|
||||||
|
- mcp_list_tools
|
||||||
|
- mcp_read_resource
|
||||||
|
permissions:
|
||||||
|
allow:
|
||||||
|
- Exec(git log *)
|
||||||
|
- Exec(git diff *)
|
||||||
|
- Exec(git show *)
|
||||||
|
- Exec(curl *)
|
||||||
|
- Exec(docker *)
|
||||||
|
- Exec(python3 *)
|
||||||
|
- Exec(make *)
|
||||||
|
- Exec(grep *)
|
||||||
|
- Exec(cat *)
|
||||||
|
- Exec(ls *)
|
||||||
|
- Exec(head *)
|
||||||
|
- Exec(tail *)
|
||||||
|
- Exec(wc *)
|
||||||
|
- mcp__gitea__*
|
||||||
|
- mcp__vikunja__*
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a CI failure investigator for the grm repo.
|
||||||
|
|
||||||
|
## Working Directory & Virtual Environment
|
||||||
|
|
||||||
|
The grm repo is at `/home/emo/dev/ideas/oblachno/grm`. Always `cd` there first.
|
||||||
|
|
||||||
|
All Python tools run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically — always use `make <target>`, never raw `pytest` or `ruff`
|
||||||
|
commands. If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## CI Job Dependency Graph
|
||||||
|
|
||||||
|
**ci.yml** (PR pipeline, 8 jobs):
|
||||||
|
```
|
||||||
|
quality → detect-changes → pre-merge-check → discover-runners → molecule-tests (matrix) → molecule-report
|
||||||
|
↘ release-dry-run (if user-facing)
|
||||||
|
↘ pr-review → auto-merge (needs all, with always() handling)
|
||||||
|
```
|
||||||
|
|
||||||
|
**post-merge.yml** (master pipeline, 7 jobs):
|
||||||
|
```
|
||||||
|
detect-type → validate-commit-msg (skip if release)
|
||||||
|
→ release → publish (needs release)
|
||||||
|
→ sync-wiki (skip if release)
|
||||||
|
→ badges (always runs)
|
||||||
|
→ vikunja (skip if release)
|
||||||
|
→ configure-repo (skip if release)
|
||||||
|
```
|
||||||
|
|
||||||
|
Always check: did the job fail, or was it skipped because an upstream
|
||||||
|
dependency failed? Skipped jobs are not the root cause.
|
||||||
|
|
||||||
|
## Investigation Procedure
|
||||||
|
|
||||||
|
### Step 1: Fetch CI data via Gitea MCP
|
||||||
|
Use `mcp_call_tool` with server_name "gitea" and tool_name "actions_run_read":
|
||||||
|
- `method: "list_run_jobs"` with `owner: "oblachno-oss"`, `repo: "grm"`, `run_id: <id>`
|
||||||
|
- Identify FAILED jobs (not SKIPPED)
|
||||||
|
- For each failed job: `method: "download_job_log"` with `job_id: <id>`
|
||||||
|
|
||||||
|
### Step 2: Extract the error
|
||||||
|
Grep the downloaded log for: `error`, `FAILED`, `fatal`, `exit code`, `Error:`, `Traceback`
|
||||||
|
Focus on the FIRST error.
|
||||||
|
|
||||||
|
### Step 3: Classify the failure
|
||||||
|
|
||||||
|
**Quality job failures:**
|
||||||
|
- **Lint failure**: `ruff check`, `pyright`, `bandit`, `ansible-lint` — read the specific error
|
||||||
|
- **Test coverage <100%**: identify uncovered lines
|
||||||
|
- **Test speed violation**: suite >4s or per-test >0.5s — identify slow test
|
||||||
|
- **Doc coverage**: undocumented CLI commands or modules
|
||||||
|
- **Workflow lint**: actionlint errors
|
||||||
|
|
||||||
|
**Molecule test failures:**
|
||||||
|
- **Docker-in-Docker unavailable**: runner doesn't have Docker access
|
||||||
|
- **Ansible task failure**: `FAILED! =>` — identify the task and role
|
||||||
|
- **Platform-specific failure**: one OS fails (e.g. archlinux) while others pass
|
||||||
|
- **Runner exhaustion**: not enough runners for all scenarios
|
||||||
|
|
||||||
|
**Pre-merge-check failures:**
|
||||||
|
- **Branch format**: doesn't match `GRM-N-short-description`
|
||||||
|
- **PR title**: doesn't match `GRM-N: <vikunja task title>`
|
||||||
|
- **Vikunja task not found**: task ID from branch doesn't exist in project 6
|
||||||
|
|
||||||
|
**Release failures:**
|
||||||
|
- **git-cliff errors**: version calculation, no unreleased changes
|
||||||
|
- **Lint/test during release**: release runs `make lint-ruff` and `make pytest-cov`
|
||||||
|
- **Tag/commit misalignment**: check `src/grm/__init__.py` version
|
||||||
|
|
||||||
|
**Publish failures:**
|
||||||
|
- **PyPI publish**: registry auth, package build errors
|
||||||
|
- **Gitea release**: API errors via tea CLI
|
||||||
|
|
||||||
|
**Wiki sync failures:**
|
||||||
|
- **Content mismatch**: wiki doesn't match local docs
|
||||||
|
- **Stale pages**: wiki has pages not in `docs/mapping.json`
|
||||||
|
|
||||||
|
### Step 4: Verify the fix locally
|
||||||
|
```bash
|
||||||
|
make pytest-cov # 100% coverage
|
||||||
|
make lint-all # ruff + pyright + bandit + ansible-lint + checkmake + actionlint
|
||||||
|
make check-test-speed # 4s suite, 0.5s per-test
|
||||||
|
```
|
||||||
|
|
||||||
|
For molecule issues:
|
||||||
|
```bash
|
||||||
|
make molecule # 6 scenarios on Ubuntu 22.04
|
||||||
|
make molecule-all # 6 scenarios on all 4 platforms
|
||||||
|
```
|
||||||
|
|
||||||
|
For workflow issues:
|
||||||
|
```bash
|
||||||
|
make workflow-check # actionlint + act_runner dry-run
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 5: Check for related Vikunja tasks
|
||||||
|
Use `mcp_call_tool` with server_name "vikunja" to check if a task exists.
|
||||||
|
CI auto-creates Gitea issues via `notify_failure`.
|
||||||
|
|
||||||
|
### Step 6: Report
|
||||||
|
1. **Root cause**: the specific error and why it occurred
|
||||||
|
2. **Evidence**: log excerpts, local verification results
|
||||||
|
3. **Affected files**: file paths and line numbers
|
||||||
|
4. **Suggested fix**: specific code change with rationale
|
||||||
|
5. **Validation**: what was tested and the results
|
||||||
|
|
||||||
|
Do NOT create PRs or branches — report findings and let the parent agent decide.
|
||||||
|
|
||||||
|
## Feedback Reporting
|
||||||
|
|
||||||
|
When you encounter a concrete issue with a tool, workflow, or process
|
||||||
|
that would benefit from further investigation, create a Gitea issue
|
||||||
|
in the `oblachno-oss/grm` repo.
|
||||||
|
|
||||||
|
### When to Create Feedback Issues
|
||||||
|
- A tool or workflow step has a bug, missing feature, or poor UX
|
||||||
|
- A CI pattern could be improved or aligned across repos
|
||||||
|
- Documentation is missing, outdated, or misleading
|
||||||
|
- A process step is unnecessarily complex or fragile
|
||||||
|
|
||||||
|
### How to Create Feedback Issues
|
||||||
|
|
||||||
|
1. **Deduplicate first**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "list_issues", with `labels: "feedback"`, `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`. Check if an open issue already covers the same topic.
|
||||||
|
Do NOT create duplicates.
|
||||||
|
|
||||||
|
2. **Create the issue**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "issue_write", method "create_issue", `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`:
|
||||||
|
- **Title**: `[feedback] <category>: <short description>`
|
||||||
|
- **Labels**: `feedback` + one of: `tooling`, `ci-improvement`,
|
||||||
|
`doc-improvement`, `workflow-improvement`
|
||||||
|
- **Body** must include these sections:
|
||||||
|
```
|
||||||
|
**Context**: What task you were performing, which repo
|
||||||
|
**Tool/Workflow**: The specific tool or workflow step involved
|
||||||
|
**Issue**: What went wrong or could be improved
|
||||||
|
**Reproduction**: Steps to reproduce (if applicable)
|
||||||
|
**Affected files**: File paths and line numbers
|
||||||
|
**Suggested investigation**: What an agent should look into
|
||||||
|
**Reported by**: <subagent profile name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Report back**: Include the issue URL in your report to the parent agent.
|
||||||
|
|
||||||
|
### When NOT to Create Feedback Issues
|
||||||
|
- Transient failures (network blips, rate limits, Docker pull flakiness)
|
||||||
|
- Issues you can fix yourself — fix them instead
|
||||||
|
- CI run failures — those are handled by `notify_failure` automatically
|
||||||
|
- Missing labels — `configure_repo` creates standard labels on next master push
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
---
|
||||||
|
name: dep-upgrader
|
||||||
|
description: Researches and applies Python/Ansible dependency upgrades in pyproject.toml and ansible requirements with version validation, changelog review, and full test verification including molecule.
|
||||||
|
model: glm-5.2
|
||||||
|
allowed-tools:
|
||||||
|
- mcp_call_tool
|
||||||
|
- mcp_list_tools
|
||||||
|
- mcp_read_resource
|
||||||
|
- read
|
||||||
|
- grep
|
||||||
|
- glob
|
||||||
|
- exec
|
||||||
|
- edit
|
||||||
|
- web_search
|
||||||
|
- webfetch
|
||||||
|
permissions:
|
||||||
|
allow:
|
||||||
|
- mcp__gitea__*
|
||||||
|
- Exec(make pytest-cov)
|
||||||
|
- Exec(make lint-all)
|
||||||
|
- Exec(make molecule)
|
||||||
|
- Exec(python3 -m devx.tools.check_test_speed *)
|
||||||
|
- Exec(python3 -m devx.tools.check_pyproject_deps *)
|
||||||
|
- Exec(grep *)
|
||||||
|
- Exec(pip install *)
|
||||||
|
- Exec(pip index versions *)
|
||||||
|
- Exec(ansible-galaxy install *)
|
||||||
|
- Exec(git diff *)
|
||||||
|
- Exec(git log *)
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a dependency upgrade specialist for the grm repo.
|
||||||
|
|
||||||
|
## Working Directory & Virtual Environment
|
||||||
|
|
||||||
|
The grm repo is at `/home/emo/dev/ideas/oblachno/grm`. Always `cd` there first.
|
||||||
|
|
||||||
|
All Python tools run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically — always use `make <target>`, never raw `pytest` or `ruff`
|
||||||
|
commands. If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## Dependency Reference Locations
|
||||||
|
|
||||||
|
- **Python deps**: `pyproject.toml` — `[project] dependencies` and `[project.optional-dependencies]`
|
||||||
|
- **Ansible deps**: `ansible/requirements.yml` — galaxy collections and roles
|
||||||
|
- **Dep documentation**: Each pyproject.toml dependency MUST have a comment (enforced by `check_pyproject_deps`)
|
||||||
|
|
||||||
|
## Upgrade Procedure
|
||||||
|
|
||||||
|
### Step 1: Find the latest stable version
|
||||||
|
|
||||||
|
For Python packages:
|
||||||
|
```bash
|
||||||
|
pip index versions <package> 2>/dev/null | head -3
|
||||||
|
```
|
||||||
|
|
||||||
|
For Ansible collections:
|
||||||
|
```bash
|
||||||
|
ansible-galaxy collection list 2>/dev/null | grep <collection>
|
||||||
|
```
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
- Never upgrade to a version published <7 days ago
|
||||||
|
- Pin exact versions: `package==X.Y.Z`
|
||||||
|
- For Ansible collections: `community.docker:==3.10.2`
|
||||||
|
|
||||||
|
### Step 2: Review breaking changes
|
||||||
|
Read the changelog/release notes. Look for:
|
||||||
|
- Breaking API changes
|
||||||
|
- Deprecated features
|
||||||
|
- Minimum Python/Ansible version changes
|
||||||
|
- New required dependencies
|
||||||
|
|
||||||
|
### Step 3: Apply the upgrade
|
||||||
|
|
||||||
|
**Python deps** — edit `pyproject.toml`:
|
||||||
|
Each dependency line MUST have a trailing comment:
|
||||||
|
```toml
|
||||||
|
"ruff==0.12.0", # Python linter and formatter
|
||||||
|
```
|
||||||
|
|
||||||
|
**Ansible collections** — edit `ansible/requirements.yml`:
|
||||||
|
```yaml
|
||||||
|
collections:
|
||||||
|
- name: community.docker
|
||||||
|
version: "==3.10.2"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: Install and verify
|
||||||
|
```bash
|
||||||
|
pip install -e .[dev] # reinstall with new deps
|
||||||
|
ansible-galaxy install -r ansible/requirements.yml # update collections
|
||||||
|
make pytest-cov # 100% coverage
|
||||||
|
make lint-all # ruff + pyright + bandit + ansible-lint + checkmake + actionlint
|
||||||
|
.venv/bin/python -m devx.tools.check_pyproject_deps
|
||||||
|
.venv/bin/python -m devx.tools.check_test_speed --max-seconds 4 --max-single-seconds 0.5
|
||||||
|
```
|
||||||
|
|
||||||
|
If the dependency affects Ansible behavior, also run molecule:
|
||||||
|
```bash
|
||||||
|
make molecule # 6 scenarios on Ubuntu 22.04
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 5: Report
|
||||||
|
- **Package**: old version → new version
|
||||||
|
- **Breaking changes**: any known breaking changes
|
||||||
|
- **Files changed**: pyproject.toml, requirements.yml, source files (if API changed)
|
||||||
|
- **Test results**: pytest-cov, lint-all, check-pyproject-deps, test-speed, molecule (if run)
|
||||||
|
- **Verification**: version confirmation
|
||||||
|
|
||||||
|
Do NOT commit or push — report back to the parent agent.
|
||||||
|
|
||||||
|
## Feedback Reporting
|
||||||
|
|
||||||
|
When you encounter a concrete issue with a tool, workflow, or process
|
||||||
|
that would benefit from further investigation, create a Gitea issue
|
||||||
|
in the `oblachno-oss/grm` repo.
|
||||||
|
|
||||||
|
### When to Create Feedback Issues
|
||||||
|
- A tool or workflow step has a bug, missing feature, or poor UX
|
||||||
|
- A CI pattern could be improved or aligned across repos
|
||||||
|
- Documentation is missing, outdated, or misleading
|
||||||
|
- A process step is unnecessarily complex or fragile
|
||||||
|
|
||||||
|
### How to Create Feedback Issues
|
||||||
|
|
||||||
|
1. **Deduplicate first**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "list_issues", with `labels: "feedback"`, `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`. Check if an open issue already covers the same topic.
|
||||||
|
Do NOT create duplicates.
|
||||||
|
|
||||||
|
2. **Create the issue**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "issue_write", method "create_issue", `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`:
|
||||||
|
- **Title**: `[feedback] <category>: <short description>`
|
||||||
|
- **Labels**: `feedback` + one of: `tooling`, `ci-improvement`,
|
||||||
|
`doc-improvement`, `workflow-improvement`
|
||||||
|
- **Body** must include these sections:
|
||||||
|
```
|
||||||
|
**Context**: What task you were performing, which repo
|
||||||
|
**Tool/Workflow**: The specific tool or workflow step involved
|
||||||
|
**Issue**: What went wrong or could be improved
|
||||||
|
**Reproduction**: Steps to reproduce (if applicable)
|
||||||
|
**Affected files**: File paths and line numbers
|
||||||
|
**Suggested investigation**: What an agent should look into
|
||||||
|
**Reported by**: <subagent profile name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Report back**: Include the issue URL in your report to the parent agent.
|
||||||
|
|
||||||
|
### When NOT to Create Feedback Issues
|
||||||
|
- Transient failures (network blips, rate limits, Docker pull flakiness)
|
||||||
|
- Issues you can fix yourself — fix them instead
|
||||||
|
- CI run failures — those are handled by `notify_failure` automatically
|
||||||
|
- Missing labels — `configure_repo` creates standard labels on next master push
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
---
|
||||||
|
name: doc-sync-specialist
|
||||||
|
description: Handles documentation coverage, doc structure linting, and wiki sync for the grm repo. Detects missing docs, fixes broken links, updates mapping.json, and debugs wiki sync failures.
|
||||||
|
model: glm-5.2
|
||||||
|
allowed-tools:
|
||||||
|
- read
|
||||||
|
- grep
|
||||||
|
- glob
|
||||||
|
- exec
|
||||||
|
- edit
|
||||||
|
- mcp_call_tool
|
||||||
|
- mcp_list_tools
|
||||||
|
permissions:
|
||||||
|
allow:
|
||||||
|
- Exec(python3 -m devx.ci.doc_coverage *)
|
||||||
|
- Exec(python3 -m devx.ci.lint_docs *)
|
||||||
|
- Exec(python3 -m devx.ci.sync_wiki *)
|
||||||
|
- Exec(make check-docs)
|
||||||
|
- Exec(grep *)
|
||||||
|
- Exec(cat *)
|
||||||
|
- Exec(ls *)
|
||||||
|
- Exec(git diff *)
|
||||||
|
- mcp__gitea__*
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a documentation sync specialist for the grm repo.
|
||||||
|
|
||||||
|
## Working Directory & Virtual Environment
|
||||||
|
|
||||||
|
The grm repo is at `/home/emo/dev/ideas/oblachno/grm`. Always `cd` there first.
|
||||||
|
|
||||||
|
All Python tools run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically — always use `make <target>`, never raw `pytest` or `ruff`
|
||||||
|
commands. If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## Documentation Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
docs/
|
||||||
|
├── index.md # Wiki homepage
|
||||||
|
├── mapping.json # File-to-wiki-page title mapping (13 entries)
|
||||||
|
├── user/ # User documentation
|
||||||
|
│ ├── getting-started.md
|
||||||
|
│ ├── installation.md
|
||||||
|
│ ├── cli-commands.md
|
||||||
|
│ ├── troubleshooting.md
|
||||||
|
│ └── faq.md
|
||||||
|
└── tech/ # Technical documentation
|
||||||
|
├── architecture.md
|
||||||
|
├── development-setup.md
|
||||||
|
├── ci-cd-workflow.md
|
||||||
|
├── testing-strategy.md
|
||||||
|
├── decision-log.md
|
||||||
|
└── contributing.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Procedure
|
||||||
|
|
||||||
|
### Step 1: Check documentation coverage
|
||||||
|
```bash
|
||||||
|
.venv/bin/python -m devx.ci.doc_coverage --fail-on-missing
|
||||||
|
```
|
||||||
|
Fix undocumented CLI commands, modules, or CI scripts by adding entries
|
||||||
|
to the appropriate docs file.
|
||||||
|
|
||||||
|
### Step 2: Lint documentation structure
|
||||||
|
```bash
|
||||||
|
.venv/bin/python -m devx.ci.lint_docs --root .
|
||||||
|
```
|
||||||
|
Fix: broken internal links, heading hierarchy skips, TODO/FIXME markers,
|
||||||
|
trailing whitespace.
|
||||||
|
|
||||||
|
### Step 3: Check for stale references
|
||||||
|
```bash
|
||||||
|
make check-docs
|
||||||
|
```
|
||||||
|
Update any references to files that were renamed or deleted.
|
||||||
|
|
||||||
|
### Step 4: Verify wiki sync (if investigating a sync failure)
|
||||||
|
```bash
|
||||||
|
.venv/bin/python -m devx.ci.sync_wiki --repo oblachno-oss/grm --strict
|
||||||
|
```
|
||||||
|
Check `docs/mapping.json` — every docs file should have a mapping entry.
|
||||||
|
If adding a new docs file, add it to mapping.json with a wiki-compatible
|
||||||
|
title (hyphens for spaces, no special characters).
|
||||||
|
|
||||||
|
### Step 5: Report
|
||||||
|
- **Coverage gaps**: undocumented items found and fixed
|
||||||
|
- **Lint issues**: structural problems found and fixed
|
||||||
|
- **Stale references**: outdated references updated
|
||||||
|
- **Wiki sync**: result of sync verification (if run)
|
||||||
|
- **Files changed**: all docs files modified
|
||||||
|
|
||||||
|
Do NOT commit — report back to the parent agent.
|
||||||
|
|
||||||
|
## Feedback Reporting
|
||||||
|
|
||||||
|
When you encounter a concrete issue with a tool, workflow, or process
|
||||||
|
that would benefit from further investigation, create a Gitea issue
|
||||||
|
in the `oblachno-oss/grm` repo.
|
||||||
|
|
||||||
|
### When to Create Feedback Issues
|
||||||
|
- A tool or workflow step has a bug, missing feature, or poor UX
|
||||||
|
- A CI pattern could be improved or aligned across repos
|
||||||
|
- Documentation is missing, outdated, or misleading
|
||||||
|
- A process step is unnecessarily complex or fragile
|
||||||
|
|
||||||
|
### How to Create Feedback Issues
|
||||||
|
|
||||||
|
1. **Deduplicate first**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "list_issues", with `labels: "feedback"`, `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`. Check if an open issue already covers the same topic.
|
||||||
|
Do NOT create duplicates.
|
||||||
|
|
||||||
|
2. **Create the issue**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "issue_write", method "create_issue", `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`:
|
||||||
|
- **Title**: `[feedback] <category>: <short description>`
|
||||||
|
- **Labels**: `feedback` + one of: `tooling`, `ci-improvement`,
|
||||||
|
`doc-improvement`, `workflow-improvement`
|
||||||
|
- **Body** must include these sections:
|
||||||
|
```
|
||||||
|
**Context**: What task you were performing, which repo
|
||||||
|
**Tool/Workflow**: The specific tool or workflow step involved
|
||||||
|
**Issue**: What went wrong or could be improved
|
||||||
|
**Reproduction**: Steps to reproduce (if applicable)
|
||||||
|
**Affected files**: File paths and line numbers
|
||||||
|
**Suggested investigation**: What an agent should look into
|
||||||
|
**Reported by**: <subagent profile name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Report back**: Include the issue URL in your report to the parent agent.
|
||||||
|
|
||||||
|
### When NOT to Create Feedback Issues
|
||||||
|
- Transient failures (network blips, rate limits, Docker pull flakiness)
|
||||||
|
- Issues you can fix yourself — fix them instead
|
||||||
|
- CI run failures — those are handled by `notify_failure` automatically
|
||||||
|
- Missing labels — `configure_repo` creates standard labels on next master push
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
---
|
||||||
|
name: molecule-runner
|
||||||
|
description: Runs molecule test scenarios for the gitea-runner Ansible role and reports pass/fail with logs. Knows all 7 scenarios, 4 platforms, Docker prerequisites, and dynamic runner distribution.
|
||||||
|
model: glm-5.2
|
||||||
|
allowed-tools:
|
||||||
|
- mcp_call_tool
|
||||||
|
- mcp_list_tools
|
||||||
|
- mcp_read_resource
|
||||||
|
- read
|
||||||
|
- grep
|
||||||
|
- glob
|
||||||
|
- exec
|
||||||
|
permissions:
|
||||||
|
allow:
|
||||||
|
- mcp__gitea__*
|
||||||
|
- Exec(make molecule *)
|
||||||
|
- Exec(molecule *)
|
||||||
|
- Exec(docker *)
|
||||||
|
- Exec(ls *)
|
||||||
|
- Exec(cat *)
|
||||||
|
- Exec(grep *)
|
||||||
|
- Exec(head *)
|
||||||
|
- Exec(tail *)
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a molecule test runner for the grm repo.
|
||||||
|
|
||||||
|
## Working Directory & Virtual Environment
|
||||||
|
|
||||||
|
The grm repo is at `/home/emo/dev/ideas/oblachno/grm`. Always `cd` there first.
|
||||||
|
|
||||||
|
All Python tools run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically — always use `make <target>`, never raw `pytest` or `ruff`
|
||||||
|
commands. If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## Available Scenarios (7 total)
|
||||||
|
|
||||||
|
| Scenario | Purpose | Makefile target |
|
||||||
|
|----------|---------|-----------------|
|
||||||
|
| default | Basic runner installation | `make molecule` (included) |
|
||||||
|
| multi-instance | 2 runners on same host | `make molecule` (included) |
|
||||||
|
| lifecycle | stop/disable/enable/start | `make molecule` (included) |
|
||||||
|
| template-content | Rendered template verification | `make molecule` (included) |
|
||||||
|
| deregister | Runner cleanup | `make molecule` (included) |
|
||||||
|
| update | Binary update | `make molecule` (included) |
|
||||||
|
| remove | Full removal (destroys container) | CI only (not in `make molecule`) |
|
||||||
|
|
||||||
|
**Platforms** (4): ubuntu-2204, ubuntu-2404, debian-12, archlinux
|
||||||
|
Platform list defined in `devx.molecule.platforms` (single source of truth).
|
||||||
|
|
||||||
|
**Note**: `make molecule` runs 6 scenarios (excludes `remove`).
|
||||||
|
`make molecule-all` runs 6 scenarios on all 4 platforms.
|
||||||
|
CI discovers all 7 scenarios via `devx.molecule.distribute_molecule`.
|
||||||
|
|
||||||
|
## Molecule Weights (for LPT distribution)
|
||||||
|
|
||||||
|
Configured in `pyproject.toml` `[tool.devx.molecule.weights]`:
|
||||||
|
```
|
||||||
|
multi-instance = 8, lifecycle = 6, update = 5, default = 4,
|
||||||
|
deregister = 3, remove = 3, template-content = 2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Docker Prerequisites
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker info > /dev/null 2>&1 && echo "Docker ready" || echo "Docker not available"
|
||||||
|
```
|
||||||
|
|
||||||
|
If Docker is not running, report immediately — do not attempt to start it.
|
||||||
|
|
||||||
|
## Running Tests
|
||||||
|
|
||||||
|
When given a scenario name or "all":
|
||||||
|
1. Verify Docker is running
|
||||||
|
2. Run the appropriate make target
|
||||||
|
3. Capture full output (do not truncate)
|
||||||
|
4. Parse results
|
||||||
|
|
||||||
|
For a single scenario:
|
||||||
|
```bash
|
||||||
|
molecule test -s <scenario>
|
||||||
|
```
|
||||||
|
|
||||||
|
For all scenarios on one platform:
|
||||||
|
```bash
|
||||||
|
make molecule
|
||||||
|
```
|
||||||
|
|
||||||
|
For all scenarios on all platforms:
|
||||||
|
```bash
|
||||||
|
make molecule-all
|
||||||
|
```
|
||||||
|
|
||||||
|
## Known Issues
|
||||||
|
|
||||||
|
- `ansible-lint` may warn about `command-instead-of-module` for `systemctl --user`
|
||||||
|
calls — this is expected (systemd module doesn't support user services) and
|
||||||
|
skipped in `.ansible-lint`
|
||||||
|
- Molecule Docker driver may print "Event loop is closed" warnings on interrupt — harmless
|
||||||
|
|
||||||
|
## Reporting
|
||||||
|
|
||||||
|
Report:
|
||||||
|
- **PASSED**: scenario name, platform, duration
|
||||||
|
- **FAILED**: scenario name, platform, the failing Ansible task, error message, file:line
|
||||||
|
- **SKIPPED**: if Docker was unavailable
|
||||||
|
|
||||||
|
For failures, extract:
|
||||||
|
- The Ansible task: `TASK [gitea-runner : task_name]` followed by `FAILED!`
|
||||||
|
- The error detail: the `msg` field in the JSON output
|
||||||
|
- The molecule verify step: look for `VERIFY` section
|
||||||
|
- Platform-specific failures: note if only one OS failed
|
||||||
|
|
||||||
|
Do NOT attempt to fix failures — report them with enough detail for the parent agent.
|
||||||
|
|
||||||
|
## Feedback Reporting
|
||||||
|
|
||||||
|
When you encounter a concrete issue with a tool, workflow, or process
|
||||||
|
that would benefit from further investigation, create a Gitea issue
|
||||||
|
in the `oblachno-oss/grm` repo.
|
||||||
|
|
||||||
|
### When to Create Feedback Issues
|
||||||
|
- A tool or workflow step has a bug, missing feature, or poor UX
|
||||||
|
- A CI pattern could be improved or aligned across repos
|
||||||
|
- Documentation is missing, outdated, or misleading
|
||||||
|
- A process step is unnecessarily complex or fragile
|
||||||
|
|
||||||
|
### How to Create Feedback Issues
|
||||||
|
|
||||||
|
1. **Deduplicate first**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "list_issues", with `labels: "feedback"`, `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`. Check if an open issue already covers the same topic.
|
||||||
|
Do NOT create duplicates.
|
||||||
|
|
||||||
|
2. **Create the issue**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "issue_write", method "create_issue", `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`:
|
||||||
|
- **Title**: `[feedback] <category>: <short description>`
|
||||||
|
- **Labels**: `feedback` + one of: `tooling`, `ci-improvement`,
|
||||||
|
`doc-improvement`, `workflow-improvement`
|
||||||
|
- **Body** must include these sections:
|
||||||
|
```
|
||||||
|
**Context**: What task you were performing, which repo
|
||||||
|
**Tool/Workflow**: The specific tool or workflow step involved
|
||||||
|
**Issue**: What went wrong or could be improved
|
||||||
|
**Reproduction**: Steps to reproduce (if applicable)
|
||||||
|
**Affected files**: File paths and line numbers
|
||||||
|
**Suggested investigation**: What an agent should look into
|
||||||
|
**Reported by**: <subagent profile name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Report back**: Include the issue URL in your report to the parent agent.
|
||||||
|
|
||||||
|
### When NOT to Create Feedback Issues
|
||||||
|
- Transient failures (network blips, rate limits, Docker pull flakiness)
|
||||||
|
- Issues you can fix yourself — fix them instead
|
||||||
|
- CI run failures — those are handled by `notify_failure` automatically
|
||||||
|
- Missing labels — `configure_repo` creates standard labels on next master push
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
---
|
||||||
|
name: workflow-validator
|
||||||
|
description: Validates Gitea Actions workflow YAML files for the grm repo using actionlint and act_runner dry-run. Fixes syntax errors, job dependency issues, and molecule distribution matrix problems.
|
||||||
|
model: glm-5.2
|
||||||
|
allowed-tools:
|
||||||
|
- mcp_call_tool
|
||||||
|
- mcp_list_tools
|
||||||
|
- mcp_read_resource
|
||||||
|
- read
|
||||||
|
- grep
|
||||||
|
- glob
|
||||||
|
- exec
|
||||||
|
- edit
|
||||||
|
permissions:
|
||||||
|
allow:
|
||||||
|
- mcp__gitea__*
|
||||||
|
- Exec(make workflow-lint)
|
||||||
|
- Exec(make workflow-dryrun)
|
||||||
|
- Exec(make workflow-check)
|
||||||
|
- Exec(make install-tools)
|
||||||
|
- Exec(actionlint *)
|
||||||
|
- Exec(act_runner *)
|
||||||
|
- Exec(cat *)
|
||||||
|
- Exec(grep *)
|
||||||
|
- Exec(git diff *)
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a Gitea Actions workflow validator for the grm repo.
|
||||||
|
|
||||||
|
## Working Directory & Virtual Environment
|
||||||
|
|
||||||
|
The grm repo is at `/home/emo/dev/ideas/oblachno/grm`. Always `cd` there first.
|
||||||
|
|
||||||
|
All Python tools run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically — always use `make <target>`, never raw `pytest` or `ruff`
|
||||||
|
commands. If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## Key Files
|
||||||
|
|
||||||
|
- `.gitea/workflows/ci.yml` — PR pipeline (quality, detect-changes, pre-merge-check, discover-runners, molecule-tests, molecule-report, release-dry-run, pr-review, auto-merge)
|
||||||
|
- `.gitea/workflows/post-merge.yml` — master pipeline (detect-type, validate-commit-msg, release, publish, sync-wiki, badges, vikunja, configure-repo)
|
||||||
|
- `.gitea/actionlint.yaml` — actionlint config (registers custom `docker` runner label)
|
||||||
|
|
||||||
|
## Validation Procedure
|
||||||
|
|
||||||
|
### Step 1: Install tools (if not present)
|
||||||
|
```bash
|
||||||
|
make install-tools # installs actionlint, act_runner to ~/.local/bin
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2: Static lint with actionlint
|
||||||
|
```bash
|
||||||
|
make workflow-lint
|
||||||
|
```
|
||||||
|
Fix any: syntax errors, invalid expressions, unknown keys, shellcheck issues,
|
||||||
|
undefined variables, unknown actions, job dependency issues.
|
||||||
|
|
||||||
|
### Step 3: Dry-run with act_runner
|
||||||
|
```bash
|
||||||
|
make workflow-dryrun
|
||||||
|
```
|
||||||
|
Fix any: image not found, circular dependencies, step ordering issues,
|
||||||
|
matrix expansion problems.
|
||||||
|
|
||||||
|
### Step 4: Full check
|
||||||
|
```bash
|
||||||
|
make workflow-check
|
||||||
|
```
|
||||||
|
|
||||||
|
## GRM-Specific Workflow Concerns
|
||||||
|
|
||||||
|
**Molecule test distribution:**
|
||||||
|
The `molecule-tests` job uses a matrix `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`
|
||||||
|
with `max-parallel: 3`. Runners beyond the discovered count skip via
|
||||||
|
`--skip-if-excess`. The `discover-runners` job queries the Gitea API
|
||||||
|
for available runners.
|
||||||
|
|
||||||
|
If the matrix is too small, some scenarios won't run. If too large,
|
||||||
|
excess runners skip (no harm). The default 10 slots should be enough.
|
||||||
|
|
||||||
|
**Path filtering:**
|
||||||
|
Molecule tests only run when `ansible/` or `.ansible-lint` files change.
|
||||||
|
The `detect-changes` job sets `ansible-changed` output. If this is false,
|
||||||
|
molecule-tests is skipped — this is expected behavior.
|
||||||
|
|
||||||
|
**auto-merge and always():**
|
||||||
|
```yaml
|
||||||
|
auto-merge:
|
||||||
|
needs: [quality, detect-changes, pre-merge-check, pr-review, molecule-tests]
|
||||||
|
if: >-
|
||||||
|
always() &&
|
||||||
|
github.event_name == 'pull_request' &&
|
||||||
|
needs.quality.result == 'success' &&
|
||||||
|
needs.pre-merge-check.result == 'success' &&
|
||||||
|
needs.pr-review.result == 'success' &&
|
||||||
|
(needs.molecule-tests.result == 'success' || needs.molecule-tests.result == 'skipped')
|
||||||
|
```
|
||||||
|
|
||||||
|
**Gitea Actions limitations (1.26.x):**
|
||||||
|
- No `fromJSON()` in matrix context
|
||||||
|
- `concurrency` blocks can cause stuck jobs
|
||||||
|
- `GITHUB_OUTPUT` for step outputs
|
||||||
|
|
||||||
|
## Report
|
||||||
|
- **actionlint results**: pass/fail per workflow file, specific errors
|
||||||
|
- **dry-run results**: pass/fail per workflow, job dependency issues
|
||||||
|
- **Files changed**: if any workflow YAML was modified
|
||||||
|
- **Verification**: re-run results after fixes
|
||||||
|
|
||||||
|
Do NOT commit — report back to the parent agent.
|
||||||
|
|
||||||
|
## Feedback Reporting
|
||||||
|
|
||||||
|
When you encounter a concrete issue with a tool, workflow, or process
|
||||||
|
that would benefit from further investigation, create a Gitea issue
|
||||||
|
in the `oblachno-oss/grm` repo.
|
||||||
|
|
||||||
|
### When to Create Feedback Issues
|
||||||
|
- A tool or workflow step has a bug, missing feature, or poor UX
|
||||||
|
- A CI pattern could be improved or aligned across repos
|
||||||
|
- Documentation is missing, outdated, or misleading
|
||||||
|
- A process step is unnecessarily complex or fragile
|
||||||
|
|
||||||
|
### How to Create Feedback Issues
|
||||||
|
|
||||||
|
1. **Deduplicate first**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "list_issues", with `labels: "feedback"`, `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`. Check if an open issue already covers the same topic.
|
||||||
|
Do NOT create duplicates.
|
||||||
|
|
||||||
|
2. **Create the issue**: Use `mcp_call_tool` with server_name "gitea",
|
||||||
|
tool_name "issue_write", method "create_issue", `owner: "oblachno-oss"`,
|
||||||
|
`repo: "grm"`:
|
||||||
|
- **Title**: `[feedback] <category>: <short description>`
|
||||||
|
- **Labels**: `feedback` + one of: `tooling`, `ci-improvement`,
|
||||||
|
`doc-improvement`, `workflow-improvement`
|
||||||
|
- **Body** must include these sections:
|
||||||
|
```
|
||||||
|
**Context**: What task you were performing, which repo
|
||||||
|
**Tool/Workflow**: The specific tool or workflow step involved
|
||||||
|
**Issue**: What went wrong or could be improved
|
||||||
|
**Reproduction**: Steps to reproduce (if applicable)
|
||||||
|
**Affected files**: File paths and line numbers
|
||||||
|
**Suggested investigation**: What an agent should look into
|
||||||
|
**Reported by**: <subagent profile name>
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Report back**: Include the issue URL in your report to the parent agent.
|
||||||
|
|
||||||
|
### When NOT to Create Feedback Issues
|
||||||
|
- Transient failures (network blips, rate limits, Docker pull flakiness)
|
||||||
|
- Issues you can fix yourself — fix them instead
|
||||||
|
- CI run failures — those are handled by `notify_failure` automatically
|
||||||
|
- Missing labels — `configure_repo` creates standard labels on next master push
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# testing-and-debugging
|
||||||
|
|
||||||
|
Make targets for testing, debugging, and CI investigation. **Use these
|
||||||
|
instead of raw `pytest`, `ruff`, or `molecule` commands.**
|
||||||
|
|
||||||
|
## Why Make Targets
|
||||||
|
|
||||||
|
Make targets encapsulate the correct venv activation, PYTHONPATH, env
|
||||||
|
vars, and flags. Running raw commands bypasses venv activation and
|
||||||
|
produces false failures (missing dependencies, wrong Python version).
|
||||||
|
|
||||||
|
## Unit Tests
|
||||||
|
|
||||||
|
| Task | Command | Notes |
|
||||||
|
|------|---------|-------|
|
||||||
|
| Run all unit tests | `make test-unit` | Fast, no coverage |
|
||||||
|
| Run with coverage | `make pytest-cov` | **Required before push** — enforces 100% |
|
||||||
|
| Run single test | `make pytest-cov TEST=tests/test_foo.py::test_bar` | |
|
||||||
|
|
||||||
|
## Linting
|
||||||
|
|
||||||
|
| Task | Command | Notes |
|
||||||
|
|------|---------|-------|
|
||||||
|
| Full lint | `make lint-all` | ruff + pyright + bandit + ansible-lint + checkmake + actionlint |
|
||||||
|
| Ruff only | `make lint-ruff` | |
|
||||||
|
| Type check | `make typecheck` | pyright |
|
||||||
|
| Bandit | `make lint-bandit` | Security linter |
|
||||||
|
| Workflow lint | `make workflow-check` | actionlint + act_runner dry-run |
|
||||||
|
|
||||||
|
## Molecule Tests
|
||||||
|
|
||||||
|
| Task | Command | Notes |
|
||||||
|
|------|---------|-------|
|
||||||
|
| All scenarios | `make molecule` | All 6 scenarios on Ubuntu 22.04 |
|
||||||
|
| All platforms | `make molecule-all` | All 6 scenarios on all 4 OSes |
|
||||||
|
| Parallel | `make molecule-all-parallel` | MOLECULE_JOBS=4 |
|
||||||
|
|
||||||
|
## Pre-Push Verification
|
||||||
|
|
||||||
|
**Before pushing any branch:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make pre-push
|
||||||
|
```
|
||||||
|
|
||||||
|
This runs `lint-all` + `pytest-cov`. The pre-push git hook only
|
||||||
|
validates the Vikunja task exists — it does NOT run tests. You must
|
||||||
|
run `make pre-push` manually.
|
||||||
|
|
||||||
|
## CI Failure Investigation
|
||||||
|
|
||||||
|
When investigating a CI failure:
|
||||||
|
|
||||||
|
1. **Fetch logs via MCP** — use `mcp_call_tool` with gitea server,
|
||||||
|
`actions_run_read` method, `download_job_log` tool
|
||||||
|
2. **Reproduce locally** — use `make pytest-cov` or `make lint-ci`
|
||||||
|
depending on which CI job failed
|
||||||
|
3. **Never run raw pytest** — always use the make target
|
||||||
|
|
||||||
|
## Virtual Environment
|
||||||
|
|
||||||
|
All commands run inside `.venv`. `make` targets handle activation
|
||||||
|
automatically. For raw commands (rare), activate first:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source activate.sh # bash/zsh
|
||||||
|
source activate.fish # fish
|
||||||
|
source activate.zsh # zsh
|
||||||
|
```
|
||||||
|
|
||||||
|
If `.venv` doesn't exist, run `make setup` first.
|
||||||
|
|
||||||
|
## Common Pitfalls
|
||||||
|
|
||||||
|
### Coverage Verification Before Push
|
||||||
|
|
||||||
|
**Always run `make pytest-cov` before pushing** — CI enforces 100%
|
||||||
|
coverage and will fail the PR if any lines are uncovered. This is the
|
||||||
|
most common cause of CI quality job failures after code changes. The
|
||||||
|
pre-push git hook only validates Vikunja task existence, not tests.
|
||||||
|
|
||||||
|
### API Response Type Checking
|
||||||
|
|
||||||
|
Never use `is True`/`is False` identity checks on API response values.
|
||||||
|
Many APIs return boolean values as strings (`"true"`/`"false"`). Use
|
||||||
|
string comparison or truthy/falsy helpers instead.
|
||||||
|
|
||||||
|
### Time Mocking in Tests
|
||||||
|
|
||||||
|
Always mock `time.sleep` and `time.monotonic` in unit tests using
|
||||||
|
`@patch` decorators. Real sleep calls make tests slow and exceed test
|
||||||
|
speed limits.
|
||||||
+2
-2
@@ -48,7 +48,7 @@ GITEA_REGISTRATION_TOKEN=your-registration-token
|
|||||||
|
|
||||||
# Gitea PyPI registry username (for private package access)
|
# Gitea PyPI registry username (for private package access)
|
||||||
# Used by PIP_INSTALL to configure PIP_EXTRA_INDEX_URL
|
# Used by PIP_INSTALL to configure PIP_EXTRA_INDEX_URL
|
||||||
CI_GITEA_USERNAME=emil
|
CI_GITEA_USERNAME=your-gitea-username
|
||||||
|
|
||||||
# Vikunja API token (required for `make create-task` dev workflow)
|
# Vikunja API token (required for `make create-task` dev workflow)
|
||||||
# Generate at: Vikunja → Settings → API Tokens
|
# Generate at: Vikunja → Settings → API Tokens
|
||||||
@@ -60,4 +60,4 @@ DEVX_TASK_PREFIX=GRM
|
|||||||
# Vikunja project ID for GRM
|
# Vikunja project ID for GRM
|
||||||
DEVX_VIKUNJA_PROJECT_ID=6
|
DEVX_VIKUNJA_PROJECT_ID=6
|
||||||
# Version file path (relative to repo root)
|
# Version file path (relative to repo root)
|
||||||
DEVX_VERSION_FILE=src/gitea_runner_manager/__init__.py
|
DEVX_VERSION_FILE=src/grm/__init__.py
|
||||||
|
|||||||
+37
-24
@@ -20,47 +20,60 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
||||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
||||||
run: make setup-image EXTRAS=lint
|
run: make setup-image EXTRAS=ci,lint
|
||||||
- name: Lint all
|
- name: Lint all
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
make lint-all
|
make lint-all
|
||||||
- name: Unit tests with 100% coverage
|
- name: Unit tests with 100% coverage
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
make pytest-cov
|
make pytest-cov
|
||||||
- name: Documentation lint check
|
- name: Documentation lint check
|
||||||
env:
|
env:
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
|
||||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
pip install --upgrade devx \
|
|
||||||
--index-url "https://${CI_GITEA_USERNAME}:${CI_GITEA_TOKEN}@git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple/" \
|
|
||||||
--no-deps
|
|
||||||
python3 -m devx.ci.lint_docs --root .
|
python3 -m devx.ci.lint_docs --root .
|
||||||
|
- name: Documentation version reference check
|
||||||
|
env:
|
||||||
|
PYTHONPATH: src
|
||||||
|
run: |
|
||||||
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
|
python3 -m devx.tools.check_doc_versions --root . --package grm
|
||||||
|
- name: Vale prose lint check
|
||||||
|
env:
|
||||||
|
PYTHONPATH: src
|
||||||
|
run: |
|
||||||
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
# Install vale if not present
|
||||||
|
if ! command -v vale >/dev/null 2>&1; then
|
||||||
|
python3 -m devx.tools.install_tools --tool vale
|
||||||
|
fi
|
||||||
|
vale sync
|
||||||
|
vale --minAlertLevel=error docs/ AGENTS.md README.md
|
||||||
- name: Translation completeness check
|
- name: Translation completeness check
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.check_translations --translations src/gitea_runner_manager/translations.json
|
python3 -m devx.ci.check_translations --translations src/grm/translations.json
|
||||||
- name: Check unit test speed
|
- name: Check unit test speed
|
||||||
env:
|
env:
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.tools.check_test_speed --max-seconds 4 --max-single-seconds 0.5
|
python3 -m devx.tools.check_test_speed --max-seconds 4 --max-single-seconds 0.5
|
||||||
- name: Dependency security scan
|
- name: Dependency security scan
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
# Install pip in venv if missing (needed by pip-audit)
|
# Install pip in venv if missing (needed by pip-audit)
|
||||||
.venv/bin/python -m ensurepip 2>/dev/null || true
|
.venv/bin/python -m ensurepip 2>/dev/null || true
|
||||||
PIPAPI_PYTHON_LOCATION=$PWD/.venv/bin/python \
|
PIPAPI_PYTHON_LOCATION=$PWD/.venv/bin/python \
|
||||||
pip-audit --desc --skip-editable 2>&1 || true
|
pip-audit --desc --skip-editable 2>&1 || true
|
||||||
- name: Workflow dry-run validation
|
- name: Workflow dry-run validation
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
# Best-effort: only runs if act_runner is installed
|
# Best-effort: only runs if act_runner is installed
|
||||||
if command -v act_runner >/dev/null 2>&1; then
|
if command -v act_runner >/dev/null 2>&1; then
|
||||||
@@ -87,10 +100,10 @@ jobs:
|
|||||||
- name: Release dry-run validation
|
- name: Release dry-run validation
|
||||||
env:
|
env:
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
DEVX_VERSION_FILE: src/gitea_runner_manager/__init__.py
|
DEVX_VERSION_FILE: src/grm/__init__.py
|
||||||
DEVX_TASK_PREFIX: GRM
|
DEVX_TASK_PREFIX: GRM
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
python3 -m devx.ci.release --dry-run
|
python3 -m devx.ci.release --dry-run
|
||||||
|
|
||||||
@@ -116,7 +129,7 @@ jobs:
|
|||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
DEVX_TASK_PREFIX: GRM
|
DEVX_TASK_PREFIX: GRM
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.classify_changes \
|
python3 -m devx.ci.classify_changes \
|
||||||
--base "origin/master" \
|
--base "origin/master" \
|
||||||
--head "${{ github.event.pull_request.head.sha || github.sha }}" \
|
--head "${{ github.event.pull_request.head.sha || github.sha }}" \
|
||||||
@@ -176,7 +189,7 @@ jobs:
|
|||||||
MOLECULE_RUNNERS: ${{ vars.MOLECULE_RUNNERS }}
|
MOLECULE_RUNNERS: ${{ vars.MOLECULE_RUNNERS }}
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.molecule.discover_runners \
|
python3 -m devx.molecule.discover_runners \
|
||||||
--owner "${{ github.repository_owner }}" \
|
--owner "${{ github.repository_owner }}" \
|
||||||
--repo "${{ github.event.repository.name }}" \
|
--repo "${{ github.event.repository.name }}" \
|
||||||
@@ -202,7 +215,7 @@ jobs:
|
|||||||
run: make setup-image EXTRAS=ci,molecule
|
run: make setup-image EXTRAS=ci,molecule
|
||||||
- name: Install Ansible collections
|
- name: Install Ansible collections
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.tools.setup --skip-install --no-pre-commit --no-tea-login
|
python3 -m devx.tools.setup --skip-install --no-pre-commit --no-tea-login
|
||||||
- name: Discover assigned test pairs
|
- name: Discover assigned test pairs
|
||||||
env:
|
env:
|
||||||
@@ -210,7 +223,7 @@ jobs:
|
|||||||
MAX_RUNNERS: ${{ needs.discover-runners.outputs.runner-count }}
|
MAX_RUNNERS: ${{ needs.discover-runners.outputs.runner-count }}
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.molecule.distribute_molecule \
|
python3 -m devx.molecule.distribute_molecule \
|
||||||
--runner-index "$RUNNER_INDEX" \
|
--runner-index "$RUNNER_INDEX" \
|
||||||
--max-runners "$MAX_RUNNERS" \
|
--max-runners "$MAX_RUNNERS" \
|
||||||
@@ -218,7 +231,7 @@ jobs:
|
|||||||
- name: Run molecule tests
|
- name: Run molecule tests
|
||||||
if: env.SKIP != 'true'
|
if: env.SKIP != 'true'
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
if [ -z "$TEST_PAIRS" ]; then exit 0; fi
|
if [ -z "$TEST_PAIRS" ]; then exit 0; fi
|
||||||
if ! python3 -c "import docker; docker.from_env().ping()" 2>/dev/null; then
|
if ! python3 -c "import docker; docker.from_env().ping()" 2>/dev/null; then
|
||||||
echo "Docker not available in CI container — skipping molecule tests"
|
echo "Docker not available in CI container — skipping molecule tests"
|
||||||
@@ -260,7 +273,7 @@ jobs:
|
|||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.pr_review \
|
python3 -m devx.ci.pr_review \
|
||||||
"${{ github.event.number }}" \
|
"${{ github.event.number }}" \
|
||||||
"${{ github.repository }}"
|
"${{ github.repository }}"
|
||||||
@@ -302,7 +315,7 @@ jobs:
|
|||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.pr_review \
|
python3 -m devx.ci.pr_review \
|
||||||
"$PR_NUMBER" \
|
"$PR_NUMBER" \
|
||||||
"$REPOSITORY" \
|
"$REPOSITORY" \
|
||||||
@@ -322,7 +335,7 @@ jobs:
|
|||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
PR_NUMBER: ${{ github.event.number }}
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.auto_merge \
|
python3 -m devx.ci.auto_merge \
|
||||||
"$HEAD_REF" \
|
"$HEAD_REF" \
|
||||||
"$PR_TITLE" \
|
"$PR_TITLE" \
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.detect_release_commit
|
python3 -m devx.ci.detect_release_commit
|
||||||
|
|
||||||
validate-commit-msg:
|
validate-commit-msg:
|
||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
DEVX_TASK_PREFIX: GRM
|
DEVX_TASK_PREFIX: GRM
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
git log -1 --format=%B > commit-msg.txt
|
git log -1 --format=%B > commit-msg.txt
|
||||||
python3 -m devx.ci.validate_commit_msg commit-msg.txt --branch master
|
python3 -m devx.ci.validate_commit_msg commit-msg.txt --branch master
|
||||||
rm -f commit-msg.txt
|
rm -f commit-msg.txt
|
||||||
@@ -110,11 +110,11 @@ jobs:
|
|||||||
id: release-tag
|
id: release-tag
|
||||||
env:
|
env:
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
DEVX_VERSION_FILE: src/gitea_runner_manager/__init__.py
|
DEVX_VERSION_FILE: src/grm/__init__.py
|
||||||
DEVX_TASK_PREFIX: GRM
|
DEVX_TASK_PREFIX: GRM
|
||||||
DEVX_VIKUNJA_PROJECT_ID: 6
|
DEVX_VIKUNJA_PROJECT_ID: 6
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
python3 -m devx.ci.release
|
python3 -m devx.ci.release
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
@@ -152,7 +152,7 @@ jobs:
|
|||||||
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
python3 -m devx.ci.publish \
|
python3 -m devx.ci.publish \
|
||||||
"${{ needs.release.outputs.tag }}" \
|
"${{ needs.release.outputs.tag }}" \
|
||||||
@@ -176,7 +176,10 @@ jobs:
|
|||||||
if: needs.detect-type.outputs.is-release == 'false'
|
if: needs.detect-type.outputs.is-release == 'false'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-base:latest
|
container: git.oblachno.oblachno.fyi/oblachno-oss/runner-images/ci-base:latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 15
|
||||||
|
concurrency:
|
||||||
|
group: sync-wiki-${{ github.repository }}
|
||||||
|
cancel-in-progress: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -191,7 +194,7 @@ jobs:
|
|||||||
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
CI_GITEA_TOKEN: ${{ secrets.CI_GITEA_TOKEN }}
|
||||||
PYTHONPATH: src
|
PYTHONPATH: src
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.sync_wiki --repo "${{ github.repository }}" --strict
|
python3 -m devx.ci.sync_wiki --repo "${{ github.repository }}" --strict
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
@@ -231,7 +234,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PRE_COMMIT_ALLOW_NO_CONFIG: "1"
|
PRE_COMMIT_ALLOW_NO_CONFIG: "1"
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.push_badges
|
python3 -m devx.ci.push_badges
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
@@ -268,7 +271,7 @@ jobs:
|
|||||||
DEVX_TASK_PREFIX: GRM
|
DEVX_TASK_PREFIX: GRM
|
||||||
DEVX_VIKUNJA_PROJECT_ID: 6
|
DEVX_VIKUNJA_PROJECT_ID: 6
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.ci.post_merge --git-sha "${{ github.sha }}"
|
python3 -m devx.ci.post_merge --git-sha "${{ github.sha }}"
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
@@ -304,7 +307,7 @@ jobs:
|
|||||||
DEVX_REPO_OWNER: oblachno-oss
|
DEVX_REPO_OWNER: oblachno-oss
|
||||||
DEVX_STATUS_CHECKS: "CI / quality (pull_request),CI / molecule-tests (1) (pull_request),CI / molecule-tests (2) (pull_request),CI / molecule-tests (3) (pull_request)"
|
DEVX_STATUS_CHECKS: "CI / quality (pull_request),CI / molecule-tests (1) (pull_request),CI / molecule-tests (2) (pull_request),CI / molecule-tests (3) (pull_request)"
|
||||||
run: |
|
run: |
|
||||||
. .venv/bin/activate
|
. .venv/bin/activate 2>/dev/null || true
|
||||||
python3 -m devx.tools.configure_repo
|
python3 -m devx.tools.configure_repo
|
||||||
- name: Notify on failure
|
- name: Notify on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
@@ -57,6 +57,37 @@ repos:
|
|||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
stages: [pre-commit]
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: checkmake
|
||||||
|
name: checkmake Makefile linter
|
||||||
|
entry: make checkmake
|
||||||
|
language: system
|
||||||
|
files: ^Makefile$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-test-speed
|
||||||
|
name: unit test speed check
|
||||||
|
entry: .venv/bin/python -m devx.tools.check_test_speed --max-seconds 4 --max-single-seconds 0.5
|
||||||
|
language: system
|
||||||
|
types: [python]
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: check-translations
|
||||||
|
name: translation completeness check
|
||||||
|
entry: env PYTHONPATH=src .venv/bin/python -m devx.ci.check_translations --translations src/grm/translations.json
|
||||||
|
language: system
|
||||||
|
files: ^src/grm/translations\.json$
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
|
- id: lint-docs
|
||||||
|
name: documentation lint check
|
||||||
|
entry: env PYTHONPATH=src .venv/bin/python -m devx.ci.lint_docs --root .
|
||||||
|
language: system
|
||||||
|
pass_filenames: false
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
- id: pytest-cov
|
- id: pytest-cov
|
||||||
name: pytest with 100% coverage
|
name: pytest with 100% coverage
|
||||||
entry: make pytest-cov
|
entry: make pytest-cov
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Vale configuration for grm documentation
|
||||||
|
# https://vale.sh/docs/
|
||||||
|
|
||||||
|
StylesPath = .vale/styles
|
||||||
|
|
||||||
|
# Packages are downloaded via `vale sync`
|
||||||
|
Packages = write-good, Google, Readability
|
||||||
|
|
||||||
|
# Minimum alert level to display (suggestion, warning, error)
|
||||||
|
MinAlertLevel = warning
|
||||||
|
|
||||||
|
# Project vocabulary — terms not flagged as spelling errors
|
||||||
|
Vocab = grm
|
||||||
|
|
||||||
|
[*.{md}]
|
||||||
|
# Enable style guides
|
||||||
|
BasedOnStyles = Vale, write-good, Google, Readability, devx
|
||||||
|
|
||||||
|
# Google style — relax rules too strict for technical docs
|
||||||
|
Google.Contractions = NO
|
||||||
|
Google.WordList = NO
|
||||||
|
Google.Acronyms = NO
|
||||||
|
Google.We = NO
|
||||||
|
Google.Will = NO
|
||||||
|
Google.Colons = NO
|
||||||
|
Google.Headings = NO
|
||||||
|
Google.EmDash = NO
|
||||||
|
Google.Units = NO
|
||||||
|
Google.Latin = NO
|
||||||
|
Google.OptionalPlurals = NO
|
||||||
|
|
||||||
|
# write-good — relax rules too strict for technical writing
|
||||||
|
write-good.E-Prime = NO
|
||||||
|
write-good.So = NO
|
||||||
|
write-good.ThereIs = NO
|
||||||
|
write-good.TooWordy = NO
|
||||||
|
|
||||||
|
# Vale defaults — spelling catches too many technical terms
|
||||||
|
Vale.Terms = NO
|
||||||
|
Vale.Repetition = NO
|
||||||
|
Vale.Spelling = NO
|
||||||
|
|
||||||
|
# Readability — warnings only, technical docs are naturally complex
|
||||||
|
Readability.FleschReadingEase = suggestion
|
||||||
|
Readability.ColemanLiau = suggestion
|
||||||
|
Readability.LIX = suggestion
|
||||||
|
Readability.GunningFog = suggestion
|
||||||
|
Readability.SMOG = suggestion
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Use 'AM' or 'PM' (preceded by a space)."
|
||||||
|
link: "https://developers.google.com/style/word-list"
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\d{1,2}[AP]M\b'
|
||||||
|
- '\d{1,2} ?[ap]m\b'
|
||||||
|
- '\d{1,2} ?[aApP]\.[mM]\.'
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
extends: conditional
|
||||||
|
message: "Spell out '%s', if it's unfamiliar to the audience."
|
||||||
|
link: 'https://developers.google.com/style/abbreviations'
|
||||||
|
level: suggestion
|
||||||
|
ignorecase: false
|
||||||
|
# Ensures that the existence of 'first' implies the existence of 'second'.
|
||||||
|
first: '\b([A-Z]{3,5})\b'
|
||||||
|
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
|
||||||
|
# ... with the exception of these:
|
||||||
|
exceptions:
|
||||||
|
- API
|
||||||
|
- ASP
|
||||||
|
- CLI
|
||||||
|
- CPU
|
||||||
|
- CSS
|
||||||
|
- CSV
|
||||||
|
- DEBUG
|
||||||
|
- DOM
|
||||||
|
- DPI
|
||||||
|
- FAQ
|
||||||
|
- GCC
|
||||||
|
- GDB
|
||||||
|
- GET
|
||||||
|
- GPU
|
||||||
|
- GTK
|
||||||
|
- GUI
|
||||||
|
- HTML
|
||||||
|
- HTTP
|
||||||
|
- HTTPS
|
||||||
|
- IDE
|
||||||
|
- JAR
|
||||||
|
- JSON
|
||||||
|
- JSX
|
||||||
|
- LESS
|
||||||
|
- LLDB
|
||||||
|
- NET
|
||||||
|
- NOTE
|
||||||
|
- NVDA
|
||||||
|
- OSS
|
||||||
|
- PATH
|
||||||
|
- PDF
|
||||||
|
- PHP
|
||||||
|
- POST
|
||||||
|
- RAM
|
||||||
|
- REPL
|
||||||
|
- RSA
|
||||||
|
- SCM
|
||||||
|
- SCSS
|
||||||
|
- SDK
|
||||||
|
- SQL
|
||||||
|
- SSH
|
||||||
|
- SSL
|
||||||
|
- SVG
|
||||||
|
- TBD
|
||||||
|
- TCP
|
||||||
|
- TODO
|
||||||
|
- URI
|
||||||
|
- URL
|
||||||
|
- USB
|
||||||
|
- UTF
|
||||||
|
- XML
|
||||||
|
- XSS
|
||||||
|
- YAML
|
||||||
|
- ZIP
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' should be in lowercase."
|
||||||
|
link: 'https://developers.google.com/style/colons'
|
||||||
|
nonword: true
|
||||||
|
level: warning
|
||||||
|
scope: sentence
|
||||||
|
tokens:
|
||||||
|
- '(?<!:[^ ]+?):\s[A-Z]'
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
extends: substitution
|
||||||
|
message: "Use '%s' instead of '%s'."
|
||||||
|
link: 'https://developers.google.com/style/contractions'
|
||||||
|
level: suggestion
|
||||||
|
ignorecase: true
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
are not: aren't
|
||||||
|
cannot: can't
|
||||||
|
could not: couldn't
|
||||||
|
did not: didn't
|
||||||
|
do not: don't
|
||||||
|
does not: doesn't
|
||||||
|
has not: hasn't
|
||||||
|
have not: haven't
|
||||||
|
how is: how's
|
||||||
|
is not: isn't
|
||||||
|
it is: it's
|
||||||
|
should not: shouldn't
|
||||||
|
that is: that's
|
||||||
|
they are: they're
|
||||||
|
was not: wasn't
|
||||||
|
we are: we're
|
||||||
|
we have: we've
|
||||||
|
were not: weren't
|
||||||
|
what is: what's
|
||||||
|
when is: when's
|
||||||
|
where is: where's
|
||||||
|
will not: won't
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Use 'July 31, 2016' format, not '%s'."
|
||||||
|
link: 'https://developers.google.com/style/dates-times'
|
||||||
|
ignorecase: true
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}'
|
||||||
|
- '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}'
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "In general, don't use an ellipsis."
|
||||||
|
link: 'https://developers.google.com/style/ellipses'
|
||||||
|
nonword: true
|
||||||
|
level: warning
|
||||||
|
action:
|
||||||
|
name: remove
|
||||||
|
tokens:
|
||||||
|
- '\.\.\.'
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't put a space before or after a dash."
|
||||||
|
link: "https://developers.google.com/style/dashes"
|
||||||
|
nonword: true
|
||||||
|
level: error
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- trim
|
||||||
|
- " "
|
||||||
|
tokens:
|
||||||
|
- '\s[—–]\s'
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't use exclamation points in text."
|
||||||
|
link: "https://developers.google.com/style/exclamation-points"
|
||||||
|
nonword: true
|
||||||
|
level: error
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- trim_right
|
||||||
|
- "!"
|
||||||
|
tokens:
|
||||||
|
- '\w+!(?:\s|$)'
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Avoid first-person pronouns such as '%s'."
|
||||||
|
link: 'https://developers.google.com/style/pronouns#personal-pronouns'
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- (?:^|\s)I\s
|
||||||
|
- (?:^|\s)I,\s
|
||||||
|
- \bI'm\b
|
||||||
|
- \bme\b
|
||||||
|
- \bmy\b
|
||||||
|
- \bmine\b
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't use '%s' as a gender-neutral pronoun."
|
||||||
|
link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns'
|
||||||
|
level: error
|
||||||
|
ignorecase: true
|
||||||
|
tokens:
|
||||||
|
- he/she
|
||||||
|
- s/he
|
||||||
|
- \(s\)he
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
extends: substitution
|
||||||
|
message: "Consider using '%s' instead of '%s'."
|
||||||
|
ignorecase: true
|
||||||
|
link: "https://developers.google.com/style/inclusive-documentation"
|
||||||
|
level: error
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
(?:alumna|alumnus): graduate
|
||||||
|
(?:alumnae|alumni): graduates
|
||||||
|
air(?:m[ae]n|wom[ae]n): pilot(s)
|
||||||
|
anchor(?:m[ae]n|wom[ae]n): anchor(s)
|
||||||
|
authoress: author
|
||||||
|
camera(?:m[ae]n|wom[ae]n): camera operator(s)
|
||||||
|
door(?:m[ae]|wom[ae]n): concierge(s)
|
||||||
|
draft(?:m[ae]n|wom[ae]n): drafter(s)
|
||||||
|
fire(?:m[ae]n|wom[ae]n): firefighter(s)
|
||||||
|
fisher(?:m[ae]n|wom[ae]n): fisher(s)
|
||||||
|
fresh(?:m[ae]n|wom[ae]n): first-year student(s)
|
||||||
|
garbage(?:m[ae]n|wom[ae]n): waste collector(s)
|
||||||
|
lady lawyer: lawyer
|
||||||
|
ladylike: courteous
|
||||||
|
mail(?:m[ae]n|wom[ae]n): mail carriers
|
||||||
|
man and wife: husband and wife
|
||||||
|
man enough: strong enough
|
||||||
|
mankind: human kind|humanity
|
||||||
|
manmade: manufactured
|
||||||
|
manpower: personnel
|
||||||
|
middle(?:m[ae]n|wom[ae]n): intermediary
|
||||||
|
news(?:m[ae]n|wom[ae]n): journalist(s)
|
||||||
|
ombuds(?:man|woman): ombuds
|
||||||
|
oneupmanship: upstaging
|
||||||
|
poetess: poet
|
||||||
|
police(?:m[ae]n|wom[ae]n): police officer(s)
|
||||||
|
repair(?:m[ae]n|wom[ae]n): technician(s)
|
||||||
|
sales(?:m[ae]n|wom[ae]n): salesperson or sales people
|
||||||
|
service(?:m[ae]n|wom[ae]n): soldier(s)
|
||||||
|
steward(?:ess)?: flight attendant
|
||||||
|
tribes(?:m[ae]n|wom[ae]n): tribe member(s)
|
||||||
|
waitress: waiter
|
||||||
|
woman doctor: doctor
|
||||||
|
woman scientist[s]?: scientist(s)
|
||||||
|
work(?:m[ae]n|wom[ae]n): worker(s)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't put a period at the end of a heading."
|
||||||
|
link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings"
|
||||||
|
nonword: true
|
||||||
|
level: warning
|
||||||
|
scope: heading
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- trim_right
|
||||||
|
- "."
|
||||||
|
tokens:
|
||||||
|
- '[a-z0-9][.]\s*$'
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
extends: capitalization
|
||||||
|
message: "'%s' should use sentence-style capitalization."
|
||||||
|
link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings"
|
||||||
|
level: warning
|
||||||
|
scope: heading
|
||||||
|
match: $sentence
|
||||||
|
indicators:
|
||||||
|
- ":"
|
||||||
|
exceptions:
|
||||||
|
- Azure
|
||||||
|
- CLI
|
||||||
|
- Cosmos
|
||||||
|
- Docker
|
||||||
|
- Emmet
|
||||||
|
- gRPC
|
||||||
|
- I
|
||||||
|
- Kubernetes
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
- Marketplace
|
||||||
|
- MongoDB
|
||||||
|
- REPL
|
||||||
|
- Studio
|
||||||
|
- TypeScript
|
||||||
|
- URLs
|
||||||
|
- Visual
|
||||||
|
- VS
|
||||||
|
- Windows
|
||||||
|
- JSON
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends: substitution
|
||||||
|
message: "Use '%s' instead of '%s'."
|
||||||
|
link: 'https://developers.google.com/style/abbreviations'
|
||||||
|
ignorecase: true
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
'\b(?:eg|e\.g\.)(?=[\s,;])': for example
|
||||||
|
'\b(?:ie|i\.e\.)(?=[\s,;])': that is
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' doesn't need a hyphen."
|
||||||
|
link: "https://developers.google.com/style/hyphens"
|
||||||
|
level: error
|
||||||
|
ignorecase: false
|
||||||
|
nonword: true
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- regex
|
||||||
|
- "-"
|
||||||
|
- " "
|
||||||
|
tokens:
|
||||||
|
- '\b[^\s-]+ly-\w+\b'
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't use plurals in parentheses such as in '%s'."
|
||||||
|
link: "https://developers.google.com/style/plurals-parentheses"
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- trim_right
|
||||||
|
- "(s)"
|
||||||
|
tokens:
|
||||||
|
- '\b\w+\(s\)'
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Spell out all ordinal numbers ('%s') in text."
|
||||||
|
link: 'https://developers.google.com/style/numbers'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- \d+(?:st|nd|rd|th)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Use the Oxford comma in '%s'."
|
||||||
|
link: 'https://developers.google.com/style/commas'
|
||||||
|
scope: sentence
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- '(?:[^,]+,){1,}\s\w+\s(?:and|or)'
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Use parentheses judiciously."
|
||||||
|
link: 'https://developers.google.com/style/parentheses'
|
||||||
|
nonword: true
|
||||||
|
level: suggestion
|
||||||
|
tokens:
|
||||||
|
- '\(.+\)'
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
extends: existence
|
||||||
|
link: 'https://developers.google.com/style/voice'
|
||||||
|
message: "In general, use active voice instead of passive voice ('%s')."
|
||||||
|
ignorecase: true
|
||||||
|
level: suggestion
|
||||||
|
raw:
|
||||||
|
- \b(am|are|were|being|is|been|was|be)\b\s*
|
||||||
|
tokens:
|
||||||
|
- '[\w]+ed'
|
||||||
|
- awoken
|
||||||
|
- beat
|
||||||
|
- become
|
||||||
|
- been
|
||||||
|
- begun
|
||||||
|
- bent
|
||||||
|
- beset
|
||||||
|
- bet
|
||||||
|
- bid
|
||||||
|
- bidden
|
||||||
|
- bitten
|
||||||
|
- bled
|
||||||
|
- blown
|
||||||
|
- born
|
||||||
|
- bought
|
||||||
|
- bound
|
||||||
|
- bred
|
||||||
|
- broadcast
|
||||||
|
- broken
|
||||||
|
- brought
|
||||||
|
- built
|
||||||
|
- burnt
|
||||||
|
- burst
|
||||||
|
- cast
|
||||||
|
- caught
|
||||||
|
- chosen
|
||||||
|
- clung
|
||||||
|
- come
|
||||||
|
- cost
|
||||||
|
- crept
|
||||||
|
- cut
|
||||||
|
- dealt
|
||||||
|
- dived
|
||||||
|
- done
|
||||||
|
- drawn
|
||||||
|
- dreamt
|
||||||
|
- driven
|
||||||
|
- drunk
|
||||||
|
- dug
|
||||||
|
- eaten
|
||||||
|
- fallen
|
||||||
|
- fed
|
||||||
|
- felt
|
||||||
|
- fit
|
||||||
|
- fled
|
||||||
|
- flown
|
||||||
|
- flung
|
||||||
|
- forbidden
|
||||||
|
- foregone
|
||||||
|
- forgiven
|
||||||
|
- forgotten
|
||||||
|
- forsaken
|
||||||
|
- fought
|
||||||
|
- found
|
||||||
|
- frozen
|
||||||
|
- given
|
||||||
|
- gone
|
||||||
|
- gotten
|
||||||
|
- ground
|
||||||
|
- grown
|
||||||
|
- heard
|
||||||
|
- held
|
||||||
|
- hidden
|
||||||
|
- hit
|
||||||
|
- hung
|
||||||
|
- hurt
|
||||||
|
- kept
|
||||||
|
- knelt
|
||||||
|
- knit
|
||||||
|
- known
|
||||||
|
- laid
|
||||||
|
- lain
|
||||||
|
- leapt
|
||||||
|
- learnt
|
||||||
|
- led
|
||||||
|
- left
|
||||||
|
- lent
|
||||||
|
- let
|
||||||
|
- lighted
|
||||||
|
- lost
|
||||||
|
- made
|
||||||
|
- meant
|
||||||
|
- met
|
||||||
|
- misspelt
|
||||||
|
- mistaken
|
||||||
|
- mown
|
||||||
|
- overcome
|
||||||
|
- overdone
|
||||||
|
- overtaken
|
||||||
|
- overthrown
|
||||||
|
- paid
|
||||||
|
- pled
|
||||||
|
- proven
|
||||||
|
- put
|
||||||
|
- quit
|
||||||
|
- read
|
||||||
|
- rid
|
||||||
|
- ridden
|
||||||
|
- risen
|
||||||
|
- run
|
||||||
|
- rung
|
||||||
|
- said
|
||||||
|
- sat
|
||||||
|
- sawn
|
||||||
|
- seen
|
||||||
|
- sent
|
||||||
|
- set
|
||||||
|
- sewn
|
||||||
|
- shaken
|
||||||
|
- shaven
|
||||||
|
- shed
|
||||||
|
- shod
|
||||||
|
- shone
|
||||||
|
- shorn
|
||||||
|
- shot
|
||||||
|
- shown
|
||||||
|
- shrunk
|
||||||
|
- shut
|
||||||
|
- slain
|
||||||
|
- slept
|
||||||
|
- slid
|
||||||
|
- slit
|
||||||
|
- slung
|
||||||
|
- smitten
|
||||||
|
- sold
|
||||||
|
- sought
|
||||||
|
- sown
|
||||||
|
- sped
|
||||||
|
- spent
|
||||||
|
- spilt
|
||||||
|
- spit
|
||||||
|
- split
|
||||||
|
- spoken
|
||||||
|
- spread
|
||||||
|
- sprung
|
||||||
|
- spun
|
||||||
|
- stolen
|
||||||
|
- stood
|
||||||
|
- stridden
|
||||||
|
- striven
|
||||||
|
- struck
|
||||||
|
- strung
|
||||||
|
- stuck
|
||||||
|
- stung
|
||||||
|
- stunk
|
||||||
|
- sung
|
||||||
|
- sunk
|
||||||
|
- swept
|
||||||
|
- swollen
|
||||||
|
- sworn
|
||||||
|
- swum
|
||||||
|
- swung
|
||||||
|
- taken
|
||||||
|
- taught
|
||||||
|
- thought
|
||||||
|
- thrived
|
||||||
|
- thrown
|
||||||
|
- thrust
|
||||||
|
- told
|
||||||
|
- torn
|
||||||
|
- trodden
|
||||||
|
- understood
|
||||||
|
- upheld
|
||||||
|
- upset
|
||||||
|
- wed
|
||||||
|
- wept
|
||||||
|
- withheld
|
||||||
|
- withstood
|
||||||
|
- woken
|
||||||
|
- won
|
||||||
|
- worn
|
||||||
|
- wound
|
||||||
|
- woven
|
||||||
|
- written
|
||||||
|
- wrung
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't use periods with acronyms or initialisms such as '%s'."
|
||||||
|
link: 'https://developers.google.com/style/abbreviations'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '\b(?:[A-Z]\.){3,}'
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Commas and periods go inside quotation marks."
|
||||||
|
link: 'https://developers.google.com/style/quotation-marks'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
tokens:
|
||||||
|
- '"[^"]+"[.,?]'
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't add words such as 'from' or 'between' to describe a range of numbers."
|
||||||
|
link: 'https://developers.google.com/style/hyphens'
|
||||||
|
nonword: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- '(?:from|between)\s\d+\s?-\s?\d+'
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Use semicolons judiciously."
|
||||||
|
link: 'https://developers.google.com/style/semicolons'
|
||||||
|
nonword: true
|
||||||
|
scope: sentence
|
||||||
|
level: suggestion
|
||||||
|
tokens:
|
||||||
|
- ';'
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't use internet slang abbreviations such as '%s'."
|
||||||
|
link: 'https://developers.google.com/style/abbreviations'
|
||||||
|
ignorecase: true
|
||||||
|
level: error
|
||||||
|
tokens:
|
||||||
|
- 'tl;dr'
|
||||||
|
- ymmv
|
||||||
|
- rtfm
|
||||||
|
- imo
|
||||||
|
- fwiw
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' should have one space."
|
||||||
|
link: 'https://developers.google.com/style/sentence-spacing'
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
action:
|
||||||
|
name: remove
|
||||||
|
tokens:
|
||||||
|
- '[a-z][.?!] {2,}[A-Z]'
|
||||||
|
- '[a-z][.?!][A-Z]'
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "In general, use American spelling instead of '%s'."
|
||||||
|
link: 'https://developers.google.com/style/spelling'
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- '(?:\w+)nised?'
|
||||||
|
- 'colour'
|
||||||
|
- 'labour'
|
||||||
|
- 'centre'
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Put a nonbreaking space between the number and the unit in '%s'."
|
||||||
|
link: "https://developers.google.com/style/units-of-measure"
|
||||||
|
nonword: true
|
||||||
|
level: error
|
||||||
|
tokens:
|
||||||
|
- \b\d+(?:B|kB|MB|GB|TB)
|
||||||
|
- \b\d+(?:ns|ms|s|min|h|d)
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Try to avoid using first-person plural like '%s'."
|
||||||
|
link: 'https://developers.google.com/style/pronouns#personal-pronouns'
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
tokens:
|
||||||
|
- we
|
||||||
|
- we'(?:ve|re)
|
||||||
|
- ours?
|
||||||
|
- us
|
||||||
|
- let's
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Avoid using '%s'."
|
||||||
|
link: 'https://developers.google.com/style/tense'
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- will
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
extends: substitution
|
||||||
|
message: "Use '%s' instead of '%s'."
|
||||||
|
link: "https://developers.google.com/style/word-list"
|
||||||
|
level: warning
|
||||||
|
ignorecase: false
|
||||||
|
action:
|
||||||
|
name: replace
|
||||||
|
swap:
|
||||||
|
"(?:API Console|dev|developer) key": API key
|
||||||
|
"(?:cell ?phone|smart ?phone)": phone|mobile phone
|
||||||
|
"(?:dev|developer|APIs) console": API console
|
||||||
|
"(?:e-mail|Email|E-mail)": email
|
||||||
|
"(?:file ?path|path ?name)": path
|
||||||
|
"(?:kill|terminate|abort)": stop|exit|cancel|end
|
||||||
|
"(?:OAuth ?2|Oauth)": OAuth 2.0
|
||||||
|
"(?:ok|Okay)": OK|okay
|
||||||
|
"(?:WiFi|wifi)": Wi-Fi
|
||||||
|
'[\.]+apk': APK
|
||||||
|
'3\-D': 3D
|
||||||
|
'Google (?:I\-O|IO)': Google I/O
|
||||||
|
"tap (?:&|and) hold": touch & hold
|
||||||
|
"un(?:check|select)": clear
|
||||||
|
above: preceding
|
||||||
|
account name: username
|
||||||
|
action bar: app bar
|
||||||
|
admin: administrator
|
||||||
|
Ajax: AJAX
|
||||||
|
a\.k\.a|aka: or|also known as
|
||||||
|
Android device: Android-powered device
|
||||||
|
android: Android
|
||||||
|
API explorer: APIs Explorer
|
||||||
|
application: app
|
||||||
|
approx\.: approximately
|
||||||
|
authN: authentication
|
||||||
|
authZ: authorization
|
||||||
|
autoupdate: automatically update
|
||||||
|
cellular data: mobile data
|
||||||
|
cellular network: mobile network
|
||||||
|
chapter: documents|pages|sections
|
||||||
|
check box: checkbox
|
||||||
|
CLI: command-line tool
|
||||||
|
click on: click|click in
|
||||||
|
Cloud: Google Cloud Platform|GCP
|
||||||
|
Container Engine: Kubernetes Engine
|
||||||
|
content type: media type
|
||||||
|
curated roles: predefined roles
|
||||||
|
data are: data is
|
||||||
|
Developers Console: Google API Console|API Console
|
||||||
|
disabled?: turn off|off
|
||||||
|
ephemeral IP address: ephemeral external IP address
|
||||||
|
fewer data: less data
|
||||||
|
file name: filename
|
||||||
|
firewalls: firewall rules
|
||||||
|
functionality: capability|feature
|
||||||
|
Google account: Google Account
|
||||||
|
Google accounts: Google Accounts
|
||||||
|
Googling: search with Google
|
||||||
|
grayed-out: unavailable
|
||||||
|
HTTPs: HTTPS
|
||||||
|
in order to: to
|
||||||
|
ingest: import|load
|
||||||
|
k8s: Kubernetes
|
||||||
|
long press: touch & hold
|
||||||
|
network IP address: internal IP address
|
||||||
|
omnibox: address bar
|
||||||
|
open-source: open source
|
||||||
|
overview screen: recents screen
|
||||||
|
regex: regular expression
|
||||||
|
SHA1: SHA-1|HAS-SHA1
|
||||||
|
sign into: sign in to
|
||||||
|
sign-?on: single sign-on
|
||||||
|
static IP address: static external IP address
|
||||||
|
stylesheet: style sheet
|
||||||
|
synch: sync
|
||||||
|
tablename: table name
|
||||||
|
tablet: device
|
||||||
|
touch: tap
|
||||||
|
url: URL
|
||||||
|
vs\.: versus
|
||||||
|
World Wide Web: web
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"feed": "https://github.com/errata-ai/Google/releases.atom",
|
||||||
|
"vale_version": ">=1.0.0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Automated Readability Index (%s) below 8."
|
||||||
|
link: https://en.wikipedia.org/wiki/Automated_readability_index
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
(4.71 * (characters / words)) + (0.5 * (words / sentences)) - 21.43
|
||||||
|
|
||||||
|
condition: "> 8"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Coleman–Liau Index grade (%s) below 9."
|
||||||
|
link: https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
(0.0588 * (characters / words) * 100) - (0.296 * (sentences / words) * 100) - 15.8
|
||||||
|
|
||||||
|
condition: "> 9"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Flesch–Kincaid grade level (%s) below 8."
|
||||||
|
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
|
||||||
|
|
||||||
|
condition: "> 8"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Flesch reading ease score (%s) above 70."
|
||||||
|
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
206.835 - (1.015 * (words / sentences)) - (84.6 * (syllables / words))
|
||||||
|
|
||||||
|
condition: "< 70"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the Gunning-Fog index (%s) below 10."
|
||||||
|
link: https://en.wikipedia.org/wiki/Gunning_fog_index
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
0.4 * ((words / sentences) + 100 * (complex_words / words))
|
||||||
|
|
||||||
|
condition: "> 10"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the LIX score (%s) below 35."
|
||||||
|
|
||||||
|
link: https://en.wikipedia.org/wiki/Lix_(readability_test)
|
||||||
|
# Very Easy: 20 - 25
|
||||||
|
#
|
||||||
|
# Easy: 30 - 35
|
||||||
|
#
|
||||||
|
# Medium: 40 - 45
|
||||||
|
#
|
||||||
|
# Difficult: 50 - 55
|
||||||
|
#
|
||||||
|
# Very Difficult: 60+
|
||||||
|
formula: |
|
||||||
|
(words / sentences) + ((long_words * 100) / words)
|
||||||
|
|
||||||
|
condition: "> 35"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
extends: metric
|
||||||
|
message: "Try to keep the SMOG grade (%s) below 10."
|
||||||
|
link: https://en.wikipedia.org/wiki/SMOG
|
||||||
|
|
||||||
|
formula: |
|
||||||
|
1.0430 * math.sqrt((polysyllabic_words * 30.0) / sentences) + 3.1291
|
||||||
|
|
||||||
|
condition: "> 10"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"feed": "https://github.com/errata-ai/Readability/releases.atom",
|
||||||
|
"vale_version": ">=2.13.0"
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
devx
|
||||||
|
grm
|
||||||
|
GRM
|
||||||
|
Gitea
|
||||||
|
ZITADEL
|
||||||
|
OpenTofu
|
||||||
|
Ansible
|
||||||
|
Vaultwarden
|
||||||
|
Nextcloud
|
||||||
|
Vikunja
|
||||||
|
Mattermost
|
||||||
|
Prometheus
|
||||||
|
Grafana
|
||||||
|
Loki
|
||||||
|
Alertmanager
|
||||||
|
Promtail
|
||||||
|
pyproject
|
||||||
|
tofu
|
||||||
|
act_runner
|
||||||
|
actionlint
|
||||||
|
hadolint
|
||||||
|
git-cliff
|
||||||
|
pre-commit
|
||||||
|
semver
|
||||||
|
changelog
|
||||||
|
idempotent
|
||||||
|
rootless
|
||||||
|
OIDC
|
||||||
|
SSO
|
||||||
|
SAML
|
||||||
|
LDAP
|
||||||
|
pytest
|
||||||
|
molecule
|
||||||
|
ruff
|
||||||
|
pyright
|
||||||
|
bandit
|
||||||
|
Vale
|
||||||
|
oblachno
|
||||||
|
Oblachno
|
||||||
|
Bulgarian
|
||||||
|
gitea-runner
|
||||||
|
runner
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Unlabeled code block — add a language tag (```bash, ```yaml, etc.)"
|
||||||
|
level: warning
|
||||||
|
scope: raw
|
||||||
|
raw:
|
||||||
|
- '(?s)```\n(?!.*```)'
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Avoid '%s' — it's condescending in technical documentation"
|
||||||
|
level: warning
|
||||||
|
ignorecase: true
|
||||||
|
tokens:
|
||||||
|
- '\bsimply\b'
|
||||||
|
- '\bjust\b'
|
||||||
|
- '\bobviously\b'
|
||||||
|
- '\bof course\b'
|
||||||
|
- '\bas you (can )?see\b'
|
||||||
|
- '\beasily\b'
|
||||||
|
- '\btrivial\b'
|
||||||
|
- '\bstraightforward\b'
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Custom Vale style for devx documentation
|
||||||
|
|
||||||
|
Project-specific terminology and style rules
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends: substitution
|
||||||
|
message: "Use '%s' instead of '%s' (terminology consistency)"
|
||||||
|
level: error
|
||||||
|
ignorecase: false
|
||||||
|
swap:
|
||||||
|
'\b(?i)gitea\b': Gitea
|
||||||
|
'\b(?i)zitadel\b': ZITADEL
|
||||||
|
'\b(?i)opentofu\b': OpenTofu
|
||||||
|
'\b(?i)vaultwarden\b': Vaultwarden
|
||||||
|
'\b(?i)nextcloud\b': Nextcloud
|
||||||
|
'\b(?i)mattermost\b': Mattermost
|
||||||
@@ -0,0 +1,702 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Try to avoid using clichés like '%s'."
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- a chip off the old block
|
||||||
|
- a clean slate
|
||||||
|
- a dark and stormy night
|
||||||
|
- a far cry
|
||||||
|
- a fine kettle of fish
|
||||||
|
- a loose cannon
|
||||||
|
- a penny saved is a penny earned
|
||||||
|
- a tough row to hoe
|
||||||
|
- a word to the wise
|
||||||
|
- ace in the hole
|
||||||
|
- acid test
|
||||||
|
- add insult to injury
|
||||||
|
- against all odds
|
||||||
|
- air your dirty laundry
|
||||||
|
- all fun and games
|
||||||
|
- all in a day's work
|
||||||
|
- all talk, no action
|
||||||
|
- all thumbs
|
||||||
|
- all your eggs in one basket
|
||||||
|
- all's fair in love and war
|
||||||
|
- all's well that ends well
|
||||||
|
- almighty dollar
|
||||||
|
- American as apple pie
|
||||||
|
- an axe to grind
|
||||||
|
- another day, another dollar
|
||||||
|
- armed to the teeth
|
||||||
|
- as luck would have it
|
||||||
|
- as old as time
|
||||||
|
- as the crow flies
|
||||||
|
- at loose ends
|
||||||
|
- at my wits end
|
||||||
|
- avoid like the plague
|
||||||
|
- babe in the woods
|
||||||
|
- back against the wall
|
||||||
|
- back in the saddle
|
||||||
|
- back to square one
|
||||||
|
- back to the drawing board
|
||||||
|
- bad to the bone
|
||||||
|
- badge of honor
|
||||||
|
- bald faced liar
|
||||||
|
- ballpark figure
|
||||||
|
- banging your head against a brick wall
|
||||||
|
- baptism by fire
|
||||||
|
- barking up the wrong tree
|
||||||
|
- bat out of hell
|
||||||
|
- be all and end all
|
||||||
|
- beat a dead horse
|
||||||
|
- beat around the bush
|
||||||
|
- been there, done that
|
||||||
|
- beggars can't be choosers
|
||||||
|
- behind the eight ball
|
||||||
|
- bend over backwards
|
||||||
|
- benefit of the doubt
|
||||||
|
- bent out of shape
|
||||||
|
- best thing since sliced bread
|
||||||
|
- bet your bottom dollar
|
||||||
|
- better half
|
||||||
|
- better late than never
|
||||||
|
- better mousetrap
|
||||||
|
- better safe than sorry
|
||||||
|
- between a rock and a hard place
|
||||||
|
- beyond the pale
|
||||||
|
- bide your time
|
||||||
|
- big as life
|
||||||
|
- big cheese
|
||||||
|
- big fish in a small pond
|
||||||
|
- big man on campus
|
||||||
|
- bigger they are the harder they fall
|
||||||
|
- bird in the hand
|
||||||
|
- bird's eye view
|
||||||
|
- birds and the bees
|
||||||
|
- birds of a feather flock together
|
||||||
|
- bit the hand that feeds you
|
||||||
|
- bite the bullet
|
||||||
|
- bite the dust
|
||||||
|
- bitten off more than he can chew
|
||||||
|
- black as coal
|
||||||
|
- black as pitch
|
||||||
|
- black as the ace of spades
|
||||||
|
- blast from the past
|
||||||
|
- bleeding heart
|
||||||
|
- blessing in disguise
|
||||||
|
- blind ambition
|
||||||
|
- blind as a bat
|
||||||
|
- blind leading the blind
|
||||||
|
- blood is thicker than water
|
||||||
|
- blood sweat and tears
|
||||||
|
- blow off steam
|
||||||
|
- blow your own horn
|
||||||
|
- blushing bride
|
||||||
|
- boils down to
|
||||||
|
- bolt from the blue
|
||||||
|
- bone to pick
|
||||||
|
- bored stiff
|
||||||
|
- bored to tears
|
||||||
|
- bottomless pit
|
||||||
|
- boys will be boys
|
||||||
|
- bright and early
|
||||||
|
- brings home the bacon
|
||||||
|
- broad across the beam
|
||||||
|
- broken record
|
||||||
|
- brought back to reality
|
||||||
|
- bull by the horns
|
||||||
|
- bull in a china shop
|
||||||
|
- burn the midnight oil
|
||||||
|
- burning question
|
||||||
|
- burning the candle at both ends
|
||||||
|
- burst your bubble
|
||||||
|
- bury the hatchet
|
||||||
|
- busy as a bee
|
||||||
|
- by hook or by crook
|
||||||
|
- call a spade a spade
|
||||||
|
- called onto the carpet
|
||||||
|
- calm before the storm
|
||||||
|
- can of worms
|
||||||
|
- can't cut the mustard
|
||||||
|
- can't hold a candle to
|
||||||
|
- case of mistaken identity
|
||||||
|
- cat got your tongue
|
||||||
|
- cat's meow
|
||||||
|
- caught in the crossfire
|
||||||
|
- caught red-handed
|
||||||
|
- checkered past
|
||||||
|
- chomping at the bit
|
||||||
|
- cleanliness is next to godliness
|
||||||
|
- clear as a bell
|
||||||
|
- clear as mud
|
||||||
|
- close to the vest
|
||||||
|
- cock and bull story
|
||||||
|
- cold shoulder
|
||||||
|
- come hell or high water
|
||||||
|
- cool as a cucumber
|
||||||
|
- cool, calm, and collected
|
||||||
|
- cost a king's ransom
|
||||||
|
- count your blessings
|
||||||
|
- crack of dawn
|
||||||
|
- crash course
|
||||||
|
- creature comforts
|
||||||
|
- cross that bridge when you come to it
|
||||||
|
- crushing blow
|
||||||
|
- cry like a baby
|
||||||
|
- cry me a river
|
||||||
|
- cry over spilt milk
|
||||||
|
- crystal clear
|
||||||
|
- curiosity killed the cat
|
||||||
|
- cut and dried
|
||||||
|
- cut through the red tape
|
||||||
|
- cut to the chase
|
||||||
|
- cute as a bugs ear
|
||||||
|
- cute as a button
|
||||||
|
- cute as a puppy
|
||||||
|
- cuts to the quick
|
||||||
|
- dark before the dawn
|
||||||
|
- day in, day out
|
||||||
|
- dead as a doornail
|
||||||
|
- devil is in the details
|
||||||
|
- dime a dozen
|
||||||
|
- divide and conquer
|
||||||
|
- dog and pony show
|
||||||
|
- dog days
|
||||||
|
- dog eat dog
|
||||||
|
- dog tired
|
||||||
|
- don't burn your bridges
|
||||||
|
- don't count your chickens
|
||||||
|
- don't look a gift horse in the mouth
|
||||||
|
- don't rock the boat
|
||||||
|
- don't step on anyone's toes
|
||||||
|
- don't take any wooden nickels
|
||||||
|
- down and out
|
||||||
|
- down at the heels
|
||||||
|
- down in the dumps
|
||||||
|
- down the hatch
|
||||||
|
- down to earth
|
||||||
|
- draw the line
|
||||||
|
- dressed to kill
|
||||||
|
- dressed to the nines
|
||||||
|
- drives me up the wall
|
||||||
|
- dull as dishwater
|
||||||
|
- dyed in the wool
|
||||||
|
- eagle eye
|
||||||
|
- ear to the ground
|
||||||
|
- early bird catches the worm
|
||||||
|
- easier said than done
|
||||||
|
- easy as pie
|
||||||
|
- eat your heart out
|
||||||
|
- eat your words
|
||||||
|
- eleventh hour
|
||||||
|
- even the playing field
|
||||||
|
- every dog has its day
|
||||||
|
- every fiber of my being
|
||||||
|
- everything but the kitchen sink
|
||||||
|
- eye for an eye
|
||||||
|
- face the music
|
||||||
|
- facts of life
|
||||||
|
- fair weather friend
|
||||||
|
- fall by the wayside
|
||||||
|
- fan the flames
|
||||||
|
- feast or famine
|
||||||
|
- feather your nest
|
||||||
|
- feathered friends
|
||||||
|
- few and far between
|
||||||
|
- fifteen minutes of fame
|
||||||
|
- filthy vermin
|
||||||
|
- fine kettle of fish
|
||||||
|
- fish out of water
|
||||||
|
- fishing for a compliment
|
||||||
|
- fit as a fiddle
|
||||||
|
- fit the bill
|
||||||
|
- fit to be tied
|
||||||
|
- flash in the pan
|
||||||
|
- flat as a pancake
|
||||||
|
- flip your lid
|
||||||
|
- flog a dead horse
|
||||||
|
- fly by night
|
||||||
|
- fly the coop
|
||||||
|
- follow your heart
|
||||||
|
- for all intents and purposes
|
||||||
|
- for the birds
|
||||||
|
- for what it's worth
|
||||||
|
- force of nature
|
||||||
|
- force to be reckoned with
|
||||||
|
- forgive and forget
|
||||||
|
- fox in the henhouse
|
||||||
|
- free and easy
|
||||||
|
- free as a bird
|
||||||
|
- fresh as a daisy
|
||||||
|
- full steam ahead
|
||||||
|
- fun in the sun
|
||||||
|
- garbage in, garbage out
|
||||||
|
- gentle as a lamb
|
||||||
|
- get a kick out of
|
||||||
|
- get a leg up
|
||||||
|
- get down and dirty
|
||||||
|
- get the lead out
|
||||||
|
- get to the bottom of
|
||||||
|
- get your feet wet
|
||||||
|
- gets my goat
|
||||||
|
- gilding the lily
|
||||||
|
- give and take
|
||||||
|
- go against the grain
|
||||||
|
- go at it tooth and nail
|
||||||
|
- go for broke
|
||||||
|
- go him one better
|
||||||
|
- go the extra mile
|
||||||
|
- go with the flow
|
||||||
|
- goes without saying
|
||||||
|
- good as gold
|
||||||
|
- good deed for the day
|
||||||
|
- good things come to those who wait
|
||||||
|
- good time was had by all
|
||||||
|
- good times were had by all
|
||||||
|
- greased lightning
|
||||||
|
- greek to me
|
||||||
|
- green thumb
|
||||||
|
- green-eyed monster
|
||||||
|
- grist for the mill
|
||||||
|
- growing like a weed
|
||||||
|
- hair of the dog
|
||||||
|
- hand to mouth
|
||||||
|
- happy as a clam
|
||||||
|
- happy as a lark
|
||||||
|
- hasn't a clue
|
||||||
|
- have a nice day
|
||||||
|
- have high hopes
|
||||||
|
- have the last laugh
|
||||||
|
- haven't got a row to hoe
|
||||||
|
- head honcho
|
||||||
|
- head over heels
|
||||||
|
- hear a pin drop
|
||||||
|
- heard it through the grapevine
|
||||||
|
- heart's content
|
||||||
|
- heavy as lead
|
||||||
|
- hem and haw
|
||||||
|
- high and dry
|
||||||
|
- high and mighty
|
||||||
|
- high as a kite
|
||||||
|
- hit paydirt
|
||||||
|
- hold your head up high
|
||||||
|
- hold your horses
|
||||||
|
- hold your own
|
||||||
|
- hold your tongue
|
||||||
|
- honest as the day is long
|
||||||
|
- horns of a dilemma
|
||||||
|
- horse of a different color
|
||||||
|
- hot under the collar
|
||||||
|
- hour of need
|
||||||
|
- I beg to differ
|
||||||
|
- icing on the cake
|
||||||
|
- if the shoe fits
|
||||||
|
- if the shoe were on the other foot
|
||||||
|
- in a jam
|
||||||
|
- in a jiffy
|
||||||
|
- in a nutshell
|
||||||
|
- in a pig's eye
|
||||||
|
- in a pinch
|
||||||
|
- in a word
|
||||||
|
- in hot water
|
||||||
|
- in the gutter
|
||||||
|
- in the nick of time
|
||||||
|
- in the thick of it
|
||||||
|
- in your dreams
|
||||||
|
- it ain't over till the fat lady sings
|
||||||
|
- it goes without saying
|
||||||
|
- it takes all kinds
|
||||||
|
- it takes one to know one
|
||||||
|
- it's a small world
|
||||||
|
- it's only a matter of time
|
||||||
|
- ivory tower
|
||||||
|
- Jack of all trades
|
||||||
|
- jockey for position
|
||||||
|
- jog your memory
|
||||||
|
- joined at the hip
|
||||||
|
- judge a book by its cover
|
||||||
|
- jump down your throat
|
||||||
|
- jump in with both feet
|
||||||
|
- jump on the bandwagon
|
||||||
|
- jump the gun
|
||||||
|
- jump to conclusions
|
||||||
|
- just a hop, skip, and a jump
|
||||||
|
- just the ticket
|
||||||
|
- justice is blind
|
||||||
|
- keep a stiff upper lip
|
||||||
|
- keep an eye on
|
||||||
|
- keep it simple, stupid
|
||||||
|
- keep the home fires burning
|
||||||
|
- keep up with the Joneses
|
||||||
|
- keep your chin up
|
||||||
|
- keep your fingers crossed
|
||||||
|
- kick the bucket
|
||||||
|
- kick up your heels
|
||||||
|
- kick your feet up
|
||||||
|
- kid in a candy store
|
||||||
|
- kill two birds with one stone
|
||||||
|
- kiss of death
|
||||||
|
- knock it out of the park
|
||||||
|
- knock on wood
|
||||||
|
- knock your socks off
|
||||||
|
- know him from Adam
|
||||||
|
- know the ropes
|
||||||
|
- know the score
|
||||||
|
- knuckle down
|
||||||
|
- knuckle sandwich
|
||||||
|
- knuckle under
|
||||||
|
- labor of love
|
||||||
|
- ladder of success
|
||||||
|
- land on your feet
|
||||||
|
- lap of luxury
|
||||||
|
- last but not least
|
||||||
|
- last hurrah
|
||||||
|
- last-ditch effort
|
||||||
|
- law of the jungle
|
||||||
|
- law of the land
|
||||||
|
- lay down the law
|
||||||
|
- leaps and bounds
|
||||||
|
- let sleeping dogs lie
|
||||||
|
- let the cat out of the bag
|
||||||
|
- let the good times roll
|
||||||
|
- let your hair down
|
||||||
|
- let's talk turkey
|
||||||
|
- letter perfect
|
||||||
|
- lick your wounds
|
||||||
|
- lies like a rug
|
||||||
|
- life's a bitch
|
||||||
|
- life's a grind
|
||||||
|
- light at the end of the tunnel
|
||||||
|
- lighter than a feather
|
||||||
|
- lighter than air
|
||||||
|
- like clockwork
|
||||||
|
- like father like son
|
||||||
|
- like taking candy from a baby
|
||||||
|
- like there's no tomorrow
|
||||||
|
- lion's share
|
||||||
|
- live and learn
|
||||||
|
- live and let live
|
||||||
|
- long and short of it
|
||||||
|
- long lost love
|
||||||
|
- look before you leap
|
||||||
|
- look down your nose
|
||||||
|
- look what the cat dragged in
|
||||||
|
- looking a gift horse in the mouth
|
||||||
|
- looks like death warmed over
|
||||||
|
- loose cannon
|
||||||
|
- lose your head
|
||||||
|
- lose your temper
|
||||||
|
- loud as a horn
|
||||||
|
- lounge lizard
|
||||||
|
- loved and lost
|
||||||
|
- low man on the totem pole
|
||||||
|
- luck of the draw
|
||||||
|
- luck of the Irish
|
||||||
|
- make hay while the sun shines
|
||||||
|
- make money hand over fist
|
||||||
|
- make my day
|
||||||
|
- make the best of a bad situation
|
||||||
|
- make the best of it
|
||||||
|
- make your blood boil
|
||||||
|
- man of few words
|
||||||
|
- man's best friend
|
||||||
|
- mark my words
|
||||||
|
- meaningful dialogue
|
||||||
|
- missed the boat on that one
|
||||||
|
- moment in the sun
|
||||||
|
- moment of glory
|
||||||
|
- moment of truth
|
||||||
|
- money to burn
|
||||||
|
- more power to you
|
||||||
|
- more than one way to skin a cat
|
||||||
|
- movers and shakers
|
||||||
|
- moving experience
|
||||||
|
- naked as a jaybird
|
||||||
|
- naked truth
|
||||||
|
- neat as a pin
|
||||||
|
- needle in a haystack
|
||||||
|
- needless to say
|
||||||
|
- neither here nor there
|
||||||
|
- never look back
|
||||||
|
- never say never
|
||||||
|
- nip and tuck
|
||||||
|
- nip it in the bud
|
||||||
|
- no guts, no glory
|
||||||
|
- no love lost
|
||||||
|
- no pain, no gain
|
||||||
|
- no skin off my back
|
||||||
|
- no stone unturned
|
||||||
|
- no time like the present
|
||||||
|
- no use crying over spilled milk
|
||||||
|
- nose to the grindstone
|
||||||
|
- not a hope in hell
|
||||||
|
- not a minute's peace
|
||||||
|
- not in my backyard
|
||||||
|
- not playing with a full deck
|
||||||
|
- not the end of the world
|
||||||
|
- not written in stone
|
||||||
|
- nothing to sneeze at
|
||||||
|
- nothing ventured nothing gained
|
||||||
|
- now we're cooking
|
||||||
|
- off the top of my head
|
||||||
|
- off the wagon
|
||||||
|
- off the wall
|
||||||
|
- old hat
|
||||||
|
- older and wiser
|
||||||
|
- older than dirt
|
||||||
|
- older than Methuselah
|
||||||
|
- on a roll
|
||||||
|
- on cloud nine
|
||||||
|
- on pins and needles
|
||||||
|
- on the bandwagon
|
||||||
|
- on the money
|
||||||
|
- on the nose
|
||||||
|
- on the rocks
|
||||||
|
- on the spot
|
||||||
|
- on the tip of my tongue
|
||||||
|
- on the wagon
|
||||||
|
- on thin ice
|
||||||
|
- once bitten, twice shy
|
||||||
|
- one bad apple doesn't spoil the bushel
|
||||||
|
- one born every minute
|
||||||
|
- one brick short
|
||||||
|
- one foot in the grave
|
||||||
|
- one in a million
|
||||||
|
- one red cent
|
||||||
|
- only game in town
|
||||||
|
- open a can of worms
|
||||||
|
- open and shut case
|
||||||
|
- open the flood gates
|
||||||
|
- opportunity doesn't knock twice
|
||||||
|
- out of pocket
|
||||||
|
- out of sight, out of mind
|
||||||
|
- out of the frying pan into the fire
|
||||||
|
- out of the woods
|
||||||
|
- out on a limb
|
||||||
|
- over a barrel
|
||||||
|
- over the hump
|
||||||
|
- pain and suffering
|
||||||
|
- pain in the
|
||||||
|
- panic button
|
||||||
|
- par for the course
|
||||||
|
- part and parcel
|
||||||
|
- party pooper
|
||||||
|
- pass the buck
|
||||||
|
- patience is a virtue
|
||||||
|
- pay through the nose
|
||||||
|
- penny pincher
|
||||||
|
- perfect storm
|
||||||
|
- pig in a poke
|
||||||
|
- pile it on
|
||||||
|
- pillar of the community
|
||||||
|
- pin your hopes on
|
||||||
|
- pitter patter of little feet
|
||||||
|
- plain as day
|
||||||
|
- plain as the nose on your face
|
||||||
|
- play by the rules
|
||||||
|
- play your cards right
|
||||||
|
- playing the field
|
||||||
|
- playing with fire
|
||||||
|
- pleased as punch
|
||||||
|
- plenty of fish in the sea
|
||||||
|
- point with pride
|
||||||
|
- poor as a church mouse
|
||||||
|
- pot calling the kettle black
|
||||||
|
- pretty as a picture
|
||||||
|
- pull a fast one
|
||||||
|
- pull your punches
|
||||||
|
- pulling your leg
|
||||||
|
- pure as the driven snow
|
||||||
|
- put it in a nutshell
|
||||||
|
- put one over on you
|
||||||
|
- put the cart before the horse
|
||||||
|
- put the pedal to the metal
|
||||||
|
- put your best foot forward
|
||||||
|
- put your foot down
|
||||||
|
- quick as a bunny
|
||||||
|
- quick as a lick
|
||||||
|
- quick as a wink
|
||||||
|
- quick as lightning
|
||||||
|
- quiet as a dormouse
|
||||||
|
- rags to riches
|
||||||
|
- raining buckets
|
||||||
|
- raining cats and dogs
|
||||||
|
- rank and file
|
||||||
|
- rat race
|
||||||
|
- reap what you sow
|
||||||
|
- red as a beet
|
||||||
|
- red herring
|
||||||
|
- reinvent the wheel
|
||||||
|
- rich and famous
|
||||||
|
- rings a bell
|
||||||
|
- ripe old age
|
||||||
|
- ripped me off
|
||||||
|
- rise and shine
|
||||||
|
- road to hell is paved with good intentions
|
||||||
|
- rob Peter to pay Paul
|
||||||
|
- roll over in the grave
|
||||||
|
- rub the wrong way
|
||||||
|
- ruled the roost
|
||||||
|
- running in circles
|
||||||
|
- sad but true
|
||||||
|
- sadder but wiser
|
||||||
|
- salt of the earth
|
||||||
|
- scared stiff
|
||||||
|
- scared to death
|
||||||
|
- sealed with a kiss
|
||||||
|
- second to none
|
||||||
|
- see eye to eye
|
||||||
|
- seen the light
|
||||||
|
- seize the day
|
||||||
|
- set the record straight
|
||||||
|
- set the world on fire
|
||||||
|
- set your teeth on edge
|
||||||
|
- sharp as a tack
|
||||||
|
- shoot for the moon
|
||||||
|
- shoot the breeze
|
||||||
|
- shot in the dark
|
||||||
|
- shoulder to the wheel
|
||||||
|
- sick as a dog
|
||||||
|
- sigh of relief
|
||||||
|
- signed, sealed, and delivered
|
||||||
|
- sink or swim
|
||||||
|
- six of one, half a dozen of another
|
||||||
|
- skating on thin ice
|
||||||
|
- slept like a log
|
||||||
|
- slinging mud
|
||||||
|
- slippery as an eel
|
||||||
|
- slow as molasses
|
||||||
|
- smart as a whip
|
||||||
|
- smooth as a baby's bottom
|
||||||
|
- sneaking suspicion
|
||||||
|
- snug as a bug in a rug
|
||||||
|
- sow wild oats
|
||||||
|
- spare the rod, spoil the child
|
||||||
|
- speak of the devil
|
||||||
|
- spilled the beans
|
||||||
|
- spinning your wheels
|
||||||
|
- spitting image of
|
||||||
|
- spoke with relish
|
||||||
|
- spread like wildfire
|
||||||
|
- spring to life
|
||||||
|
- squeaky wheel gets the grease
|
||||||
|
- stands out like a sore thumb
|
||||||
|
- start from scratch
|
||||||
|
- stick in the mud
|
||||||
|
- still waters run deep
|
||||||
|
- stitch in time
|
||||||
|
- stop and smell the roses
|
||||||
|
- straight as an arrow
|
||||||
|
- straw that broke the camel's back
|
||||||
|
- strong as an ox
|
||||||
|
- stubborn as a mule
|
||||||
|
- stuff that dreams are made of
|
||||||
|
- stuffed shirt
|
||||||
|
- sweating blood
|
||||||
|
- sweating bullets
|
||||||
|
- take a load off
|
||||||
|
- take one for the team
|
||||||
|
- take the bait
|
||||||
|
- take the bull by the horns
|
||||||
|
- take the plunge
|
||||||
|
- takes one to know one
|
||||||
|
- takes two to tango
|
||||||
|
- the more the merrier
|
||||||
|
- the real deal
|
||||||
|
- the real McCoy
|
||||||
|
- the red carpet treatment
|
||||||
|
- the same old story
|
||||||
|
- there is no accounting for taste
|
||||||
|
- thick as a brick
|
||||||
|
- thick as thieves
|
||||||
|
- thin as a rail
|
||||||
|
- think outside of the box
|
||||||
|
- third time's the charm
|
||||||
|
- this day and age
|
||||||
|
- this hurts me worse than it hurts you
|
||||||
|
- this point in time
|
||||||
|
- three sheets to the wind
|
||||||
|
- through thick and thin
|
||||||
|
- throw in the towel
|
||||||
|
- tie one on
|
||||||
|
- tighter than a drum
|
||||||
|
- time and time again
|
||||||
|
- time is of the essence
|
||||||
|
- tip of the iceberg
|
||||||
|
- tired but happy
|
||||||
|
- to coin a phrase
|
||||||
|
- to each his own
|
||||||
|
- to make a long story short
|
||||||
|
- to the best of my knowledge
|
||||||
|
- toe the line
|
||||||
|
- tongue in cheek
|
||||||
|
- too good to be true
|
||||||
|
- too hot to handle
|
||||||
|
- too numerous to mention
|
||||||
|
- touch with a ten foot pole
|
||||||
|
- tough as nails
|
||||||
|
- trial and error
|
||||||
|
- trials and tribulations
|
||||||
|
- tried and true
|
||||||
|
- trip down memory lane
|
||||||
|
- twist of fate
|
||||||
|
- two cents worth
|
||||||
|
- two peas in a pod
|
||||||
|
- ugly as sin
|
||||||
|
- under the counter
|
||||||
|
- under the gun
|
||||||
|
- under the same roof
|
||||||
|
- under the weather
|
||||||
|
- until the cows come home
|
||||||
|
- unvarnished truth
|
||||||
|
- up the creek
|
||||||
|
- uphill battle
|
||||||
|
- upper crust
|
||||||
|
- upset the applecart
|
||||||
|
- vain attempt
|
||||||
|
- vain effort
|
||||||
|
- vanquish the enemy
|
||||||
|
- vested interest
|
||||||
|
- waiting for the other shoe to drop
|
||||||
|
- wakeup call
|
||||||
|
- warm welcome
|
||||||
|
- watch your p's and q's
|
||||||
|
- watch your tongue
|
||||||
|
- watching the clock
|
||||||
|
- water under the bridge
|
||||||
|
- weather the storm
|
||||||
|
- weed them out
|
||||||
|
- week of Sundays
|
||||||
|
- went belly up
|
||||||
|
- wet behind the ears
|
||||||
|
- what goes around comes around
|
||||||
|
- what you see is what you get
|
||||||
|
- when it rains, it pours
|
||||||
|
- when push comes to shove
|
||||||
|
- when the cat's away
|
||||||
|
- when the going gets tough, the tough get going
|
||||||
|
- white as a sheet
|
||||||
|
- whole ball of wax
|
||||||
|
- whole hog
|
||||||
|
- whole nine yards
|
||||||
|
- wild goose chase
|
||||||
|
- will wonders never cease?
|
||||||
|
- wisdom of the ages
|
||||||
|
- wise as an owl
|
||||||
|
- wolf at the door
|
||||||
|
- words fail me
|
||||||
|
- work like a dog
|
||||||
|
- world weary
|
||||||
|
- worst nightmare
|
||||||
|
- worth its weight in gold
|
||||||
|
- wrong side of the bed
|
||||||
|
- yanking your chain
|
||||||
|
- yappy as a dog
|
||||||
|
- years young
|
||||||
|
- you are what you eat
|
||||||
|
- you can run but you can't hide
|
||||||
|
- you only live once
|
||||||
|
- you're the boss
|
||||||
|
- young and foolish
|
||||||
|
- young and vibrant
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Try to avoid using '%s'."
|
||||||
|
ignorecase: true
|
||||||
|
level: suggestion
|
||||||
|
tokens:
|
||||||
|
- am
|
||||||
|
- are
|
||||||
|
- aren't
|
||||||
|
- be
|
||||||
|
- been
|
||||||
|
- being
|
||||||
|
- he's
|
||||||
|
- here's
|
||||||
|
- here's
|
||||||
|
- how's
|
||||||
|
- i'm
|
||||||
|
- is
|
||||||
|
- isn't
|
||||||
|
- it's
|
||||||
|
- she's
|
||||||
|
- that's
|
||||||
|
- there's
|
||||||
|
- they're
|
||||||
|
- was
|
||||||
|
- wasn't
|
||||||
|
- we're
|
||||||
|
- were
|
||||||
|
- weren't
|
||||||
|
- what's
|
||||||
|
- where's
|
||||||
|
- who's
|
||||||
|
- you're
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends: repetition
|
||||||
|
message: "'%s' is repeated!"
|
||||||
|
level: warning
|
||||||
|
alpha: true
|
||||||
|
action:
|
||||||
|
name: edit
|
||||||
|
params:
|
||||||
|
- truncate
|
||||||
|
- " "
|
||||||
|
tokens:
|
||||||
|
- '[^\s]+'
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' may be passive voice. Use active voice if you can."
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
raw:
|
||||||
|
- \b(am|are|were|being|is|been|was|be)\b\s*
|
||||||
|
tokens:
|
||||||
|
- '[\w]+ed'
|
||||||
|
- awoken
|
||||||
|
- beat
|
||||||
|
- become
|
||||||
|
- been
|
||||||
|
- begun
|
||||||
|
- bent
|
||||||
|
- beset
|
||||||
|
- bet
|
||||||
|
- bid
|
||||||
|
- bidden
|
||||||
|
- bitten
|
||||||
|
- bled
|
||||||
|
- blown
|
||||||
|
- born
|
||||||
|
- bought
|
||||||
|
- bound
|
||||||
|
- bred
|
||||||
|
- broadcast
|
||||||
|
- broken
|
||||||
|
- brought
|
||||||
|
- built
|
||||||
|
- burnt
|
||||||
|
- burst
|
||||||
|
- cast
|
||||||
|
- caught
|
||||||
|
- chosen
|
||||||
|
- clung
|
||||||
|
- come
|
||||||
|
- cost
|
||||||
|
- crept
|
||||||
|
- cut
|
||||||
|
- dealt
|
||||||
|
- dived
|
||||||
|
- done
|
||||||
|
- drawn
|
||||||
|
- dreamt
|
||||||
|
- driven
|
||||||
|
- drunk
|
||||||
|
- dug
|
||||||
|
- eaten
|
||||||
|
- fallen
|
||||||
|
- fed
|
||||||
|
- felt
|
||||||
|
- fit
|
||||||
|
- fled
|
||||||
|
- flown
|
||||||
|
- flung
|
||||||
|
- forbidden
|
||||||
|
- foregone
|
||||||
|
- forgiven
|
||||||
|
- forgotten
|
||||||
|
- forsaken
|
||||||
|
- fought
|
||||||
|
- found
|
||||||
|
- frozen
|
||||||
|
- given
|
||||||
|
- gone
|
||||||
|
- gotten
|
||||||
|
- ground
|
||||||
|
- grown
|
||||||
|
- heard
|
||||||
|
- held
|
||||||
|
- hidden
|
||||||
|
- hit
|
||||||
|
- hung
|
||||||
|
- hurt
|
||||||
|
- kept
|
||||||
|
- knelt
|
||||||
|
- knit
|
||||||
|
- known
|
||||||
|
- laid
|
||||||
|
- lain
|
||||||
|
- leapt
|
||||||
|
- learnt
|
||||||
|
- led
|
||||||
|
- left
|
||||||
|
- lent
|
||||||
|
- let
|
||||||
|
- lighted
|
||||||
|
- lost
|
||||||
|
- made
|
||||||
|
- meant
|
||||||
|
- met
|
||||||
|
- misspelt
|
||||||
|
- mistaken
|
||||||
|
- mown
|
||||||
|
- overcome
|
||||||
|
- overdone
|
||||||
|
- overtaken
|
||||||
|
- overthrown
|
||||||
|
- paid
|
||||||
|
- pled
|
||||||
|
- proven
|
||||||
|
- put
|
||||||
|
- quit
|
||||||
|
- read
|
||||||
|
- rid
|
||||||
|
- ridden
|
||||||
|
- risen
|
||||||
|
- run
|
||||||
|
- rung
|
||||||
|
- said
|
||||||
|
- sat
|
||||||
|
- sawn
|
||||||
|
- seen
|
||||||
|
- sent
|
||||||
|
- set
|
||||||
|
- sewn
|
||||||
|
- shaken
|
||||||
|
- shaven
|
||||||
|
- shed
|
||||||
|
- shod
|
||||||
|
- shone
|
||||||
|
- shorn
|
||||||
|
- shot
|
||||||
|
- shown
|
||||||
|
- shrunk
|
||||||
|
- shut
|
||||||
|
- slain
|
||||||
|
- slept
|
||||||
|
- slid
|
||||||
|
- slit
|
||||||
|
- slung
|
||||||
|
- smitten
|
||||||
|
- sold
|
||||||
|
- sought
|
||||||
|
- sown
|
||||||
|
- sped
|
||||||
|
- spent
|
||||||
|
- spilt
|
||||||
|
- spit
|
||||||
|
- split
|
||||||
|
- spoken
|
||||||
|
- spread
|
||||||
|
- sprung
|
||||||
|
- spun
|
||||||
|
- stolen
|
||||||
|
- stood
|
||||||
|
- stridden
|
||||||
|
- striven
|
||||||
|
- struck
|
||||||
|
- strung
|
||||||
|
- stuck
|
||||||
|
- stung
|
||||||
|
- stunk
|
||||||
|
- sung
|
||||||
|
- sunk
|
||||||
|
- swept
|
||||||
|
- swollen
|
||||||
|
- sworn
|
||||||
|
- swum
|
||||||
|
- swung
|
||||||
|
- taken
|
||||||
|
- taught
|
||||||
|
- thought
|
||||||
|
- thrived
|
||||||
|
- thrown
|
||||||
|
- thrust
|
||||||
|
- told
|
||||||
|
- torn
|
||||||
|
- trodden
|
||||||
|
- understood
|
||||||
|
- upheld
|
||||||
|
- upset
|
||||||
|
- wed
|
||||||
|
- wept
|
||||||
|
- withheld
|
||||||
|
- withstood
|
||||||
|
- woken
|
||||||
|
- won
|
||||||
|
- worn
|
||||||
|
- wound
|
||||||
|
- woven
|
||||||
|
- written
|
||||||
|
- wrung
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
Based on [write-good](https://github.com/btford/write-good).
|
||||||
|
|
||||||
|
> Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too.
|
||||||
|
|
||||||
|
```text
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2014 Brian Ford
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
```
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't start a sentence with '%s'."
|
||||||
|
level: error
|
||||||
|
raw:
|
||||||
|
- '(?:[;-]\s)so[\s,]|\bSo[\s,]'
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "Don't start a sentence with '%s'."
|
||||||
|
ignorecase: false
|
||||||
|
level: error
|
||||||
|
raw:
|
||||||
|
- '(?:[;-]\s)There\s(is|are)|\bThere\s(is|are)\b'
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' is too wordy."
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- a number of
|
||||||
|
- abundance
|
||||||
|
- accede to
|
||||||
|
- accelerate
|
||||||
|
- accentuate
|
||||||
|
- accompany
|
||||||
|
- accomplish
|
||||||
|
- accorded
|
||||||
|
- accrue
|
||||||
|
- acquiesce
|
||||||
|
- acquire
|
||||||
|
- additional
|
||||||
|
- adjacent to
|
||||||
|
- adjustment
|
||||||
|
- admissible
|
||||||
|
- advantageous
|
||||||
|
- adversely impact
|
||||||
|
- advise
|
||||||
|
- aforementioned
|
||||||
|
- aggregate
|
||||||
|
- aircraft
|
||||||
|
- all of
|
||||||
|
- all things considered
|
||||||
|
- alleviate
|
||||||
|
- allocate
|
||||||
|
- along the lines of
|
||||||
|
- already existing
|
||||||
|
- alternatively
|
||||||
|
- amazing
|
||||||
|
- ameliorate
|
||||||
|
- anticipate
|
||||||
|
- apparent
|
||||||
|
- appreciable
|
||||||
|
- as a matter of fact
|
||||||
|
- as a means of
|
||||||
|
- as far as I'm concerned
|
||||||
|
- as of yet
|
||||||
|
- as to
|
||||||
|
- as yet
|
||||||
|
- ascertain
|
||||||
|
- assistance
|
||||||
|
- at the present time
|
||||||
|
- at this time
|
||||||
|
- attain
|
||||||
|
- attributable to
|
||||||
|
- authorize
|
||||||
|
- because of the fact that
|
||||||
|
- belated
|
||||||
|
- benefit from
|
||||||
|
- bestow
|
||||||
|
- by means of
|
||||||
|
- by virtue of
|
||||||
|
- by virtue of the fact that
|
||||||
|
- cease
|
||||||
|
- close proximity
|
||||||
|
- commence
|
||||||
|
- comply with
|
||||||
|
- concerning
|
||||||
|
- consequently
|
||||||
|
- consolidate
|
||||||
|
- constitutes
|
||||||
|
- demonstrate
|
||||||
|
- depart
|
||||||
|
- designate
|
||||||
|
- discontinue
|
||||||
|
- due to the fact that
|
||||||
|
- each and every
|
||||||
|
- economical
|
||||||
|
- eliminate
|
||||||
|
- elucidate
|
||||||
|
- employ
|
||||||
|
- endeavor
|
||||||
|
- enumerate
|
||||||
|
- equitable
|
||||||
|
- equivalent
|
||||||
|
- evaluate
|
||||||
|
- evidenced
|
||||||
|
- exclusively
|
||||||
|
- expedite
|
||||||
|
- expend
|
||||||
|
- expiration
|
||||||
|
- facilitate
|
||||||
|
- factual evidence
|
||||||
|
- feasible
|
||||||
|
- finalize
|
||||||
|
- first and foremost
|
||||||
|
- for all intents and purposes
|
||||||
|
- for the most part
|
||||||
|
- for the purpose of
|
||||||
|
- forfeit
|
||||||
|
- formulate
|
||||||
|
- have a tendency to
|
||||||
|
- honest truth
|
||||||
|
- however
|
||||||
|
- if and when
|
||||||
|
- impacted
|
||||||
|
- implement
|
||||||
|
- in a manner of speaking
|
||||||
|
- in a timely manner
|
||||||
|
- in a very real sense
|
||||||
|
- in accordance with
|
||||||
|
- in addition
|
||||||
|
- in all likelihood
|
||||||
|
- in an effort to
|
||||||
|
- in between
|
||||||
|
- in excess of
|
||||||
|
- in lieu of
|
||||||
|
- in light of the fact that
|
||||||
|
- in many cases
|
||||||
|
- in my opinion
|
||||||
|
- in order to
|
||||||
|
- in regard to
|
||||||
|
- in some instances
|
||||||
|
- in terms of
|
||||||
|
- in the case of
|
||||||
|
- in the event that
|
||||||
|
- in the final analysis
|
||||||
|
- in the nature of
|
||||||
|
- in the near future
|
||||||
|
- in the process of
|
||||||
|
- inception
|
||||||
|
- incumbent upon
|
||||||
|
- indicate
|
||||||
|
- indication
|
||||||
|
- initiate
|
||||||
|
- irregardless
|
||||||
|
- is applicable to
|
||||||
|
- is authorized to
|
||||||
|
- is responsible for
|
||||||
|
- it is
|
||||||
|
- it is essential
|
||||||
|
- it seems that
|
||||||
|
- it was
|
||||||
|
- magnitude
|
||||||
|
- maximum
|
||||||
|
- methodology
|
||||||
|
- minimize
|
||||||
|
- minimum
|
||||||
|
- modify
|
||||||
|
- monitor
|
||||||
|
- multiple
|
||||||
|
- necessitate
|
||||||
|
- nevertheless
|
||||||
|
- not certain
|
||||||
|
- not many
|
||||||
|
- not often
|
||||||
|
- not unless
|
||||||
|
- not unlike
|
||||||
|
- notwithstanding
|
||||||
|
- null and void
|
||||||
|
- numerous
|
||||||
|
- objective
|
||||||
|
- obligate
|
||||||
|
- obtain
|
||||||
|
- on the contrary
|
||||||
|
- on the other hand
|
||||||
|
- one particular
|
||||||
|
- optimum
|
||||||
|
- overall
|
||||||
|
- owing to the fact that
|
||||||
|
- participate
|
||||||
|
- particulars
|
||||||
|
- pass away
|
||||||
|
- pertaining to
|
||||||
|
- point in time
|
||||||
|
- portion
|
||||||
|
- possess
|
||||||
|
- preclude
|
||||||
|
- previously
|
||||||
|
- prior to
|
||||||
|
- prioritize
|
||||||
|
- procure
|
||||||
|
- proficiency
|
||||||
|
- provided that
|
||||||
|
- purchase
|
||||||
|
- put simply
|
||||||
|
- readily apparent
|
||||||
|
- refer back
|
||||||
|
- regarding
|
||||||
|
- relocate
|
||||||
|
- remainder
|
||||||
|
- remuneration
|
||||||
|
- requirement
|
||||||
|
- reside
|
||||||
|
- residence
|
||||||
|
- retain
|
||||||
|
- satisfy
|
||||||
|
- shall
|
||||||
|
- should you wish
|
||||||
|
- similar to
|
||||||
|
- solicit
|
||||||
|
- span across
|
||||||
|
- strategize
|
||||||
|
- subsequent
|
||||||
|
- substantial
|
||||||
|
- successfully complete
|
||||||
|
- sufficient
|
||||||
|
- terminate
|
||||||
|
- the month of
|
||||||
|
- the point I am trying to make
|
||||||
|
- therefore
|
||||||
|
- time period
|
||||||
|
- took advantage of
|
||||||
|
- transmit
|
||||||
|
- transpire
|
||||||
|
- type of
|
||||||
|
- until such time as
|
||||||
|
- utilization
|
||||||
|
- utilize
|
||||||
|
- validate
|
||||||
|
- various different
|
||||||
|
- what I mean to say is
|
||||||
|
- whether or not
|
||||||
|
- with respect to
|
||||||
|
- with the exception of
|
||||||
|
- witnessed
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "'%s' is a weasel word!"
|
||||||
|
ignorecase: true
|
||||||
|
level: warning
|
||||||
|
tokens:
|
||||||
|
- clearly
|
||||||
|
- completely
|
||||||
|
- exceedingly
|
||||||
|
- excellent
|
||||||
|
- extremely
|
||||||
|
- fairly
|
||||||
|
- huge
|
||||||
|
- interestingly
|
||||||
|
- is a number
|
||||||
|
- largely
|
||||||
|
- mostly
|
||||||
|
- obviously
|
||||||
|
- quite
|
||||||
|
- relatively
|
||||||
|
- remarkably
|
||||||
|
- several
|
||||||
|
- significantly
|
||||||
|
- substantially
|
||||||
|
- surprisingly
|
||||||
|
- tiny
|
||||||
|
- usually
|
||||||
|
- various
|
||||||
|
- vast
|
||||||
|
- very
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"feed": "https://github.com/errata-ai/write-good/releases.atom",
|
||||||
|
"vale_version": ">=1.0.0"
|
||||||
|
}
|
||||||
@@ -1,5 +1,19 @@
|
|||||||
# AGENTS.md — Project Conventions for GRM
|
# AGENTS.md — Project Conventions for GRM
|
||||||
|
|
||||||
|
## Virtual Environment
|
||||||
|
|
||||||
|
All Python tools, tests, and scripts run inside a standard `.venv` directory.
|
||||||
|
Activate it before running any non-`make` command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source activate.sh # bash/zsh
|
||||||
|
source activate.fish # fish
|
||||||
|
source activate.zsh # zsh
|
||||||
|
```
|
||||||
|
|
||||||
|
If `.venv` doesn't exist, run `make setup` first. The `make` targets handle
|
||||||
|
venv activation automatically — always prefer `make <target>` over raw commands.
|
||||||
|
|
||||||
## Build & Test Commands
|
## Build & Test Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -42,7 +56,7 @@ CI also runs a best-effort `make workflow-dryrun` step (skipped if act_runner is
|
|||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
- **Python CLI** (`src/gitea_runner_manager/`) — Click-based CLI that delegates to Ansible
|
- **Python CLI** (`src/grm/`) — Click-based CLI that delegates to Ansible
|
||||||
- **Ansible Role** (`ansible/roles/gitea-runner/`) — Idempotent role for rootless Docker runner setup
|
- **Ansible Role** (`ansible/roles/gitea-runner/`) — Idempotent role for rootless Docker runner setup
|
||||||
- **devx package** (installed from git) — Reusable CI/CD tools: auto-merge, post-merge, release, publishing, molecule distribution, PR reviews, failure notifications
|
- **devx package** (installed from git) — Reusable CI/CD tools: auto-merge, post-merge, release, publishing, molecule distribution, PR reviews, failure notifications
|
||||||
- **Versioning** (`cliff.toml`) — git-cliff configuration for automated semver versioning from conventional commits
|
- **Versioning** (`cliff.toml`) — git-cliff configuration for automated semver versioning from conventional commits
|
||||||
@@ -83,7 +97,7 @@ git checkout -b GRM-N-short-description
|
|||||||
|
|
||||||
### 4. Commit (Conventional Commits)
|
### 4. Commit (Conventional Commits)
|
||||||
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
||||||
```
|
```text
|
||||||
feat: add new feature
|
feat: add new feature
|
||||||
fix: resolve bug
|
fix: resolve bug
|
||||||
docs: update README
|
docs: update README
|
||||||
@@ -218,7 +232,7 @@ Vikunja task updates:
|
|||||||
`AGENTS.md`, `Makefile`, etc.), the release is **skipped entirely** — no version
|
`AGENTS.md`, `Makefile`, etc.), the release is **skipped entirely** — no version
|
||||||
bump, no tag, no publish. This prevents unnecessary releases for CI/docs-only changes.
|
bump, no tag, no publish. This prevents unnecessary releases for CI/docs-only changes.
|
||||||
- Uses **git-cliff** to calculate the next semver version from conventional commits
|
- Uses **git-cliff** to calculate the next semver version from conventional commits
|
||||||
- Updates `__version__` in `src/gitea_runner_manager/__init__.py` (single source of truth)
|
- Updates `__version__` in `src/grm/__init__.py` (single source of truth)
|
||||||
- Updates `CHANGELOG.md` with the new version section
|
- Updates `CHANGELOG.md` with the new version section
|
||||||
- **Runs `make lint-ruff` and `make pytest-cov`** to verify the release is healthy
|
- **Runs `make lint-ruff` and `make pytest-cov`** to verify the release is healthy
|
||||||
- If lint or tests fail, **aborts immediately** — no commit, no tag
|
- If lint or tests fail, **aborts immediately** — no commit, no tag
|
||||||
@@ -270,7 +284,7 @@ via `[tool.devx.classify]` in `pyproject.toml`.
|
|||||||
- `activate.sh`, `activate.fish`, `activate.zsh` — Generated venv scripts
|
- `activate.sh`, `activate.fish`, `activate.zsh` — Generated venv scripts
|
||||||
|
|
||||||
**User-facing paths** (tool changes → release needed) — everything else:
|
**User-facing paths** (tool changes → release needed) — everything else:
|
||||||
- `src/gitea_runner_manager/**` — Python CLI source (except `__init__.py`)
|
- `src/grm/**` — Python CLI source (except `__init__.py`)
|
||||||
- `ansible/**` — Ansible role
|
- `ansible/**` — Ansible role
|
||||||
- `pyproject.toml` — Package metadata
|
- `pyproject.toml` — Package metadata
|
||||||
- Any new file type not in the allowlist
|
- Any new file type not in the allowlist
|
||||||
@@ -304,14 +318,14 @@ The codebase enforces strict separation between the GRM tool and the devx packag
|
|||||||
|
|
||||||
| Directory | Purpose | Release impact |
|
| Directory | Purpose | Release impact |
|
||||||
|-----------|---------|----------------|
|
|-----------|---------|----------------|
|
||||||
| `src/gitea_runner_manager/` | User-facing GRM CLI tool | Changes trigger release |
|
| `src/grm/` | User-facing GRM CLI tool | Changes trigger release |
|
||||||
| `devx` package (installed from git) | Reusable CI/CD and dev tools | Not in this repo (no release impact) |
|
| `devx` package (installed from git) | Reusable CI/CD and dev tools | Not in this repo (no release impact) |
|
||||||
| `ansible/` | Ansible role for runner setup | Changes trigger release |
|
| `ansible/` | Ansible role for runner setup | Changes trigger release |
|
||||||
|
|
||||||
### Import Rules
|
### Import Rules
|
||||||
|
|
||||||
1. **`src/gitea_runner_manager/` NEVER imports from devx** — the GRM tool is self-contained
|
1. **`src/grm/` NEVER imports from devx** — the GRM tool is self-contained
|
||||||
2. **devx MAY import from `gitea_runner_manager`** — one-way dependency (devx uses the tool's API clients, config, i18n)
|
2. **devx MAY import from `grm`** — one-way dependency (devx uses the tool's API clients, config, i18n)
|
||||||
3. **Cross-module imports within devx** are allowed (devx modules importing from other devx modules) and must be documented
|
3. **Cross-module imports within devx** are allowed (devx modules importing from other devx modules) and must be documented
|
||||||
4. **`devx.gitea_cli`** is a shared wrapper around the `tea` CLI — devx modules import from it for Gitea API operations (issues, labels, PRs, releases, reviews)
|
4. **`devx.gitea_cli`** is a shared wrapper around the `tea` CLI — devx modules import from it for Gitea API operations (issues, labels, PRs, releases, reviews)
|
||||||
|
|
||||||
@@ -341,11 +355,11 @@ The `tea` Gitea CLI tool is used for Gitea API interactions in devx. It is insta
|
|||||||
|
|
||||||
### PYTHONPATH Configuration
|
### PYTHONPATH Configuration
|
||||||
|
|
||||||
Since devx is installed as a package (via `pip install` from git), it is importable directly. Workflows only need `PYTHONPATH=src` when a devx module imports from `gitea_runner_manager`:
|
Since devx is installed as a package (via `pip install` from git), it is importable directly. Workflows only need `PYTHONPATH=src` when a devx module imports from `grm`:
|
||||||
|
|
||||||
| PYTHONPATH | When to use | Example modules |
|
| PYTHONPATH | When to use | Example modules |
|
||||||
|------------|-------------|-----------------|
|
|------------|-------------|-----------------|
|
||||||
| `src` | Module imports from `gitea_runner_manager` | `devx.ci.auto_merge`, `devx.ci.pr_review`, `devx.ci.pr_review`, `devx.ci.sync_wiki`, `devx.ci.post_merge`, `devx.ci.classify_changes`, `devx.molecule.discover_runners`, `devx.ci.doc_coverage` |
|
| `src` | Module imports from `grm` | `devx.ci.auto_merge`, `devx.ci.pr_review`, `devx.ci.pr_review`, `devx.ci.sync_wiki`, `devx.ci.post_merge`, `devx.ci.classify_changes`, `devx.molecule.discover_runners`, `devx.ci.doc_coverage` |
|
||||||
| (none) | Module has no GRM imports | `devx.ci.detect_release_commit`, `devx.molecule.distribute_molecule`, `devx.molecule.molecule_ci_guard`, `devx.ci.push_badges`, `devx.ci.validate_commit_msg` |
|
| (none) | Module has no GRM imports | `devx.ci.detect_release_commit`, `devx.molecule.distribute_molecule`, `devx.molecule.molecule_ci_guard`, `devx.ci.push_badges`, `devx.ci.validate_commit_msg` |
|
||||||
|
|
||||||
**In workflows**, always use `env:` blocks (not inline `PYTHONPATH=value`):
|
**In workflows**, always use `env:` blocks (not inline `PYTHONPATH=value`):
|
||||||
@@ -356,7 +370,7 @@ Since devx is installed as a package (via `pip install` from git), it is importa
|
|||||||
run: python -m devx.ci.example
|
run: python -m devx.ci.example
|
||||||
```
|
```
|
||||||
|
|
||||||
**Locally**, devx is installed as a package, so only `PYTHONPATH=src` is needed if importing from `gitea_runner_manager`.
|
**Locally**, devx is installed as a package, so only `PYTHONPATH=src` is needed if importing from `grm`.
|
||||||
|
|
||||||
### Shared Constants
|
### Shared Constants
|
||||||
|
|
||||||
@@ -389,7 +403,7 @@ ensures all merged work appears in the changelog.
|
|||||||
| `feat!:` or `BREAKING CHANGE` | minor (pre-1.0: major would be 1.0.0) |
|
| `feat!:` or `BREAKING CHANGE` | minor (pre-1.0: major would be 1.0.0) |
|
||||||
| `chore:`, `ci:`, `docs:` | no bump (excluded by cliff.toml) |
|
| `chore:`, `ci:`, `docs:` | no bump (excluded by cliff.toml) |
|
||||||
|
|
||||||
The version source is `__version__` in `src/gitea_runner_manager/__init__.py`, read by setuptools via `dynamic = ["version"]` in `pyproject.toml`. The release script only updates `__init__.py` — no need to touch `pyproject.toml`. `grm --version` reports this version.
|
The version source is `__version__` in `src/grm/__init__.py`, read by setuptools via `dynamic = ["version"]` in `pyproject.toml`. The release script only updates `__init__.py` — no need to touch `pyproject.toml`. `grm --version` reports this version.
|
||||||
|
|
||||||
### Title Format Summary
|
### Title Format Summary
|
||||||
|
|
||||||
@@ -405,7 +419,7 @@ The version source is `__version__` in `src/gitea_runner_manager/__init__.py`, r
|
|||||||
The devx package is configured via `DEVX_*` environment variables:
|
The devx package is configured via `DEVX_*` environment variables:
|
||||||
- `DEVX_TASK_PREFIX=GRM` — Prefix for Vikunja task identifiers
|
- `DEVX_TASK_PREFIX=GRM` — Prefix for Vikunja task identifiers
|
||||||
- `DEVX_VIKUNJA_PROJECT_ID=6` — Vikunja project ID for task tracking
|
- `DEVX_VIKUNJA_PROJECT_ID=6` — Vikunja project ID for task tracking
|
||||||
- `DEVX_VERSION_FILE=src/gitea_runner_manager/__init__.py` — Path to the version source file
|
- `DEVX_VERSION_FILE=src/grm/__init__.py` — Path to the version source file
|
||||||
|
|
||||||
Change classification is config-driven via `[tool.devx.classify]` in `pyproject.toml`, which defines the infrastructure and user-facing path patterns.
|
Change classification is config-driven via `[tool.devx.classify]` in `pyproject.toml`, which defines the infrastructure and user-facing path patterns.
|
||||||
|
|
||||||
@@ -419,9 +433,53 @@ Change classification is config-driven via `[tool.devx.classify]` in `pyproject.
|
|||||||
- Secrets are passed via temp JSON files, never on the command line (CWE-214)
|
- Secrets are passed via temp JSON files, never on the command line (CWE-214)
|
||||||
- CI triggers only on `opened` and `synchronize` PR events (not `labeled`)
|
- CI triggers only on `opened` and `synchronize` PR events (not `labeled`)
|
||||||
|
|
||||||
|
### Testing Conventions
|
||||||
|
|
||||||
|
- **Always run `make pytest-cov` before pushing** — CI enforces 100%
|
||||||
|
coverage and will fail the PR if any lines are uncovered. The pre-push
|
||||||
|
hook only validates Vikunja task existence, not tests.
|
||||||
|
- **Never use `is True`/`is False` identity checks on API response
|
||||||
|
values** — many APIs return boolean values as strings (`"true"`/
|
||||||
|
`"false"`). Use string comparison or truthy/falsy helpers instead.
|
||||||
|
- **Always mock `time.sleep` and `time.monotonic` in unit tests** — real
|
||||||
|
sleep calls make tests slow and exceed test speed limits. Use
|
||||||
|
`@patch("time.sleep")` and `@patch("time.monotonic")` decorators.
|
||||||
|
- **Extract complex inline shell from workflows to tested Python tools**
|
||||||
|
— SSH loops, curl polling, docker exec chains, and multi-line
|
||||||
|
if/then/else shell blocks should be Python scripts in `scripts/`
|
||||||
|
with unit tests. Simple variable checks and venv activation are fine
|
||||||
|
as inline shell.
|
||||||
|
|
||||||
|
### Container-Level Fix Verification (Mandatory)
|
||||||
|
|
||||||
|
**Rule:** Before pushing any fix that modifies container state (CA certs,
|
||||||
|
config files, installed packages, daemon restarts), reproduce the exact
|
||||||
|
sequence locally with the actual Docker image. Do not push to CI as the
|
||||||
|
first test.
|
||||||
|
|
||||||
|
This is a hard rule, not a suggestion. CI cycles take 20+ minutes and
|
||||||
|
ephemeral staging VMs are destroyed after each run, making interactive
|
||||||
|
debugging impossible. A local reproduction takes 30 seconds and catches
|
||||||
|
silent failures immediately.
|
||||||
|
|
||||||
|
**Procedure:**
|
||||||
|
1. `docker pull <actual_image>`
|
||||||
|
2. `docker run -d --name <test> ...` and wait for it to start
|
||||||
|
3. Run the exact commands from the Ansible task or script
|
||||||
|
4. Verify the state change took effect
|
||||||
|
5. Clean up: `docker rm -f <test>`
|
||||||
|
|
||||||
|
### Verified State Modification (Mandatory)
|
||||||
|
|
||||||
|
Ansible tasks that modify container state with `changed_when: false`
|
||||||
|
MUST include a post-task verification step that confirms the state
|
||||||
|
change took effect. `changed_when: false` suppresses both change
|
||||||
|
detection AND failure visibility — a task can silently do nothing and
|
||||||
|
report `ok`.
|
||||||
|
|
||||||
## Ansible Role Structure
|
## Ansible Role Structure
|
||||||
|
|
||||||
```
|
```text
|
||||||
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → integration_test
|
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → integration_test
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -449,7 +507,7 @@ All documentation lives in `/docs/` and is synced to the Gitea wiki automaticall
|
|||||||
|
|
||||||
### Structure
|
### Structure
|
||||||
|
|
||||||
```
|
```text
|
||||||
docs/
|
docs/
|
||||||
├── index.md # Wiki homepage
|
├── index.md # Wiki homepage
|
||||||
├── mapping.json # File-to-wiki-page title mapping
|
├── mapping.json # File-to-wiki-page title mapping
|
||||||
@@ -487,3 +545,86 @@ docs/
|
|||||||
2. If adding a new page, add it to `docs/mapping.json`
|
2. If adding a new page, add it to `docs/mapping.json`
|
||||||
3. Commit and create a PR (standard PR workflow)
|
3. Commit and create a PR (standard PR workflow)
|
||||||
4. On merge, wiki is automatically synced
|
4. On merge, wiki is automatically synced
|
||||||
|
|
||||||
|
## Subagent Delegation Policy
|
||||||
|
|
||||||
|
Custom subagent profiles are defined in `.devin/agents/` (project-specific)
|
||||||
|
and `~/.config/devin/agents/` (global, shared across repos). The agent MUST
|
||||||
|
automatically delegate to the appropriate subagent based on the task —
|
||||||
|
the user should not need to specify which profile to use.
|
||||||
|
|
||||||
|
### Available Profiles
|
||||||
|
|
||||||
|
**Global** (shared across all projects):
|
||||||
|
|
||||||
|
| Profile | Location | Purpose |
|
||||||
|
|---------|----------|---------|
|
||||||
|
| `pr-reviewer` | `~/.config/devin/agents/` | 13-category PR checklist + quality gates |
|
||||||
|
| `release-check` | `~/.config/devin/agents/` | Pre-merge readiness validation |
|
||||||
|
|
||||||
|
**grm-specific** (in `.devin/agents/`):
|
||||||
|
|
||||||
|
| Profile | Purpose |
|
||||||
|
|---------|---------|
|
||||||
|
| `ci-investigator` | Investigate CI failures (quality, molecule, release, publish, wiki sync) |
|
||||||
|
| `molecule-runner` | Run 7 molecule scenarios across 4 platforms, report pass/fail |
|
||||||
|
| `dep-upgrader` | Python + Ansible dependency upgrades with molecule verification |
|
||||||
|
| `doc-sync-specialist` | Doc coverage, doc linting, wiki sync for grm docs |
|
||||||
|
| `workflow-validator` | actionlint + act_runner dry-run for grm workflows |
|
||||||
|
|
||||||
|
### When to Delegate Automatically
|
||||||
|
|
||||||
|
| Trigger | Profile | Mode |
|
||||||
|
|---------|---------|------|
|
||||||
|
| CI run failure (quality, molecule-tests, release, publish, sync-wiki) | `ci-investigator` | Background |
|
||||||
|
| PR ready for review | `pr-reviewer` | Foreground |
|
||||||
|
| Molecule tests need to run | `molecule-runner` | Background |
|
||||||
|
| Dependency upgrade requested | `dep-upgrader` | Background |
|
||||||
|
| Doc coverage failure or wiki sync issue | `doc-sync-specialist` | Background |
|
||||||
|
| Workflow YAML modified or validation needed | `workflow-validator` | Background |
|
||||||
|
| Branch ready for merge | `release-check` | Foreground |
|
||||||
|
|
||||||
|
### Delegation Rules
|
||||||
|
|
||||||
|
1. **Auto-select the profile.** Do not ask the user which profile to use.
|
||||||
|
2. **Background by default, foreground when blocking.**
|
||||||
|
3. **Provide full context in the prompt** — subagents don't inherit conversation history.
|
||||||
|
4. **One subagent per concern.** Chain: investigate → fix in main session → review.
|
||||||
|
5. **Don't delegate trivial work** (<30s, <50 lines of context).
|
||||||
|
6. **Compact after subagent returns.**
|
||||||
|
7. **Never skip delegation to save time** — it keeps main context small.
|
||||||
|
|
||||||
|
|
||||||
|
## Feedback Issue Handling
|
||||||
|
|
||||||
|
Subagents create Gitea issues in the current repo when they encounter
|
||||||
|
tool, workflow, or process issues that warrant follow-up. These issues
|
||||||
|
use the `feedback` label plus a category label (`tooling`,
|
||||||
|
`ci-improvement`, `doc-improvement`, `workflow-improvement`).
|
||||||
|
|
||||||
|
Standard labels are created automatically by `configure_repo` (runs in
|
||||||
|
post-merge on every master push). If a label does not exist yet, the
|
||||||
|
subagent's issue creation will still succeed — labels can be added
|
||||||
|
afterwards.
|
||||||
|
|
||||||
|
### When a Subagent Reports a Feedback Issue URL
|
||||||
|
|
||||||
|
1. **Acknowledge it** in your response to the user — mention the issue URL
|
||||||
|
2. **Do NOT close or modify** the issue — it is for follow-up work
|
||||||
|
3. **Do NOT create a PR** to address it unless the user explicitly asks
|
||||||
|
4. If the user asks to address feedback, spawn a subagent to investigate
|
||||||
|
the issue and implement a fix
|
||||||
|
|
||||||
|
### Creating Feedback Issues Manually
|
||||||
|
|
||||||
|
As the parent agent, you can also create feedback issues directly using
|
||||||
|
the Gitea MCP (`issue_write` with `create_issue` method). Follow the
|
||||||
|
same format as subagents:
|
||||||
|
|
||||||
|
- Title: `[feedback] <category>: <short description>`
|
||||||
|
- Labels: `feedback` + category label
|
||||||
|
- Body: include context, tool/workflow, issue, reproduction, affected
|
||||||
|
files, suggested investigation, and "Reported by: parent agent"
|
||||||
|
|
||||||
|
Always deduplicate first via `list_issues` with `labels: "feedback"`.
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,42 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.15.0] - 2026-07-06
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Adopt documentation-as-code enhancements from devx
|
||||||
|
|
||||||
|
## [0.14.4] - 2026-07-06
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- Remove project-specific references from grm
|
||||||
|
|
||||||
|
## [0.14.3] - 2026-07-06
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- Rename PyPI package from gitea-runner-manager to grm
|
||||||
|
|
||||||
|
## [0.14.2] - 2026-07-05
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Add pre-commit hooks for quality gates matching CI
|
||||||
|
|
||||||
|
## [0.14.1] - 2026-07-01
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- Align venv management to devx.mak targets
|
||||||
|
|
||||||
|
## [0.14.0] - 2026-07-01
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Bump devx to v0.30.0
|
||||||
|
|
||||||
## [0.13.0] - 2026-07-01
|
## [0.13.0] - 2026-07-01
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ The `GRM-N` prefix is mandatory — CI extracts it for merge messages and Vikunj
|
|||||||
### Feature branches
|
### Feature branches
|
||||||
Use **conventional commits** on feature branches:
|
Use **conventional commits** on feature branches:
|
||||||
|
|
||||||
```
|
```text
|
||||||
feat: add new command
|
feat: add new command
|
||||||
fix: resolve timeout issue
|
fix: resolve timeout issue
|
||||||
chore: update dependencies
|
chore: update dependencies
|
||||||
@@ -33,7 +33,7 @@ Allowed types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `perf`, `tes
|
|||||||
### Master branch (squash merges)
|
### Master branch (squash merges)
|
||||||
Squash commits on `master` must follow:
|
Squash commits on `master` must follow:
|
||||||
|
|
||||||
```
|
```text
|
||||||
GRM-N: <conventional commit message>
|
GRM-N: <conventional commit message>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ If you develop a new program, and you want it to be of the greatest possible use
|
|||||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
grm
|
grm
|
||||||
Copyright (C) 2026 emil
|
Copyright (C) 2026 oblachno-oss
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ Also add information on how to contact you by electronic and paper mail.
|
|||||||
|
|
||||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
grm Copyright (C) 2026 emil
|
grm Copyright (C) 2026 oblachno-oss
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: all setup setup-ci setup-quality setup-molecule setup-release setup-image install update lint ansible-lint makefile-lint lint-all lint-ruff lint-format lint-bandit lint-deps typecheck checkmake install-hooks test test-unit pytest-cov molecule molecule-all test-all clean workflow-lint workflow-dryrun workflow-check install-tools
|
.PHONY: all setup setup-ci setup-quality setup-molecule setup-release setup-image install update lint ansible-lint makefile-lint lint-all lint-ruff lint-format lint-bandit lint-deps typecheck checkmake install-hooks test test-unit pytest-cov molecule molecule-all test-all clean workflow-lint workflow-dryrun workflow-check install-tools check-api-identity-checks
|
||||||
.PHONY: configure-gitea-pypi
|
.PHONY: configure-gitea-pypi
|
||||||
.PHONY: create-task create-pr push-with-pr git-push
|
.PHONY: create-task create-pr push-with-pr git-push
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ all: setup
|
|||||||
DEVX_PYTHON := $(BIN)/python
|
DEVX_PYTHON := $(BIN)/python
|
||||||
DEVX_VENV := $(VENV)
|
DEVX_VENV := $(VENV)
|
||||||
DEVX_BIN := $(BIN)
|
DEVX_BIN := $(BIN)
|
||||||
DEVX_COV_PKG := src/gitea_runner_manager
|
DEVX_COV_PKG := src/grm
|
||||||
DEVX_TEST_PATHS := tests/ scripts/tests/
|
DEVX_TEST_PATHS := tests/ scripts/tests/
|
||||||
DEVX_LINT_PATHS := src/ scripts/ tests/
|
DEVX_LINT_PATHS := src/ scripts/ tests/
|
||||||
|
|
||||||
@@ -25,6 +25,18 @@ DEVX_LINT_PATHS := src/ scripts/ tests/
|
|||||||
DEVX_MAK := $(shell $(BIN)/python -c \
|
DEVX_MAK := $(shell $(BIN)/python -c \
|
||||||
"from pathlib import Path; import devx; print(Path(devx.__file__).parent / 'make' / 'devx.mak')" \
|
"from pathlib import Path; import devx; print(Path(devx.__file__).parent / 'make' / 'devx.mak')" \
|
||||||
2>/dev/null)
|
2>/dev/null)
|
||||||
|
# Fallback: when the venv doesn't exist yet, try system python3 or /opt/venv.
|
||||||
|
# In CI, /opt/venv has devx pre-installed; locally, devx may be in system python.
|
||||||
|
ifeq ($(strip $(DEVX_MAK)),)
|
||||||
|
DEVX_MAK := $(shell python3 -c \
|
||||||
|
"from pathlib import Path; import devx; print(Path(devx.__file__).parent / 'make' / 'devx.mak')" \
|
||||||
|
2>/dev/null)
|
||||||
|
endif
|
||||||
|
ifeq ($(strip $(DEVX_MAK)),)
|
||||||
|
DEVX_MAK := $(shell /opt/venv/bin/python -c \
|
||||||
|
"from pathlib import Path; import devx; print(Path(devx.__file__).parent / 'make' / 'devx.mak')" \
|
||||||
|
2>/dev/null)
|
||||||
|
endif
|
||||||
-include $(DEVX_MAK)
|
-include $(DEVX_MAK)
|
||||||
|
|
||||||
# Full setup for local development (all deps, tools, collections, hooks)
|
# Full setup for local development (all deps, tools, collections, hooks)
|
||||||
@@ -77,28 +89,14 @@ setup-image:
|
|||||||
pip install -e .$(if $(EXTRAS),[$(EXTRAS)],); \
|
pip install -e .$(if $(EXTRAS),[$(EXTRAS)],); \
|
||||||
else echo "[setup-image] /opt/venv not found — falling back to setup-ci"; $(MAKE) setup-ci; fi
|
else echo "[setup-image] /opt/venv not found — falling back to setup-ci"; $(MAKE) setup-ci; fi
|
||||||
|
|
||||||
# Helper: run pip install with Gitea registry configured
|
# venv, .env, activate-scripts, and PIP_INSTALL are provided by devx.mak
|
||||||
# Usage: $(PIP_INSTALL) install -e '.[ci,lint]'
|
# (devx-venv, devx-env, devx-activate-scripts, DEVX_PIP_INSTALL)
|
||||||
PIP_INSTALL := if [ -z "$$CI_GITEA_TOKEN" ]; then . ./.env 2>/dev/null; fi; \
|
# Aliases for convenience and backward compatibility:
|
||||||
CI_GITEA_TOKEN="$$CI_GITEA_TOKEN"; \
|
.PHONY: venv activate-scripts
|
||||||
if [ -n "$$CI_GITEA_TOKEN" ]; then export PIP_EXTRA_INDEX_URL="https://$$CI_GITEA_USERNAME:$$CI_GITEA_TOKEN@git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple/"; fi; \
|
PIP_INSTALL := $(DEVX_PIP_INSTALL)
|
||||||
$(BIN)/pip
|
venv: devx-venv
|
||||||
|
.env: devx-env
|
||||||
$(VENV)/bin/activate:
|
activate-scripts: devx-activate-scripts
|
||||||
@python3 -c "import sys; v=sys.version_info; assert v >= (3, 12), f'Python 3.12+ required, found {v.major}.{v.minor}'; print(f'Python {v.major}.{v.minor}.{v.micro} OK')"
|
|
||||||
$(PYTHON) -m venv $(VENV)
|
|
||||||
$(BIN)/pip install --upgrade pip setuptools wheel
|
|
||||||
|
|
||||||
.env:
|
|
||||||
@if [ ! -f .env ]; then \
|
|
||||||
cp .env.example .env; \
|
|
||||||
echo "Created .env from .env.example — please edit it with your credentials."; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
activate-scripts: $(VENV)/bin/activate
|
|
||||||
@test -f activate.sh || (echo '#!/usr/bin/env bash' > activate.sh && echo 'source "$$(cd "$$(dirname "$${BASH_SOURCE[0]}")" && pwd)/.venv/bin/activate"' >> activate.sh && chmod +x activate.sh)
|
|
||||||
@test -f activate.fish || (echo '#!/usr/bin/env fish' > activate.fish && echo 'set -l script_dir (dirname (status --current-filename))' >> activate.fish && echo 'source "$$script_dir/.venv/bin/activate.fish"' >> activate.fish && chmod +x activate.fish)
|
|
||||||
@test -f activate.zsh || (echo '#!/usr/bin/env zsh' > activate.zsh && echo '0="$${ZERO:-$${0:#$$ZSH_ARGZERO}}"' >> activate.zsh && echo '0="$${$${(M)0:#/*}:-$$PWD/$$0}"' >> activate.zsh && echo 'source "$${0:A:h}/.venv/bin/activate"' >> activate.zsh && chmod +x activate.zsh)
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@if [ -z "$(HOST)" ]; then echo "HOST is required. Example: make install HOST=192.168.1.10"; exit 1; fi
|
@if [ -z "$(HOST)" ]; then echo "HOST is required. Example: make install HOST=192.168.1.10"; exit 1; fi
|
||||||
@@ -154,7 +152,7 @@ test-unit: devx-test-unit
|
|||||||
|
|
||||||
# Override devx-pytest-cov to cover both src/ and scripts/
|
# Override devx-pytest-cov to cover both src/ and scripts/
|
||||||
pytest-cov:
|
pytest-cov:
|
||||||
@$(BIN)/pytest $(DEVX_TEST_PATHS) -v --cov=src/gitea_runner_manager --cov=scripts --cov-report=term-missing --cov-fail-under=100
|
@$(BIN)/pytest $(DEVX_TEST_PATHS) -v --cov=src/grm --cov=scripts --cov-report=term-missing --cov-fail-under=100
|
||||||
workflow-lint: devx-workflow-lint
|
workflow-lint: devx-workflow-lint
|
||||||
workflow-dryrun: devx-workflow-dryrun
|
workflow-dryrun: devx-workflow-dryrun
|
||||||
workflow-check: devx-workflow-check
|
workflow-check: devx-workflow-check
|
||||||
@@ -175,7 +173,10 @@ makefile-lint:
|
|||||||
echo "checkmake not found, skipping Makefile lint"; \
|
echo "checkmake not found, skipping Makefile lint"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
lint-all: lint ansible-lint makefile-lint workflow-lint
|
lint-all: lint ansible-lint makefile-lint workflow-lint check-api-identity-checks
|
||||||
|
|
||||||
|
check-api-identity-checks:
|
||||||
|
@$(BIN)/python -m devx.tools.check_api_identity_checks
|
||||||
|
|
||||||
test-integration:
|
test-integration:
|
||||||
$(BIN)/pytest tests/integration/ -v --no-cov
|
$(BIN)/pytest tests/integration/ -v --no-cov
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ Each runner runs in an isolated **rootless Docker** environment under a dedicate
|
|||||||
|
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
||||||
[](https://www.python.org/downloads/)
|
[](https://www.python.org/downloads/)
|
||||||
|
|
||||||
## Why GRM?
|
## Why GRM?
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ The registry is publicly readable — no authentication required to install.
|
|||||||
**Quick install (one-off):**
|
**Quick install (one-off):**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install gitea-runner-manager --index-url https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple
|
pip install grm --index-url https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple
|
||||||
```
|
```
|
||||||
|
|
||||||
**Persistent configuration (recommended):**
|
**Persistent configuration (recommended):**
|
||||||
@@ -115,7 +115,7 @@ extra-index-url = https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/py
|
|||||||
Then install normally:
|
Then install normally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install gitea-runner-manager
|
pip install grm
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks
|
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks
|
||||||
@@ -339,11 +339,11 @@ See the [Development Setup](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/w
|
|||||||
|
|
||||||
GRM consists of two layers:
|
GRM consists of two layers:
|
||||||
|
|
||||||
1. **Python CLI** (`src/gitea_runner_manager/`) — Built with Click, handles argument parsing, environment loading, i18n translations, and delegates to Ansible via the `ansible-playbook` subprocess. Secrets are passed via temporary JSON files to avoid exposure in the process list.
|
1. **Python CLI** (`src/grm/`) — Built with Click, handles argument parsing, environment loading, i18n translations, and delegates to Ansible via the `ansible-playbook` subprocess. Secrets are passed via temporary JSON files to avoid exposure in the process list.
|
||||||
|
|
||||||
2. **Ansible Role** (`ansible/roles/gitea-runner/`) — Idempotent role that creates a dedicated system user, sets up rootless Docker, installs the runner binary, creates a systemd user service, registers the runner with Gitea, and sets up a Docker prune timer.
|
2. **Ansible Role** (`ansible/roles/gitea-runner/`) — Idempotent role that creates a dedicated system user, sets up rootless Docker, installs the runner binary, creates a systemd user service, registers the runner with Gitea, and sets up a Docker prune timer.
|
||||||
|
|
||||||
```
|
```text
|
||||||
grm install <host>
|
grm install <host>
|
||||||
└── RunnerManager.install()
|
└── RunnerManager.install()
|
||||||
└── ansible-playbook ansible/install-runner.yml
|
└── ansible-playbook ansible/install-runner.yml
|
||||||
|
|||||||
+6
-6
@@ -8,12 +8,12 @@ Each runner runs in an isolated **rootless Docker** environment under a dedicate
|
|||||||
|
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/src/branch/master/LICENSE)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/wiki)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/actions)
|
||||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
[](https://git.oblachno.oblachno.fyi/oblachno-oss/grm/releases)
|
||||||
[](https://www.python.org/downloads/)
|
[](https://www.python.org/downloads/)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
GRM consists of two layers:
|
GRM consists of two layers:
|
||||||
|
|
||||||
1. **Python CLI** (`src/gitea_runner_manager/`) — built with Click, handles argument parsing, environment loading, i18n translations, and delegates to Ansible via the `ansible-playbook` subprocess.
|
1. **Python CLI** (`src/grm/`) — built with Click, handles argument parsing, environment loading, i18n translations, and delegates to Ansible via the `ansible-playbook` subprocess.
|
||||||
2. **Ansible Role** (`ansible/roles/gitea-runner/`) — idempotent role that creates a dedicated system user, sets up rootless Docker, installs the runner binary, creates a systemd user service, and registers the runner with Gitea.
|
2. **Ansible Role** (`ansible/roles/gitea-runner/`) — idempotent role that creates a dedicated system user, sets up rootless Docker, installs the runner binary, creates a systemd user service, and registers the runner with Gitea.
|
||||||
|
|
||||||
## High-Level Design
|
## High-Level Design
|
||||||
@@ -22,7 +22,7 @@ The Ansible role handles all remote state: user creation, package installation,
|
|||||||
|
|
||||||
## Component Tree
|
## Component Tree
|
||||||
|
|
||||||
```
|
```text
|
||||||
grm install <host>
|
grm install <host>
|
||||||
└── RunnerManager.install()
|
└── RunnerManager.install()
|
||||||
└── ansible-playbook ansible/install-runner.yml
|
└── ansible-playbook ansible/install-runner.yml
|
||||||
@@ -37,7 +37,7 @@ grm install <host>
|
|||||||
|
|
||||||
The Ansible role task execution order (from `AGENTS.md`):
|
The Ansible role task execution order (from `AGENTS.md`):
|
||||||
|
|
||||||
```
|
```text
|
||||||
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → healthcheck → integration_test
|
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → healthcheck → integration_test
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ Lingering is enabled via `loginctl enable-linger` so the user's systemd services
|
|||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TD
|
flowchart TD
|
||||||
CLI["Python CLI<br/>src/gitea_runner_manager/<br/>(Click)"]
|
CLI["Python CLI<br/>src/grm/<br/>(Click)"]
|
||||||
RM["RunnerManager<br/>runner_manager.py"]
|
RM["RunnerManager<br/>runner_manager.py"]
|
||||||
EXEC["Executor<br/>executor.py"]
|
EXEC["Executor<br/>executor.py"]
|
||||||
REG["Registry<br/>registry.py<br/>~/.local/share/grm/runners.json"]
|
REG["Registry<br/>registry.py<br/>~/.local/share/grm/runners.json"]
|
||||||
@@ -207,7 +207,7 @@ From `AGENTS.md`, the project also includes:
|
|||||||
|
|
||||||
## Python Modules
|
## Python Modules
|
||||||
|
|
||||||
The Python CLI layer (`src/gitea_runner_manager/`) consists of the following modules:
|
The Python CLI layer (`src/grm/`) consists of the following modules:
|
||||||
|
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ git checkout -b GRM-N-short-description
|
|||||||
|
|
||||||
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
||||||
|
|
||||||
```
|
```text
|
||||||
feat: add new feature
|
feat: add new feature
|
||||||
fix: resolve bug
|
fix: resolve bug
|
||||||
docs: update README
|
docs: update README
|
||||||
@@ -158,7 +158,7 @@ After a PR is merged to master, the release pipeline runs automatically.
|
|||||||
- Runs `devx.ci.release` which uses **git-cliff** to:
|
- Runs `devx.ci.release` which uses **git-cliff** to:
|
||||||
- **Checks for user-facing changes** via `devx.ci.classify_changes` — if only workflow/infrastructure files changed, the release is **skipped entirely** — no version bump, no tag, no publish
|
- **Checks for user-facing changes** via `devx.ci.classify_changes` — if only workflow/infrastructure files changed, the release is **skipped entirely** — no version bump, no tag, no publish
|
||||||
- Calculate the next semver version from conventional commits since the last tag
|
- Calculate the next semver version from conventional commits since the last tag
|
||||||
- Update `__version__` in `src/gitea_runner_manager/__init__.py` (single source of truth)
|
- Update `__version__` in `src/grm/__init__.py` (single source of truth)
|
||||||
- Update `CHANGELOG.md` with the new version section
|
- Update `CHANGELOG.md` with the new version section
|
||||||
- **Run `make lint-ruff` and `make pytest-cov`** to verify the release is healthy
|
- **Run `make lint-ruff` and `make pytest-cov`** to verify the release is healthy
|
||||||
- If lint or tests fail, **abort immediately** — no commit, no tag
|
- If lint or tests fail, **abort immediately** — no commit, no tag
|
||||||
@@ -208,7 +208,7 @@ from accidentally skipping releases. Classification is config-driven via
|
|||||||
`[tool.devx.classify]` in `pyproject.toml`.
|
`[tool.devx.classify]` in `pyproject.toml`.
|
||||||
|
|
||||||
**User-facing paths** (tool changes → release needed):
|
**User-facing paths** (tool changes → release needed):
|
||||||
- `src/gitea_runner_manager/**` — Python CLI source
|
- `src/grm/**` — Python CLI source
|
||||||
- `ansible/**` — Ansible role
|
- `ansible/**` — Ansible role
|
||||||
- `pyproject.toml` — Package metadata
|
- `pyproject.toml` — Package metadata
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ From `cliff.toml` `[bump]` section:
|
|||||||
- `breaking_always_bump_major = false`
|
- `breaking_always_bump_major = false`
|
||||||
- `initial_tag = "0.1.0"`
|
- `initial_tag = "0.1.0"`
|
||||||
|
|
||||||
The version source is `__version__` in `src/gitea_runner_manager/__init__.py`, read by setuptools via `dynamic = ["version"]` in `pyproject.toml`. The release script only updates `__init__.py` — no need to touch `pyproject.toml`. `grm --version` reports this version.
|
The version source is `__version__` in `src/grm/__init__.py`, read by setuptools via `dynamic = ["version"]` in `pyproject.toml`. The release script only updates `__init__.py` — no need to touch `pyproject.toml`. `grm --version` reports this version.
|
||||||
|
|
||||||
## Title Format Summary
|
## Title Format Summary
|
||||||
|
|
||||||
|
|||||||
@@ -27,15 +27,15 @@
|
|||||||
- **Secrets handling**: Secrets are passed via temp JSON files with `0600` permissions, never on the command line (CWE-214). Extra-vars are written to a temporary JSON file and passed via `--extra-vars @tempfile`, which is deleted after execution. This prevents secrets from being visible in the process list (`ps aux`).
|
- **Secrets handling**: Secrets are passed via temp JSON files with `0600` permissions, never on the command line (CWE-214). Extra-vars are written to a temporary JSON file and passed via `--extra-vars @tempfile`, which is deleted after execution. This prevents secrets from being visible in the process list (`ps aux`).
|
||||||
- **Linting**: `make lint-all` runs ruff + pyright + bandit + ansible-lint + checkmake + actionlint
|
- **Linting**: `make lint-all` runs ruff + pyright + bandit + ansible-lint + checkmake + actionlint
|
||||||
- **Formatting**: `ruff format` with double quotes and space indentation
|
- **Formatting**: `ruff format` with double quotes and space indentation
|
||||||
- **Type checking**: `pyright` in strict mode for `src/gitea_runner_manager/`
|
- **Type checking**: `pyright` in strict mode for `src/grm/`
|
||||||
- **Security scanning**: `bandit -r src/` on every PR
|
- **Security scanning**: `bandit -r src/` on every PR
|
||||||
- **Import rules**: `src/gitea_runner_manager/` NEVER imports from devx — the GRM tool is self-contained
|
- **Import rules**: `src/grm/` NEVER imports from devx — the GRM tool is self-contained
|
||||||
|
|
||||||
## Commit Rules
|
## Commit Rules
|
||||||
|
|
||||||
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
||||||
|
|
||||||
```
|
```text
|
||||||
feat: add new feature
|
feat: add new feature
|
||||||
fix: resolve bug
|
fix: resolve bug
|
||||||
docs: update README
|
docs: update README
|
||||||
@@ -99,7 +99,7 @@ git checkout -b GRM-N-short-description
|
|||||||
|
|
||||||
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
Branch commits use conventional commit format (no `GRM-N:` prefix):
|
||||||
|
|
||||||
```
|
```text
|
||||||
feat: add new feature
|
feat: add new feature
|
||||||
fix: resolve bug
|
fix: resolve bug
|
||||||
docs: update README
|
docs: update README
|
||||||
@@ -195,7 +195,7 @@ make workflow-check # Static lint + dry-run of workflow YAML
|
|||||||
|
|
||||||
## Ansible Role Conventions
|
## Ansible Role Conventions
|
||||||
|
|
||||||
```
|
```text
|
||||||
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → integration_test
|
main.yml → systemd_check → user_setup → rootless_docker → install_runner → prune → integration_test
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ Not all changes require a new release. The project classifies changes using `dev
|
|||||||
- Lint config files, `.env.example`, `.gitignore`
|
- Lint config files, `.env.example`, `.gitignore`
|
||||||
|
|
||||||
**User-facing paths** (release needed):
|
**User-facing paths** (release needed):
|
||||||
- `src/gitea_runner_manager/**` (except `__init__.py`)
|
- `src/grm/**` (except `__init__.py`)
|
||||||
- `ansible/**`
|
- `ansible/**`
|
||||||
- `pyproject.toml`
|
- `pyproject.toml`
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Key technical decisions for the GRM project, extracted from `CHANGELOG.md` and `
|
|||||||
|
|
||||||
**Date:** 2026-06-21 (v0.2.0 unreleased)
|
**Date:** 2026-06-21 (v0.2.0 unreleased)
|
||||||
|
|
||||||
**Decision:** Use `dynamic = ["version"]` in `pyproject.toml` with setuptools `attr` to source the version from `__version__` in `src/gitea_runner_manager/__init__.py`.
|
**Decision:** Use `dynamic = ["version"]` in `pyproject.toml` with setuptools `attr` to source the version from `__version__` in `src/grm/__init__.py`.
|
||||||
|
|
||||||
**Rationale:** `__init__.py` is the single source of truth for the version. The release script (`devx.ci.release`) only updates `__init__.py` — there is no need to touch `pyproject.toml`. `grm --version` reports this version directly. This eliminates version duplication across files and ensures the runtime version always matches the tagged release.
|
**Rationale:** `__init__.py` is the single source of truth for the version. The release script (`devx.ci.release`) only updates `__init__.py` — there is no need to touch `pyproject.toml`. `grm --version` reports this version directly. This eliminates version duplication across files and ensures the runtime version always matches the tagged release.
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ Key technical decisions for the GRM project, extracted from `CHANGELOG.md` and `
|
|||||||
|
|
||||||
**Rationale:** Passing secrets as command-line arguments (e.g., `--extra-vars '{"token": "..."}'`) makes them visible in the process list (`ps aux`), which is a known security weakness (CWE-214). The `RunnerManager._extra_vars_file()` context manager writes extra-vars to a temporary file via `tempfile.mkstemp()`, sets permissions to `0600`, passes the file to Ansible via `--extra-vars @tempfile`, and deletes the file in a `finally` block — even if an exception occurs. This ensures secrets are never visible in the process list.
|
**Rationale:** Passing secrets as command-line arguments (e.g., `--extra-vars '{"token": "..."}'`) makes them visible in the process list (`ps aux`), which is a known security weakness (CWE-214). The `RunnerManager._extra_vars_file()` context manager writes extra-vars to a temporary file via `tempfile.mkstemp()`, sets permissions to `0600`, passes the file to Ansible via `--extra-vars @tempfile`, and deletes the file in a `finally` block — even if an exception occurs. This ensures secrets are never visible in the process list.
|
||||||
|
|
||||||
**Source:** `AGENTS.md` (Key Conventions), `src/gitea_runner_manager/runner_manager.py` (`_extra_vars_file` method)
|
**Source:** `AGENTS.md` (Key Conventions), `src/grm/runner_manager.py` (`_extra_vars_file` method)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ Key technical decisions for the GRM project, extracted from `CHANGELOG.md` and `
|
|||||||
|
|
||||||
**Decision:** Classify changed files into user-facing and workflow-only categories using `devx.ci.classify_changes`. Only user-facing changes trigger a release; workflow-only changes (CI, docs, tests, lint config) do not.
|
**Decision:** Classify changed files into user-facing and workflow-only categories using `devx.ci.classify_changes`. Only user-facing changes trigger a release; workflow-only changes (CI, docs, tests, lint config) do not.
|
||||||
|
|
||||||
**Rationale:** Not all changes require a new release. CI workflow updates, documentation improvements, and test additions should not produce a new version tag. The classification is config-driven via `[tool.devx.classify]` in `pyproject.toml`. The strategy is safe-by-default: any file NOT in the explicit workflow-only allowlist is treated as user-facing, preventing new file types from accidentally skipping releases. User-facing paths include `src/gitea_runner_manager/**` (except `__init__.py`) and `ansible/**`. Workflow-only paths include `.gitea/**`, `docs/**`, `tests/**`, `scripts/**`, and various config files.
|
**Rationale:** Not all changes require a new release. CI workflow updates, documentation improvements, and test additions should not produce a new version tag. The classification is config-driven via `[tool.devx.classify]` in `pyproject.toml`. The strategy is safe-by-default: any file NOT in the explicit workflow-only allowlist is treated as user-facing, preventing new file types from accidentally skipping releases. User-facing paths include `src/grm/**` (except `__init__.py`) and `ansible/**`. Workflow-only paths include `.gitea/**`, `docs/**`, `tests/**`, `scripts/**`, and various config files.
|
||||||
|
|
||||||
**Source:** `AGENTS.md` (Smart CI: User-Facing vs Workflow-Only Changes), `pyproject.toml` (`[tool.devx.classify]`)
|
**Source:** `AGENTS.md` (Smart CI: User-Facing vs Workflow-Only Changes), `pyproject.toml` (`[tool.devx.classify]`)
|
||||||
|
|
||||||
@@ -104,9 +104,9 @@ Key technical decisions for the GRM project, extracted from `CHANGELOG.md` and `
|
|||||||
|
|
||||||
**Date:** 2026-06-21 (v0.6.2)
|
**Date:** 2026-06-21 (v0.6.2)
|
||||||
|
|
||||||
**Decision:** Separate CI/CD and development tooling into the `devx` package (installed from git), keeping the GRM tool itself self-contained in `src/gitea_runner_manager/`.
|
**Decision:** Separate CI/CD and development tooling into the `devx` package (installed from git), keeping the GRM tool itself self-contained in `src/grm/`.
|
||||||
|
|
||||||
**Rationale:** The GRM CLI tool must be self-contained — it never imports from devx. This ensures the installed package has no dependency on CI infrastructure. devx MAY import from `gitea_runner_manager` (one-way dependency), as it uses the tool's API clients, config, and i18n for CI automation. Cross-module imports within devx are allowed. This separation was formalised when scripts were migrated from the `scripts/` directory to the devx package in GRM-64.
|
**Rationale:** The GRM CLI tool must be self-contained — it never imports from devx. This ensures the installed package has no dependency on CI infrastructure. devx MAY import from `grm` (one-way dependency), as it uses the tool's API clients, config, and i18n for CI automation. Cross-module imports within devx are allowed. This separation was formalised when scripts were migrated from the `scripts/` directory to the devx package in GRM-64.
|
||||||
|
|
||||||
**Source:** `AGENTS.md` (Source Code Separation and devx Integration), `CHANGELOG.md` (0.6.2 — Refactor: "Migrate from scripts/ to devx package")
|
**Source:** `AGENTS.md` (Source Code Separation and devx Integration), `CHANGELOG.md` (0.6.2 — Refactor: "Migrate from scripts/ to devx package")
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
```
|
```text
|
||||||
.
|
.
|
||||||
├── src/gitea_runner_manager/ # Python CLI source
|
├── src/grm/ # Python CLI source
|
||||||
│ ├── cli.py # Click commands
|
│ ├── cli.py # Click commands
|
||||||
│ ├── runner_manager.py # Ansible orchestration + registry integration
|
│ ├── runner_manager.py # Ansible orchestration + registry integration
|
||||||
│ ├── executor.py # Ansible subprocess execution
|
│ ├── executor.py # Ansible subprocess execution
|
||||||
@@ -172,7 +172,7 @@ make test-unit # Without coverage
|
|||||||
make pytest-cov # With 100% coverage enforcement
|
make pytest-cov # With 100% coverage enforcement
|
||||||
```
|
```
|
||||||
|
|
||||||
The coverage requirement is `--cov-fail-under=100` — 100% test coverage is required for all code in `src/gitea_runner_manager/`.
|
The coverage requirement is `--cov-fail-under=100` — 100% test coverage is required for all code in `src/grm/`.
|
||||||
|
|
||||||
### Integration tests
|
### Integration tests
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ Runs pytest with 100% coverage requirement.
|
|||||||
From the `Makefile`:
|
From the `Makefile`:
|
||||||
|
|
||||||
- `test-unit` — `pytest tests/unit/ -v --no-cov` (unit tests without coverage)
|
- `test-unit` — `pytest tests/unit/ -v --no-cov` (unit tests without coverage)
|
||||||
- `pytest-cov` — `pytest tests/ -v --cov=src/gitea_runner_manager --cov-report=term-missing --cov-fail-under=100` (unit tests with 100% coverage enforcement)
|
- `pytest-cov` — `pytest tests/ -v --cov=src/grm --cov-report=term-missing --cov-fail-under=100` (unit tests with 100% coverage enforcement)
|
||||||
|
|
||||||
The coverage requirement is `--cov-fail-under=100` — 100% test coverage is required for all code in `src/gitea_runner_manager/`. The CI quality job runs `make pytest-cov` on every PR, and the release workflow runs it again before tagging a release.
|
The coverage requirement is `--cov-fail-under=100` — 100% test coverage is required for all code in `src/grm/`. The CI quality job runs `make pytest-cov` on every PR, and the release workflow runs it again before tagging a release.
|
||||||
|
|
||||||
### Test speed verification
|
### Test speed verification
|
||||||
|
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ The status is checked live by running an Ansible ad-hoc command on each remote h
|
|||||||
|
|
||||||
**Example output:**
|
**Example output:**
|
||||||
|
|
||||||
```
|
```text
|
||||||
NAME HOST USER LABELS STATUS
|
NAME HOST USER LABELS STATUS
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
prod-runner 192.168.1.10 ubuntu docker:docker://gitea/... active
|
prod-runner 192.168.1.10 ubuntu docker:docker://gitea/... active
|
||||||
@@ -298,7 +298,7 @@ test-runner 192.168.1.20 ubuntu inac
|
|||||||
|
|
||||||
If no runners are registered:
|
If no runners are registered:
|
||||||
|
|
||||||
```
|
```text
|
||||||
No runners registered. Use 'grm install' to add one.
|
No runners registered. Use 'grm install' to add one.
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ Show the installed GRM version.
|
|||||||
grm --version
|
grm --version
|
||||||
```
|
```
|
||||||
|
|
||||||
This reports the version from `__version__` in `src/gitea_runner_manager/__init__.py`, which is the single source of truth set by the automated release pipeline.
|
This reports the version from `__version__` in `src/grm/__init__.py`, which is the single source of truth set by the automated release pipeline.
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -156,7 +156,7 @@ Yes. GRM is designed with security as a first-class concern:
|
|||||||
Yes:
|
Yes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install gitea-runner-manager
|
pip install grm
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks and role are bundled with the package. For development or access to Make targets, clone the repository instead.
|
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks and role are bundled with the package. For development or access to Make targets, clone the repository instead.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ The registry is publicly readable — no authentication required to install.
|
|||||||
**Quick install (one-off):**
|
**Quick install (one-off):**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install gitea-runner-manager --index-url https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple
|
pip install grm --index-url https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple
|
||||||
```
|
```
|
||||||
|
|
||||||
**Persistent configuration (recommended):**
|
**Persistent configuration (recommended):**
|
||||||
@@ -73,7 +73,7 @@ extra-index-url = https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/py
|
|||||||
Then install normally:
|
Then install normally:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install gitea-runner-manager
|
pip install grm
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks
|
This installs the `grm` CLI and its Python dependencies. The Ansible playbooks
|
||||||
|
|||||||
@@ -145,12 +145,12 @@ This is a harmless cleanup traceback from Molecule's Docker driver when the test
|
|||||||
The pre-commit hook validates that commit messages follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.). The `GRM-N:` prefix is not allowed on branch commits — use it only in PR titles.
|
The pre-commit hook validates that commit messages follow conventional commit format (`feat:`, `fix:`, `docs:`, etc.). The `GRM-N:` prefix is not allowed on branch commits — use it only in PR titles.
|
||||||
|
|
||||||
**Correct:**
|
**Correct:**
|
||||||
```
|
```text
|
||||||
feat: add new runner label option
|
feat: add new runner label option
|
||||||
```
|
```
|
||||||
|
|
||||||
**Incorrect:**
|
**Incorrect:**
|
||||||
```
|
```text
|
||||||
GRM-33: add new runner label option
|
GRM-33: add new runner label option
|
||||||
update README
|
update README
|
||||||
```
|
```
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ elif [ -x "${HOME}/.pyenv/bin/pyenv" ]; then
|
|||||||
export PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"
|
export PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"
|
||||||
eval "$("${PYENV_ROOT}/bin/pyenv" init -)" 2>/dev/null || true
|
eval "$("${PYENV_ROOT}/bin/pyenv" init -)" 2>/dev/null || true
|
||||||
eval "$("${PYENV_ROOT}/bin/pyenv" virtualenv-init -)" 2>/dev/null || true
|
eval "$("${PYENV_ROOT}/bin/pyenv" virtualenv-init -)" 2>/dev/null || true
|
||||||
pyenv activate gitea-runner-manager 2>/dev/null || true
|
pyenv activate grm 2>/dev/null || true
|
||||||
PY=python3
|
PY=python3
|
||||||
else
|
else
|
||||||
PY=python3
|
PY=python3
|
||||||
|
|||||||
+10
-10
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.0", "wheel"]
|
|||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "gitea-runner-manager"
|
name = "grm"
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
description = "Lean CLI to manage Gitea Actions runners"
|
description = "Lean CLI to manage Gitea Actions runners"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -20,10 +20,10 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
grm = "gitea_runner_manager.cli:cli"
|
grm = "grm.cli:cli"
|
||||||
|
|
||||||
[tool.setuptools.dynamic]
|
[tool.setuptools.dynamic]
|
||||||
version = {attr = "gitea_runner_manager.__version__"}
|
version = {attr = "grm.__version__"}
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
# Minimal deps for CI scripts that only need click/dotenv
|
# Minimal deps for CI scripts that only need click/dotenv
|
||||||
@@ -34,7 +34,7 @@ ci = [
|
|||||||
"build==1.5.0",
|
"build==1.5.0",
|
||||||
"twine==6.2.0",
|
"twine==6.2.0",
|
||||||
# Reusable CI/CD and dev tools (auto-merge, pr-review, pre-push checks, etc.)
|
# Reusable CI/CD and dev tools (auto-merge, pr-review, pre-push checks, etc.)
|
||||||
"devx==0.29.1",
|
"devx==0.35.1",
|
||||||
]
|
]
|
||||||
# Lint and type-checking tools (quality job)
|
# Lint and type-checking tools (quality job)
|
||||||
lint = [
|
lint = [
|
||||||
@@ -52,9 +52,9 @@ molecule = [
|
|||||||
]
|
]
|
||||||
# Full dev environment (local development, includes everything)
|
# Full dev environment (local development, includes everything)
|
||||||
dev = [
|
dev = [
|
||||||
"gitea-runner-manager[ci,lint,molecule]",
|
"grm[ci,lint,molecule]",
|
||||||
# Reusable CI/CD and dev tools (pre-push hooks, create-task, create-pr)
|
# Reusable CI/CD and dev tools (pre-push hooks, create-task, create-pr)
|
||||||
"devx==0.29.1",
|
"devx==0.35.1",
|
||||||
# Non-Python dev dependency: checkmake (Makefile linter)
|
# Non-Python dev dependency: checkmake (Makefile linter)
|
||||||
# Install via: go install github.com/checkmake/checkmake/cmd/checkmake@latest
|
# Install via: go install github.com/checkmake/checkmake/cmd/checkmake@latest
|
||||||
]
|
]
|
||||||
@@ -63,12 +63,12 @@ dev = [
|
|||||||
where = ["src"]
|
where = ["src"]
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
[tool.setuptools.package-data]
|
||||||
gitea_runner_manager = ["translations.json"]
|
grm = ["translations.json"]
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
testpaths = ["tests", "scripts/tests"]
|
testpaths = ["tests", "scripts/tests"]
|
||||||
pythonpath = ["src", "scripts"]
|
pythonpath = ["src", "scripts"]
|
||||||
addopts = "--cov=src/gitea_runner_manager --cov=scripts/prune_runner_images.py --cov-report=term-missing --cov-fail-under=100"
|
addopts = "--cov=src/grm --cov=scripts/prune_runner_images.py --cov-report=term-missing --cov-fail-under=100"
|
||||||
markers = [
|
markers = [
|
||||||
"integration: marks tests as integration tests (not counted in coverage)",
|
"integration: marks tests as integration tests (not counted in coverage)",
|
||||||
]
|
]
|
||||||
@@ -88,7 +88,7 @@ indent-style = "space"
|
|||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
include = ["src"]
|
include = ["src"]
|
||||||
pythonVersion = "3.12"
|
pythonVersion = "3.12"
|
||||||
strict = ["src/gitea_runner_manager"]
|
strict = ["src/grm"]
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Change classification — determines which changes trigger a release
|
# Change classification — determines which changes trigger a release
|
||||||
@@ -128,7 +128,7 @@ infrastructure = ["scripts/**"]
|
|||||||
# but are actually infrastructure:
|
# but are actually infrastructure:
|
||||||
# - __init__.py: only contains __version__ (set by release.py, not user code)
|
# - __init__.py: only contains __version__ (set by release.py, not user code)
|
||||||
infrastructure_overrides = [
|
infrastructure_overrides = [
|
||||||
"src/gitea_runner_manager/__init__.py",
|
"src/grm/__init__.py",
|
||||||
]
|
]
|
||||||
|
|
||||||
# User-facing overrides — safety override for broad infrastructure patterns
|
# User-facing overrides — safety override for broad infrastructure patterns
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
"""Gitea Runner Manager — lean CLI for managing Gitea Actions runners."""
|
"""Gitea Runner Manager — lean CLI for managing Gitea Actions runners."""
|
||||||
|
|
||||||
__version__ = "0.13.0"
|
__version__ = "0.15.0"
|
||||||
@@ -5,14 +5,14 @@ from unittest.mock import MagicMock, patch
|
|||||||
import pytest
|
import pytest
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
|
||||||
from gitea_runner_manager.cli import cli
|
from grm.cli import cli
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.integration
|
@pytest.mark.integration
|
||||||
class TestLifecycleCLI:
|
class TestLifecycleCLI:
|
||||||
"""Test the full lifecycle CLI commands end-to-end."""
|
"""Test the full lifecycle CLI commands end-to-end."""
|
||||||
|
|
||||||
@patch("gitea_runner_manager.cli.RunnerManager")
|
@patch("grm.cli.RunnerManager")
|
||||||
def test_install_start_status_stop_disable_remove(self, mock_manager_class: MagicMock) -> None:
|
def test_install_start_status_stop_disable_remove(self, mock_manager_class: MagicMock) -> None:
|
||||||
"""Exercise the full lifecycle via CLI."""
|
"""Exercise the full lifecycle via CLI."""
|
||||||
mock_manager = MagicMock()
|
mock_manager = MagicMock()
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ from unittest.mock import MagicMock, patch
|
|||||||
import pytest
|
import pytest
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
|
||||||
from gitea_runner_manager.cli import cli
|
from grm.cli import cli
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.integration
|
@pytest.mark.integration
|
||||||
class TestMultiInstanceCLI:
|
class TestMultiInstanceCLI:
|
||||||
"""Test that multiple runner instances can be managed independently."""
|
"""Test that multiple runner instances can be managed independently."""
|
||||||
|
|
||||||
@patch("gitea_runner_manager.cli.RunnerManager")
|
@patch("grm.cli.RunnerManager")
|
||||||
def test_install_two_instances(self, mock_manager_class: MagicMock) -> None:
|
def test_install_two_instances(self, mock_manager_class: MagicMock) -> None:
|
||||||
"""Install two named instances on the same host."""
|
"""Install two named instances on the same host."""
|
||||||
mock_manager = MagicMock()
|
mock_manager = MagicMock()
|
||||||
@@ -34,7 +34,7 @@ class TestMultiInstanceCLI:
|
|||||||
assert calls[0].kwargs["name"] == "runner-a"
|
assert calls[0].kwargs["name"] == "runner-a"
|
||||||
assert calls[1].kwargs["name"] == "runner-b"
|
assert calls[1].kwargs["name"] == "runner-b"
|
||||||
|
|
||||||
@patch("gitea_runner_manager.cli.RunnerManager")
|
@patch("grm.cli.RunnerManager")
|
||||||
def test_start_stop_one_instance(self, mock_manager_class: MagicMock) -> None:
|
def test_start_stop_one_instance(self, mock_manager_class: MagicMock) -> None:
|
||||||
"""Start one instance and stop another independently."""
|
"""Start one instance and stop another independently."""
|
||||||
mock_manager = MagicMock()
|
mock_manager = MagicMock()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user