-
Notifications
You must be signed in to change notification settings - Fork 23
154 lines (130 loc) · 6.17 KB
/
Copy pathci.yml
File metadata and controls
154 lines (130 loc) · 6.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on:
pull_request:
# Non-agent PRs are exempt from the agent-contract sections (see the
# "Check documentation-risk PR contract" step below), so the default
# trigger types are not enough on their own. `edited` re-runs the check
# when the finalizer repairs the PR body without pushing a new commit;
# `labeled` re-runs it when `warpy-factory` is applied after PR open.
types: [opened, synchronize, reopened, ready_for_review, edited, labeled]
push:
branches: [main]
permissions:
contents: read
jobs:
docs-editorial-quality:
name: Docs editorial quality
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
# Changed-file-only style lint. Error-severity findings block; warning-
# severity tone/judgment findings remain visible to review-docs-pr.
- name: Run style_lint --changed
run: python3 .agents/skills/style_lint/style_lint.py --changed
docs-technical-references:
name: Docs technical references
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
# Validates changed UI paths, Command Palette names, and UI-reference
# formatting against the committed valid_paths.json snapshot. Uses the
# committed snapshot only — no warpdotdev/warp checkout required.
- name: Validate changed UI references
run: python3 .agents/skills/validate_ui_refs/validate_ui_refs.py --changed --require-provenance
# Doc-quality policy unit tests (risk allowlist, VERIFY accounting,
# override boundaries, PR-contract validation).
- name: Test doc_quality_policy
run: |
python3 .agents/skills/doc_quality_policy/test_policy.py
python3 .agents/skills/doc_quality_policy/test_check_pr_contract.py
python3 .agents/skills/doc_quality_policy/test_check_compression_contract.py
python3 .agents/skills/doc_quality_policy/test_verify_review_signal.py
python3 .agents/skills/doc_quality_policy/test_publish_review_signal.py
python3 .agents/skills/doc_quality_policy/test_manifest.py
- name: Test validate_ui_refs --changed mode and snapshot provenance
run: python3 .agents/skills/validate_ui_refs/test_changed_mode.py
- name: Test improve-drafting-skills metrics command
run: |
python3 .agents/skills/improve-drafting-skills/scripts/test_compute_metrics.py
python3 .agents/skills/improve-drafting-skills/scripts/test_build_baseline_records.py
# PR-contract check: unlisted VERIFY markers and missing/invalid risk
# metadata. Only agent-marked PRs carry this contract (see
# doc-quality-policy.md) — an ordinary human docs PR has no
# "## Documentation risk" section and must not be failed for lacking
# one, so this step is scoped to `warpy-factory` PRs. The human
# engineering gate is intentionally not evaluated on each push: a
# pending approval is expected while a PR is in review. A push-to-main
# run (no open PR) also has nothing to check.
- name: Check documentation-risk PR contract
if: >-
github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'warpy-factory')
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
printf '%s' "$PR_BODY" > /tmp/pr-body.md
python3 .agents/skills/doc_quality_policy/check_pr_contract.py \
--body /tmp/pr-body.md
build:
name: Build, link-check, audit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: npm ci
- name: Type-check
run: npm run typecheck
- name: Build site
run: npm run build
- name: Check internal links
run: python3 .agents/skills/check_for_broken_links/check_links.py --internal-only
# Stdlib-only tests for the missing_docs skill scripts. The reviewer-resolver
# unit tests run fully here; the audit integration tests skip gracefully
# because the warp/warp-server code repos aren't checked out in docs CI.
- name: Test missing_docs skill scripts
run: |
python3 .agents/skills/missing_docs/scripts/test_suggest_reviewers.py
python3 .agents/skills/missing_docs/scripts/test_audit_docs.py
python3 .agents/skills/missing_docs/scripts/test_check_new_release.py
# Stdlib-only tests for the PR body integrity checker, including the
# feature-summary lead section that drafting PRs must open with.
- name: Test create_pr body checker
run: python3 .agents/skills/create_pr/test_check_pr_body.py
# Extracts the documented reviewer-request bash snippet from SKILL.md and
# runs it against a stubbed gh/suggest_reviewers.py, so CI exercises the
# exact text agents copy rather than a paraphrase of it.
- name: Test create_pr reviewer-request snippet
run: python3 .agents/skills/create_pr/test_request_reviewers.py
# Validate the validate_ui_refs snapshot and script invariants. Uses
# a synthetic warp client fixture internally — no checkout required.
- name: Self-test validate_ui_refs skill
run: python3 .agents/skills/validate_ui_refs/validate_ui_refs.py --self-test
# Production-only audit; gate on high+ so dev-only deprecation chatter
# doesn't break PRs. The `|| true` keeps it informational; tighten this
# to a hard fail once we're confident the noise is gone.
- name: npm audit (production deps)
run: npm audit --omit=dev --audit-level=high || true