release: ensure_config targets payram.server.url; node-status + SCW deploy hardening - #83
release: ensure_config targets payram.server.url; node-status + SCW deploy hardening#83BuddhaSource wants to merge 7 commits into
Conversation
…ut project id Core collapsed payram.frontend/payram.backend into one canonical payram.server.url and hard-deletes the legacy keys on boot, so ensure_config's writes had become silent no-ops — and a payram.server.url left unset makes POST /payment return 500 at link creation. ensure_config now checks GET /system/site-url and, when siteUrl is null, POSTs the canonical endpoint (root-only; core derives the origin from the request, only the scheme is sent). Non-200 on GET falls back to the legacy split keys so the script still works against older images. deploy-scw-eth.js: current core registers SCWs only on the project-scoped route, so an empty PAYRAM_PROJECT_ID used to fail registration AFTER the deploy tx had burned gas. The project id is now validated before sending the transaction.
…re-config GET /system/workers/status returns 500 on hosts without supervisord; node-status previously fed that error body into every chain check, degrading each to listener-down with a bogus restart remediation and exit 1. Worker status is now best-effort: on non-200 the listener state prints as 'unknown', the listener-down downgrade is suppressed, and the RPC/block-age checks still run. Docs: PAYRAM_HEADLESS_AGENT.md now describes ensure-config's canonical payram.server.url behaviour (legacy keys only as the older-core fallback).
fix: ensure_config targets payram.server.url; SCW deploy fails fast without project id
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe changes update agent setup documentation and behavior, tolerate unavailable worker-status endpoints, strengthen SCW deployment prerequisites and registration routing, and set version 3.5.2 as the latest upgrade-policy release. ChangesAgent configuration and status
SCW deployment registration
Release upgrade policy
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@scripts/deploy-scw-eth.js`:
- Around line 163-166: Update the preflight validation in the deployment flow
before the transaction is sent to require factoryData.id (factoryId) to be
non-null and non-blank, alongside the existing factory address and ABI checks.
Abort deployment when the ID is invalid so the registration URLs built in the
candidates array never contain an undefined or empty identifier.
In `@setup_payram_agents.sh`:
- Around line 1301-1307: Update the server URL POST handling in the
ensure-config flow so HTTP 403 and other non-200 responses return failure
instead of reaching the unconditional return 0. Preserve the successful 200
path, and ensure the function’s final status reflects whether the canonical
server URL was actually set.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0c37bda2-3c11-44ba-9253-bb421bff36c1
📒 Files selected for processing (3)
docs/PAYRAM_HEADLESS_AGENT.mdscripts/deploy-scw-eth.jssetup_payram_agents.sh
…eploy From the CodeRabbit review on release PR #83: - ensure_config returned 0 even when POST /system/site-url failed, so the ensure-config command reported success while payment-link creation stayed broken. Non-200 now returns 1; the full agent flow tolerates it with a warning so wallet/gas setup still proceeds. - deploy-scw-eth.js validated address+abi but not factoryData.id, which forms the registration URL — a malformed backend response could burn deploy gas then POST to /undefined. The preflight now requires it.
fix: honest ensure_config exit code + factoryId preflight (review follow-up for #83)
Release develop → main.
Contains PR #82 (root-cause fix for payment-link 500s):
ensure_confignow sets the canonicalpayram.server.urlviaPOST /system/site-url(legacy split-key fallback for older cores)deploy-scw-eth.jsvalidatesPAYRAM_PROJECT_IDbefore the deploy tx spends gasnode-statustolerates missing worker status (no more false listener-down on supervisord-less hosts)PAYRAM_HEADLESS_AGENT.mdupdated to matchsetup_payram.shuntouched (0 lines vs main).🤖 Generated with Claude Code
https://claude.ai/code/session_01S2XQq28ZNuUWMWAM2HL6qu