BunnyWay action exonerated; correct hoppy template env footgun#16
Conversation
Investigation against the live admin app to verify the iter-9 hypothesis that BunnyWay/actions/container-update-image was wiping environmentVariables on every roll. Tests run against admin app h4vme6Uhod4W3Yu (env preserved across all destructive scenarios that mattered): - Direct PATCH replicating the action's request body (id, imageTag only): env preserved (9 -> 9). bunny.net's Magic Containers PATCH endpoint preserves omitted fields. - Pod recreate (hoppy container pod recreate): env preserved (9 -> 9). - hoppy container template env with zero --env flags: env wiped (9 -> 0). Exit 0, no warning. THIS is the actual footgun. - hoppy container template env with one --env flag: env replaced to exactly that one entry (9 -> 1). "Replaces all" is exact. Conclusion: BunnyWay action and bunny PATCH semantics are both correct. The iter-9 wipe was almost certainly an accidental hoppy template env call with the wrong --env list, exposed by the "replace all" semantics with no guard rail against the N>0->0 transition. Files: - New kb/bunnyway-actions-investigation.md captures the full reproduction with command lines, before/after states, and the exoneration. - Updated MC.1 in hoppy-bug-report-magic-containers.md to describe the real bug (zero-flag wipe, plus the "replace all" + N=1 case as documented but surprising). - Retracted deviation #7 in iter-9 plan, updated action items (defensive: lift env to GitHub secrets, reassert in CI; no upstream issue at BunnyWay). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThree knowledge base documents are updated to document an investigation conclusion: ChangesInvestigation & Root-Cause Correction
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@kb/bunnyway-actions-investigation.md`:
- Line 32: The fenced code block containing the PATCH request starting with
"PATCH https://api.bunny.net/mc/apps/{appId}/containers/{containerId}" is
unlabeled and triggers MD040; fix it by adding a language identifier (e.g.,
`http`) to the opening fence so the block begins with ```http and keep the
existing block content exactly as shown (Headers and Body lines).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c518da3f-6dbc-46ab-bfa4-1deea2715b1e
📒 Files selected for processing (3)
kb/bunnyway-actions-investigation.mdkb/hoppy-bug-report-magic-containers.mdkb/iteration-09-go-live-bunny-infra.md
|
|
||
| The action source at https://github.com/BunnyWay/actions/blob/main/container-update-image/src/action.ts shows it calls: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Add a language identifier to the fenced code block.
Line 32 uses an unlabeled fence, which triggers MD040. Please annotate it (e.g., http).
Proposed fix
-```
+```http
PATCH https://api.bunny.net/mc/apps/{appId}/containers/{containerId}
Headers: Content-Type: application/json, AccessKey: {apiKey}
Body: { "id": "{containerId}", "imageTag": "{tag}", "imageDigest"?: "{digest}" }</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 32-32: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@kb/bunnyway-actions-investigation.md` at line 32, The fenced code block
containing the PATCH request starting with "PATCH
https://api.bunny.net/mc/apps/{appId}/containers/{containerId}" is unlabeled and
triggers MD040; fix it by adding a language identifier (e.g., `http`) to the
opening fence so the block begins with ```http and keep the existing block
content exactly as shown (Headers and Body lines).
Investigation requested by the operator: verify whether BunnyWay/actions/container-update-image is the cause of iter-9's env-vars-wiped sign-in failure, and create a bug report.
Verdict
BunnyWay action is innocent. Their PATCH
{id, imageTag}does NOT wipeenvironmentVariables; bunny's Magic Containers PATCH endpoint preserves omitted fields. Pod recreate also preserves env.The actual culprit is
hoppy container template envwith the wrong--envarg list — its 'replaces all' semantics has no guard rail against the destructive N>0→0 transition.Tests run against live admin app
{id, imageTag}(replicates BunnyWay action)--env--envAdmin briefly went down during the zero-flag test, restored to 9 vars + verified sign-in (HTTP 200) post-restore.
Changes
kb/bunnyway-actions-investigation.md— full reproduction + exoneration.hoppy-bug-report-magic-containers.md— describes the real bug (zero-flag wipe + replace-all surprise), removes the BunnyWay/PATCH framing.Recommended hoppy fix
🤖 Generated with Claude Code
Summary by CodeRabbit