Skip to content

Commit aa1817c

Browse files
committed
feat(ci): add Sentry and package action facades
1 parent 91db919 commit aa1817c

16 files changed

Lines changed: 316 additions & 391 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,4 @@ jobs:
2626
run: python -m pip install --quiet --upgrade pip pytest pyyaml
2727

2828
- name: Run action-contract tests
29-
run: python -m pytest tests/ -q --ignore=tests/test_herald_renderer.py
30-
31-
# The Herald renderer is behavioral, not just structural: it shells the real
32-
# `decided decisions-for --json` (published asdecided-core — the same contract the
33-
# wrapper consumes in the field, ADR-063) and must render byte-identical
34-
# comments for the same corpus and diff. Kept out of the structural job so
35-
# that tier stays engine-free.
36-
herald-renderer:
37-
name: herald renderer (published engine)
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v5
41-
42-
- uses: actions/setup-python@v6
43-
with:
44-
python-version: "3.12"
45-
46-
- name: Install test deps
47-
run: python -m pip install --quiet --upgrade pip pytest
48-
49-
- name: Install the verified native engine
50-
run: bash shared/install-native.sh 0.23.1
51-
52-
- name: Run the renderer battery
53-
run: python -m pytest tests/test_herald_renderer.py -q
29+
run: python -m pytest tests/ -q

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ member) this consolidates the CI wrappers that previously lived in `asdecided-co
77
in the standalone `rac-actions` / `lore-watchkeeper` / `lore-gatekeeper` repos.
88

99
Every capability is a **thin wrapper over the public `decided` CLI** (ADR-063);
10-
all analysis and policy live in the native engine. The wrappers download a
11-
checksum-verified `asdecided-core` release (pin with the
12-
`asdecided-version` input). Python is used only by Herald's comment renderer,
13-
not as the engine.
10+
all analysis, policy, and Herald rendering live in the native engine. The
11+
wrappers download a checksum-verified `asdecided-core` release (pin with the
12+
`asdecided-version` input). No action requires a Python runtime.
1413

1514
## Capabilities
1615

@@ -19,8 +18,9 @@ not as the engine.
1918
| Watchkeeper | [`watchkeeper/github/`](watchkeeper/github/) | `decided watchkeeper` (PR knowledge review) | `uses: asdecided/ci/watchkeeper/github@<ref>` |
2019
| Gatekeeper | [`gatekeeper/github/`](gatekeeper/github/) | `decided gate --sarif` (required merge gate) | `uses: asdecided/ci/gatekeeper/github@<ref>` |
2120
| Registrar | [`registrar/github/`](registrar/github/) | `decided validate --sarif` (well-formedness, ADR-058) | `uses: asdecided/ci/registrar/github@<ref>` |
22-
| Herald | [`herald/github/`](herald/github/) | `decided decisions-for --json` (advisory governing-decisions comment on PRs) | `uses: asdecided/ci/herald/github@<ref>` |
21+
| Herald | [`herald/github/`](herald/github/) | `decided herald` (advisory governing-decisions comment on PRs) | `uses: asdecided/ci/herald/github@<ref>` |
2322
| Recordkeeper | [`recordkeeper/`](recordkeeper/) | read-access audit recorder (ADR-084) | *placeholder — not yet shipped* |
23+
| Sentry | [`sentry/github/`](sentry/github/) | `decided sentry --sarif` (deterministic decision-to-code enforcement) | `uses: asdecided/ci/sentry/github@<ref>` |
2424

2525
A reusable Watchkeeper workflow is also published at
2626
[`.github/workflows/watchkeeper.yml`](.github/workflows/watchkeeper.yml)
@@ -30,6 +30,20 @@ A reusable Watchkeeper workflow is also published at
3030
demanded; the engine is already platform-neutral (SARIF/JSON), so that work is in
3131
the wrappers, not the engine.
3232

33+
## Distribution facades
34+
35+
Development remains in this repository. Marketplace-facing repositories are
36+
generated release facades so each action can carry a root `action.yml`:
37+
38+
`asdecided/gatekeeper`, `asdecided/herald`, `asdecided/recordkeeper`,
39+
`asdecided/registrar`, `asdecided/watchkeeper`, and `asdecided/sentry`.
40+
41+
`distribution/actions.json` is the source manifest and
42+
`scripts/package-facades.sh <empty-output-directory>` builds all six
43+
deterministically. Recordkeeper is packaged as a companion-repository
44+
placeholder but is not marked Marketplace-ready until its execution wrapper
45+
ships; the other five contain root action manifests.
46+
3347
## History
3448

3549
The `watchkeeper/`, `gatekeeper/`, and `registrar/` wrappers moved here from

distribution/actions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"schema_version": 1,
3+
"facades": [
4+
{"name": "gatekeeper", "source": "gatekeeper/github", "marketplace": true},
5+
{"name": "herald", "source": "herald/github", "marketplace": true},
6+
{"name": "recordkeeper", "source": "recordkeeper", "marketplace": false},
7+
{"name": "registrar", "source": "registrar/github", "marketplace": true},
8+
{"name": "watchkeeper", "source": "watchkeeper/github", "marketplace": true},
9+
{"name": "sentry", "source": "sentry/github", "marketplace": true}
10+
]
11+
}

gatekeeper/github/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# The Watchkeeper action lives at `watchkeeper/github/` and the validate
1313
# (Registrar) action at `registrar/github/`; this gate is referenced as
1414
# `uses: asdecided/ci/gatekeeper/github@<ref>`.
15-
name: "RAC PR gate"
15+
name: "As Decided Gatekeeper"
1616
description: >-
17-
Enforce a requirements-as-code (RAC) corpus on a pull request with a single
17+
Enforce an As Decided knowledge corpus on a pull request with a single
1818
`decided gate` command — validation, relationship integrity, and review under the
1919
corpus enforcement policy — surfaced inline via GitHub Code Scanning (SARIF) as
20-
a required status check. A thin wrapper over the `rac` CLI.
20+
a required status check. A thin wrapper over the native `decided` CLI.
2121
author: "Tom Ballard"
2222

2323
branding:
@@ -26,9 +26,9 @@ branding:
2626

2727
inputs:
2828
path:
29-
description: "The RAC corpus directory to enforce (passed to `decided gate`)."
29+
description: "The As Decided corpus directory to enforce."
3030
required: false
31-
default: "rac"
31+
default: "decisions"
3232
upload-sarif:
3333
description: >-
3434
Upload SARIF to GitHub Code Scanning (`true` or `false`). Requires the job
@@ -79,7 +79,7 @@ runs:
7979
uses: github/codeql-action/upload-sarif@v3
8080
with:
8181
sarif_file: ${{ inputs.sarif-dir }}/gate.sarif
82-
category: rac-gate
82+
category: asdecided-gatekeeper
8383

8484
# Any non-zero CLI exit fails the check; the Code Scanning annotations show
8585
# every finding, blocking and advisory. What is blocking is decided by the
@@ -90,7 +90,7 @@ runs:
9090
EXIT_CODE: ${{ steps.gate.outputs.exit_code }}
9191
run: |
9292
if [ "$EXIT_CODE" != "0" ]; then
93-
echo "::error::RAC PR gate failed (exit $EXIT_CODE) — see the Code Scanning annotations."
93+
echo "::error::As Decided Gatekeeper failed (exit $EXIT_CODE) — see Code Scanning annotations."
9494
exit "$EXIT_CODE"
9595
fi
96-
echo "RAC PR gate passed."
96+
echo "As Decided Gatekeeper passed."

herald/github/action.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# Proclaims the recorded decisions that govern a pull request's changed paths
55
# as ONE advisory comment: compute the merge-base diff, run
6-
# `decided decisions-for --json` per changed path (the live-decisions lookup the
7-
# CLI and MCP serve, `decision-to-code-proximity`), and post a terse,
6+
# native `decided herald` renderer (built on the live-decisions lookup the CLI
7+
# and MCP serve, `decision-to-code-proximity`), and post a terse,
88
# deduplicated comment that re-runs update in place. Facts, never verdicts
99
# (ADR-034): the comment names what governs and recommends review; it never
1010
# gates the merge — the action succeeds whatever it finds, and only
@@ -22,21 +22,21 @@
2222
# `pull-requests: write` on the job for the comment. On forks, where the
2323
# token is read-only, the comment falls back to the step summary instead of
2424
# failing the check.
25-
name: "AsDecided decisions on PR"
25+
name: "As Decided Herald"
2626
description: >-
2727
Comment the recorded decisions that govern a pull request's changed paths —
2828
id, title, and the declared scope that matched — as one advisory,
29-
update-in-place comment. A thin wrapper over `decided decisions-for`; facts,
29+
update-in-place comment. A thin wrapper over `decided herald`; facts,
3030
never a merge gate.
3131
author: "Tom Ballard"
3232
branding:
3333
icon: "book-open"
3434
color: "purple"
3535
inputs:
3636
path:
37-
description: "The RAC corpus directory (passed to `decided decisions-for`)."
37+
description: "The As Decided corpus directory."
3838
required: false
39-
default: "rac"
39+
default: "decisions"
4040
max-inline:
4141
description: >-
4242
Governing decisions listed in full before the rest collapse into a
@@ -51,9 +51,6 @@ inputs:
5151
runs:
5252
using: "composite"
5353
steps:
54-
- uses: actions/setup-python@v5
55-
with:
56-
python-version: "3.12"
5754
- name: Install AsDecided
5855
shell: bash
5956
run: |
@@ -74,9 +71,8 @@ runs:
7471
fi
7572
git diff --name-only "$BASE_SHA...$HEAD_SHA" > lore-changed-paths.txt
7673
echo "$(wc -l < lore-changed-paths.txt) changed path(s)"
77-
# One deterministic comment body: `decided decisions-for --json` per changed
78-
# path, merged by decision id, sorted, no wall-clock input — the same
79-
# bytes for the same corpus and diff.
74+
# The native engine owns collection, deduplication, sorting, and rendering.
75+
# The same corpus and diff produce the same bytes; no Python sidecar.
8076
- name: Render governing decisions
8177
id: render
8278
shell: bash
@@ -85,12 +81,12 @@ runs:
8581
MAX_INLINE: ${{ inputs.max-inline }}
8682
LINK_BASE: ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.pull_request.head.sha }}
8783
run: |
88-
python "$GITHUB_ACTION_PATH/render.py" \
89-
--corpus "$INPUT_PATH" \
84+
decided herald "$INPUT_PATH" \
9085
--paths-file lore-changed-paths.txt \
9186
--link-base "$LINK_BASE" \
9287
--max-inline "$MAX_INLINE" \
93-
--out lore-decisions-comment.md
88+
--out lore-decisions-comment.md \
89+
--github-output "$GITHUB_OUTPUT"
9490
# One comment per PR, updated in place on re-runs (found by its marker).
9591
# No comment is created when nothing governs; an existing comment is
9692
# updated even to the empty state, so it never goes stale. A read-only

herald/github/render.py

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)