-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfixrisk-operational-readiness.yml
More file actions
196 lines (175 loc) · 6.22 KB
/
Copy pathfixrisk-operational-readiness.yml
File metadata and controls
196 lines (175 loc) · 6.22 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
name: Fixrisk Operational Readiness
on:
pull_request:
push:
branches:
- main
- master
- release/**
workflow_dispatch:
inputs:
run_strict_evidence:
description: "Run strict FR-009 evidence gate (requires run_mobile_capture=true)."
required: false
default: "false"
type: choice
options:
- "true"
- "false"
run_mobile_capture:
description: "Run self-hosted physical-device evidence capture and closure flow."
required: false
default: "false"
type: choice
options:
- "false"
- "true"
android_serial:
description: "Optional adb serial for the target physical device."
required: false
type: string
default: ""
evidence_node_count:
description: "Large-graph evidence node count threshold."
required: false
type: string
default: "10000"
evidence_edge_count:
description: "Large-graph evidence edge count threshold."
required: false
type: string
default: "1000000"
permissions:
contents: read
jobs:
fixrisk-issues-gate:
name: Fixrisk Issues Gate (Code-Level)
if: ${{ github.event_name != 'schedule' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Verify fixrisk issue closure (code-level)
run: npm run verify:fixrisk:issues
- name: Upload fixrisk issue reports
if: always()
uses: actions/upload-artifact@v4
with:
name: fixrisk-issue-reports-code-gate
if-no-files-found: warn
path: |
build/fixrisk-issue-check-latest.json
build/fixrisk-issue-check-*.json
build/fixrisk-jest-contract-report.json
strict-evidence-gate:
name: Fixrisk Strict Evidence Gate (FR-009)
needs:
- capture-mobile-evidence
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_strict_evidence == 'true' && github.event.inputs.run_mobile_capture == 'true' }}
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Download captured mobile evidence artifact
uses: actions/download-artifact@v4
with:
name: mobile-evidence-captured
path: captured-mobile-evidence
- name: Materialize captured evidence tree
shell: pwsh
run: |
$sourceRoot = Join-Path $PWD "captured-mobile-evidence/docs/mobile-evidence"
if (-not (Test-Path $sourceRoot)) {
throw "Missing captured evidence tree: $sourceRoot"
}
if (Test-Path "docs/mobile-evidence") {
Remove-Item -Path "docs/mobile-evidence" -Recurse -Force
}
New-Item -Path "docs/mobile-evidence" -ItemType Directory | Out-Null
Copy-Item -Path (Join-Path $sourceRoot "*") -Destination "docs/mobile-evidence" -Recurse -Force
- name: Verify fixrisk issue closure (strict evidence required)
env:
NOTE_CONNECTION_REQUIRE_EVIDENCE_ROOT: "1"
NOTE_CONNECTION_REQUIRE_LARGE_GRAPH_EVIDENCE: "1"
NOTE_CONNECTION_MIN_EVIDENCE_NODE_COUNT: ${{ github.event.inputs.evidence_node_count }}
NOTE_CONNECTION_MIN_EVIDENCE_EDGE_COUNT: ${{ github.event.inputs.evidence_edge_count }}
NOTE_CONNECTION_EVIDENCE_ROOT: docs/mobile-evidence
run: npm run verify:fixrisk:issues:strict:evidence
- name: Upload strict evidence verification reports
if: always()
uses: actions/upload-artifact@v4
with:
name: fixrisk-issue-reports-strict-evidence
if-no-files-found: warn
path: |
build/fixrisk-issue-check-latest.json
build/fixrisk-issue-check-*.json
build/fixrisk-jest-contract-report.json
- name: Upload mobile evidence snapshot
if: always()
uses: actions/upload-artifact@v4
with:
name: mobile-evidence-snapshot
if-no-files-found: warn
path: |
docs/mobile-evidence/**
capture-mobile-evidence:
name: Capture Mobile Evidence (Self-Hosted)
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.run_mobile_capture == 'true') || ((github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')) && vars.NOTE_CONNECTION_ENABLE_MOBILE_EVIDENCE_CAPTURE == '1') }}
runs-on:
- self-hosted
- windows
- x64
- android
timeout-minutes: 90
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build Capacitor APK for evidence capture
run: npm run mobile:build:capacitor
- name: Run fixrisk operational closure pipeline
env:
NOTE_CONNECTION_ANDROID_SERIAL: ${{ github.event.inputs.android_serial }}
NOTE_CONNECTION_EVIDENCE_NODE_COUNT: ${{ github.event.inputs.evidence_node_count }}
NOTE_CONNECTION_EVIDENCE_EDGE_COUNT: ${{ github.event.inputs.evidence_edge_count }}
NOTE_CONNECTION_REQUIRE_EVIDENCE_ROOT: "1"
NOTE_CONNECTION_REQUIRE_LARGE_GRAPH_EVIDENCE: "1"
run: npm run ops:fixrisk:close
- name: Upload captured mobile evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: mobile-evidence-captured
if-no-files-found: error
path: |
docs/mobile-evidence/**
build/fixrisk-ops-closure-latest.json
build/fixrisk-issue-check-latest.json
build/fixrisk-issue-check-*.json