|
| 1 | +# 0004 Implementation Checklist |
| 2 | + |
| 3 | +Update this as implementation teaches us things. |
| 4 | + |
| 5 | +## Baseline |
| 6 | + |
| 7 | +- [x] Plugin work lives under `extended/plugins/send-message`. |
| 8 | +- [x] The plugin subtree does not rely on repo resources outside itself. |
| 9 | +- [x] Slack credentials stay local-only and out of git. |
| 10 | +- [x] The host does not own channel lookup, Secret reads, or Slack API calls. |
| 11 | + |
| 12 | +## Phase 0: read and pin the seams |
| 13 | + |
| 14 | +- [x] Read proposal 0004 again before starting code. |
| 15 | +- [x] Re-read the `send-message` section in proposal 0002 spec. |
| 16 | +- [x] Read the current StepPlugin host runtime and e2e harness seams. |
| 17 | +- [x] Record any host-side gap found during that read. |
| 18 | + |
| 19 | +## Phase 1: create the standalone subtree |
| 20 | + |
| 21 | +- [x] Create `extended/plugins/send-message/`. |
| 22 | +- [x] Add plugin-owned runtime source there. |
| 23 | +- [x] Add plugin-owned image build there. |
| 24 | +- [x] Add plugin-owned tests there. |
| 25 | +- [x] Add plugin-owned CRD manifests there. |
| 26 | +- [x] Add plugin-owned RBAC manifests there. |
| 27 | +- [x] Add plugin-owned smoke assets or smoke helper there. |
| 28 | + |
| 29 | +## Phase 2: implement the runtime |
| 30 | + |
| 31 | +- [x] Implement `POST /api/v1/step.execute`. |
| 32 | +- [x] Enforce bearer-token auth from `/var/run/kargo/token`. |
| 33 | +- [x] Return `403` on bad auth. |
| 34 | +- [x] Reject unsupported methods cleanly. |
| 35 | +- [x] Parse the v1 step-config subset. |
| 36 | +- [x] Resolve `MessageChannel` from the Project namespace. |
| 37 | +- [x] Resolve `ClusterMessageChannel` from the system-resources namespace. |
| 38 | +- [x] Resolve referenced Secrets from the correct namespace. |
| 39 | +- [x] Read Slack token from Secret key `apiKey`. |
| 40 | +- [x] Send the Slack message from the plugin. |
| 41 | +- [x] Return `slack.threadTS` output. |
| 42 | + |
| 43 | +## Phase 3: own the OSS CRDs and RBAC |
| 44 | + |
| 45 | +- [x] Add Slack-only `MessageChannel` CRD manifest. |
| 46 | +- [x] Add Slack-only `ClusterMessageChannel` CRD manifest. |
| 47 | +- [x] Keep the API group `ee.kargo.akuity.io/v1alpha1`. |
| 48 | +- [x] Add plugin-owned RBAC manifests for channel and Secret reads. |
| 49 | +- [x] Keep RBAC setup out of host code unless a real host gap is proven. |
| 50 | + |
| 51 | +## Phase 4: tests inside the subtree |
| 52 | + |
| 53 | +- [x] Add runtime tests for auth. |
| 54 | +- [x] Add runtime tests for namespaced channel lookup. |
| 55 | +- [x] Add runtime tests for cluster-scoped channel lookup. |
| 56 | +- [x] Add runtime tests for referenced Secret lookup. |
| 57 | +- [x] Add runtime tests for Slack request shaping. |
| 58 | +- [x] Add runtime tests for `slack.channelID` override. |
| 59 | +- [x] Add runtime tests for `slack.threadTS` override and output. |
| 60 | +- [x] Add runtime tests for missing channel or Secret failures. |
| 61 | +- [x] Add runtime tests for Slack API failure handling. |
| 62 | + |
| 63 | +## Phase 5: local smoke path |
| 64 | + |
| 65 | +- [x] Build the plugin image from `extended/plugins/send-message`. |
| 66 | +- [x] Load the image into the local kind cluster. |
| 67 | +- [x] Keep kube access on an isolated `KUBECONFIG`. |
| 68 | +- [x] Keep the user's existing kube context untouched. |
| 69 | +- [x] Install plugin CRDs and RBAC. |
| 70 | +- [x] Generate and install the StepPlugin `ConfigMap`. |
| 71 | +- [x] Inject a local-only Slack token into a cluster `Secret`. |
| 72 | +- [x] Create a test `MessageChannel` or `ClusterMessageChannel`. |
| 73 | +- [x] Run a `Stage` with `uses: send-message`. |
| 74 | +- [x] Prove promotion success in-cluster. |
| 75 | +- [x] Prove `slack.threadTS` output is populated. |
| 76 | +- [x] Verify the message appeared in the target Slack channel. |
| 77 | + |
| 78 | +## Phase 6: repo harness integration |
| 79 | + |
| 80 | +- [x] Extend `extended/tests/e2e_stepplugins.sh` to support the real |
| 81 | + `send-message` smoke path. |
| 82 | +- [x] Keep the committed harness credential-free. |
| 83 | +- [x] Gate Slack smoke on a local env var for the token. |
| 84 | +- [x] Keep any non-`extended/` edit to a tiny hook only, if one is needed. |
| 85 | + |
| 86 | +## Phase Post-Green: Minimize Diff Of Files Outside ./extended Against Kargo Upstream |
| 87 | + |
| 88 | +- [x] Fetch `upstream`. |
| 89 | +- [x] Review every edited file outside `extended/`, if any, against |
| 90 | + `upstream/main`. |
| 91 | +- [x] Move more logic behind `extended/` helpers if that shrinks the outside |
| 92 | + diff safely. |
| 93 | +- [x] Re-run matching tests after each cleanup pass. |
| 94 | +- [x] Stop only when no obvious outside-`extended/` shrink remains. |
0 commit comments