chore: promote dev → main (JIRA baseUrl discovery + createPR timeout removal)#1186
Merged
zbigniewsobiecki merged 3 commits intomainfrom Apr 24, 2026
Merged
chore: promote dev → main (JIRA baseUrl discovery + createPR timeout removal)#1186zbigniewsobiecki merged 3 commits intomainfrom
zbigniewsobiecki merged 3 commits intomainfrom
Conversation
…edentials (#1184) Edit-mode re-verification in the JIRA wizard's Select Project step was returning "Internal server error" because `pm.discovery.discover({ projectId })` resolved credentials only from `project_credentials` — where JIRA's `baseUrl` does not live. The JIRA `createDiscoveryProvider` factory built `new Version3Client({ host: '' })` and the underlying jira.js client threw "Couldn't parse the host URL." Regression from spec 010/2, which replaced per-provider discovery procedures with the generic `pm.discovery.discover`. The legacy `jiraProjectsByProject` read `baseUrl` off integration config directly. Fix: add an optional `configToCredentials(config): Record<string, string>` hook to `PMProviderManifest`. The resolver invokes it on the `projectId` path to seed the credentials bag with non-secret connection fields promoted from `project_integrations.config`. `project_credentials` values override on key collisions — DB-scoped secrets always win over config-derived defaults. JIRA declares the hook to promote `baseUrl` → `base_url`. The hook is generic (no JIRA `if` in shared infra), defensive (bad hook returns or throws are caught and logged, discovery stays up), and preserves the spec-009 "new provider touches zero shared files" invariant. Also: refactored `resolvePMCredentials` to stay under the biome cognitive- complexity threshold by extracting `promoteConfigCredentials` + `loadIntegrationAndManifest` helpers. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… hooks survive (#1185) Three stacked wall-clocks were killing `cascade-tools scm create-pr` whenever a project's pre-push hook ran a real test suite: 1. `git commit` runCommand — wallTimeoutMs 120s, idleTimeoutMs 60s 2. `git push` runCommand — wallTimeoutMs 230s, idleTimeoutMs 90s 3. CreatePR gadget — outer timeoutMs 240s A 5-minute pre-push test suite is a legitimate use case. The agent harness that wraps this gadget already budgets long tool calls; the second shorter cap here was just re-creating the "PUSH FAILED at 2 min" failure mode of spec 013. Fix: pass `wallTimeoutMs: 0, idleTimeoutMs: 0` to both runCommand calls (runCommand treats 0 as "disabled", per its docstring at utils/repo.ts:75-86 and the enforced branches at :153,164,169). Set the CreatePR gadget's outer `timeoutMs: 0`, which llmist treats as "no outer timer" (see `if (timeoutMs && timeoutMs > 0)` in its dispatch path). Heartbeat stays on (default 30s stderr pulse) so operators still see `[git-push] still running (Ns)` ticks during slow hooks — observability without killing. Test coverage: - Two new `runCommand` tests pin the disabled-idle and disabled-wall paths (tests/unit/utils/repo.test.ts) - Three new regression tests pin that createPR passes 0/0 for both git commands (tests/unit/gadgets/github/core/createPR.test.ts) - The definitions-level assertion was flipped from "240s" to "0" and now documents why 0 is the correct value - Outdated spec-013 contract tests that asserted the old "finite" timeouts were deleted; the captured-output assertions from that block were kept Not touched: runCommand DEFAULT_IDLE_TIMEOUT_MS / DEFAULT_WALL_TIMEOUT_MS, and every other timeout in the inventory (HTTP clients, watchdogs, VerifyChanges, diagnostics tsc/biome, tmux, Sleep). Those guard genuine hang cases and were explicitly out of scope. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ntials refactor (#1187) #1184 extracted `promoteConfigCredentials` + `loadIntegrationAndManifest` helpers but added five guard branches none of the new tests exercised (codecov patch coverage on that PR was 58.33%, below the 80% target). This commit pins each branch directly so the patch is in the green: - UNAUTHORIZED when projectId is set but effectiveOrgId is null - NOT_FOUND when no PM integration is configured for the project - NOT_FOUND when the saved integration belongs to a different provider - configToCredentials returning a non-object (string/null/array) is silently coerced to empty — resolved bag ends up project_credentials-only - configToCredentials throwing is swallowed with a console.warn; discovery still returns project_credentials — a broken hook cannot brick the wizard All five are behavioural contracts the original `resolvePMCredentials` upheld through inline conditionals; the refactor preserved them but moved them into the helpers. These tests make the contract explicit. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes two
devcommits tomain:fix(pm-discovery): promote JIRA baseUrl from config into discovery credentials #1184 —
fix(pm-discovery): promote JIRA baseUrl from config into discovery credentialsCloses the prod incident on
ua-storewhere the JIRA wizard's Select Project step returned "Internal server error" for any saved integration. Adds a genericconfigToCredentialsmanifest hook (non-secret connection fields promoted fromproject_integrations.configinto discovery credentials). JIRA declares it to surfacebaseUrl → base_url. DB-scoped secrets still win on key collisions. Regression pinned at router + manifest layers.chore(createPR): remove subprocess + gadget timeouts so long pre-push hooks survive #1185 —
chore(createPR): remove subprocess + gadget timeouts so long pre-push hooks surviveDrops the three stacked wall-clocks that were killing
cascade-tools scm create-prwhenever a pre-push hook ran a real test suite.git commit+git pushnow usewallTimeoutMs: 0, idleTimeoutMs: 0(disabled), and the CreatePR gadget's outertimeoutMsis0(llmist treats as no outer timer). Heartbeats still emit every 30 s so long hooks remain observable. Regression pinned with tests for both the disabled-timeout paths onrunCommandand the 0/0 contract at the call site.Test plan
ua-store, verify Select Project lists projects without errorcascade-tools scm create-pron a repo with a slow pre-push hook, verify push completes past the old 90 s / 230 s marks🤖 Generated with Claude Code