fix(bybit-options): make the deploy script survive shell startup - #742
Conversation
bybit-options-archiver-deploy.sh declared 'readonly SCRIPT_DIR' before assigning it, so every invocation died with 'SCRIPT_DIR: readonly variable' before reaching any logic. The release contract test only grepped the script text and never executed it, so the defect shipped. Swap the two lines to match every other deploy script in the directory, and add a no-argument invocation smoke assertion to the contract test so startup regressions fail CI instead of the host cutover.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe deployment script now initializes ChangesDeploy script contract
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Change contract
bybit-options-archiver-deploy.shdeclaredreadonly SCRIPT_DIRbefore assigning it, so every invocation died withSCRIPT_DIR: readonly variable(exit 1) before reaching any logic. This blocks the bybit-options archiver host cutover (contract #4): the governed staging lane cannot run at all. The release contract test only grepped the script text and never executed it, which is how the defect shipped.One-line swap to assignment-then-readonly, matching every other deploy script in
deployment/aliyun/(verified: all 13 others use the correct order; this was the only inverted one).Issue relationship
None
Out of scope
host-bybit-options-shadow-gate.sh/host-bybit-options-cutover.shwere executed and start correctly (fail only on the expected root check).Dependencies and merge order
None
Focused validation
bash deployment/aliyun/bybit-options-archiver-deploy.sh→line 20: SCRIPT_DIR: readonly variable, exit 1.bash deployment/aliyun/test-bybit-options-release-contract.sh→ passes, now including a new no-argument invocation smoke assertion (must exit 2 with usage text, not a shell startup error) so this regression class fails CI instead of the host cutover.git diff --checkclean.Rollout and rollback
No production impact at merge; the script runs only on the governed host lane. Unblocks the pending bybit-options cutover. Rollback is revert.
Scope exception
None
Summary by CodeRabbit
Bug Fixes
Tests