Skip to content

Integration tier: a preflight for the test member, and setup batches that clean up - #66

Merged
jallers merged 1 commit into
masterfrom
claude/tier-hardening
Nov 26, 2026
Merged

jallers merged 1 commit into
masterfrom
claude/tier-hardening

Conversation

@jallers

@jallers jallers commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

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, undefined where a row was expected) and not the cause. One setup batch partly succeeded and left a StoryStatus fixture behind, because the suite recorded what it created only when the whole batch succeeded.

What changes

  • A preflight (test/integration/preflight.ts, vitest's globalSetup for 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 is problemWith(transport) in test/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.ts is split: which instance and where the tier may run is instanceConfig.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

  • The preflight creates and deletes one Story named sdk-integration preflight … per run of the tier.
  • With no instance configured the preflight does nothing and the suites skip themselves, as before.
  • The preflight's refusal path could not be run live here (the available member has the access); it is unit-tested against the server's actual refusal from the failed run.

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.
  • The full integration tier against the API-testing instance, with the preflight and the new helper in every setup: 80 passed, 3 skipped by design; fixtures deleted.

Generated by Claude Code

…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
@jallers
jallers merged commit ad34a96 into master Nov 26, 2026
4 checks passed
@jallers
jallers deleted the claude/tier-hardening branch November 26, 2026 18:15
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.

2 participants