Commit 2cd4bd5
authored
refactor: migrate Deequ Bot to the shared Shadow engine (#756)
* Migrate Deequ Bot to the shared Shadow engine
Replace the vendored copy of the bot (src/scripts/issue_bot/) with consuming
the shared engine sudsali/shadow via its reusable workflow, SHA-pinned to
3a057597420d7123df162bfe4686aaafb5f7eccd (v1.2). One engine, maintained once
upstream, instead of a per-repo fork.
Zero intended behavior change:
- Deequ's language-tuned prompts stay in Secrets Manager (deequ-bot/* namespace)
and are selected via prompt_sm_prefix: deequ-bot — the engine fetches all
eight (pr-investigator/critic/reporter + 2 commit nudges + issue-classify/
issue-respond/followup) in place of its bundled language-agnostic defaults.
- .shadow.yml sets bot.name: deequ-bot so the clean-review marker stays
<!-- deequ-bot:clean --> (auto-approve.yml keys on it) and the Scala codebase
config (src/main/scala, .scala) matches the vendored setup.
- All four surfaces (PR review, issue triage, issue-respond, follow-up), all
four triggers, and the job-level trigger guard are preserved. Workflow name
stays "Deequ Bot" (auto-approve.yml keys on it too).
BOT_AGENT_PIPELINE=1 is already the live path, so the dropped legacy file-review
prompts are dead code. generate_kb.py stays (update-kb.yml still runs it); its
stale paths-ignore entries for the removed dirs are cleaned up.
Requires a one-time OIDC trust update on the bot's IAM role (job_workflow_ref →
shadow's reusable workflow), applied out-of-band with an @* version wildcard so
future engine bumps need no IAM change.
* Clarify OIDC trust comment: hardening is optional and post-merge only
The caller works on the current sub-only IAM trust with no change (its OIDC sub
is still repo:awslabs/deequ:*). The job_workflow_ref pin is optional
defense-in-depth to be applied only after this PR merges — applying it while the
base branch still runs the vendored bot denies AssumeRole. Comment-only.
* Add top-level permissions to the Shadow caller workflow
A reusable-workflow caller must grant, at the top level, the union of
permissions its nested jobs request — GitHub caps nested jobs at the caller's
token and otherwise fails at startup ('is requesting ... but is only allowed
none'). The reusable workflow's analyze (id-token:write, pull-requests:read)
and act (issues:write, pull-requests:write) jobs need this union; the vendored
workflow declared these per-job, which doesn't carry across the workflow_call
boundary. Fixes the workflow_dispatch startup_failure.
* Trim workflow/config comments to WHY-only
Drop WHAT-narration and multi-paragraph explanations; keep only comments that
prevent a concrete mistake (name coupling, dual-SHA pin, pull_request_target
no-ref, permissions ceiling, marker, if-guard).
* Rename bot identity deequ-bot -> shadow
Surface the Shadow product to the OSS community. Renames the user-facing
identity in lockstep across the three coupled points: .shadow.yml bot.name
(the clean-review marker), the workflow name, and auto-approve.yml (both the
workflows[] trigger and the CLEAN_MARKER it greps). prompt_sm_prefix stays
deequ-bot (private Secrets Manager namespace).
* Pin engine to v1.3 and set Shadow attribution footer
Bumps the shared-engine SHA to v1.3 (adds bot.attribution) and sets the footer
attribution so posted comments surface the Shadow product to the OSS community.1 parent 0b8cea5 commit 2cd4bd5
25 files changed
Lines changed: 55 additions & 8233 deletions
File tree
- .github/workflows
- src/scripts
- issue_bot
- schemas
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
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 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
This file was deleted.
This file was deleted.
0 commit comments