Repository navigation
Fix the flaky MCP naming suite and drop the unused CI job - #49
Merged
Merged
Conversation
`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>
This was referenced Sep 28, 2026
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.
Three small, independent commits.
Fix the flaky
McpToolNamingTestsSQLite lockwithMcpToolNamingAppboots the full app throughconfigure(app), which registersSkillUsageRetentionLifecycle. That handler'sdidBootAsyncspawns a detached task runningSkillUsageService.pruneimmediately — per-projectDELETEs 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 intermittentdatabase is lockedfailure.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, andSkillRuntimeHardeningTestsboot 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.testingin one place.Drop the unused changed-path detection job
The
cijob never declaredneeds: changesand read none of the job's four outputs, sochangesandscripts/ci-detect-changes.shfed nothing. Path filtering now lives in each Railway service'swatchPatterns. Removed the job, the script, and the stale references inREADME.md,AGENTS.md, anddocs/test-plans/README.md. The workflow still parses to a singlecijob with 3 steps.Document the
sleepApplicationplan noiseChecked the live Gateway config in
dev:deploycarries nosleepApplicationkey at all, even though the applied config declaresfalse. Railway omits the field once app sleep is off, sorailway config planwill reportsleepApplication: null → falsefor Gateway and Web in both environments on every run.railway/README.mdnow calls that out as expected noise rather than a pending change.🤖 Generated with Claude Code