Repository navigation
Integration tier: a preflight for the test member, and setup batches that clean up - #66
Merged
Merged
Conversation
…that clean up after a partial failure A member with an admin role and no project membership made the tier fail in every suite with errors about fixtures and empty reads, and one setup batch that partly succeeded left a fixture behind. The preflight checks once that the member can see the system project and create and delete a Story there, and stops with one message saying what it needs. sendFixtures removes what a partly failed setup batch created before it throws. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
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.
Test-only. Nothing in the published package changes.
Why
The scheduled integration workflow's first run was made by a member with an admin role and no project membership. It failed in every suite with errors that named symptoms (fixtures refused with
Invalid Story.Scope, reads answering no rows,undefinedwhere a row was expected) and not the cause. One setup batch partly succeeded and left aStoryStatusfixture behind, because the suite recorded what it created only when the whole batch succeeded.What changes
test/integration/preflight.ts, vitest'sglobalSetupfor the integration tier). Before any suite it checks that the configured member can see the system project (Scope:0) and create and delete a Story there. If not, the tier stops with one message: who the member is, what it could not do, the server's own words, and what it needs (membership in the system project with a role that can create and delete work items). The check itself isproblemWith(transport)intest/integration/memberCheck.ts, apart from the instance configuration so it can be unit-tested.sendFixtures(transport, commands)(test/integration/instance.ts): creates a suite's fixtures in one batch, and when the batch partly fails removes whatever it created before throwing. Every multi-command setup batch uses it (schema, batch, guard, resolve, search).instance.tsis split: which instance and where the tier may run isinstanceConfig.ts, free of the test runner, so the preflight can import it.AGENTS.md: what the member the tier runs as must have, and the two helpers.Things a reviewer should know
sdk-integration preflight …per run of the tier.Verification
npm run verify: 261 unit tests in 34 files, all passing, including three for the member check (can do everything; cannot see the project or cannot create; can create and not delete). Also run with no instance variables in the environment: same result.Generated by Claude Code