Skip to content

fix(sidecar): keep Custom page base URL when run key drifts (#137) - #141

Open
AndresV22 wants to merge 1 commit into
androoAGI:feat/harness-backendfrom
AndresV22:fix/custom-baseurl-key-drift
Open

AndresV22 wants to merge 1 commit into
androoAGI:feat/harness-backendfrom
AndresV22:fix/custom-baseurl-key-drift

Conversation

@AndresV22

Copy link
Copy Markdown

Fixes #137

An env (or other) key that is not byte-identical to the page key used to
drop the saved Custom endpoint, falsely blocking scheduled/conveyor work.

What changed

providerRuntimeBaseUrl only used the page-saved Custom endpoint when the run key was byte-identical to the page key (pageCopyRidesWith, #89). That correctly keeps key pools from mixing accounts, but for Custom the destination is the configuration: any env-key drift (or other non-page key) with no competing env URL discarded the saved endpoint (baseUrl: ''). Scheduled/conveyor work then hit a false blocked_config: "no CUSTOM base URL is saved on this station…", even though the URL was saved.

This change: for requiresBaseUrl providers, if the page record has both a key and a base URL and the operator did not set an env URL, use that page endpoint even when the run key differs. Key pools stay gated by pageCopyRidesWith. A keyless page URL under an env key stays refused. cronHasCredential now resolves the endpoint for the key it is checking (same seam as /api/run).

Verification

  • npm run test:fast — engine-credential.test.js (113 assertions; includes [Bug]: no CUSTOM base URL is saved on this station for this scheduled routine #137 case: env key ≠ page key, keyed page URL, no env URL → endpoint resolves)
  • Relevant HTTP/E2E or live-app verification completed — Custom conveyor/inbox runs after loading the fixed sidecar, re-pushing credentials into runtime memory, and lifting E-STOP
  • No credentials, local workspaces, QA captures, or generated release artifacts committed

Safety and truthfulness

Endpoint-only relaxation for requiresBaseUrl when a keyed page record exists and no env URL overrides. Does not share backup key pools across mismatched keys. No new network, secrets surface, permissions, or schema changes. none beyond that.

User-reported regression coverage

GitHub #137 (no qa/bugs/ record).
Before: Custom URL saved; scheduled/conveyor jobs blocked with "no CUSTOM base URL is saved…".
After: same saved endpoint is used when the run key drifts and no env URL competes; live conveyor/inbox works on the fixed sidecar.

Understanding the interface

not user-facing — credential resolution inside the sidecar. The existing base-URL missing error still applies when no endpoint is actually available.

…I#137)

An env (or other) key that is not byte-identical to the page key used to
drop the saved Custom endpoint, falsely blocking scheduled/conveyor work.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: no CUSTOM base URL is saved on this station for this scheduled routine

1 participant