Promote per-scenario wrapper bash to a seitask workflow-run subcommand (defer until N=3 scenarios)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- cli, devops, infrastructure
Research direction
Start by reading sei-protocol/platform#627 and the three scenario wrappers once N=3 exists. Inventory their variance, write the survey-checkpoint decision, and record whether to promote to seitask workflow-run or retain per-scenario bash; if promoting, migrate all three scenarios and add the specified SHA-fingerprint validation.
Written by the indexing model from the issue text.
Description
Problem
The CronJob wrapper bash introduced in sei-protocol/platform#627 contains ~80 lines that perform 7 operations every Workflow-based scenario will repeat verbatim:
- Fetch scenario YAML from a sei-k8s-controller git ref
- Allow-list-envsubst per-run scalars
kubectl applythe rendered Workflow CR- Poll
.status.phaseto terminal, with one-shot overrun warning at the 60m inner-deadline boundary - Capture terminal state (Workflow YAML + WorkflowNode tree + Task pod statuses) before deletion
- Annotate-abort → bounded
delete --wait=true→ child-pod sweep aws s3 cporchestrator stdout to the validation bucket
None of this is release-test-specific. The question is whether the variance across scenarios fits a typed flag interface or genuinely needs per-scenario bespoke bash — and we won't know until N≥3 scenarios exist.
Impact
Two failure modes if we get the timing wrong:
- Promote on N=1 → wrong abstraction. release-test's quirks become accidental contract; the second scenario fights the interface; the third hammers it into something unrecognizable. Expensive to undo because by then every scenario depends on the bad shape.
- Never promote → drift + missed safety nets. N copies of the same bash drift independently (different log formats, different cleanup ordering, different deadline math). More importantly: Cursor Bugbot already flagged two SHA-drift bugs on #627 (SEITASK_IMAGE vs controller-manager image; SEITASK_IMAGE vs vendored seitask-runner RBAC). A typed wrapper could enforce these as build-time invariants. Bash + human vigilance + Bugbot is the duct-tape version of that enforcement.
The phased pattern (build N=1..3 as duct-tape, survey at N=3 before landing, decide based on observed variance) is the right shape — but only if we actually pause at N=3.
Relevant experts
- platform-engineer — image versioning lock-step, CronJob shape, scenario asset layout, build-time SHA enforcement
- kubernetes-specialist — Workflow CR lifecycle, ownerRefs cascade semantics, vendored RBAC drift
- product-engineer — defines what "extensible" means in the survey checkpoint (which knobs are scenario-intrinsic vs universal)
- sre-engineer — owns the terminal-state-capture + cleanup-race logic; should sign off that the typed wrapper preserves the failure-diagnosability the bash currently has
Proposed approach
Phased, with an explicit survey checkpoint:
- N=1 (release-test, sei-protocol/platform#627) — landing now. Bash wrapper inline.
- N=2 (next scenario, TBD) — build the same bash-wrapper shape. Resist abstracting preemptively.
- N=3 (third scenario, TBD) — survey checkpoint BEFORE landing:
- Inventory the variance across all 3 wrappers: which knobs differ, which are universal, which were YAGNI knobs we accidentally exposed.
- Decide: extensible to N=10+, or does each instance need bespoke knobs after all?
- Decision:
- Extensible → promote to
seitask workflow-run. Sketch:
Migrate all 3 scenarios in one PR. Add SHA-fingerprint validation that refuses to apply if image SHA doesn't match SCENARIO_REF's expected controller-manager + vendored-RBAC.args: - workflow-run - --scenario=release-test - --scenario-repo=github.com/sei-protocol/sei-k8s-controller - --scenario-ref=$SCENARIO_REF - --bucket=harbor-validation-results - --var=SEID_IMAGE=$SEID_IMAGE - --var=SEITASK_IMAGE=$SEITASK_IMAGE - --var=RELEASE_TEST_IMAGE=$RELEASE_TEST_IMAGE - Not extensible → duct-tape was the right shape; keep per-scenario bash; document the variance.
- Extensible → promote to
Acceptance criteria
This issue resolves when:
- At least 3 Workflow-based scenarios are running in production (release-test + 2 more).
- A survey-checkpoint write-up exists capturing observed cross-scenario variance.
- A decision is recorded on the issue: promote OR keep duct-tape, with reasoning.
- If promote:
seitask workflow-runexists, all 3+ scenarios migrated, CronJobargs:collapsed to typed flags, SHA-drift Bugbot rules superseded by build-time invariants.
Out of scope
- The shared status-check template library — sibling issue at sei-protocol/sei-k8s-controller#330.
- Migrating the legacy
major-upgrade.yaml's half-bash-half-Workflow shape — that's its own retirement, Phase 2c+. - Pageable alerting on CronJob failure — separate observability-platform-engineer concern.
References
- sei-protocol/platform#627 — the N=1 wrapper
- sei-protocol/sei-k8s-controller#330 — sibling promotion-at-N=3 issue (status-check library)
- Memory:
feedback_prototype_first.mdsurvey-checkpoint pattern
- Dominant language
- Go
- Stars
- 1
- Forks
- 2
- Avg merge
- 2h 29m
- Merged PRs (30d)
- 56
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sei-protocol/sei-k8s-controller
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
sei-protocol/sei-k8s-controller#457 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
All issues in sei-protocol/sei-k8s-controller
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100