Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [master]
paths:
- "site/**"
- "docs/demo/risk-gate-demo-*"
- ".github/workflows/pages.yml"
workflow_dispatch:

Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
/coverage/
*.profraw
*.profdata

# Agent and tool state
.ai-jail
.claude-flow/
.swarm/
ruvector.db
__pycache__/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ idempotent report comment.
It does not replace technical review. It makes likely impact explicit and
applies a policy proportional to the affected area's criticality.

## Demo

[![Risk Gate demo: a pull request that reaches payments is blocked until its validations pass](docs/demo/risk-gate-demo-en.jpg)](docs/demo/risk-gate-demo-en.mp4)

Watch the 64-second demo ([MP4](docs/demo/risk-gate-demo-en.mp4)): configure
`.risk-gate.yaml`, add the Action, open a pull request, and follow the report
from cascade impact to merge. Also available in
[Português (Brasil)](docs/demo/risk-gate-demo-pt-BR.mp4) and
[Español](docs/demo/risk-gate-demo-es.mp4). See [docs/demo](docs/demo/README.md)
for how the video was made and how to re-render it.

## How the analysis works

For a PR execution, Risk Gate:
Expand Down
3 changes: 2 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ cargo run -- --ast-impact --root /path/to/repository + --repository owner/repos
~~~

The implementation plan is in implementation-plan.md. Quality commands and
coverage/mutation requirements are in quality.md.
coverage/mutation requirements are in quality.md. Demo videos in English,
Portuguese, and Spanish, with their HyperFrames source, are in demo/.
65 changes: 65 additions & 0 deletions docs/demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Risk Gate demo videos

A 64-second walkthrough of Risk Gate running as a GitHub Actions step:
versioning `.risk-gate.yaml`, adding the workflow, opening a pull request,
watching the gate fail on a cascade into payments, reading the report, and
merging after a fix.

| Language | Video | Poster |
| --- | --- | --- |
| English | [risk-gate-demo-en.mp4](risk-gate-demo-en.mp4) | [risk-gate-demo-en.jpg](risk-gate-demo-en.jpg) |
| Português (Brasil) | [risk-gate-demo-pt-BR.mp4](risk-gate-demo-pt-BR.mp4) | [risk-gate-demo-pt-BR.jpg](risk-gate-demo-pt-BR.jpg) |
| Español | [risk-gate-demo-es.mp4](risk-gate-demo-es.mp4) | [risk-gate-demo-es.jpg](risk-gate-demo-es.jpg) |

Only the captions, intro, and closing card are translated. The GitHub
screens, code, logs, and report stay in English because they reproduce what
users see.

## What is real and what is staged

- The report comment, the Actions log, and the cascade diagram come from a
real run of the `risk-gate` v0.1.0 release binary (`--base main --head HEAD`)
on a fixture repository (`acme/storefront`, 40 files) whose PR changes
`src/api/checkout.ts`, which imports `src/payment/charge.ts`. The captured
Markdown is `video/assets/data/report-failed.md`. Validation timings are
those of the fixture's scripts.
- The `.risk-gate.yaml` and workflow shown in the video are the fixture's
files and match the configuration contract in `specs/configuration.md`.
- The GitHub interface is rebuilt in HTML for the video; it is not a screen
recording. The merge box assumes branch protection that requires the Risk
Gate check, which Risk Gate itself does not configure.
- After the fix commit the video shows only the passing check and the merge
box. In the fixture the re-run reports `Status: PARTIAL` with
`Merge blocked: false`, because non-code files such as `.risk-gate.yaml` and
shell scripts are listed as unanalyzed; the updated comment is not shown.
- Music and sound effects are synthesized by `video/scripts/make_audio.py`
with a fixed seed, so they carry no third-party licence.

## Rebuilding

