Skip to content

Fix the flaky MCP naming suite and drop the unused CI job - #49

Merged
CountableNewt merged 3 commits into
devfrom
chore/ci-drop-unused-changes-job
Sep 28, 2026
Merged

CountableNewt merged 3 commits into
devfrom
chore/ci-drop-unused-changes-job

Conversation

@CountableNewt

Copy link
Copy Markdown
Collaborator

Three small, independent commits.

Fix the flaky McpToolNamingTests SQLite lock

withMcpToolNamingApp boots the full app through configure(app), which registers SkillUsageRetentionLifecycle. That handler's didBootAsync spawns a detached task running SkillUsageService.prune immediately — per-project DELETEs against the same shared in-memory SQLite database the suite is inserting into. Those deletes take a write lock concurrently with the suite's writes, which is the intermittent database is locked failure.

The two sibling suites that write telemetry already set DISABLE_SKILL_USAGE_RETENTION_SCHEDULER=1 (SkillUsageRouteTests, SkillUsageAnalyticsTests); this one didn't. Now it does.

Verified with 6 consecutive runs of swift test --filter McpToolNamingTests — all 6 tests green each run. The flake was intermittent, so that is corroboration rather than proof, but the racing writer is gone by construction.

Not addressed here: McpOAuthTests, ApiKeyRevocationTests, McpPingRouteTests, SecurityFindingMitigationTests, and SkillRuntimeHardeningTests boot the app the same way without that env var, so they carry the same latent race. Happy to follow up by either adding the var to each or gating the lifecycle off under .testing in one place.

Drop the unused changed-path detection job

The ci job never declared needs: changes and read none of the job's four outputs, so changes and scripts/ci-detect-changes.sh fed nothing. Path filtering now lives in each Railway service's watchPatterns. Removed the job, the script, and the stale references in README.md, AGENTS.md, and docs/test-plans/README.md. The workflow still parses to a single ci job with 3 steps.

Document the sleepApplication plan noise

Checked the live Gateway config in dev: deploy carries no sleepApplication key at all, even though the applied config declares false. Railway omits the field once app sleep is off, so railway config plan will report sleepApplication: null → false for Gateway and Web in both environments on every run. railway/README.md now calls that out as expected noise rather than a pending change.

🤖 Generated with Claude Code

CountableNewt and others added 3 commits September 27, 2026 22:34
`withMcpToolNamingApp` boots the full app, so `SkillUsageRetentionLifecycle`
spawns a detached prune at boot. Its per-project DELETEs take a write lock on
the same shared in-memory SQLite database the suite is inserting into, which
intermittently failed the suite with "database is locked".

Disable the scheduler the way SkillUsageRouteTests and SkillUsageAnalyticsTests
already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The `ci` job never declared `needs: changes` and read none of the four outputs,
so the job and `scripts/ci-detect-changes.sh` fed nothing. Path filtering now
lives in each Railway service's `watchPatterns`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Railway omits `sleepApplication` from a service's deploy config once app sleep
is off, so `railway config plan` reports `null -> false` for Gateway and Web in
both environments on every run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CountableNewt
CountableNewt merged commit 78eab8b into dev Sep 28, 2026
1 check passed
@CountableNewt
CountableNewt deleted the chore/ci-drop-unused-changes-job branch September 28, 2026 03:46
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.

1 participant