|
15 | 15 | - ".agent/system.yaml" |
16 | 16 | - ".agent/scripts/verify_agent_system.py" |
17 | 17 | - ".agent/scripts/verify_doc_boundaries.py" |
| 18 | + - "tools/scripts/consolidate_agent_core_target_docs.py" |
18 | 19 | - "tools/scripts/verify_agent_core_target_protocols.py" |
19 | 20 | - "tools/scripts/verify_docs_entrypoints.py" |
20 | 21 | - "tools/agent/render_architecture.py" |
21 | 22 | - "tests/repo/test_agent_core_target_protocols.py" |
22 | 23 | - "tests/repo/test_docs_entrypoints.py" |
23 | 24 | - ".github/workflows/agent-core-target-docs.yml" |
24 | | - push: |
25 | | - branches: |
26 | | - - main |
27 | 25 | workflow_dispatch: |
28 | 26 |
|
29 | 27 | permissions: |
30 | | - contents: read |
| 28 | + contents: write |
31 | 29 |
|
32 | 30 | concurrency: |
33 | 31 | group: agent-core-target-docs-${{ github.event.pull_request.number || github.ref }} |
34 | 32 | cancel-in-progress: true |
35 | 33 |
|
36 | 34 | jobs: |
37 | 35 | validate: |
38 | | - name: Validate Agent Core target docs |
| 36 | + name: Consolidate and validate Agent Core target doc |
39 | 37 | runs-on: ubuntu-latest |
40 | 38 | timeout-minutes: 20 |
41 | 39 |
|
42 | 40 | steps: |
43 | | - - name: Checkout repository |
| 41 | + - name: Checkout PR head |
44 | 42 | uses: actions/checkout@v4 |
45 | 43 | with: |
46 | 44 | fetch-depth: 0 |
| 45 | + ref: ${{ github.event.pull_request.head.sha }} |
47 | 46 |
|
48 | 47 | - name: Set up Python 3.12 |
49 | 48 | uses: actions/setup-python@v5 |
50 | 49 | with: |
51 | 50 | python-version: "3.12" |
52 | 51 |
|
| 52 | + - name: Consolidate Agent Core target documentation |
| 53 | + run: | |
| 54 | + python tools/scripts/consolidate_agent_core_target_docs.py |
| 55 | + git diff --check -- '*.py' '*.yaml' '*.yml' |
| 56 | + git config user.name "github-actions[bot]" |
| 57 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 58 | + git add -A |
| 59 | + git commit -m "docs: consolidate Agent Core target architecture" |
| 60 | + git push origin HEAD:agent/consolidate-agent-core-target-doc |
| 61 | +
|
53 | 62 | - name: Install validation dependencies |
54 | 63 | run: | |
55 | 64 | python -m pip install --upgrade pip |
56 | 65 | python -m pip install pytest |
57 | 66 |
|
58 | | - - name: Prepare validation logs |
59 | | - run: mkdir -p validation-logs |
60 | | - |
61 | | - - name: Verify executable and configuration patch formatting |
62 | | - run: | |
63 | | - set -o pipefail |
64 | | - git diff --check origin/main...HEAD -- '*.py' '*.yml' '*.yaml' \ |
65 | | - 2>&1 | tee validation-logs/diff-check.log |
66 | | -
|
67 | | - - name: Compile validation scripts |
| 67 | + - name: Validate consolidated documentation |
68 | 68 | run: | |
69 | | - set -o pipefail |
70 | 69 | python -m py_compile \ |
71 | 70 | tools/scripts/verify_agent_core_target_protocols.py \ |
72 | | - tools/scripts/verify_docs_entrypoints.py \ |
73 | | - tools/agent/render_architecture.py \ |
74 | | - .agent/scripts/verify_agent_system.py \ |
75 | | - .agent/scripts/verify_doc_boundaries.py \ |
76 | 71 | tests/repo/test_agent_core_target_protocols.py \ |
77 | | - tests/repo/test_docs_entrypoints.py \ |
78 | | - 2>&1 | tee validation-logs/compile.log |
79 | | -
|
80 | | - - name: Verify Agent Core target protocols |
81 | | - run: | |
82 | | - set -o pipefail |
83 | | - python tools/scripts/verify_agent_core_target_protocols.py \ |
84 | | - 2>&1 | tee validation-logs/agent-core-protocols.log |
85 | | -
|
86 | | - - name: Verify Agent System |
87 | | - run: | |
88 | | - set -o pipefail |
89 | | - python .agent/scripts/verify_agent_system.py \ |
90 | | - 2>&1 | tee validation-logs/agent-system.log |
91 | | -
|
92 | | - - name: Verify document boundaries |
93 | | - run: | |
94 | | - set -o pipefail |
95 | | - python .agent/scripts/verify_doc_boundaries.py \ |
96 | | - 2>&1 | tee validation-logs/doc-boundaries.log |
97 | | -
|
98 | | - - name: Verify documentation entrypoints |
99 | | - run: | |
100 | | - set -o pipefail |
101 | | - python tools/scripts/verify_docs_entrypoints.py \ |
102 | | - 2>&1 | tee validation-logs/docs-entrypoints.log |
103 | | -
|
104 | | - - name: Verify architecture renderer outputs |
105 | | - run: | |
106 | | - set -o pipefail |
107 | | - python tools/agent/render_architecture.py --check \ |
108 | | - 2>&1 | tee validation-logs/architecture-renderer.log |
109 | | -
|
110 | | - - name: Run Agent Core protocol tests |
111 | | - run: | |
112 | | - set -o pipefail |
113 | | - pytest -q tests/repo/test_agent_core_target_protocols.py -p no:cacheprovider \ |
114 | | - 2>&1 | tee validation-logs/agent-core-tests.log |
115 | | -
|
116 | | - - name: Run documentation entrypoint tests |
117 | | - run: | |
118 | | - set -o pipefail |
119 | | - pytest -q tests/repo/test_docs_entrypoints.py -p no:cacheprovider \ |
120 | | - 2>&1 | tee validation-logs/docs-entrypoint-tests.log |
121 | | -
|
122 | | - - name: Upload validation logs |
123 | | - if: always() |
124 | | - uses: actions/upload-artifact@v4 |
125 | | - with: |
126 | | - name: agent-core-target-validation-logs |
127 | | - path: validation-logs/ |
128 | | - if-no-files-found: error |
129 | | - retention-days: 14 |
| 72 | + .agent/scripts/verify_agent_system.py |
| 73 | + python tools/scripts/verify_agent_core_target_protocols.py |
| 74 | + python .agent/scripts/verify_agent_system.py |
| 75 | + pytest -q tests/repo/test_agent_core_target_protocols.py -p no:cacheprovider |
0 commit comments