The source is a [HyperFrames](https://hyperframes.heygen.com) project in
`video/`:

- `index.html` places the scenes, captions, and audio on the timeline.
- `compositions/` holds one sub-composition per scene plus the caption track.
- `assets/kit.js` is the shared seek-safe engine (cursor, camera zoom,
typing); `assets/kit.css` rebuilds the GitHub surfaces.
- `assets/i18n.js` holds every translated string.

Preview and edit in HyperFrames Studio:

~~~bash
cd docs/demo/video
npx --yes hyperframes@0.8.155 preview
~~~

Render all languages (Node.js 22+, FFmpeg, Python 3 with NumPy; run outside
sandboxes that block Chrome):

~~~bash
docs/demo/video/scripts/render.sh # en, pt-BR, es
docs/demo/video/scripts/render.sh pt-BR # a single language
~~~

To add a language, add a table to `assets/i18n.js`, add it to the `lang`
options in `index.html`, and pass it to `render.sh`.
Binary file added docs/demo/risk-gate-demo-en.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo/risk-gate-demo-en.mp4
Binary file not shown.
Binary file added docs/demo/risk-gate-demo-es.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo/risk-gate-demo-es.mp4
Binary file not shown.
Binary file added docs/demo/risk-gate-demo-pt-BR.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo/risk-gate-demo-pt-BR.mp4
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/demo/video/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# HyperFrames and tool caches
.hyperframes/
.waveform-cache/
renders/
node_modules/
# Agent tooling state
.claude-flow/
.swarm/
ruvector.db
# Intermediate audio; the encoded .m4a files are committed
assets/audio/*.wav
Binary file added docs/demo/video/assets/audio/music.m4a
Binary file not shown.
Binary file added docs/demo/video/assets/audio/sfx.m4a
Binary file not shown.
49 changes: 49 additions & 0 deletions docs/demo/video/assets/data/report-failed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- risk-gate:report -->
## Risk Gate

- **Risk:** `danger`
- **Status:** `FAILED`
- **Merge blocked:** `true`
- **Version:** `0.1.0`

### Why this risk

- `src/api/checkout.ts` → **danger** (rule `src/api/`); modules: `chargeCard`, `checkout`, `items`, `token`, `total`, `items`, `sum`, `item`, `sum`, `chargeCard`, `total`

### Cascade impact

- `src/api/checkout.ts` is connected to `src/payment/charge.ts` → **danger** (rule `src/payment/`): Payments and authorization; chain: `src/api/checkout.ts` → `src/payment/charge.ts`
- `src/api/checkout.ts` is connected to `tests/checkout.test.ts` → **minimal** (rule `tests/`); chain: `src/api/checkout.ts` → `tests/checkout.test.ts`
- `src/api/checkout.ts` is connected to `src/payment/fraud.ts` → **danger** (rule `src/payment/`): Payments and authorization; chain: `src/api/checkout.ts` → `src/payment/charge.ts` → `src/payment/fraud.ts`

```mermaid
flowchart LR
impact_0["src/api/checkout.ts"]
impact_1["src/payment/charge.ts"]
impact_2["tests/checkout.test.ts"]
impact_3["src/payment/fraud.ts"]
impact_0 -->|"step 1"| impact_1
impact_0 -->|"step 1"| impact_2
impact_1 -->|"step 2"| impact_3
```

### AST analysis

Parsed files: `40`; incomplete files: `4`.

The following files require attention:

- `.github/workflows/risk-gate.yml`: unsupported language
- `.risk-gate.yaml`: unsupported language
- `scripts/mutation-test.sh`: unsupported language
- `scripts/test-e2e.sh`: unsupported language

### Validations

- `e2e`: `SUCCESS` (exit: `0`; 4048 ms)
- stdout: `12 scenarios passed`
- `mutationTesting`: `FAILED` (exit: `1`; 6019 ms)
- stderr: `3 mutants survived in src/payment/charge.ts`

_Generated by risk-gate._

4 changes: 4 additions & 0 deletions docs/demo/video/assets/data/report.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions docs/demo/video/assets/fonts/LICENSE-Inter.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
93 changes: 93 additions & 0 deletions docs/demo/video/assets/fonts/LICENSE-JetBrainsMono.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading