code-yeongyu / code-yeongyu/senpi
Publish Model Catalog fails with "Unable to locate credentials" whenever the R2 upload is actually attempted
- Dominant language
- TypeScript
- Stars
- 429
- Forks
- 98
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 526
Description
## Summary
Every `Publish Model Catalog` run that actually enters the publication window fails at **Publish model catalog to R2** with:
```
fatal error: Unable to locate credentials
```
The runs that report success are the ones whose publication window is closed, so the R2 step is `skipped` and the job passes without uploading anything. The green history is therefore not evidence that publication works.
## Evidence (2026-09-09)
| run | event | conclusion | `Publish model catalog to R2` |
|---|---|---|---|
| 34334984265 | schedule | success | **skipped** (window closed) |
| 34335646741 | workflow_run | failure | **failure** — `Unable to locate credentials` |
| 34329718741 | schedule | failure | **failure** |
`Check publication window` succeeded in all three, so the gate itself is fine; the difference is only whether the upload was attempted.
## Where it breaks
`.github/workflows/publish-model-catalog.yml`, the `publish` job's R2 step:
```yaml
- name: Publish model catalog to R2
if: steps.publication-window.outputs.allowed == 'true'
run: |
node scripts/publish-model-catalog.mjs \
--input .artifacts/model-catalog \
--bucket pi-artifacts \
--endpoint "$R2_ENDPOINT" \
--source-commit "$(git rev-parse HEAD)"
```
`R2_ENDPOINT` is present in the job env (visible in the run log), but the AWS SDK credential chain resolves nothing, so the uploader aborts before its first request. The step needs the R2 access key id and secret injected (or an equivalent credential source) in the same env block.
## Impact
The published model catalog is not being refreshed, silently: the workflow is only "green" when it does nothing. It is downstream of releases via `workflow_run`, so it does not block a release — the senpi `2026.9.9-2` release completed normally with this failing.
## Suggested fix
Inject the R2 credentials into the R2 step's `env` (matching whatever secret names the account uses) and, so this cannot regress silently again, fail the job when the window is open but no credential source is configured, instead of letting the SDK discover it at request time.
Contributor guide
Research direction
Start with .github/workflows/publish-model-catalog.yml and inspect the publish job's R2 step and its environment configuration. Then read scripts/publish-model-catalog.mjs to understand its credential expectations. Done means an open publication window uploads the catalog successfully and missing credentials cause an explicit job failure rather than a late SDK error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github-actions, typescript
- Domain
- ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100