|
|
@@ -0,0 +1,352 @@ |
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
export type Exclusion = { |
| 16 |
|
| 17 |
file: string; |
| 18 |
|
| 19 |
reason: string; |
| 20 |
|
| 21 |
issue: number; |
| 22 |
}; |
| 23 |
|
| 24 |
export const GATE: readonly string[] = [ |
| 25 |
"test/crew.test.ts", |
| 26 |
"test/review-route.test.ts", |
| 27 |
"test/review-lines.test.ts", |
| 28 |
"test/review-gate.test.ts", |
| 29 |
"test/crew-wrapup.test.ts", |
| 30 |
"test/crew-limits.test.ts", |
| 31 |
"test/crew-parks.test.ts", |
| 32 |
"test/crew-sandbox.test.ts", |
| 33 |
"test/steer.test.ts", |
| 34 |
"test/session-settle.test.ts", |
| 35 |
"test/landing.test.ts", |
| 36 |
"test/decide.test.ts", |
| 37 |
"test/ledger.test.ts", |
| 38 |
"test/checks.test.ts", |
| 39 |
"test/dependencies.test.ts", |
| 40 |
"test/map-closing.test.ts", |
| 41 |
"test/autonomy.test.ts", |
| 42 |
"test/studio.test.ts", |
| 43 |
"test/studio-words.test.ts", |
| 44 |
"test/forks.test.ts", |
| 45 |
"test/fork-flow.test.ts", |
| 46 |
"test/cross-repo-pull.test.ts", |
| 47 |
"test/pulls.test.ts", |
| 48 |
"test/apps.test.ts", |
| 49 |
"test/apps-adversarial.test.ts", |
| 50 |
"test/apps-busy.test.ts", |
| 51 |
"test/apps-token.test.ts", |
| 52 |
"test/surfaces-adversarial.test.ts", |
| 53 |
"test/orgs.test.ts", |
| 54 |
"test/web.test.ts", |
| 55 |
"test/git-trust.test.ts", |
| 56 |
"test/helpers.test.ts", |
| 57 |
"test/shards.test.ts", |
| 58 |
"test/migrate.test.ts", |
| 59 |
"test/vitals.test.ts", |
| 60 |
"test/guard.test.ts", |
| 61 |
"test/asks.test.ts", |
| 62 |
"test/feed.test.ts", |
| 63 |
"test/feed-page.test.ts", |
| 64 |
"test/offline.test.ts", |
| 65 |
"test/share.test.ts", |
| 66 |
"test/cloud.test.ts", |
| 67 |
"test/run-secrets.test.ts", |
| 68 |
"test/forge-cloudflare.test.ts", |
| 69 |
"test/usage.test.ts", |
| 70 |
"test/tokens.test.ts", |
| 71 |
"test/credentials.test.ts", |
| 72 |
"test/standing.test.ts", |
| 73 |
"test/board.test.ts", |
| 74 |
"test/spawn-plan.test.ts", |
| 75 |
"test/spawn.test.ts", |
| 76 |
"test/web-apps.test.ts", |
| 77 |
"test/fleet-ops.test.ts", |
| 78 |
"test/meter.test.ts", |
| 79 |
"test/told-by.test.ts", |
| 80 |
"test/check-list.test.ts", |
| 81 |
]; |
| 82 |
|
| 83 |
export const EXCLUDED: readonly Exclusion[] = [ |
| 84 |
{ file: "test/actions.test.ts", reason: "not yet admitted", issue: 261 }, |
| 85 |
{ |
| 86 |
file: "test/agents.test.ts", |
| 87 |
reason: "red: fifty concurrent pushes come back 'auth required'", |
| 88 |
issue: 293, |
| 89 |
}, |
| 90 |
{ file: "test/api-errors.test.ts", reason: "not yet admitted", issue: 261 }, |
| 91 |
{ file: "test/app-domains.test.ts", reason: "not yet admitted", issue: 261 }, |
| 92 |
{ file: "test/app-env.test.ts", reason: "not yet admitted", issue: 261 }, |
| 93 |
{ file: "test/app.test.ts", reason: "not yet admitted", issue: 261 }, |
| 94 |
{ file: "test/apps-api.test.ts", reason: "not yet admitted", issue: 261 }, |
| 95 |
{ file: "test/apps-idle.test.ts", reason: "not yet admitted", issue: 261 }, |
| 96 |
{ |
| 97 |
file: "test/apps-open-host.test.ts", |
| 98 |
reason: "not yet admitted", |
| 99 |
issue: 261, |
| 100 |
}, |
| 101 |
{ file: "test/apps-sleep.test.ts", reason: "not yet admitted", issue: 261 }, |
| 102 |
{ file: "test/apps-ssh.test.ts", reason: "not yet admitted", issue: 261 }, |
| 103 |
{ file: "test/apps-ws.test.ts", reason: "not yet admitted", issue: 261 }, |
| 104 |
{ file: "test/audit.test.ts", reason: "not yet admitted", issue: 261 }, |
| 105 |
{ |
| 106 |
file: "test/board-windows.test.ts", |
| 107 |
reason: "red: an app with spend and nothing shipped is missing from the board", |
| 108 |
issue: 555, |
| 109 |
}, |
| 110 |
{ file: "test/branches.test.ts", reason: "not yet admitted", issue: 261 }, |
| 111 |
{ file: "test/cli-sync.test.ts", reason: "not yet admitted", issue: 261 }, |
| 112 |
{ file: "test/code.test.ts", reason: "not yet admitted", issue: 261 }, |
| 113 |
{ file: "test/contents-api.test.ts", reason: "not yet admitted", issue: 261 }, |
| 114 |
{ file: "test/contract.test.ts", reason: "not yet admitted", issue: 261 }, |
| 115 |
{ file: "test/counts.test.ts", reason: "not yet admitted", issue: 261 }, |
| 116 |
{ |
| 117 |
file: "test/crew-interrupted.test.ts", |
| 118 |
reason: "not yet admitted", |
| 119 |
issue: 261, |
| 120 |
}, |
| 121 |
{ file: "test/crew-loop.test.ts", reason: "not yet admitted", issue: 261 }, |
| 122 |
{ file: "test/crew-totals.test.ts", reason: "not yet admitted", issue: 261 }, |
| 123 |
{ |
| 124 |
file: "test/diff-edge-cases.test.ts", |
| 125 |
reason: "not yet admitted", |
| 126 |
issue: 261, |
| 127 |
}, |
| 128 |
{ file: "test/diff.test.ts", reason: "not yet admitted", issue: 261 }, |
| 129 |
{ file: "test/edge-auth.test.ts", reason: "not yet admitted", issue: 261 }, |
| 130 |
{ |
| 131 |
file: "test/edits-security.test.ts", |
| 132 |
reason: "not yet admitted", |
| 133 |
issue: 261, |
| 134 |
}, |
| 135 |
{ file: "test/edits.test.ts", reason: "not yet admitted", issue: 261 }, |
| 136 |
{ |
| 137 |
file: "test/event-audience.test.ts", |
| 138 |
reason: "not yet admitted", |
| 139 |
issue: 261, |
| 140 |
}, |
| 141 |
{ file: "test/feeds.test.ts", reason: "not yet admitted", issue: 261 }, |
| 142 |
{ file: "test/fleet-graph.test.ts", reason: "not yet admitted", issue: 261 }, |
| 143 |
{ file: "test/following.test.ts", reason: "not yet admitted", issue: 261 }, |
| 144 |
{ file: "test/git-local.test.ts", reason: "not yet admitted", issue: 261 }, |
| 145 |
{ file: "test/git-ssh.test.ts", reason: "not yet admitted", issue: 261 }, |
| 146 |
{ file: "test/git.test.ts", reason: "not yet admitted", issue: 261 }, |
| 147 |
{ file: "test/hardening.test.ts", reason: "not yet admitted", issue: 261 }, |
| 148 |
{ |
| 149 |
file: "test/highlight.test.ts", |
| 150 |
reason: "red: a 10ms highlighter bound fails on a slower machine", |
| 151 |
issue: 294, |
| 152 |
}, |
| 153 |
{ file: "test/image-gif.test.ts", reason: "not yet admitted", issue: 261 }, |
| 154 |
{ |
| 155 |
file: "test/image-graphics.test.ts", |
| 156 |
reason: "not yet admitted", |
| 157 |
issue: 261, |
| 158 |
}, |
| 159 |
{ file: "test/image-jpeg.test.ts", reason: "not yet admitted", issue: 261 }, |
| 160 |
{ file: "test/image-png.test.ts", reason: "not yet admitted", issue: 261 }, |
| 161 |
{ file: "test/issues.test.ts", reason: "not yet admitted", issue: 261 }, |
| 162 |
{ file: "test/kernel.test.ts", reason: "not yet admitted", issue: 261 }, |
| 163 |
{ file: "test/keys.test.ts", reason: "not yet admitted", issue: 261 }, |
| 164 |
{ file: "test/live-pages.test.ts", reason: "not yet admitted", issue: 261 }, |
| 165 |
{ file: "test/live.test.ts", reason: "not yet admitted", issue: 261 }, |
| 166 |
{ |
| 167 |
file: "test/looks.test.ts", |
| 168 |
reason: |
| 169 |
"red: asserts the dashboard and studio pages as they were before the redesign", |
| 170 |
issue: 291, |
| 171 |
}, |
| 172 |
{ file: "test/map.test.ts", reason: "not yet admitted", issue: 261 }, |
| 173 |
{ file: "test/mcp.test.ts", reason: "not yet admitted", issue: 261 }, |
| 174 |
{ file: "test/notify.test.ts", reason: "not yet admitted", issue: 261 }, |
| 175 |
{ file: "test/onboarding.test.ts", reason: "not yet admitted", issue: 261 }, |
| 176 |
{ |
| 177 |
file: "test/origins-oauth.test.ts", |
| 178 |
reason: "not yet admitted", |
| 179 |
issue: 261, |
| 180 |
}, |
| 181 |
{ |
| 182 |
file: "test/origins-operator.test.ts", |
| 183 |
reason: "not yet admitted", |
| 184 |
issue: 261, |
| 185 |
}, |
| 186 |
{ |
| 187 |
file: "test/origins-security-auth.test.ts", |
| 188 |
reason: "not yet admitted", |
| 189 |
issue: 261, |
| 190 |
}, |
| 191 |
{ |
| 192 |
file: "test/origins-security-provider.test.ts", |
| 193 |
reason: "not yet admitted", |
| 194 |
issue: 261, |
| 195 |
}, |
| 196 |
{ |
| 197 |
file: "test/origins-security-push.test.ts", |
| 198 |
reason: "not yet admitted", |
| 199 |
issue: 261, |
| 200 |
}, |
| 201 |
{ file: "test/origins-sync.test.ts", reason: "not yet admitted", issue: 261 }, |
| 202 |
{ file: "test/origins.test.ts", reason: "not yet admitted", issue: 261 }, |
| 203 |
{ file: "test/pacing.test.ts", reason: "not yet admitted", issue: 261 }, |
| 204 |
{ file: "test/palette.test.ts", reason: "not yet admitted", issue: 261 }, |
| 205 |
{ file: "test/parity.test.ts", reason: "not yet admitted", issue: 261 }, |
| 206 |
{ file: "test/policy.test.ts", reason: "not yet admitted", issue: 261 }, |
| 207 |
{ file: "test/probe.test.ts", reason: "not yet admitted", issue: 261 }, |
| 208 |
{ file: "test/probes.test.ts", reason: "not yet admitted", issue: 261 }, |
| 209 |
{ file: "test/prompts.test.ts", reason: "not yet admitted", issue: 261 }, |
| 210 |
{ file: "test/public-url.test.ts", reason: "not yet admitted", issue: 261 }, |
| 211 |
{ file: "test/push-through.test.ts", reason: "not yet admitted", issue: 261 }, |
| 212 |
{ file: "test/qr.test.ts", reason: "not yet admitted", issue: 261 }, |
| 213 |
{ file: "test/read-api.test.ts", reason: "not yet admitted", issue: 261 }, |
| 214 |
{ file: "test/revert.test.ts", reason: "not yet admitted", issue: 261 }, |
| 215 |
{ |
| 216 |
file: "test/reviews-states.test.ts", |
| 217 |
reason: "not yet admitted", |
| 218 |
issue: 261, |
| 219 |
}, |
| 220 |
{ file: "test/reviews.test.ts", reason: "not yet admitted", issue: 261 }, |
| 221 |
{ file: "test/runs-lease.test.ts", reason: "not yet admitted", issue: 261 }, |
| 222 |
{ file: "test/scaffold.test.ts", reason: "not yet admitted", issue: 261 }, |
| 223 |
{ file: "test/scale.test.ts", reason: "not yet admitted", issue: 261 }, |
| 224 |
{ file: "test/search.test.ts", reason: "not yet admitted", issue: 261 }, |
| 225 |
{ file: "test/secret-store.test.ts", reason: "not yet admitted", issue: 261 }, |
| 226 |
{ |
| 227 |
file: "test/security-merge.test.ts", |
| 228 |
reason: "not yet admitted", |
| 229 |
issue: 261, |
| 230 |
}, |
| 231 |
{ file: "test/security-xss.test.ts", reason: "not yet admitted", issue: 261 }, |
| 232 |
{ file: "test/settings.test.ts", reason: "not yet admitted", issue: 261 }, |
| 233 |
{ |
| 234 |
file: "test/signin-throttle.test.ts", |
| 235 |
reason: "not yet admitted", |
| 236 |
issue: 261, |
| 237 |
}, |
| 238 |
{ |
| 239 |
file: "test/snapshot-destination.test.ts", |
| 240 |
reason: "not yet admitted", |
| 241 |
issue: 261, |
| 242 |
}, |
| 243 |
{ file: "test/snapshot.test.ts", reason: "not yet admitted", issue: 261 }, |
| 244 |
{ |
| 245 |
file: "test/spawn-placement.test.ts", |
| 246 |
reason: "not yet admitted", |
| 247 |
issue: 261, |
| 248 |
}, |
| 249 |
{ file: "test/sse.test.ts", reason: "not yet admitted", issue: 261 }, |
| 250 |
{ file: "test/ssh-app.test.ts", reason: "not yet admitted", issue: 261 }, |
| 251 |
{ |
| 252 |
file: "test/ssh-port-taken.test.ts", |
| 253 |
reason: "not yet admitted", |
| 254 |
issue: 261, |
| 255 |
}, |
| 256 |
{ |
| 257 |
file: "test/ssh-site.test.ts", |
| 258 |
reason: |
| 259 |
"red: asserts the dashboard and studio pages as they were before the redesign", |
| 260 |
issue: 291, |
| 261 |
}, |
| 262 |
{ file: "test/ssh.test.ts", reason: "not yet admitted", issue: 261 }, |
| 263 |
{ file: "test/standards.test.ts", reason: "not yet admitted", issue: 261 }, |
| 264 |
{ file: "test/studio-phone.test.ts", reason: "not yet admitted", issue: 261 }, |
| 265 |
{ |
| 266 |
file: "test/subscriptions.test.ts", |
| 267 |
reason: "not yet admitted", |
| 268 |
issue: 261, |
| 269 |
}, |
| 270 |
{ file: "test/tui-app.test.ts", reason: "not yet admitted", issue: 261 }, |
| 271 |
{ file: "test/tui-apps.test.ts", reason: "not yet admitted", issue: 261 }, |
| 272 |
{ file: "test/tui-code.test.ts", reason: "not yet admitted", issue: 261 }, |
| 273 |
{ file: "test/tui-editor.test.ts", reason: "not yet admitted", issue: 261 }, |
| 274 |
{ file: "test/tui-icons.test.ts", reason: "not yet admitted", issue: 261 }, |
| 275 |
{ file: "test/tui-input.test.ts", reason: "not yet admitted", issue: 261 }, |
| 276 |
{ file: "test/tui-local.test.ts", reason: "not yet admitted", issue: 261 }, |
| 277 |
{ file: "test/tui-mouse.test.ts", reason: "not yet admitted", issue: 261 }, |
| 278 |
{ file: "test/tui-render.test.ts", reason: "not yet admitted", issue: 261 }, |
| 279 |
{ file: "test/tui-screens.test.ts", reason: "not yet admitted", issue: 261 }, |
| 280 |
{ file: "test/tui-size.test.ts", reason: "not yet admitted", issue: 261 }, |
| 281 |
{ file: "test/tui-widgets.test.ts", reason: "not yet admitted", issue: 261 }, |
| 282 |
{ file: "test/tui-width.test.ts", reason: "not yet admitted", issue: 261 }, |
| 283 |
{ |
| 284 |
file: "test/tui-workflows.test.ts", |
| 285 |
reason: "not yet admitted", |
| 286 |
issue: 261, |
| 287 |
}, |
| 288 |
{ |
| 289 |
file: "test/tui-workspace.test.ts", |
| 290 |
reason: "not yet admitted", |
| 291 |
issue: 261, |
| 292 |
}, |
| 293 |
{ file: "test/view-source.test.ts", reason: "not yet admitted", issue: 261 }, |
| 294 |
{ file: "test/web-browse.test.ts", reason: "not yet admitted", issue: 261 }, |
| 295 |
{ |
| 296 |
file: "test/web-code.test.ts", |
| 297 |
reason: |
| 298 |
"red: asserts the dashboard and studio pages as they were before the redesign", |
| 299 |
issue: 291, |
| 300 |
}, |
| 301 |
{ file: "test/web-editor.test.ts", reason: "not yet admitted", issue: 261 }, |
| 302 |
{ |
| 303 |
file: "test/web-origins.test.ts", |
| 304 |
reason: |
| 305 |
"red: asserts the dashboard and studio pages as they were before the redesign", |
| 306 |
issue: 291, |
| 307 |
}, |
| 308 |
{ file: "test/web-phone.test.ts", reason: "not yet admitted", issue: 261 }, |
| 309 |
{ file: "test/web-ui.test.ts", reason: "not yet admitted", issue: 261 }, |
| 310 |
{ |
| 311 |
file: "test/web-workflows.test.ts", |
| 312 |
reason: "not yet admitted", |
| 313 |
issue: 261, |
| 314 |
}, |
| 315 |
{ file: "test/webhooks.test.ts", reason: "not yet admitted", issue: 261 }, |
| 316 |
]; |
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
export function auditGate( |
| 323 |
present: readonly string[], |
| 324 |
gate: readonly string[], |
| 325 |
excluded: readonly Exclusion[], |
| 326 |
): string[] { |
| 327 |
const problems: string[] = []; |
| 328 |
const exists = new Set(present); |
| 329 |
const gated = new Set<string>(); |
| 330 |
for (const file of gate) { |
| 331 |
if (gated.has(file)) problems.push(`${file} is in GATE twice`); |
| 332 |
gated.add(file); |
| 333 |
if (!exists.has(file)) |
| 334 |
problems.push(`${file} is in GATE but does not exist`); |
| 335 |
} |
| 336 |
const out = new Set<string>(); |
| 337 |
for (const { file, reason, issue } of excluded) { |
| 338 |
if (out.has(file)) problems.push(`${file} is in EXCLUDED twice`); |
| 339 |
out.add(file); |
| 340 |
if (!exists.has(file)) |
| 341 |
problems.push(`${file} is in EXCLUDED but does not exist`); |
| 342 |
if (gated.has(file)) problems.push(`${file} is in both GATE and EXCLUDED`); |
| 343 |
if (typeof reason !== "string" || reason.trim() === "") |
| 344 |
problems.push(`${file} is excluded with no reason`); |
| 345 |
if (!Number.isInteger(issue) || issue <= 0) |
| 346 |
problems.push(`${file} is excluded with no issue number`); |
| 347 |
} |
| 348 |
for (const file of present) |
| 349 |
if (!gated.has(file) && !out.has(file)) |
| 350 |
problems.push(`${file} is in neither GATE nor EXCLUDED`); |
| 351 |
return problems; |
| 352 |
} |